Commit ef52277ed4d5a1e6c13f1d77d5609c62b257db52
1 parent
d55d921a3b
Exists in
master
開発 #2045 : node の設置の変更
Showing 4 changed files with 26 additions and 22 deletions Side-by-side Diff
sources/RoboforkApp/DesignerCanvas.cs
| ... | ... | @@ -79,6 +79,7 @@ |
| 79 | 79 | List<NewNodeInfo> NewNodeInfo_List = new List<NewNodeInfo>(); |
| 80 | 80 | List<TextBlock> NodeNo = new List<TextBlock>(); |
| 81 | 81 | List<ucNode> ucNode_Lst = new List<ucNode>(); |
| 82 | + List<ucNode> ucScheduleNode_Lst = new List<ucNode>(); | |
| 82 | 83 | int stt = 1; |
| 83 | 84 | //2017/03/04 NAM ADD END |
| 84 | 85 | |
| ... | ... | @@ -2413,6 +2414,8 @@ |
| 2413 | 2414 | |
| 2414 | 2415 | DeleteNode(i); |
| 2415 | 2416 | |
| 2417 | + SetScheduleRoute(); | |
| 2418 | + | |
| 2416 | 2419 | return; |
| 2417 | 2420 | } |
| 2418 | 2421 | else |
| ... | ... | @@ -2464,6 +2467,8 @@ |
| 2464 | 2467 | FreeNode.X = XXX; |
| 2465 | 2468 | FreeNode.Y = YYY; |
| 2466 | 2469 | AddNode(FreeNode, gGrpBlueNode); |
| 2470 | + | |
| 2471 | + SetScheduleRoute(); | |
| 2467 | 2472 | |
| 2468 | 2473 | //ve line |
| 2469 | 2474 | if (stt > 1) |
| 2470 | 2475 | |
| 2471 | 2476 | |
| ... | ... | @@ -2499,12 +2504,26 @@ |
| 2499 | 2504 | Point node_1; |
| 2500 | 2505 | Point node_2; |
| 2501 | 2506 | Point node_Schedule = new Point(); |
| 2507 | + double x_1 = 50; | |
| 2508 | + double y_1 = 80; | |
| 2509 | + double Totaldistance = 1270; | |
| 2502 | 2510 | |
| 2503 | 2511 | |
| 2512 | + if (ucScheduleNode_Lst.Count > 0) | |
| 2513 | + { | |
| 2514 | + for (int i = 0; i < ucScheduleNode_Lst.Count; i++) | |
| 2515 | + { | |
| 2516 | + ucNode _ucNode = new ucNode(); | |
| 2517 | + _ucNode = ucScheduleNode_Lst[i]; | |
| 2518 | + scheduleCanvas.Children.Remove(_ucNode); | |
| 2519 | + | |
| 2520 | + } | |
| 2521 | + ucScheduleNode_Lst.Clear(); | |
| 2522 | + } | |
| 2523 | + | |
| 2504 | 2524 | gGrpScheduleNode.Children.Clear(); |
| 2505 | 2525 | gGrpScheduleLine.Children.Clear(); |
| 2506 | 2526 | |
| 2507 | - double Totaldistance = 1000; | |
| 2508 | 2527 | |
| 2509 | 2528 | List<double> distance = new List<double>(); |
| 2510 | 2529 | double addDistance; |
| 2511 | 2530 | |
| ... | ... | @@ -2557,15 +2576,15 @@ |
| 2557 | 2576 | } |
| 2558 | 2577 | } |
| 2559 | 2578 | |
| 2560 | - node_Schedule.X = 50; | |
| 2561 | - node_Schedule.Y = 100; | |
| 2579 | + node_Schedule.X = x_1; | |
| 2580 | + node_Schedule.Y = y_1; | |
| 2562 | 2581 | AddNode(node_Schedule, gGrpScheduleNode); |
| 2563 | 2582 | |
| 2564 | 2583 | addDistance = 0; |
| 2565 | 2584 | for (int i = 0; i < distance.Count; i++) |
| 2566 | 2585 | { |
| 2567 | 2586 | |
| 2568 | - node_Schedule.Y = 100; | |
| 2587 | + node_Schedule.Y = y_1; | |
| 2569 | 2588 | addDistance = addDistance + distance[i]; |
| 2570 | 2589 | node_Schedule.X = addDistance; |
| 2571 | 2590 | AddNode(node_Schedule, gGrpScheduleNode); |
| ... | ... | @@ -2609,6 +2628,7 @@ |
| 2609 | 2628 | Canvas.SetLeft(_ucNode, point.X - 25); |
| 2610 | 2629 | Canvas.SetTop(_ucNode, point.Y - 25); |
| 2611 | 2630 | scheduleCanvas.Children.Add(_ucNode); |
| 2631 | + ucScheduleNode_Lst.Add(_ucNode); | |
| 2612 | 2632 | } |
| 2613 | 2633 | |
| 2614 | 2634 | #endregion |
sources/RoboforkApp/RoboforkApp.csproj
| ... | ... | @@ -124,6 +124,7 @@ |
| 124 | 124 | <Compile Include="RoboforkMenu.xaml.cs"> |
| 125 | 125 | <DependentUpon>RoboforkMenu.xaml</DependentUpon> |
| 126 | 126 | </Compile> |
| 127 | + <Compile Include="ScheduleCanvas.cs" /> | |
| 127 | 128 | <Compile Include="UserControls\ucDisplayCoordinate.xaml.cs"> |
| 128 | 129 | <DependentUpon>ucDisplayCoordinate.xaml</DependentUpon> |
| 129 | 130 | </Compile> |
sources/RoboforkApp/RoboforkApp.csproj.user
sources/RoboforkApp/RoboforkMenu.xaml
| ... | ... | @@ -333,25 +333,7 @@ |
| 333 | 333 | </Grid.RowDefinitions> |
| 334 | 334 | <Grid.ColumnDefinitions> |
| 335 | 335 | <ColumnDefinition Width="*"/> |
| 336 | - <ColumnDefinition Width="*"/> | |
| 337 | - <ColumnDefinition Width="*"/> | |
| 338 | - <ColumnDefinition Width="*"/> | |
| 339 | - <ColumnDefinition Width="*"/> | |
| 340 | - <ColumnDefinition Width="*"/> | |
| 341 | - <ColumnDefinition Width="*"/> | |
| 342 | - <ColumnDefinition Width="*"/> | |
| 343 | - <ColumnDefinition Width="*"/> | |
| 344 | - <ColumnDefinition Width="*"/> | |
| 345 | 336 | </Grid.ColumnDefinitions> |
| 346 | - <TextBlock Grid.Row="0" Grid.Column="1" Foreground="SkyBlue">100</TextBlock> | |
| 347 | - <TextBlock Grid.Row="0" Grid.Column="2" Foreground="SkyBlue">200</TextBlock> | |
| 348 | - <TextBlock Grid.Row="0" Grid.Column="3" Foreground="SkyBlue">300</TextBlock> | |
| 349 | - <TextBlock Grid.Row="0" Grid.Column="4" Foreground="SkyBlue">400</TextBlock> | |
| 350 | - <TextBlock Grid.Row="0" Grid.Column="5" Foreground="SkyBlue">500</TextBlock> | |
| 351 | - <TextBlock Grid.Row="0" Grid.Column="6" Foreground="SkyBlue">600</TextBlock> | |
| 352 | - <TextBlock Grid.Row="0" Grid.Column="7" Foreground="SkyBlue">700</TextBlock> | |
| 353 | - <TextBlock Grid.Row="0" Grid.Column="8" Foreground="SkyBlue">800</TextBlock> | |
| 354 | - <TextBlock Grid.Row="0" Grid.Column="9" Foreground="SkyBlue">900</TextBlock> | |
| 355 | 337 | |
| 356 | 338 | <TextBlock Grid.Row="1" Grid.Column="0" Foreground="SkyBlue">100</TextBlock> |
| 357 | 339 | <!--<TextBlock Grid.Row="2" Grid.Column="0" Foreground="SkyBlue">200</TextBlock>--> |