Commit ec7e1c69981e8cd83d3f3d25df3e52fda2694041
1 parent
2105531904
Exists in
master
2063 : Commit source
Showing 5 changed files with 134 additions and 24 deletions Inline Diff
sources/RoboforkApp/RoboforkMenu.xaml
| 1 | <Window x:Class="RoboforkApp.RoboforkMenu" | 1 | <Window x:Class="RoboforkApp.RoboforkMenu" |
| 2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | 2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | xmlns:s="clr-namespace:RoboforkApp" | 4 | xmlns:s="clr-namespace:RoboforkApp" |
| 5 | Title="Robofork App" | 5 | Title="Robofork App" |
| 6 | ResizeMode="NoResize" | 6 | ResizeMode="NoResize" |
| 7 | WindowStartupLocation="CenterScreen" | 7 | WindowStartupLocation="CenterScreen" |
| 8 | Height="1000" Width="1300"> | 8 | Height="1000" Width="1300"> |
| 9 | <Grid ShowGridLines="False" Margin="20,20,20,20"> | 9 | <Grid ShowGridLines="False" Margin="20,20,20,20"> |
| 10 | 10 | ||
| 11 | <Grid.RowDefinitions> | 11 | <Grid.RowDefinitions> |
| 12 | <RowDefinition Height="0.8*"/> | 12 | <RowDefinition Height="0.8*"/> |
| 13 | <RowDefinition Height="10*"/> | 13 | <RowDefinition Height="10*"/> |
| 14 | </Grid.RowDefinitions> | 14 | </Grid.RowDefinitions> |
| 15 | <Border Grid.Row="0" BorderThickness="1" BorderBrush="Gray" Margin="0,0,0,5"> | 15 | <Border Grid.Row="0" BorderThickness="1" BorderBrush="Gray" Margin="0,0,0,5"> |
| 16 | <Grid ShowGridLines="False"> | 16 | <Grid ShowGridLines="False"> |
| 17 | <Grid.RowDefinitions> | 17 | <Grid.RowDefinitions> |
| 18 | <RowDefinition Height="*"/> | 18 | <RowDefinition Height="*"/> |
| 19 | <RowDefinition Height="*"/> | 19 | <RowDefinition Height="*"/> |
| 20 | </Grid.RowDefinitions> | 20 | </Grid.RowDefinitions> |
| 21 | <Label Grid.Row="0" Content="Autonomous Planning Tool" Margin="10,0,0,0" | 21 | <Label Grid.Row="0" Content="Autonomous Planning Tool" Margin="10,0,0,0" |
| 22 | FontSize="16"/> | 22 | FontSize="16"/> |
| 23 | </Grid> | 23 | </Grid> |
| 24 | </Border> | 24 | </Border> |
| 25 | 25 | ||
| 26 | <Grid ShowGridLines="False" Grid.Row="1"> | 26 | <Grid ShowGridLines="False" Grid.Row="1"> |
| 27 | 27 | ||
| 28 | <Grid.ColumnDefinitions> | 28 | <Grid.ColumnDefinitions> |
| 29 | <ColumnDefinition Width="1.2*"/> | 29 | <ColumnDefinition Width="1.2*"/> |
| 30 | <ColumnDefinition Width="20"/> | 30 | <ColumnDefinition Width="20"/> |
| 31 | <ColumnDefinition Width="3*"/> | 31 | <ColumnDefinition Width="3*"/> |
| 32 | </Grid.ColumnDefinitions> | 32 | </Grid.ColumnDefinitions> |
| 33 | 33 | ||
| 34 | <Grid ShowGridLines="False" Grid.Column="0"> | 34 | <Grid ShowGridLines="False" Grid.Column="0"> |
| 35 | <Grid.RowDefinitions> | 35 | <Grid.RowDefinitions> |
| 36 | <RowDefinition Height="3*"/> | 36 | <RowDefinition Height="3*"/> |
| 37 | <RowDefinition Height="1*"/> | 37 | <RowDefinition Height="1*"/> |
| 38 | </Grid.RowDefinitions> | 38 | </Grid.RowDefinitions> |
| 39 | <Border Grid.Row="0" BorderThickness="1" BorderBrush="White" Margin="0,0,0,5"> | 39 | <Border Grid.Row="0" BorderThickness="1" BorderBrush="White" Margin="0,0,0,5"> |
| 40 | <TreeView > | 40 | <TreeView > |
| 41 | <TreeViewItem IsExpanded="True" Header="Project [AAA工場]" FontSize="17" > | 41 | <TreeViewItem IsExpanded="True" Header="Project [AAA工場]" FontSize="17" > |
| 42 | <TreeViewItem IsExpanded="True" Header="MAP" FontSize="17"> | 42 | <TreeViewItem IsExpanded="True" Header="MAP" FontSize="17"> |
| 43 | <TreeViewItem Header="Setup Restriction" FontSize="17" Name="SetupRestriction" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="SetupRestriction"> | 43 | <TreeViewItem Header="Setup Restriction" FontSize="17" Name="SetupRestriction" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="SetupRestriction"> |
| 44 | <!--<TreeViewItem Header="Set Start" FontSize="17" Name="btnSetStart" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="SetStart"></TreeViewItem> | 44 | <!--<TreeViewItem Header="Set Start" FontSize="17" Name="btnSetStart" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="SetStart"></TreeViewItem> |
| 45 | <TreeViewItem Header="Set Goal" FontSize="17" Name="btnSetGoal" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="SetGoal"></TreeViewItem> | 45 | <TreeViewItem Header="Set Goal" FontSize="17" Name="btnSetGoal" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="SetGoal"></TreeViewItem> |
| 46 | <TreeViewItem Header="Set Route" FontSize="17" Name="btnSetRoute" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="SetupRoute"></TreeViewItem> | 46 | <TreeViewItem Header="Set Route" FontSize="17" Name="btnSetRoute" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="SetupRoute"></TreeViewItem> |
| 47 | <TreeViewItem Header="Make Root" FontSize="17" Name="btnMakeRoot" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="MakeRoot"></TreeViewItem> | 47 | <TreeViewItem Header="Make Root" FontSize="17" Name="btnMakeRoot" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="MakeRoot"></TreeViewItem> |
| 48 | <TreeViewItem Header="Delete Route" FontSize="17" Name="btnDeleteRoute" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="DeleteRoute"></TreeViewItem>--> | 48 | <TreeViewItem Header="Delete Route" FontSize="17" Name="btnDeleteRoute" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="DeleteRoute"></TreeViewItem>--> |
| 49 | </TreeViewItem> | 49 | </TreeViewItem> |
| 50 | <TreeViewItem IsExpanded="True" Header="Node" FontSize="17" Name="NodeTree" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="NodeTree"> | 50 | <TreeViewItem IsExpanded="True" Header="Node" FontSize="17" Name="NodeTree" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="NodeTree"> |
| 51 | </TreeViewItem> | 51 | </TreeViewItem> |
| 52 | <TreeViewItem Header="--------------------" FontSize="17"> | 52 | <TreeViewItem Header="--------------------" FontSize="17"> |
| 53 | </TreeViewItem> | 53 | </TreeViewItem> |
| 54 | </TreeViewItem> | 54 | </TreeViewItem> |
| 55 | 55 | ||
| 56 | <TreeViewItem Header="Vehicle" FontSize="17"> | 56 | <TreeViewItem Header="Vehicle" FontSize="17"> |
| 57 | <TreeViewItem Header="FK15_#1" | 57 | <TreeViewItem Header="FK15_#1" |
| 58 | FontSize="17" | 58 | FontSize="17" |
| 59 | Name="FK15Tree" | 59 | Name="FK15Tree" |
| 60 | Selected="GetFK15Tree" | 60 | Selected="GetFK15Tree" |
| 61 | Unselected="SetFK15Tree"> | 61 | Unselected="SetFK15Tree"> |
| 62 | </TreeViewItem> | 62 | </TreeViewItem> |
| 63 | <TreeViewItem Header="[+]" | 63 | <TreeViewItem Header="[+]" |
| 64 | FontSize="17" | 64 | FontSize="17" |
| 65 | Name="VehicleAddTree" | 65 | Name="VehicleAddTree" |
| 66 | Selected="GetVehicleAddTree" | 66 | Selected="GetVehicleAddTree" |
| 67 | Unselected="SetVehicleAddTree"> | 67 | Unselected="btnMenu_UnselectedSet" Tag="VehicleAddTree"> |
| 68 | </TreeViewItem> | 68 | </TreeViewItem> |
| 69 | <TreeViewItem Header="--------------------"> | 69 | <TreeViewItem Header="--------------------"> |
| 70 | </TreeViewItem> | 70 | </TreeViewItem> |
| 71 | </TreeViewItem> | 71 | </TreeViewItem> |
| 72 | 72 | ||
| 73 | <TreeViewItem Header="Work" | 73 | <TreeViewItem Header="Work" FontSize="17"> |
| 74 | FontSize="17"> | 74 | <TreeViewItem Header="Task patterm [FK15_#1]" FontSize="17" |
| 75 | <TreeViewItem Header="Task patterm [FK15_#1]" | ||
| 76 | FontSize="17" | ||
| 77 | Name="TaskpattermTree" | 75 | Name="TaskpattermTree" |
| 78 | Selected="GetTaskpattermTree" | 76 | Selected="btnMenu_Selected" |
| 79 | Unselected="SetTaskpattermTree"> | 77 | Unselected="btnMenu_UnselectedSet" Tag="TaskpattermTree"> |
| 80 | </TreeViewItem> | 78 | </TreeViewItem> |
| 81 | <TreeViewItem Header="[+]" | 79 | <TreeViewItem Header="[+]" |
| 82 | FontSize="17" | 80 | FontSize="17" |
| 83 | Name="WorkAddTree" | 81 | Name="WorkAddTree" |
| 84 | Selected="GetWorkAddTree" | 82 | Selected="GetWorkAddTree" |
| 85 | Unselected="SetWorkAddTree"> | 83 | Unselected="SetWorkAddTree"> |
| 86 | </TreeViewItem> | 84 | </TreeViewItem> |
| 87 | <TreeViewItem Header="--------------------" | 85 | <TreeViewItem Header="--------------------" |
| 88 | FontSize="17"> | 86 | FontSize="17"> |
| 89 | </TreeViewItem> | 87 | </TreeViewItem> |
| 90 | </TreeViewItem> | 88 | </TreeViewItem> |
| 91 | 89 | ||
| 92 | <TreeViewItem Header="Setting" | 90 | <TreeViewItem Header="Setting" |
| 93 | FontSize="17"> | 91 | FontSize="17"> |
| 94 | <TreeViewItem Header="Connect [Wi-Fi]" | 92 | <TreeViewItem Header="Connect [Wi-Fi]" |
| 95 | FontSize="17" | 93 | FontSize="17" |
| 96 | Name="ConnectTree" | 94 | Name="ConnectTree" |
| 97 | Selected="GetConnectTree" | 95 | Selected="GetConnectTree" |
| 98 | Unselected="SetConnectTree"> | 96 | Unselected="SetConnectTree"> |
| 99 | </TreeViewItem> | 97 | </TreeViewItem> |
| 100 | <TreeViewItem Header="Parameter" | 98 | <TreeViewItem Header="Parameter" |
| 101 | FontSize="17" | 99 | FontSize="17" |
| 102 | Name="ParameterTree" | 100 | Name="ParameterTree" |
| 103 | Selected="GetParameterTree" | 101 | Selected="GetParameterTree" |
| 104 | Unselected="SetParameterTree"> | 102 | Unselected="SetParameterTree"> |
| 105 | </TreeViewItem> | 103 | </TreeViewItem> |
| 106 | <TreeViewItem Header="--------------------" | 104 | <TreeViewItem Header="--------------------" |
| 107 | FontSize="17"> | 105 | FontSize="17"> |
| 108 | </TreeViewItem> | 106 | </TreeViewItem> |
| 109 | </TreeViewItem> | 107 | </TreeViewItem> |
| 110 | <!--<TreeViewItem Header="Schedule" FontSize="17" Name="ScheduleTree" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="ScheduleRoute"></TreeViewItem>--> | 108 | <!--<TreeViewItem Header="Schedule" FontSize="17" Name="ScheduleTree" Selected="btnMenu_Selected" Unselected="btnMenu_UnselectedSet" Tag="ScheduleRoute"></TreeViewItem>--> |
| 111 | <TreeViewItem Header="Logging" | 109 | <TreeViewItem Header="Logging" |
| 112 | FontSize="17" | 110 | FontSize="17" |
| 113 | Name="LoggingTree" | 111 | Name="LoggingTree" |
| 114 | Selected="GetLoggingTree" | 112 | Selected="GetLoggingTree" |
| 115 | Unselected="SetLoggingTree"> | 113 | Unselected="SetLoggingTree"> |
| 116 | </TreeViewItem> | 114 | </TreeViewItem> |
| 117 | <TreeViewItem Header=" --------------------"> | 115 | <TreeViewItem Header=" --------------------"> |
| 118 | </TreeViewItem> | 116 | </TreeViewItem> |
| 119 | </TreeViewItem> | 117 | </TreeViewItem> |
| 120 | <TreeViewItem Header="Alert" | 118 | <TreeViewItem Header="Alert" |
| 121 | FontSize="17" | 119 | FontSize="17" |
| 122 | Name="AlertTree" | 120 | Name="AlertTree" |
| 123 | Selected="GetAlertTree" | 121 | Selected="GetAlertTree" |
| 124 | Unselected="SetAlertTree"> | 122 | Unselected="SetAlertTree"> |
| 125 | </TreeViewItem> | 123 | </TreeViewItem> |
| 126 | <TreeViewItem Header="Help" | 124 | <TreeViewItem Header="Help" |
| 127 | FontSize="17" | 125 | FontSize="17" |
| 128 | Name="HelpTree" | 126 | Name="HelpTree" |
| 129 | Selected="GetHelpTree" | 127 | Selected="GetHelpTree" |
| 130 | Unselected="SetHelpTree"> | 128 | Unselected="SetHelpTree"> |
| 131 | </TreeViewItem> | 129 | </TreeViewItem> |
| 132 | <TreeViewItem Header="[+New Project]" | 130 | <TreeViewItem Header="[+New Project]" |
| 133 | FontSize="17" | 131 | FontSize="17" |
| 134 | Name="NewProjectTree" | 132 | Name="NewProjectTree" |
| 135 | Selected="GetNewProjectTree" | 133 | Selected="GetNewProjectTree" |
| 136 | Unselected="SetNewProjectTree"> | 134 | Unselected="SetNewProjectTree"> |
| 137 | </TreeViewItem> | 135 | </TreeViewItem> |
| 138 | </TreeView> | 136 | </TreeView> |
| 139 | </Border> | 137 | </Border> |
| 140 | <Border Grid.Row="1" BorderThickness="1" BorderBrush="Gray" Margin="0,5,0,0"> | 138 | <Border Grid.Row="1" BorderThickness="1" BorderBrush="Gray" Margin="0,5,0,0"> |
| 141 | 139 | ||
| 142 | <Grid ShowGridLines="False"> | 140 | <Grid ShowGridLines="False"> |
| 143 | <Grid.RowDefinitions> | 141 | <Grid.RowDefinitions> |
| 144 | <RowDefinition Height="1*"/> | 142 | <RowDefinition Height="1*"/> |
| 145 | <RowDefinition Height="5*"/> | 143 | <RowDefinition Height="5*"/> |
| 146 | </Grid.RowDefinitions> | 144 | </Grid.RowDefinitions> |
| 147 | <Label Grid.Row="0" Content="Viewer" Margin="10,0,0,0" | 145 | <Label Grid.Row="0" Content="Viewer" Margin="10,0,0,0" |
| 148 | FontSize="17"/> | 146 | FontSize="17"/> |
| 149 | </Grid> | 147 | </Grid> |
| 150 | </Border> | 148 | </Border> |
| 151 | </Grid> | 149 | </Grid> |
| 152 | <TabControl x:Name="MainTab" | 150 | <TabControl x:Name="MainTab" |
| 153 | Margin="0,0,0,0" | 151 | Margin="0,0,0,0" |
| 154 | Grid.Column="2" > | 152 | Grid.Column="2" > |
| 155 | <TabItem x:Name="TabMap" > | 153 | <TabItem x:Name="TabMap" > |
| 156 | <TabItem.Header> | 154 | <TabItem.Header> |
| 157 | <StackPanel Orientation="Horizontal"> | 155 | <StackPanel Orientation="Horizontal"> |
| 158 | <TextBlock Text="MAP " VerticalAlignment="Center" FontSize="17"></TextBlock> | 156 | <TextBlock Text="MAP " VerticalAlignment="Center" FontSize="17"></TextBlock> |
| 159 | </StackPanel> | 157 | </StackPanel> |
| 160 | </TabItem.Header> | 158 | </TabItem.Header> |
| 161 | <Grid ShowGridLines="False"> | 159 | <Grid ShowGridLines="False"> |
| 162 | <Grid.RowDefinitions> | 160 | <Grid.RowDefinitions> |
| 163 | <RowDefinition Height="5*"/> | 161 | <RowDefinition Height="5*"/> |
| 164 | <RowDefinition Height="1*"/> | 162 | <RowDefinition Height="1*"/> |
| 165 | <RowDefinition Height="1*"/> | 163 | <RowDefinition Height="1*"/> |
| 166 | </Grid.RowDefinitions> | 164 | </Grid.RowDefinitions> |
| 167 | 165 | ||
| 168 | <Grid ShowGridLines="False" Grid.Row="0" Name="GridMap"> | 166 | <Grid ShowGridLines="False" Grid.Row="0" Name="GridMap"> |
| 169 | 167 | ||
| 170 | <Grid > | 168 | <Grid > |
| 171 | <Grid.ColumnDefinitions> | 169 | <Grid.ColumnDefinitions> |
| 172 | <ColumnDefinition Width="{Binding ActualHeight, ElementName=GridMap}"/> | 170 | <ColumnDefinition Width="{Binding ActualHeight, ElementName=GridMap}"/> |
| 173 | <ColumnDefinition Width="*"/> | 171 | <ColumnDefinition Width="*"/> |
| 174 | </Grid.ColumnDefinitions> | 172 | </Grid.ColumnDefinitions> |
| 175 | <Border Grid.Column="0" BorderThickness="1" BorderBrush="Red" Margin="5,5,5,5"> | 173 | <Border Grid.Column="0" BorderThickness="1" BorderBrush="Red" Margin="5,5,5,5"> |
| 176 | 174 | ||
| 177 | <Grid> | 175 | <Grid> |
| 178 | <!--<Image x:Name="Image_Map" Source="E:\02_Project\Du an Anh Dai\Robofork2\sources\RoboforkApp\Images/map.png" Stretch="Fill" />--> | 176 | <!--<Image x:Name="Image_Map" Source="E:\02_Project\Du an Anh Dai\Robofork2\sources\RoboforkApp\Images/map.png" Stretch="Fill" />--> |
| 179 | 177 | ||
| 180 | <s:DesignerCanvas x:Name="MyDesignerCanvas" | 178 | <s:DesignerCanvas x:Name="MyDesignerCanvas" |
| 181 | AllowDrop="True" | 179 | AllowDrop="True" |
| 182 | Background="White" HorizontalAlignment="Stretch"> | 180 | Background="White" HorizontalAlignment="Stretch"> |
| 183 | <Canvas.LayoutTransform> | 181 | <Canvas.LayoutTransform> |
| 184 | <!--Adjust ScaleX and ScaleY in lock-step to zoom--> | 182 | <!--Adjust ScaleX and ScaleY in lock-step to zoom--> |
| 185 | <ScaleTransform ScaleX=".57" ScaleY=".57" CenterX=".57" CenterY=".57" /> | 183 | <ScaleTransform ScaleX=".57" ScaleY=".57" CenterX=".57" CenterY=".57" /> |
| 186 | </Canvas.LayoutTransform> | 184 | </Canvas.LayoutTransform> |
| 187 | <Grid Name="MCGrid" ShowGridLines="True" | 185 | <Grid Name="MCGrid" ShowGridLines="True" |
| 188 | Width="{Binding ActualWidth, ElementName=MyDesignerCanvas}" | 186 | Width="{Binding ActualWidth, ElementName=MyDesignerCanvas}" |
| 189 | Height="{Binding ActualHeight, ElementName=MyDesignerCanvas}"> | 187 | Height="{Binding ActualHeight, ElementName=MyDesignerCanvas}"> |
| 190 | 188 | ||
| 191 | <Grid.Background> | 189 | <Grid.Background> |
| 192 | <ImageBrush ImageSource="Images/map.png"/> | 190 | <ImageBrush ImageSource="Images/map.png"/> |
| 193 | </Grid.Background> | 191 | </Grid.Background> |
| 194 | 192 | ||
| 195 | <!--<Grid.RowDefinitions> | 193 | <!--<Grid.RowDefinitions> |
| 196 | <RowDefinition Height="1*"/> | 194 | <RowDefinition Height="1*"/> |
| 197 | <RowDefinition Height="1*"/> | 195 | <RowDefinition Height="1*"/> |
| 198 | <RowDefinition Height="1*"/> | 196 | <RowDefinition Height="1*"/> |
| 199 | <RowDefinition Height="1*"/> | 197 | <RowDefinition Height="1*"/> |
| 200 | <RowDefinition Height="1*"/> | 198 | <RowDefinition Height="1*"/> |
| 201 | <RowDefinition Height="1*"/> | 199 | <RowDefinition Height="1*"/> |
| 202 | <RowDefinition Height="1*"/> | 200 | <RowDefinition Height="1*"/> |
| 203 | <RowDefinition Height="1*"/> | 201 | <RowDefinition Height="1*"/> |
| 204 | <RowDefinition Height="1*"/> | 202 | <RowDefinition Height="1*"/> |
| 205 | <RowDefinition Height="1*"/> | 203 | <RowDefinition Height="1*"/> |
| 206 | </Grid.RowDefinitions> | 204 | </Grid.RowDefinitions> |
| 207 | <Grid.ColumnDefinitions> | 205 | <Grid.ColumnDefinitions> |
| 208 | <ColumnDefinition Width="*"/> | 206 | <ColumnDefinition Width="*"/> |
| 209 | <ColumnDefinition Width="*"/> | 207 | <ColumnDefinition Width="*"/> |
| 210 | <ColumnDefinition Width="*"/> | 208 | <ColumnDefinition Width="*"/> |
| 211 | <ColumnDefinition Width="*"/> | 209 | <ColumnDefinition Width="*"/> |
| 212 | <ColumnDefinition Width="*"/> | 210 | <ColumnDefinition Width="*"/> |
| 213 | <ColumnDefinition Width="*"/> | 211 | <ColumnDefinition Width="*"/> |
| 214 | <ColumnDefinition Width="*"/> | 212 | <ColumnDefinition Width="*"/> |
| 215 | <ColumnDefinition Width="*"/> | 213 | <ColumnDefinition Width="*"/> |
| 216 | <ColumnDefinition Width="*"/> | 214 | <ColumnDefinition Width="*"/> |
| 217 | <ColumnDefinition Width="*"/> | 215 | <ColumnDefinition Width="*"/> |
| 218 | </Grid.ColumnDefinitions> | 216 | </Grid.ColumnDefinitions> |
| 219 | <TextBlock Grid.Row="0" Grid.Column="1" Foreground="SkyBlue">100</TextBlock> | 217 | <TextBlock Grid.Row="0" Grid.Column="1" Foreground="SkyBlue">100</TextBlock> |
| 220 | <TextBlock Grid.Row="0" Grid.Column="2" Foreground="SkyBlue">200</TextBlock> | 218 | <TextBlock Grid.Row="0" Grid.Column="2" Foreground="SkyBlue">200</TextBlock> |
| 221 | <TextBlock Grid.Row="0" Grid.Column="3" Foreground="SkyBlue">300</TextBlock> | 219 | <TextBlock Grid.Row="0" Grid.Column="3" Foreground="SkyBlue">300</TextBlock> |
| 222 | <TextBlock Grid.Row="0" Grid.Column="4" Foreground="SkyBlue">400</TextBlock> | 220 | <TextBlock Grid.Row="0" Grid.Column="4" Foreground="SkyBlue">400</TextBlock> |
| 223 | <TextBlock Grid.Row="0" Grid.Column="5" Foreground="SkyBlue">500</TextBlock> | 221 | <TextBlock Grid.Row="0" Grid.Column="5" Foreground="SkyBlue">500</TextBlock> |
| 224 | <TextBlock Grid.Row="0" Grid.Column="6" Foreground="SkyBlue">600</TextBlock> | 222 | <TextBlock Grid.Row="0" Grid.Column="6" Foreground="SkyBlue">600</TextBlock> |
| 225 | <TextBlock Grid.Row="0" Grid.Column="7" Foreground="SkyBlue">700</TextBlock> | 223 | <TextBlock Grid.Row="0" Grid.Column="7" Foreground="SkyBlue">700</TextBlock> |
| 226 | <TextBlock Grid.Row="0" Grid.Column="8" Foreground="SkyBlue">800</TextBlock> | 224 | <TextBlock Grid.Row="0" Grid.Column="8" Foreground="SkyBlue">800</TextBlock> |
| 227 | <TextBlock Grid.Row="0" Grid.Column="9" Foreground="SkyBlue">900</TextBlock> | 225 | <TextBlock Grid.Row="0" Grid.Column="9" Foreground="SkyBlue">900</TextBlock> |
| 228 | 226 | ||
| 229 | <TextBlock Grid.Row="1" Grid.Column="0" Foreground="SkyBlue">100</TextBlock> | 227 | <TextBlock Grid.Row="1" Grid.Column="0" Foreground="SkyBlue">100</TextBlock> |
| 230 | <TextBlock Grid.Row="2" Grid.Column="0" Foreground="SkyBlue">200</TextBlock> | 228 | <TextBlock Grid.Row="2" Grid.Column="0" Foreground="SkyBlue">200</TextBlock> |
| 231 | <TextBlock Grid.Row="3" Grid.Column="0" Foreground="SkyBlue">300</TextBlock> | 229 | <TextBlock Grid.Row="3" Grid.Column="0" Foreground="SkyBlue">300</TextBlock> |
| 232 | <TextBlock Grid.Row="4" Grid.Column="0" Foreground="SkyBlue">400</TextBlock> | 230 | <TextBlock Grid.Row="4" Grid.Column="0" Foreground="SkyBlue">400</TextBlock> |
| 233 | <TextBlock Grid.Row="5" Grid.Column="0" Foreground="SkyBlue">500</TextBlock> | 231 | <TextBlock Grid.Row="5" Grid.Column="0" Foreground="SkyBlue">500</TextBlock> |
| 234 | <TextBlock Grid.Row="6" Grid.Column="0" Foreground="SkyBlue">600</TextBlock> | 232 | <TextBlock Grid.Row="6" Grid.Column="0" Foreground="SkyBlue">600</TextBlock> |
| 235 | <TextBlock Grid.Row="7" Grid.Column="0" Foreground="SkyBlue">700</TextBlock> | 233 | <TextBlock Grid.Row="7" Grid.Column="0" Foreground="SkyBlue">700</TextBlock> |
| 236 | <TextBlock Grid.Row="8" Grid.Column="0" Foreground="SkyBlue">800</TextBlock> | 234 | <TextBlock Grid.Row="8" Grid.Column="0" Foreground="SkyBlue">800</TextBlock> |
| 237 | <TextBlock Grid.Row="9" Grid.Column="0" Foreground="SkyBlue">900</TextBlock>--> | 235 | <TextBlock Grid.Row="9" Grid.Column="0" Foreground="SkyBlue">900</TextBlock>--> |
| 238 | </Grid> | 236 | </Grid> |
| 239 | 237 | ||
| 240 | </s:DesignerCanvas> | 238 | </s:DesignerCanvas> |
| 241 | </Grid> | 239 | </Grid> |
| 242 | 240 | ||
| 243 | </Border> | 241 | </Border> |
| 244 | 242 | ||
| 245 | <Border Grid.Column="1" BorderThickness="1" BorderBrush="Gray" Margin="5,5,5,5"> | 243 | <Border Grid.Column="1" BorderThickness="1" BorderBrush="Gray" Margin="5,5,5,5"> |
| 246 | 244 | ||
| 247 | <DockPanel > | 245 | <DockPanel > |
| 248 | <ScrollViewer> | 246 | <ScrollViewer> |
| 249 | <Grid Name="grdRouteInfo"> | 247 | <Grid Name="grdRouteInfo"> |
| 250 | <Grid.RowDefinitions> | 248 | <Grid.RowDefinitions> |
| 251 | <RowDefinition Height="1*"/> | 249 | <RowDefinition Height="1*"/> |
| 252 | <RowDefinition Height="1*"/> | 250 | <RowDefinition Height="1*"/> |
| 253 | <RowDefinition Height="1*"/> | 251 | <RowDefinition Height="1*"/> |
| 254 | <RowDefinition Height="1*"/> | 252 | <RowDefinition Height="1*"/> |
| 255 | <RowDefinition Height="1*"/> | 253 | <RowDefinition Height="1*"/> |
| 256 | <RowDefinition Height="1*"/> | 254 | <RowDefinition Height="1*"/> |
| 257 | <RowDefinition Height="1*"/> | 255 | <RowDefinition Height="1*"/> |
| 258 | <RowDefinition Height="1*"/> | 256 | <RowDefinition Height="1*"/> |
| 259 | <RowDefinition Height="1*"/> | 257 | <RowDefinition Height="1*"/> |
| 260 | <RowDefinition Height="1*"/> | 258 | <RowDefinition Height="1*"/> |
| 261 | <RowDefinition Height="1*"/> | 259 | <RowDefinition Height="1*"/> |
| 262 | <RowDefinition Height="1*"/> | 260 | <RowDefinition Height="1*"/> |
| 263 | <RowDefinition Height="1*"/> | 261 | <RowDefinition Height="1*"/> |
| 264 | <RowDefinition Height="1*"/> | 262 | <RowDefinition Height="1*"/> |
| 265 | <RowDefinition Height="1*"/> | 263 | <RowDefinition Height="1*"/> |
| 266 | 264 | ||
| 267 | </Grid.RowDefinitions> | 265 | </Grid.RowDefinitions> |
| 268 | <Grid.ColumnDefinitions> | 266 | <Grid.ColumnDefinitions> |
| 269 | <ColumnDefinition Width="1*"/> | 267 | <ColumnDefinition Width="1*"/> |
| 270 | <ColumnDefinition Width="6*"/> | 268 | <ColumnDefinition Width="6*"/> |
| 271 | </Grid.ColumnDefinitions> | 269 | </Grid.ColumnDefinitions> |
| 272 | <Border Grid.Row="0" Grid.Column="0" BorderThickness="1" /> | 270 | <Border Grid.Row="0" Grid.Column="0" BorderThickness="1" /> |
| 273 | <Border Grid.Row="1" Grid.Column="0" BorderThickness="1" /> | 271 | <Border Grid.Row="1" Grid.Column="0" BorderThickness="1" /> |
| 274 | <Border Grid.Row="2" Grid.Column="0" BorderThickness="1" /> | 272 | <Border Grid.Row="2" Grid.Column="0" BorderThickness="1" /> |
| 275 | <Border Grid.Row="3" Grid.Column="0" BorderThickness="1" /> | 273 | <Border Grid.Row="3" Grid.Column="0" BorderThickness="1" /> |
| 276 | <Border Grid.Row="4" Grid.Column="0" BorderThickness="1" /> | 274 | <Border Grid.Row="4" Grid.Column="0" BorderThickness="1" /> |
| 277 | <Border Grid.Row="5" Grid.Column="0" BorderThickness="1" /> | 275 | <Border Grid.Row="5" Grid.Column="0" BorderThickness="1" /> |
| 278 | <Border Grid.Row="6" Grid.Column="0" BorderThickness="1" /> | 276 | <Border Grid.Row="6" Grid.Column="0" BorderThickness="1" /> |
| 279 | <Border Grid.Row="7" Grid.Column="0" BorderThickness="1" /> | 277 | <Border Grid.Row="7" Grid.Column="0" BorderThickness="1" /> |
| 280 | <Border Grid.Row="8" Grid.Column="0" BorderThickness="1" /> | 278 | <Border Grid.Row="8" Grid.Column="0" BorderThickness="1" /> |
| 281 | <Border Grid.Row="9" Grid.Column="0" BorderThickness="1" /> | 279 | <Border Grid.Row="9" Grid.Column="0" BorderThickness="1" /> |
| 282 | <Border Grid.Row="10" Grid.Column="0" BorderThickness="1" /> | 280 | <Border Grid.Row="10" Grid.Column="0" BorderThickness="1" /> |
| 283 | <Border Grid.Row="11" Grid.Column="0" BorderThickness="1" /> | 281 | <Border Grid.Row="11" Grid.Column="0" BorderThickness="1" /> |
| 284 | <Border Grid.Row="12" Grid.Column="0" BorderThickness="1" /> | 282 | <Border Grid.Row="12" Grid.Column="0" BorderThickness="1" /> |
| 285 | <Border Grid.Row="13" Grid.Column="0" BorderThickness="1" /> | 283 | <Border Grid.Row="13" Grid.Column="0" BorderThickness="1" /> |
| 286 | <Border Grid.Row="14" Grid.Column="0" BorderThickness="1" /> | 284 | <Border Grid.Row="14" Grid.Column="0" BorderThickness="1" /> |
| 287 | <Border Grid.Row="15" Grid.Column="0" BorderThickness="1" /> | 285 | <Border Grid.Row="15" Grid.Column="0" BorderThickness="1" /> |
| 288 | 286 | ||
| 289 | 287 | ||
| 290 | 288 | ||
| 291 | <Label Grid.Row="0" Grid.Column="1" Content="Monitor" FontSize="17"/> | 289 | <Label Grid.Row="0" Grid.Column="1" Content="Monitor" FontSize="17"/> |
| 292 | <Label Grid.Row="1" Grid.Column="1" Content="AOR 28249 [kg/h]" FontSize="17"/> | 290 | <Label Grid.Row="1" Grid.Column="1" Content="AOR 28249 [kg/h]" FontSize="17"/> |
| 293 | <Label Grid.Row="2" Grid.Column="1" Content="ABC 4738 [trq]" FontSize="17"/> | 291 | <Label Grid.Row="2" Grid.Column="1" Content="ABC 4738 [trq]" FontSize="17"/> |
| 294 | <Label Grid.Row="3" Grid.Column="1" Content="ATR 49593 [%]" FontSize="17"/> | 292 | <Label Grid.Row="3" Grid.Column="1" Content="ATR 49593 [%]" FontSize="17"/> |
| 295 | <Label Grid.Row="4" Grid.Column="1" Content="DEK 50403 [G]" FontSize="17"/> | 293 | <Label Grid.Row="4" Grid.Column="1" Content="DEK 50403 [G]" FontSize="17"/> |
| 296 | <Label Grid.Row="5" Grid.Column="1" Content="SKG 2739 [kg]" FontSize="17"/> | 294 | <Label Grid.Row="5" Grid.Column="1" Content="SKG 2739 [kg]" FontSize="17"/> |
| 297 | <Label Grid.Row="6" Grid.Column="1" Content="SOC 86 [%]" FontSize="17"/> | 295 | <Label Grid.Row="6" Grid.Column="1" Content="SOC 86 [%]" FontSize="17"/> |
| 298 | <Label Grid.Row="7" Grid.Column="1" Content=" :" FontSize="17"/> | 296 | <Label Grid.Row="7" Grid.Column="1" Content=" :" FontSize="17"/> |
| 299 | <Label Grid.Row="8" Grid.Column="1" Content=" :" FontSize="17"/> | 297 | <Label Grid.Row="8" Grid.Column="1" Content=" :" FontSize="17"/> |
| 300 | <Label Grid.Row="9" Grid.Column="1" Content=" :" FontSize="17"/> | 298 | <Label Grid.Row="9" Grid.Column="1" Content=" :" FontSize="17"/> |
| 301 | <Label Grid.Row="10" Grid.Column="1" Content=" :" FontSize="17"/> | 299 | <Label Grid.Row="10" Grid.Column="1" Content=" :" FontSize="17"/> |
| 302 | <Label Grid.Row="11" Grid.Column="1" Content=" :" FontSize="17"/> | 300 | <Label Grid.Row="11" Grid.Column="1" Content=" :" FontSize="17"/> |
| 303 | </Grid> | 301 | </Grid> |
| 304 | </ScrollViewer> | 302 | </ScrollViewer> |
| 305 | </DockPanel > | 303 | </DockPanel > |
| 306 | </Border> | 304 | </Border> |
| 307 | </Grid> | 305 | </Grid> |
| 308 | 306 | ||
| 309 | </Grid> | 307 | </Grid> |
| 310 | <Border Grid.Row="1" BorderThickness="1" BorderBrush="Gray" Margin="5,5,5,5"> | 308 | <Border Grid.Row="1" BorderThickness="1" BorderBrush="Gray" Margin="5,5,5,5"> |
| 311 | <Grid ShowGridLines="False"> | 309 | <Grid ShowGridLines="False"> |
| 312 | <Grid.ColumnDefinitions> | 310 | <Grid.ColumnDefinitions> |
| 313 | <ColumnDefinition Width="1*"/> | 311 | <ColumnDefinition Width="1*"/> |
| 314 | <ColumnDefinition Width="8*"/> | 312 | <ColumnDefinition Width="8*"/> |
| 315 | </Grid.ColumnDefinitions> | 313 | </Grid.ColumnDefinitions> |
| 316 | <Grid ShowGridLines="False" Grid.Column="0"> | 314 | <Grid ShowGridLines="False" Grid.Column="0"> |
| 317 | <Grid.RowDefinitions> | 315 | <Grid.RowDefinitions> |
| 318 | <RowDefinition Height="1*"/> | 316 | <RowDefinition Height="1*"/> |
| 319 | <RowDefinition Height="1*"/> | 317 | <RowDefinition Height="1*"/> |
| 320 | <RowDefinition Height="1*"/> | 318 | <RowDefinition Height="1*"/> |
| 321 | </Grid.RowDefinitions> | 319 | </Grid.RowDefinitions> |
| 322 | <Label Grid.Row="0" Content="Schedule" Margin="10,0,0,0" FontSize="17"/> | 320 | <Label Grid.Row="0" Content="Schedule" Margin="10,0,0,0" FontSize="17"/> |
| 323 | <Label Grid.Row="1" Content="FK15_#1" Margin="10,0,0,0" FontSize="17"/> | 321 | <Label Grid.Row="1" Content="FK15_#1" Margin="10,0,0,0" FontSize="17"/> |
| 324 | </Grid> | 322 | </Grid> |
| 325 | <Border Grid.Column="1" BorderThickness="1" BorderBrush="Red" Margin="5,5,5,5"> | 323 | <Border Grid.Column="1" BorderThickness="1" BorderBrush="Red" Margin="5,5,5,5"> |
| 326 | 324 | ||
| 327 | <s:ScheduleCanvas x:Name="MyScheduleCanvas" | 325 | <s:ScheduleCanvas x:Name="MyScheduleCanvas" |
| 328 | AllowDrop="True" | 326 | AllowDrop="True" |
| 329 | Background="White" HorizontalAlignment="Stretch"> | 327 | Background="White" HorizontalAlignment="Stretch"> |
| 330 | <Canvas.LayoutTransform> | 328 | <Canvas.LayoutTransform> |
| 331 | <!--Adjust ScaleX and ScaleY in lock-step to zoom--> | 329 | <!--Adjust ScaleX and ScaleY in lock-step to zoom--> |
| 332 | <ScaleTransform ScaleX=".57" ScaleY=".57" CenterX=".57" CenterY=".57" /> | 330 | <ScaleTransform ScaleX=".57" ScaleY=".57" CenterX=".57" CenterY=".57" /> |
| 333 | </Canvas.LayoutTransform> | 331 | </Canvas.LayoutTransform> |
| 334 | 332 | ||
| 335 | <Grid Name="MCGridShedule" Background="White" ShowGridLines="True" | 333 | <Grid Name="MCGridShedule" Background="White" ShowGridLines="True" |
| 336 | Width="{Binding ActualWidth, ElementName=MyScheduleCanvas}" | 334 | Width="{Binding ActualWidth, ElementName=MyScheduleCanvas}" |
| 337 | Height="{Binding ActualHeight, ElementName=MyScheduleCanvas}"> | 335 | Height="{Binding ActualHeight, ElementName=MyScheduleCanvas}"> |
| 338 | 336 | ||
| 339 | <Grid.RowDefinitions> | 337 | <Grid.RowDefinitions> |
| 340 | <RowDefinition Height="1*"/> | 338 | <RowDefinition Height="1*"/> |
| 341 | <RowDefinition Height="1*"/> | 339 | <RowDefinition Height="1*"/> |
| 342 | </Grid.RowDefinitions> | 340 | </Grid.RowDefinitions> |
| 343 | <Grid.ColumnDefinitions> | 341 | <Grid.ColumnDefinitions> |
| 344 | <ColumnDefinition Width="*"/> | 342 | <ColumnDefinition Width="*"/> |
| 345 | </Grid.ColumnDefinitions> | 343 | </Grid.ColumnDefinitions> |
| 346 | 344 | ||
| 347 | <TextBlock Grid.Row="1" Grid.Column="0" Foreground="SkyBlue">100</TextBlock> | 345 | <TextBlock Grid.Row="1" Grid.Column="0" Foreground="SkyBlue">100</TextBlock> |
| 348 | <!--<TextBlock Grid.Row="2" Grid.Column="0" Foreground="SkyBlue">200</TextBlock>--> | 346 | <!--<TextBlock Grid.Row="2" Grid.Column="0" Foreground="SkyBlue">200</TextBlock>--> |
| 349 | </Grid> | 347 | </Grid> |
| 350 | </s:ScheduleCanvas> | 348 | </s:ScheduleCanvas> |
| 351 | 349 | ||
| 352 | </Border> | 350 | </Border> |
| 353 | </Grid> | 351 | </Grid> |
| 354 | </Border> | 352 | </Border> |
| 355 | <Border Grid.Row="2" BorderThickness="1" BorderBrush="Gray" Margin="5,5,5,5"> | 353 | <Border Grid.Row="2" BorderThickness="1" BorderBrush="Gray" Margin="5,5,5,5"> |
| 356 | <Grid ShowGridLines="False"> | 354 | <Grid ShowGridLines="False"> |
| 357 | <Grid.ColumnDefinitions> | 355 | <Grid.ColumnDefinitions> |
| 358 | <ColumnDefinition Width="1*"/> | 356 | <ColumnDefinition Width="1*"/> |
| 359 | <ColumnDefinition Width="8*"/> | 357 | <ColumnDefinition Width="8*"/> |
| 360 | </Grid.ColumnDefinitions> | 358 | </Grid.ColumnDefinitions> |
| 361 | <Grid ShowGridLines="False" Grid.Column="0"> | 359 | <Grid ShowGridLines="False" Grid.Column="0"> |
| 362 | <Grid.RowDefinitions> | 360 | <Grid.RowDefinitions> |
| 363 | <RowDefinition Height="1*"/> | 361 | <RowDefinition Height="1*"/> |
| 364 | <RowDefinition Height="1*"/> | 362 | <RowDefinition Height="1*"/> |
| 365 | <RowDefinition Height="1*"/> | 363 | <RowDefinition Height="1*"/> |
| 366 | </Grid.RowDefinitions> | 364 | </Grid.RowDefinitions> |
| 367 | <Label Grid.Row="0" Content="Schedule" Margin="10,0,0,0" FontSize="17"/> | 365 | <Label Grid.Row="0" Content="Schedule" Margin="10,0,0,0" FontSize="17"/> |
| 368 | <Label Grid.Row="1" Content="FK16_#1" Margin="10,0,0,0" FontSize="17"/> | 366 | <Label Grid.Row="1" Content="FK16_#1" Margin="10,0,0,0" FontSize="17"/> |
| 369 | </Grid> | 367 | </Grid> |
| 370 | <Border Grid.Column="1" BorderThickness="1" BorderBrush="Red" Margin="5,5,5,5"> | 368 | <Border Grid.Column="1" BorderThickness="1" BorderBrush="Red" Margin="5,5,5,5"> |
| 371 | 369 | ||
| 372 | <s:ScheduleCanvas_2 x:Name="MyScheduleCanvas2" | 370 | <s:ScheduleCanvas_2 x:Name="MyScheduleCanvas2" |
| 373 | AllowDrop="True" | 371 | AllowDrop="True" |
| 374 | Background="White" HorizontalAlignment="Stretch"> | 372 | Background="White" HorizontalAlignment="Stretch"> |
| 375 | <Canvas.LayoutTransform> | 373 | <Canvas.LayoutTransform> |
| 376 | <!--Adjust ScaleX and ScaleY in lock-step to zoom--> | 374 | <!--Adjust ScaleX and ScaleY in lock-step to zoom--> |
| 377 | <ScaleTransform ScaleX=".57" ScaleY=".57" CenterX=".57" CenterY=".57" /> | 375 | <ScaleTransform ScaleX=".57" ScaleY=".57" CenterX=".57" CenterY=".57" /> |
| 378 | </Canvas.LayoutTransform> | 376 | </Canvas.LayoutTransform> |
| 379 | 377 | ||
| 380 | <Grid Name="MCGridShedule2" Background="White" ShowGridLines="True" | 378 | <Grid Name="MCGridShedule2" Background="White" ShowGridLines="True" |
| 381 | Width="{Binding ActualWidth, ElementName=MyScheduleCanvas2}" | 379 | Width="{Binding ActualWidth, ElementName=MyScheduleCanvas2}" |
| 382 | Height="{Binding ActualHeight, ElementName=MyScheduleCanvas2}"> | 380 | Height="{Binding ActualHeight, ElementName=MyScheduleCanvas2}"> |
| 383 | 381 | ||
| 384 | <Grid.RowDefinitions> | 382 | <Grid.RowDefinitions> |
| 385 | <RowDefinition Height="1*"/> | 383 | <RowDefinition Height="1*"/> |
| 386 | <RowDefinition Height="1*"/> | 384 | <RowDefinition Height="1*"/> |
| 387 | </Grid.RowDefinitions> | 385 | </Grid.RowDefinitions> |
| 388 | <Grid.ColumnDefinitions> | 386 | <Grid.ColumnDefinitions> |
| 389 | <ColumnDefinition Width="*"/> | 387 | <ColumnDefinition Width="*"/> |
| 390 | </Grid.ColumnDefinitions> | 388 | </Grid.ColumnDefinitions> |
| 391 | 389 | ||
| 392 | <TextBlock Grid.Row="1" Grid.Column="0" Foreground="SkyBlue">100</TextBlock> | 390 | <TextBlock Grid.Row="1" Grid.Column="0" Foreground="SkyBlue">100</TextBlock> |
| 393 | <!--<TextBlock Grid.Row="2" Grid.Column="0" Foreground="SkyBlue">200</TextBlock>--> | 391 | <!--<TextBlock Grid.Row="2" Grid.Column="0" Foreground="SkyBlue">200</TextBlock>--> |
| 394 | </Grid> | 392 | </Grid> |
| 395 | </s:ScheduleCanvas_2> | 393 | </s:ScheduleCanvas_2> |
| 396 | 394 | ||
| 397 | </Border> | 395 | </Border> |
| 398 | </Grid> | 396 | </Grid> |
| 399 | </Border> | 397 | </Border> |
| 400 | </Grid> | 398 | </Grid> |
| 401 | </TabItem> | 399 | </TabItem> |
| 402 | <TabItem x:Name="TabWork" > | 400 | <TabItem x:Name="TabWork" > |
| 403 | <TabItem.Header> | 401 | <TabItem.Header> |
| 404 | <StackPanel Orientation="Horizontal"> | 402 | <StackPanel Orientation="Horizontal"> |
| 405 | <TextBlock Text=" Work " VerticalAlignment="Center" FontSize="17"></TextBlock> | 403 | <TextBlock Text=" Work " VerticalAlignment="Center" FontSize="17"></TextBlock> |
| 406 | </StackPanel> | 404 | </StackPanel> |
| 407 | </TabItem.Header> | 405 | </TabItem.Header> |
| 408 | </TabItem> | 406 | </TabItem> |
| 409 | <TabItem x:Name="TabSchedule" > | 407 | <TabItem x:Name="TabSchedule" > |
| 410 | <TabItem.Header> | 408 | <TabItem.Header> |
| 411 | <StackPanel Orientation="Horizontal"> | 409 | <StackPanel Orientation="Horizontal"> |
| 412 | <TextBlock Text=" Schedule " VerticalAlignment="Center" FontSize="17"></TextBlock> | 410 | <TextBlock Text=" Schedule " VerticalAlignment="Center" FontSize="17"></TextBlock> |
| 413 | </StackPanel> | 411 | </StackPanel> |
| 414 | </TabItem.Header> | 412 | </TabItem.Header> |
| 415 | </TabItem> | 413 | </TabItem> |
| 416 | </TabControl> | 414 | </TabControl> |
| 417 | </Grid> | 415 | </Grid> |
| 418 | </Grid> | 416 | </Grid> |
| 419 | </Window> | 417 | </Window> |
| 420 | 418 |
sources/RoboforkApp/RoboforkMenu.xaml.cs
| 1 | using System; | 1 | using System; |
| 2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
| 3 | using System.Linq; | 3 | using System.Linq; |
| 4 | using System.Text; | 4 | using System.Text; |
| 5 | using System.Threading.Tasks; | 5 | using System.Threading.Tasks; |
| 6 | using System.Windows; | 6 | using System.Windows; |
| 7 | using System.Windows.Controls; | 7 | using System.Windows.Controls; |
| 8 | using System.Windows.Data; | 8 | using System.Windows.Data; |
| 9 | using System.Windows.Documents; | 9 | using System.Windows.Documents; |
| 10 | using System.Windows.Input; | 10 | using System.Windows.Input; |
| 11 | using System.Windows.Media; | 11 | using System.Windows.Media; |
| 12 | using System.Windows.Media.Imaging; | 12 | using System.Windows.Media.Imaging; |
| 13 | using System.Windows.Shapes; | 13 | using System.Windows.Shapes; |
| 14 | 14 | ||
| 15 | namespace RoboforkApp | 15 | namespace RoboforkApp |
| 16 | { | 16 | { |
| 17 | /// <summary> | 17 | /// <summary> |
| 18 | /// Interaction logic for RoboforkMenu.xaml | 18 | /// Interaction logic for RoboforkMenu.xaml |
| 19 | /// </summary> | 19 | /// </summary> |
| 20 | public partial class RoboforkMenu : Window | 20 | public partial class RoboforkMenu : Window |
| 21 | { | 21 | { |
| 22 | public RoboforkMenu() | 22 | public RoboforkMenu() |
| 23 | { | 23 | { |
| 24 | InitializeComponent(); | 24 | InitializeComponent(); |
| 25 | Load_Form(); | 25 | Load_Form(); |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | private void Load_Form() | 28 | private void Load_Form() |
| 29 | { | 29 | { |
| 30 | //PassplanTree.IsEnabled = false; | 30 | //PassplanTree.IsEnabled = false; |
| 31 | //NodeTree.IsEnabled = false; | 31 | //NodeTree.IsEnabled = false; |
| 32 | 32 | ||
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | private void btnMenu_Selected(object sender, RoutedEventArgs e) | 35 | private void btnMenu_Selected(object sender, RoutedEventArgs e) |
| 36 | { | 36 | { |
| 37 | if (((TreeViewItem)sender) == null) | 37 | if (((TreeViewItem)sender) == null) |
| 38 | { | 38 | { |
| 39 | return; | 39 | return; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | string tag = ((TreeViewItem)sender).Tag.ToString(); | 42 | string tag = ((TreeViewItem)sender).Tag.ToString(); |
| 43 | switch (tag) | 43 | switch (tag) |
| 44 | { | 44 | { |
| 45 | //2017/03/04 NAM ADD START1 | 45 | //2017/03/04 NAM ADD START1 |
| 46 | case "NodeTree": | 46 | case "NodeTree": |
| 47 | NewDoBeginSetFreeNotes(); | 47 | NewDoBeginSetFreeNotes(); |
| 48 | break; | 48 | break; |
| 49 | //2017/03/04 NAM ADD END | 49 | //2017/03/04 NAM ADD END |
| 50 | 50 | ||
| 51 | case "SetupRestriction": | 51 | case "SetupRestriction": |
| 52 | DoBeginSetupRestriction(); | 52 | DoBeginSetupRestriction(); |
| 53 | break; | 53 | break; |
| 54 | 54 | ||
| 55 | case "SetStart": | 55 | case "SetStart": |
| 56 | DoBeginSetStart(); | 56 | DoBeginSetStart(); |
| 57 | break; | 57 | break; |
| 58 | 58 | ||
| 59 | case "SetGoal": | 59 | case "SetGoal": |
| 60 | DoBeginSetGoal(); | 60 | DoBeginSetGoal(); |
| 61 | break; | 61 | break; |
| 62 | 62 | ||
| 63 | case "SetupRoute": | 63 | case "SetupRoute": |
| 64 | DoBeginSetupRoute(); | 64 | DoBeginSetupRoute(); |
| 65 | break; | 65 | break; |
| 66 | 66 | ||
| 67 | case "MakeRoot": | 67 | case "MakeRoot": |
| 68 | DoBeginMakeRoot(); | 68 | DoBeginMakeRoot(); |
| 69 | break; | 69 | break; |
| 70 | 70 | ||
| 71 | case "DeleteRoute": | 71 | case "DeleteRoute": |
| 72 | DoBeginDeleteRoute(); | 72 | DoBeginDeleteRoute(); |
| 73 | break; | 73 | break; |
| 74 | 74 | ||
| 75 | case "SetAutoNodes": | 75 | case "SetAutoNodes": |
| 76 | DoBeginSetAutoNotes(); | 76 | DoBeginSetAutoNotes(); |
| 77 | break; | 77 | break; |
| 78 | 78 | ||
| 79 | case "SetFreeNodes": | 79 | case "SetFreeNodes": |
| 80 | DoBeginSetFreeNotes(); | 80 | DoBeginSetFreeNotes(); |
| 81 | break; | 81 | break; |
| 82 | 82 | ||
| 83 | case "ScheduleRoute": | 83 | case "ScheduleRoute": |
| 84 | 84 | ||
| 85 | DoBeginSetSchedule(); | 85 | DoBeginSetSchedule(); |
| 86 | break; | 86 | break; |
| 87 | case "TaskpattermTree": | ||
| 88 | DoBeginTask(); | ||
| 89 | break; | ||
| 87 | default: | 90 | default: |
| 88 | break; | 91 | break; |
| 89 | } | 92 | } |
| 90 | } | 93 | } |
| 91 | 94 | ||
| 92 | 95 | ||
| 93 | 96 | ||
| 94 | private void DoBeginSetSchedule() | 97 | private void DoBeginSetSchedule() |
| 95 | { | 98 | { |
| 96 | 99 | ||
| 97 | MyDesignerCanvas.SetScheduleRoute(); | 100 | MyDesignerCanvas.SetScheduleRoute(); |
| 98 | } | 101 | } |
| 99 | 102 | ||
| 100 | private void NewDoBeginSetFreeNotes() | 103 | private void NewDoBeginSetFreeNotes() |
| 101 | { | 104 | { |
| 102 | MyDesignerCanvas.Init(); | 105 | MyDesignerCanvas.Init(); |
| 103 | MyDesignerCanvas.Operation = DesignerCanvas.OperationState.NewDrawSetFreeNode; | 106 | MyDesignerCanvas.Operation = DesignerCanvas.OperationState.NewDrawSetFreeNode; |
| 104 | MyDesignerCanvas.scheduleCanvas = MyScheduleCanvas; | 107 | MyDesignerCanvas.scheduleCanvas = MyScheduleCanvas; |
| 105 | 108 | ||
| 106 | 109 | ||
| 107 | MyDesignerCanvas.Init(); | 110 | MyDesignerCanvas.Init(); |
| 108 | MyDesignerCanvas.Operation = DesignerCanvas.OperationState.NewDrawSetFreeNode; | 111 | MyDesignerCanvas.Operation = DesignerCanvas.OperationState.NewDrawSetFreeNode; |
| 109 | MyDesignerCanvas.scheduleCanvas_2 = MyScheduleCanvas2; | 112 | MyDesignerCanvas.scheduleCanvas_2 = MyScheduleCanvas2; |
| 110 | } | 113 | } |
| 111 | 114 | ||
| 112 | private void btnMenu_UnselectedSet(object sender, RoutedEventArgs e) | 115 | private void btnMenu_UnselectedSet(object sender, RoutedEventArgs e) |
| 113 | { | 116 | { |
| 114 | if (((TreeViewItem)sender) == null) | 117 | if (((TreeViewItem)sender) == null) |
| 115 | { | 118 | { |
| 116 | return; | 119 | return; |
| 117 | } | 120 | } |
| 118 | 121 | ||
| 119 | string tag = ((TreeViewItem)sender).Tag.ToString(); | 122 | string tag = ((TreeViewItem)sender).Tag.ToString(); |
| 120 | switch (tag) | 123 | switch (tag) |
| 121 | { | 124 | { |
| 122 | case "SetupRestriction": | 125 | case "SetupRestriction": |
| 123 | //DoBeginSetStart(); | 126 | //DoBeginSetStart(); |
| 124 | break; | 127 | break; |
| 125 | 128 | ||
| 126 | case "SetStart": | 129 | case "SetStart": |
| 127 | //DoBeginSetStart(); | 130 | //DoBeginSetStart(); |
| 128 | break; | 131 | break; |
| 129 | 132 | ||
| 130 | case "SetGoal": | 133 | case "SetGoal": |
| 131 | //DoBeginSetGoal(); | 134 | //DoBeginSetGoal(); |
| 132 | break; | 135 | break; |
| 133 | 136 | ||
| 134 | case "DeleteRoute": | 137 | case "DeleteRoute": |
| 135 | //DoBeginDeleteRoute(); | 138 | //DoBeginDeleteRoute(); |
| 136 | break; | 139 | break; |
| 137 | 140 | ||
| 138 | case "SetupRoute": | 141 | case "SetupRoute": |
| 139 | //DoBeginSetupRoute(); | 142 | //DoBeginSetupRoute(); |
| 140 | break; | 143 | break; |
| 141 | 144 | ||
| 142 | case "MakeRoot": | 145 | case "MakeRoot": |
| 143 | //DoBeginMakeRoot(); | 146 | //DoBeginMakeRoot(); |
| 144 | break; | 147 | break; |
| 145 | 148 | ||
| 146 | default: | 149 | default: |
| 147 | break; | 150 | break; |
| 148 | } | 151 | } |
| 152 | } | ||
| 153 | |||
| 154 | private void DoBeginTask() | ||
| 155 | { | ||
| 156 | MyScheduleCanvas.CreateSimulation(); | ||
| 149 | } | 157 | } |
| 150 | 158 | ||
| 151 | private void DoBeginSetAutoNotes() | 159 | private void DoBeginSetAutoNotes() |
| 152 | { | 160 | { |
| 153 | MyDesignerCanvas.SetAutoNodes(); | 161 | MyDesignerCanvas.SetAutoNodes(); |
| 154 | } | 162 | } |
| 155 | 163 | ||
| 156 | private void DoBeginSetFreeNotes() | 164 | private void DoBeginSetFreeNotes() |
| 157 | { | 165 | { |
| 158 | MyDesignerCanvas.Init(); | 166 | MyDesignerCanvas.Init(); |
| 159 | MyDesignerCanvas.Operation = DesignerCanvas.OperationState.DrawSetFreeNode; | 167 | MyDesignerCanvas.Operation = DesignerCanvas.OperationState.DrawSetFreeNode; |
| 160 | } | 168 | } |
| 161 | 169 | ||
| 162 | private void DoBeginSetupRestriction() | 170 | private void DoBeginSetupRestriction() |
| 163 | { | 171 | { |
| 164 | MyDesignerCanvas.Init(); | 172 | MyDesignerCanvas.Init(); |
| 165 | MyDesignerCanvas.Operation = DesignerCanvas.OperationState.DrawObstract; | 173 | MyDesignerCanvas.Operation = DesignerCanvas.OperationState.DrawObstract; |
| 166 | MyDesignerCanvas.mouseState = DesignerCanvas.MouseState.None; | 174 | MyDesignerCanvas.mouseState = DesignerCanvas.MouseState.None; |
| 167 | } | 175 | } |
| 168 | 176 | ||
| 169 | private void DoBeginSetStart() | 177 | private void DoBeginSetStart() |
| 170 | { | 178 | { |
| 171 | MyDesignerCanvas.CreateStartPoint(); | 179 | MyDesignerCanvas.CreateStartPoint(); |
| 172 | } | 180 | } |
| 173 | 181 | ||
| 174 | private void DoBeginSetGoal() | 182 | private void DoBeginSetGoal() |
| 175 | { | 183 | { |
| 176 | MyDesignerCanvas.CreateGoalPoint(); | 184 | MyDesignerCanvas.CreateGoalPoint(); |
| 177 | } | 185 | } |
| 178 | 186 | ||
| 179 | private void DoBeginSetupRoute() | 187 | private void DoBeginSetupRoute() |
| 180 | { | 188 | { |
| 181 | MyDesignerCanvas.Operation = DesignerCanvas.OperationState.DrawRoute; | 189 | MyDesignerCanvas.Operation = DesignerCanvas.OperationState.DrawRoute; |
| 182 | } | 190 | } |
| 183 | 191 | ||
| 184 | private void DoBeginMakeRoot() | 192 | private void DoBeginMakeRoot() |
| 185 | { | 193 | { |
| 186 | MyDesignerCanvas.Children.Remove(MyDesignerCanvas.pRootLine); | 194 | MyDesignerCanvas.Children.Remove(MyDesignerCanvas.pRootLine); |
| 187 | MyDesignerCanvas.MakeRoot(); | 195 | MyDesignerCanvas.MakeRoot(); |
| 188 | } | 196 | } |
| 189 | 197 | ||
| 190 | private void DoBeginDeleteRoute() | 198 | private void DoBeginDeleteRoute() |
| 191 | { | 199 | { |
| 192 | MessageBoxResult result = MessageBox.Show("Do you want delete route?", "Delete route", MessageBoxButton.OKCancel); | 200 | MessageBoxResult result = MessageBox.Show("Do you want delete route?", "Delete route", MessageBoxButton.OKCancel); |
| 193 | if (result == MessageBoxResult.OK) | 201 | if (result == MessageBoxResult.OK) |
| 194 | { | 202 | { |
| 195 | MyDesignerCanvas.ClearRoute(); | 203 | MyDesignerCanvas.ClearRoute(); |
| 196 | } | 204 | } |
| 197 | } | 205 | } |
| 198 | 206 | ||
| 199 | private void GetPassplanTree(object sender, RoutedEventArgs e) | 207 | private void GetPassplanTree(object sender, RoutedEventArgs e) |
| 200 | { | 208 | { |
| 201 | MessageBoxResult result = MessageBox.Show("Selected PassplanTree", "", MessageBoxButton.OKCancel); | 209 | MessageBoxResult result = MessageBox.Show("Selected PassplanTree", "", MessageBoxButton.OKCancel); |
| 202 | } | 210 | } |
| 203 | 211 | ||
| 204 | private void SetPassplanTree(object sender, RoutedEventArgs e) | 212 | private void SetPassplanTree(object sender, RoutedEventArgs e) |
| 205 | { | 213 | { |
| 206 | 214 | ||
| 207 | } | 215 | } |
| 208 | 216 | ||
| 209 | private void GetNodeTree(object sender, RoutedEventArgs e) | 217 | private void GetNodeTree(object sender, RoutedEventArgs e) |
| 210 | { | 218 | { |
| 211 | MessageBoxResult result = MessageBox.Show("Selected NodeTree", "", MessageBoxButton.OKCancel); | 219 | MessageBoxResult result = MessageBox.Show("Selected NodeTree", "", MessageBoxButton.OKCancel); |
| 212 | } | 220 | } |
| 213 | 221 | ||
| 214 | private void SetNodeTree(object sender, RoutedEventArgs e) | 222 | private void SetNodeTree(object sender, RoutedEventArgs e) |
| 215 | { | 223 | { |
| 216 | 224 | ||
| 217 | } | 225 | } |
| 218 | 226 | ||
| 219 | private void GetFK15Tree(object sender, RoutedEventArgs e) | 227 | private void GetFK15Tree(object sender, RoutedEventArgs e) |
| 220 | { | 228 | { |
| 221 | MessageBoxResult result = MessageBox.Show("Selected FK15Tree", "", MessageBoxButton.OKCancel); | 229 | MessageBoxResult result = MessageBox.Show("Selected FK15Tree", "", MessageBoxButton.OKCancel); |
| 222 | } | 230 | } |
| 223 | 231 | ||
| 224 | private void SetFK15Tree(object sender, RoutedEventArgs e) | 232 | private void SetFK15Tree(object sender, RoutedEventArgs e) |
| 225 | { | 233 | { |
| 226 | 234 | ||
| 227 | } | 235 | } |
| 228 | 236 | ||
| 229 | private void GetVehicleAddTree(object sender, RoutedEventArgs e) | 237 | private void GetVehicleAddTree(object sender, RoutedEventArgs e) |
| 230 | { | 238 | { |
| 231 | MessageBoxResult result = MessageBox.Show("Selected VehicleAddTree", "", MessageBoxButton.OKCancel); | 239 | MessageBoxResult result = MessageBox.Show("Selected VehicleAddTree", "", MessageBoxButton.OKCancel); |
| 232 | } | 240 | } |
| 233 | 241 | ||
| 234 | private void SetVehicleAddTree(object sender, RoutedEventArgs e) | 242 | private void SetVehicleAddTree(object sender, RoutedEventArgs e) |
| 235 | { | 243 | { |
| 236 | 244 | ||
| 237 | } | 245 | } |
| 238 | 246 | ||
| 239 | private void GetTaskpattermTree(object sender, RoutedEventArgs e) | 247 | private void GetTaskpattermTree(object sender, RoutedEventArgs e) |
| 240 | { | 248 | { |
| 241 | 249 | ||
| 242 | } | 250 | } |
| 243 | 251 | ||
| 244 | private void SetTaskpattermTree(object sender, RoutedEventArgs e) | 252 | private void SetTaskpattermTree(object sender, RoutedEventArgs e) |
| 245 | { | 253 | { |
| 246 | 254 | ||
| 247 | } | 255 | } |
| 248 | 256 | ||
| 249 | private void GetWorkAddTree(object sender, RoutedEventArgs e) | 257 | private void GetWorkAddTree(object sender, RoutedEventArgs e) |
| 250 | { | 258 | { |
| 251 | 259 | ||
| 252 | } | 260 | } |
| 253 | 261 | ||
| 254 | private void SetWorkAddTree(object sender, RoutedEventArgs e) | 262 | private void SetWorkAddTree(object sender, RoutedEventArgs e) |
| 255 | { | 263 | { |
| 256 | 264 | ||
| 257 | } | 265 | } |
| 258 | 266 | ||
| 259 | private void GetConnectTree(object sender, RoutedEventArgs e) | 267 | private void GetConnectTree(object sender, RoutedEventArgs e) |
| 260 | { | 268 | { |
| 261 | 269 | ||
| 262 | } | 270 | } |
| 263 | 271 | ||
| 264 | private void SetConnectTree(object sender, RoutedEventArgs e) | 272 | private void SetConnectTree(object sender, RoutedEventArgs e) |
| 265 | { | 273 | { |
| 266 | 274 | ||
| 267 | } | 275 | } |
| 268 | 276 | ||
| 269 | private void GetParameterTree(object sender, RoutedEventArgs e) | 277 | private void GetParameterTree(object sender, RoutedEventArgs e) |
| 270 | { | 278 | { |
| 271 | 279 | ||
| 272 | } | 280 | } |
| 273 | 281 | ||
| 274 | private void SetParameterTree(object sender, RoutedEventArgs e) | 282 | private void SetParameterTree(object sender, RoutedEventArgs e) |
| 275 | { | 283 | { |
| 276 | 284 | ||
| 277 | } | 285 | } |
| 278 | 286 | ||
| 279 | private void GetScheduleTree(object sender, RoutedEventArgs e) | 287 | private void GetScheduleTree(object sender, RoutedEventArgs e) |
| 280 | { | 288 | { |
| 281 | 289 | ||
| 282 | } | 290 | } |
| 283 | 291 | ||
| 284 | private void SetScheduleTree(object sender, RoutedEventArgs e) | 292 | private void SetScheduleTree(object sender, RoutedEventArgs e) |
| 285 | { | 293 | { |
| 286 | 294 | ||
| 287 | } | 295 | } |
| 288 | 296 | ||
| 289 | private void GetLoggingTree(object sender, RoutedEventArgs e) | 297 | private void GetLoggingTree(object sender, RoutedEventArgs e) |
| 290 | { | 298 | { |
| 291 | 299 | ||
| 292 | } | 300 | } |
| 293 | 301 | ||
| 294 | private void SetLoggingTree(object sender, RoutedEventArgs e) | 302 | private void SetLoggingTree(object sender, RoutedEventArgs e) |
| 295 | { | 303 | { |
| 296 | 304 | ||
| 297 | } | 305 | } |
| 298 | 306 | ||
| 299 | private void GetAlertTree(object sender, RoutedEventArgs e) | 307 | private void GetAlertTree(object sender, RoutedEventArgs e) |
| 300 | { | 308 | { |
| 301 | 309 | ||
| 302 | } | 310 | } |
| 303 | 311 | ||
| 304 | private void SetAlertTree(object sender, RoutedEventArgs e) | 312 | private void SetAlertTree(object sender, RoutedEventArgs e) |
| 305 | { | 313 | { |
| 306 | 314 | ||
| 307 | } | 315 | } |
| 308 | 316 | ||
| 309 | private void GetHelpTree(object sender, RoutedEventArgs e) | 317 | private void GetHelpTree(object sender, RoutedEventArgs e) |
| 310 | { | 318 | { |
| 311 | 319 | ||
| 312 | } | 320 | } |
| 313 | 321 | ||
| 314 | private void SetHelpTree(object sender, RoutedEventArgs e) | 322 | private void SetHelpTree(object sender, RoutedEventArgs e) |
| 315 | { | 323 | { |
| 316 | 324 | ||
| 317 | } | 325 | } |
| 318 | 326 | ||
| 319 | private void GetNewProjectTree(object sender, RoutedEventArgs e) | 327 | private void GetNewProjectTree(object sender, RoutedEventArgs e) |
| 320 | { | 328 | { |
| 321 | 329 | ||
| 322 | } | 330 | } |
| 323 | 331 | ||
| 324 | private void SetNewProjectTree(object sender, RoutedEventArgs e) | 332 | private void SetNewProjectTree(object sender, RoutedEventArgs e) |
| 325 | { | 333 | { |
| 326 | 334 | ||
| 327 | } | 335 | } |
| 328 | 336 | ||
| 329 | 337 | ||
| 330 | } | 338 | } |
| 331 | } | 339 | } |
| 332 | 340 |
sources/RoboforkApp/ScheduleCanvas.cs
| 1 | using System; | 1 | using System; |
| 2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
| 3 | using System.Linq; | 3 | using System.Linq; |
| 4 | using System.Text; | 4 | using System.Text; |
| 5 | using System.Threading.Tasks; | 5 | using System.Threading.Tasks; |
| 6 | using System.Windows; | 6 | using System.Windows; |
| 7 | using System.Windows.Controls; | 7 | using System.Windows.Controls; |
| 8 | using System.Windows.Media; | 8 | using System.Windows.Media; |
| 9 | using System.Windows.Media.Animation; | ||
| 9 | using System.Windows.Shapes; | 10 | using System.Windows.Shapes; |
| 10 | 11 | ||
| 11 | namespace RoboforkApp | 12 | namespace RoboforkApp |
| 12 | { | 13 | { |
| 13 | public class ScheduleCanvas : Canvas | 14 | public class ScheduleCanvas : Canvas |
| 14 | { | 15 | { |
| 15 | // Add variable for Set Schedule | 16 | private simulationRobo simulation; |
| 16 | private Path pScheduleNode = new Path(); | ||
| 17 | private Path pScheduleLine = new Path(); | ||
| 18 | private GeometryGroup gGrpScheduleNode = new GeometryGroup(); | ||
| 19 | private GeometryGroup gGrpScheduleLine = new GeometryGroup(); | ||
| 20 | 17 | ||
| 21 | public void DrawRoute(List<ucNode> listNode) | 18 | public void CreateSimulation() |
| 22 | { | 19 | { |
| 23 | //Update after | 20 | if(simulation != null || this.Children.Count < 2) |
| 24 | } | 21 | { |
| 22 | return; | ||
| 23 | } | ||
| 25 | 24 | ||
| 26 | private void CreateNode(Point point, int indexNode) | 25 | PathGeometry animationPath = new PathGeometry(); |
| 27 | { | 26 | PathFigure pFigure = new PathFigure(); |
| 28 | ucNode _ucNode = new ucNode(); | 27 | pFigure.StartPoint = new Point(50, 65); |
| 29 | _ucNode.btnWidth = 20.0; | 28 | LineSegment lineSegment = new LineSegment(); |
| 30 | _ucNode.btnHeight = 20.0; | 29 | lineSegment.Point = new Point(1270, 65); |
| 31 | _ucNode.txtNode = indexNode.ToString(); | 30 | pFigure.Segments.Add(lineSegment); |
| 32 | Canvas.SetLeft(_ucNode, point.X); | 31 | animationPath.Figures.Add(pFigure); |
| 33 | Canvas.SetTop(_ucNode, point.Y); | 32 | |
| 34 | this.Children.Add(_ucNode); | 33 | // Freeze the PathGeometry for performance benefits. |
| 34 | animationPath.Freeze(); | ||
| 35 | |||
| 36 | // Create a MatrixAnimationUsingPath to move the | ||
| 37 | // button along the path by animating | ||
| 38 | // its MatrixTransform. | ||
| 39 | MatrixAnimationUsingPath matrixAnimation = new MatrixAnimationUsingPath(); | ||
| 40 | matrixAnimation.PathGeometry = animationPath; | ||
| 41 | matrixAnimation.Duration = TimeSpan.FromSeconds(10); | ||
| 42 | //matrixAnimation.RepeatBehavior = RepeatBehavior.Forever; | ||
| 43 | matrixAnimation.AutoReverse = false; | ||
| 44 | matrixAnimation.DoesRotateWithTangent = true; | ||
| 45 | |||
| 46 | // Set the animation to target the Matrix property | ||
| 47 | // of the MatrixTransform named "ButtonMatrixTransform". | ||
| 48 | Storyboard.SetTargetName(matrixAnimation, "fl"); | ||
| 49 | Storyboard.SetTargetProperty(matrixAnimation, new PropertyPath(MatrixTransform.MatrixProperty)); | ||
| 50 | |||
| 51 | // Create a Storyboard to contain and apply the animation. | ||
| 52 | Storyboard pathAnimationStoryboard = new Storyboard(); | ||
| 53 | pathAnimationStoryboard.Children.Add(matrixAnimation); | ||
| 54 | |||
| 55 | simulation = new simulationRobo(); | ||
| 56 | simulation.storyBoard = pathAnimationStoryboard; | ||
| 57 | this.Children.Add(simulation); |
sources/RoboforkApp/UserControls/simulationRobo.xaml
| File was created | 1 | <UserControl x:Class="RoboforkApp.simulationRobo" | |
| 2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
| 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
| 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
| 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
| 6 | mc:Ignorable="d" | ||
| 7 | x:Name="SimulationRobo"> | ||
| 8 | <Path Name="smuliRobo" Stroke="Orange" StrokeThickness="2" Fill="Orange" RenderTransformOrigin="0.5,0.5" Margin="0,0"> | ||
| 9 | <Path.Effect> | ||
| 10 | <DropShadowEffect BlurRadius="20" Opacity="0.5" ShadowDepth="4" /> | ||
| 11 | </Path.Effect> | ||
| 12 | <Path.Data> | ||
| 13 | <PathGeometry> | ||
| 14 | <PathGeometry.Figures> | ||
| 15 | <PathFigure StartPoint="0,0" IsClosed="True"> | ||
| 16 | <LineSegment Point="40,0"/> | ||
| 17 | <LineSegment Point="60,15"/> | ||
| 18 | <LineSegment Point="40,30"/> | ||
| 19 | <LineSegment Point="0,30"/> | ||
| 20 | </PathFigure> | ||
| 21 | </PathGeometry.Figures> | ||
| 22 | </PathGeometry> | ||
| 23 | </Path.Data> | ||
| 24 | |||
| 25 | <Path.RenderTransform> | ||
| 26 | <TransformGroup> | ||
| 27 | <MatrixTransform x:Name="fl"> | ||
| 28 | <MatrixTransform.Matrix> | ||
| 29 | <Matrix /> | ||
| 30 | </MatrixTransform.Matrix> | ||
| 31 | </MatrixTransform> | ||
| 32 | </TransformGroup> | ||
| 33 | </Path.RenderTransform> | ||
| 34 | |||
| 35 | <Path.Triggers> | ||
| 36 | <EventTrigger RoutedEvent="FrameworkElement.Loaded"> | ||
| 37 | <BeginStoryboard Storyboard="{Binding storyBoard, ElementName=SimulationRobo}" > | ||
| 38 | </BeginStoryboard> | ||
| 39 | </EventTrigger> | ||
| 40 | </Path.Triggers> | ||
| 41 | </Path> | ||
| 42 | </UserControl> | ||
| 43 |
sources/RoboforkApp/UserControls/simulationRobo.xaml.cs
| File was created | 1 | using System; | |
| 2 | using System.Collections.Generic; | ||
| 3 | using System.Linq; | ||
| 4 | using System.Text; | ||
| 5 | using System.Threading.Tasks; | ||
| 6 | using System.Windows; | ||
| 7 | using System.Windows.Controls; | ||
| 8 | using System.Windows.Data; | ||
| 9 | using System.Windows.Documents; | ||
| 10 | using System.Windows.Input; | ||
| 11 | using System.Windows.Media; | ||
| 12 | using System.Windows.Media.Animation; | ||
| 13 | using System.Windows.Media.Imaging; | ||
| 14 | using System.Windows.Navigation; | ||
| 15 | using System.Windows.Shapes; | ||
| 16 | |||
| 17 | namespace RoboforkApp | ||
| 18 | { | ||
| 19 | /// <summary> | ||
| 20 | /// Interaction logic for simulationRobo.xaml | ||
| 21 | /// </summary> | ||
| 22 | public partial class simulationRobo : UserControl | ||
| 23 | { | ||
| 24 | public static readonly DependencyProperty storyBoardProperty = | ||
| 25 | DependencyProperty.Register("storyBoard", typeof(Storyboard), | ||
| 26 | typeof(simulationRobo), new FrameworkPropertyMetadata(new Storyboard())); | ||
| 27 | |||
| 28 | public simulationRobo() | ||
| 29 | { | ||
| 30 | InitializeComponent(); | ||
| 31 | } | ||
| 32 | |||
| 33 | public Storyboard storyBoard | ||
| 34 | { | ||
| 35 | get { return (Storyboard)GetValue(storyBoardProperty); } | ||
| 36 | set { SetValue(storyBoardProperty, value); } | ||
| 37 | } | ||
| 38 | } | ||
| 39 | } | ||
| 40 |