ServoConfigView.xaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. <UserControl x:Class="OHV.Module.Interactivity.PopUp.ServoConfigView"
  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. xmlns:prism="http://prismlibrary.com/"
  7. xmlns:local="clr-namespace:OHV.Module.Interactivity.PopUp"
  8. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  9. prism:ViewModelLocator.AutoWireViewModel="True"
  10. mc:Ignorable="d"
  11. Width="1920"
  12. Height="1080"
  13. Background="#CC282C34">
  14. <prism:Dialog.WindowStyle>
  15. <Style TargetType="Window">
  16. <Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterScreen" />
  17. <Setter Property="Background" Value="Transparent"/>
  18. <Setter Property="AllowsTransparency" Value="True"/>
  19. <Setter Property="ResizeMode" Value="NoResize"/>
  20. <Setter Property="WindowStyle" Value="None"/>
  21. <Setter Property="BorderThickness" Value="1"/>
  22. <Setter Property="BorderBrush" Value="{DynamicResource BorderSolidNormal}"/>
  23. <Setter Property="Template" Value="{DynamicResource WindowTemplateKey}"/>
  24. <Setter Property="WindowState" Value="Maximized"/>
  25. <!--<Style.Triggers>
  26. <Trigger Property="ResizeMode" Value="CanResizeWithGrip">
  27. <Setter Property="Template" Value="{StaticResource WindowTemplateKey}"/>
  28. </Trigger>
  29. </Style.Triggers>-->
  30. </Style>
  31. </prism:Dialog.WindowStyle>
  32. <Border BorderBrush="Gray" BorderThickness="2" Width="1000" Height="800" Background="#163238">
  33. <Grid Margin="15" Background="#37474f">
  34. <Grid.ColumnDefinitions>
  35. <ColumnDefinition/>
  36. <ColumnDefinition Width="130"/>
  37. </Grid.ColumnDefinitions>
  38. <Grid.RowDefinitions>
  39. <RowDefinition Height="30"/>
  40. <RowDefinition Height="*"/>
  41. </Grid.RowDefinitions>
  42. <Grid Grid.Row="0">
  43. <TextBlock Margin="15,0,0,0" Text="Drive Config View" FontSize="22" Foreground="White"/>
  44. </Grid>
  45. <Grid Grid.Row="1" Background="{x:Null}">
  46. <Grid.RowDefinitions>
  47. <RowDefinition Height="40"/>
  48. <RowDefinition Height="*"/>
  49. <RowDefinition Height="*"/>
  50. <RowDefinition Height="*"/>
  51. <RowDefinition Height="*"/>
  52. <RowDefinition Height="*"/>
  53. <RowDefinition Height="*"/>
  54. <RowDefinition Height="*"/>
  55. <RowDefinition Height="*"/>
  56. <RowDefinition Height="*"/>
  57. <RowDefinition Height="*"/>
  58. <RowDefinition Height="*"/>
  59. <RowDefinition Height="*"/>
  60. <RowDefinition Height="*"/>
  61. </Grid.RowDefinitions>
  62. <Grid.ColumnDefinitions>
  63. <ColumnDefinition Width="*"/>
  64. <ColumnDefinition Width="*"/>
  65. <ColumnDefinition Width=".3*"/>
  66. </Grid.ColumnDefinitions>
  67. <Grid Grid.ColumnSpan="2" Background="#163238">
  68. <Border BorderBrush="Gray" BorderThickness="1">
  69. <TextBlock Margin="15,0,0,0" Text="Drive Speed" Foreground="Orange" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="20"/>
  70. </Border>
  71. </Grid>
  72. <Grid Grid.Row="1">
  73. <Border BorderBrush="Gray" BorderThickness="1">
  74. <!--<TextBlock Text="Acceleration m/s^2" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="17"/>-->
  75. <TextBlock Text="Linear [m/s]" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  76. </Border>
  77. </Grid>
  78. <Grid Grid.Row="2">
  79. <Border BorderBrush="Gray" BorderThickness="1">
  80. <TextBlock Text="Curve [m/s]" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  81. </Border>
  82. </Grid>
  83. <Grid Grid.Row="4" Grid.ColumnSpan="2" Background="#163238">
  84. <Border BorderBrush="Gray" BorderThickness="1">
  85. <TextBlock Margin="15,0,0,0" Text="Speed Profile" Foreground="Orange" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="20"/>
  86. </Border>
  87. </Grid>
  88. <Grid Grid.Row="5">
  89. <Border BorderBrush="Gray" BorderThickness="1">
  90. <TextBlock Text="Acceleration [m/s]" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  91. </Border>
  92. </Grid>
  93. <Grid Grid.Row="6">
  94. <Border BorderBrush="Gray" BorderThickness="1">
  95. <TextBlock Text="Deceleration [m/s]" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  96. </Border>
  97. </Grid>
  98. <Grid Grid.Row="7">
  99. <Border BorderBrush="Gray" BorderThickness="1">
  100. <TextBlock Text="Creep [m/s]" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  101. </Border>
  102. </Grid>
  103. <!--<Grid Grid.Row="7">
  104. <Border BorderBrush="Gray" BorderThickness="1">
  105. <TextBlock Text="Min Linear Speed(m/s)" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="17"/>
  106. </Border>
  107. </Grid>
  108. <Grid Grid.Row="8">
  109. <Border BorderBrush="Gray" BorderThickness="1">
  110. <TextBlock Text="Min curve Speed(m/s)" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="17"/>
  111. </Border>
  112. </Grid>-->
  113. <Grid Grid.Row="8">
  114. <Border BorderBrush="Gray" BorderThickness="1">
  115. <TextBlock Text="CreepDistance [m/s]" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  116. </Border>
  117. </Grid>
  118. <Grid Grid.Row="10" Grid.ColumnSpan="2" Background="#163238">
  119. <Border BorderBrush="Gray" BorderThickness="1">
  120. <TextBlock Margin="15,0,0,0" Text="Jog Speed" Foreground="Orange" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="20"/>
  121. </Border>
  122. </Grid>
  123. <Grid Grid.Row="11">
  124. <Border BorderBrush="Gray" BorderThickness="1">
  125. <TextBlock Text="Jog Speed [m/s]" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  126. </Border>
  127. </Grid>
  128. <Grid Grid.Row="1" Grid.Column="1">
  129. <Border BorderBrush="Gray" BorderThickness="1">
  130. <Button Background="{x:Null}" BorderBrush="{x:Null}" Command="{Binding InputNumberCommand}" CommandParameter="Linear">
  131. <TextBlock Text="{Binding LinearSpeed, StringFormat={}{0:0.00 m/s}, FallbackValue=0.00 m/s}" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  132. </Button>
  133. </Border>
  134. </Grid>
  135. <Grid Grid.Row="2" Grid.Column="1">
  136. <Border BorderBrush="Gray" BorderThickness="1">
  137. <Button Background="{x:Null}" BorderBrush="{x:Null}" Command="{Binding InputNumberCommand}" CommandParameter="Curve">
  138. <TextBlock Text="{Binding CurveSpeed, StringFormat={}{0:0.00 m/s}, FallbackValue=0.00 m/s}" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  139. </Button>
  140. </Border>
  141. </Grid>
  142. <!--<Grid Grid.Row="3" Grid.Column="1">
  143. <Border BorderBrush="Gray" BorderThickness="1">
  144. <TextBlock Text="{Binding CreepSped, FallbackValue=0.00 m/s}" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="17"/>
  145. </Border>
  146. </Grid>-->
  147. <Grid Grid.Row="5" Grid.Column="1">
  148. <Border BorderBrush="Gray" BorderThickness="1">
  149. <Button Background="{x:Null}" BorderBrush="{x:Null}" Command="{Binding InputNumberCommand}" CommandParameter="Accel">
  150. <TextBlock Text="{Binding Acceleration, StringFormat={}{0:0.00 m/s}, FallbackValue=0.00 m/s}" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  151. </Button>
  152. </Border>
  153. </Grid>
  154. <Grid Grid.Row="6" Grid.Column="1">
  155. <Border BorderBrush="Gray" BorderThickness="1">
  156. <Button Background="{x:Null}" BorderBrush="{x:Null}" Command="{Binding InputNumberCommand}" CommandParameter="Decel">
  157. <TextBlock Text="{Binding Deceleration, StringFormat={}{0:0.00 m/s}, FallbackValue=0.00 m/s}" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  158. </Button>
  159. </Border>
  160. </Grid>
  161. <Grid Grid.Row="7" Grid.Column="1">
  162. <Border BorderBrush="Gray" BorderThickness="1">
  163. <Button Background="{x:Null}" BorderBrush="{x:Null}" Command="{Binding InputNumberCommand}" CommandParameter="Creep">
  164. <TextBlock Text="{Binding CreepSpeed, StringFormat={}{0:0.00 m/s}, FallbackValue=0.00 m/s}" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  165. </Button>
  166. </Border>
  167. </Grid>
  168. <!--<Grid Grid.Row="7" Grid.Column="1">
  169. <Border BorderBrush="Gray" BorderThickness="1">
  170. <TextBlock Text="0.000 m/s" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="17"/>
  171. </Border>
  172. </Grid>
  173. <Grid Grid.Row="8" Grid.Column="1">
  174. <Border BorderBrush="Gray" BorderThickness="1">
  175. <TextBlock Text="0.000 m/s" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="17"/>
  176. </Border>
  177. </Grid>-->
  178. <Grid Grid.Row="8" Grid.Column="1">
  179. <Border BorderBrush="Gray" BorderThickness="1">
  180. <Button Background="{x:Null}" BorderBrush="{x:Null}" Command="{Binding InputNumberCommand}" CommandParameter="CreepDistance">
  181. <TextBlock Text="{Binding CreepDistance, StringFormat={}{0:0.00 m/s}, FallbackValue=0.00 m/s}" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  182. </Button>
  183. </Border>
  184. </Grid>
  185. <Grid Grid.Row="11" Grid.Column="1">
  186. <Border BorderBrush="Gray" BorderThickness="1">
  187. <Button Background="{x:Null}" BorderBrush="{x:Null}" Command="{Binding InputNumberCommand}" CommandParameter="JogSpeed">
  188. <TextBlock Text="{Binding JogSpeed, StringFormat={}{0:0.00 m/s}, FallbackValue=0.00 m/s}" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
  189. </Button>
  190. </Border>
  191. </Grid>
  192. <!--<Grid Grid.Row="1" Grid.RowSpan="2" Grid.Column="2">
  193. <Border BorderBrush="Gray" BorderThickness="1">
  194. <Button Content="Save" Margin="10" Width="auto" Height="auto" Command="{Binding SaveDriveSpeed}"/>
  195. </Border>
  196. </Grid>-->
  197. <!--<Grid Grid.Row="7" Grid.RowSpan="2" Grid.Column="2">
  198. <Border BorderBrush="Gray" BorderThickness="1">
  199. <Button Content="Save" Margin="10" Width="auto" Height="auto" Command="{Binding SaveSpeedProfile}"/>
  200. </Border>
  201. </Grid>-->
  202. <!--<Grid Grid.Row="11" Grid.RowSpan="1" Grid.Column="2">
  203. <Border BorderBrush="Gray" BorderThickness="1">
  204. <Button Content="Save" Margin="5" Width="auto" Height="auto" Command="{Binding SaveJogSpeed}"/>
  205. </Border>
  206. </Grid>-->
  207. </Grid>
  208. <!--<Grid Grid.Row="1">
  209. <DataGrid ItemsSource="{Binding ConfigListProperty}" CanUserSortColumns="True" CanUserAddRows="False" AutoGenerateColumns="False" materialDesign:DataGridAssist.CellPadding="13 8 8 8"
  210. materialDesign:DataGridAssist.ColumnHeaderPadding="8" Background="{x:Null}" IsReadOnly="False" Foreground="White">
  211. <DataGrid.Resources>
  212. <Style TargetType="{x:Type DataGridRow}">
  213. <Style.Triggers>
  214. <Trigger Property="IsSelected" Value="false">
  215. <Setter Property="Background" Value="{x:Null}"></Setter>
  216. </Trigger>
  217. </Style.Triggers>
  218. <Setter Property="TextBlock.TextAlignment" Value="Center" />
  219. <Setter Property="FontSize" Value="15"/>
  220. </Style>
  221. </DataGrid.Resources>
  222. <DataGrid.Columns>
  223. <materialDesign:DataGridTextColumn Header="Name" Binding="{Binding Name}" Width="300" EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnPopupEditingStyle}" IsReadOnly="True"></materialDesign:DataGridTextColumn>
  224. <materialDesign:DataGridTextColumn Header="Value" Binding="{Binding Value}" EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnPopupEditingStyle}"></materialDesign:DataGridTextColumn>
  225. </DataGrid.Columns>
  226. </DataGrid>
  227. </Grid>-->
  228. <Grid Grid.Column="2" HorizontalAlignment="Stretch" Background="#263238" Grid.RowSpan="2">
  229. <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
  230. <StackPanel VerticalAlignment="Top" Margin="0,30,0,0">
  231. <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2"
  232. Style="{DynamicResource MaterialDesignRaisedButton}"
  233. materialDesign:ShadowAssist.ShadowDepth="Depth5"
  234. Command="{Binding SaveToAllCommand}">
  235. <StackPanel>
  236. <materialDesign:PackIcon Kind="ContentSave" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  237. <TextBlock Text="SAVE" FontSize="20" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  238. </StackPanel>
  239. </Button>
  240. </StackPanel>
  241. <StackPanel VerticalAlignment="Bottom">
  242. <Button Margin="10,0,10,10" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
  243. <StackPanel>
  244. <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  245. <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
  246. </StackPanel>
  247. </Button>
  248. </StackPanel>
  249. </Grid>
  250. </Grid>
  251. </Border>
  252. </UserControl>