LockServoView.xaml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. <UserControl x:Class="OHV.Module.Interactivity.PopUp.LockServoView"
  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="800"
  12. Height="600"
  13. Background="#455a64">
  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. <!--<Style.Triggers>
  25. <Trigger Property="ResizeMode" Value="CanResizeWithGrip">
  26. <Setter Property="Template" Value="{StaticResource WindowTemplateKey}"/>
  27. </Trigger>
  28. </Style.Triggers>-->
  29. </Style>
  30. </prism:Dialog.WindowStyle>
  31. <Grid>
  32. <Grid.ColumnDefinitions>
  33. <ColumnDefinition/>
  34. <ColumnDefinition Width="130"/>
  35. <ColumnDefinition Width="130"/>
  36. </Grid.ColumnDefinitions>
  37. <Grid Grid.Column="0">
  38. <Grid Margin="15,15" Background="#37474f">
  39. <Grid.RowDefinitions>
  40. <RowDefinition/>
  41. <RowDefinition/>
  42. </Grid.RowDefinitions>
  43. <Grid Grid.Row="0">
  44. <Grid.RowDefinitions>
  45. <RowDefinition Height="*"/>
  46. <RowDefinition Height="*"/>
  47. <RowDefinition Height="*"/>
  48. <RowDefinition Height="*"/>
  49. </Grid.RowDefinitions>
  50. <Grid.ColumnDefinitions>
  51. <ColumnDefinition Width="*"/>
  52. <ColumnDefinition Width="*"/>
  53. <ColumnDefinition Width="*"/>
  54. <ColumnDefinition Width="*"/>
  55. <ColumnDefinition Width="*"/>
  56. </Grid.ColumnDefinitions>
  57. <Border BorderBrush="#FF00FFD3" BorderThickness="2" Grid.RowSpan="4" Grid.Column="3" Margin="95,10,2,0"/>
  58. <!--Column1-->
  59. <Button Background="{x:Null}" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  60. Style="{StaticResource MaterialDesignRaisedButton}"
  61. materialDesign:ButtonAssist.CornerRadius="10"
  62. ToolTip="MaterialDesignRaisedButton with Round Corners">
  63. <StackPanel>
  64. <TextBlock HorizontalAlignment="Center"><Run Text="Axis"/></TextBlock>
  65. <TextBlock HorizontalAlignment="Center"><Run Text="Select"/></TextBlock>
  66. </StackPanel>
  67. </Button>
  68. <Button Grid.Column="0" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  69. Style="{StaticResource MaterialDesignRaisedButton}"
  70. materialDesign:ButtonAssist.CornerRadius="10"
  71. ToolTip="MaterialDesignRaisedButton with Round Corners">
  72. <StackPanel>
  73. <TextBlock HorizontalAlignment="Center"><Run Text="Target"/></TextBlock>
  74. <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
  75. </StackPanel>
  76. </Button>
  77. <Button Grid.Column="0" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  78. Style="{StaticResource MaterialDesignRaisedButton}"
  79. materialDesign:ButtonAssist.CornerRadius="10"
  80. ToolTip="MaterialDesignRaisedButton with Round Corners">
  81. <StackPanel>
  82. <TextBlock HorizontalAlignment="Center"><Run Text="Current"/></TextBlock>
  83. <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
  84. </StackPanel>
  85. </Button>
  86. <Button Grid.Column="0" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  87. Style="{StaticResource MaterialDesignRaisedButton}"
  88. materialDesign:ButtonAssist.CornerRadius="10"
  89. ToolTip="MaterialDesignRaisedButton with Round Corners">
  90. <StackPanel>
  91. <TextBlock HorizontalAlignment="Center"><Run Text="Difference"/></TextBlock>
  92. <TextBlock HorizontalAlignment="Center"><Run Text="Pos"/></TextBlock>
  93. </StackPanel>
  94. </Button>
  95. <!--Column2-->
  96. <Button Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  97. Style="{StaticResource MaterialDesignRaisedButton}"
  98. materialDesign:ButtonAssist.CornerRadius="10"
  99. ToolTip="MaterialDesignRaisedButton with Round Corners"
  100. Command="{Binding SelectAxisCommand}">
  101. <TextBlock><Run Text="#Motor1"/></TextBlock>
  102. </Button>
  103. <Button Background="{x:Null}" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  104. Style="{StaticResource MaterialDesignRaisedButton}"
  105. materialDesign:ButtonAssist.CornerRadius="10"
  106. ToolTip="MaterialDesignRaisedButton with Round Corners">
  107. <Button.InputBindings>
  108. <MouseBinding Gesture="LeftClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Left"/>
  109. </Button.InputBindings>
  110. <TextBlock><Run Text="{Binding TargetPosLockLeft, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
  111. </Button>
  112. <Button Background="{x:Null}" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  113. Style="{StaticResource MaterialDesignRaisedButton}"
  114. materialDesign:ButtonAssist.CornerRadius="10"
  115. ToolTip="MaterialDesignRaisedButton with Round Corners">
  116. <TextBlock><Run Text="{Binding CurrentLockLeft, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
  117. </Button>
  118. <Button Background="{x:Null}" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  119. Style="{StaticResource MaterialDesignRaisedButton}"
  120. materialDesign:ButtonAssist.CornerRadius="10"
  121. ToolTip="MaterialDesignRaisedButton with Round Corners">
  122. <TextBlock><Run Text="{Binding DifferenceLockLeft, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
  123. </Button>
  124. <!--Column3-->
  125. <Button Grid.Column="2" Grid.Row="0" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  126. Style="{StaticResource MaterialDesignRaisedButton}"
  127. materialDesign:ButtonAssist.CornerRadius="10"
  128. ToolTip="MaterialDesignRaisedButton with Round Corners"
  129. Command="{Binding SelectAxisCommand}">
  130. <TextBlock><Run Text="#Motor2"/></TextBlock>
  131. </Button>
  132. <Button Background="{x:Null}" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  133. Style="{StaticResource MaterialDesignRaisedButton}"
  134. materialDesign:ButtonAssist.CornerRadius="10"
  135. ToolTip="MaterialDesignRaisedButton with Round Corners">
  136. <Button.InputBindings>
  137. <MouseBinding Gesture="RightClick" Command="{Binding KeyInTargetPosCommand}" CommandParameter="Left"/>
  138. </Button.InputBindings>
  139. <TextBlock><Run Text="{Binding TargetPosLockRight, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
  140. </Button>
  141. <Button Background="{x:Null}" Grid.Column="2" Grid.Row="2" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  142. Style="{StaticResource MaterialDesignRaisedButton}"
  143. materialDesign:ButtonAssist.CornerRadius="10"
  144. ToolTip="MaterialDesignRaisedButton with Round Corners">
  145. <TextBlock><Run Text="{Binding CurrentLockRight, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
  146. </Button>
  147. <Button Background="{x:Null}" Grid.Column="2" Grid.Row="3" HorizontalAlignment="Stretch" Margin="5" Height="auto"
  148. Style="{StaticResource MaterialDesignRaisedButton}"
  149. materialDesign:ButtonAssist.CornerRadius="10"
  150. ToolTip="MaterialDesignRaisedButton with Round Corners">
  151. <TextBlock><Run Text="{Binding DifferenceLockRight, StringFormat=0.000, FallbackValue=0.000}"/></TextBlock>
  152. </Button>
  153. <Button Margin="3" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="1" Width="Auto" Height="Auto" BorderBrush="Gray" BorderThickness="2"
  154. Command="{Binding SelectPosCommand}"
  155. CommandParameter="Lock">
  156. <StackPanel>
  157. <TextBlock Text="Pos" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  158. <TextBlock Text="Lock" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  159. </StackPanel>
  160. </Button>
  161. <Button Margin="3" HorizontalAlignment="Stretch" Grid.Column="4" Grid.Row="2" Width="Auto" Height="Auto" BorderBrush="Gray" BorderThickness="2"
  162. Command="{Binding SelectPosCommand}"
  163. CommandParameter="UnLock">
  164. <StackPanel>
  165. <TextBlock Text="Pos" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  166. <TextBlock Text="UnLock" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  167. </StackPanel>
  168. </Button>
  169. <Border BorderBrush="#FF00FFD3" BorderThickness="2" Margin="7,98,101,-33" Grid.ColumnSpan="4" RenderTransformOrigin="0.5,0.5" Grid.Row="3">
  170. <Border.RenderTransform>
  171. <TransformGroup>
  172. <ScaleTransform ScaleX="-1"/>
  173. <SkewTransform/>
  174. <RotateTransform/>
  175. <TranslateTransform/>
  176. </TransformGroup>
  177. </Border.RenderTransform>
  178. </Border>
  179. </Grid>
  180. <Grid Grid.Row="1">
  181. <StackPanel Margin="0,0,0,90" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
  182. <Button
  183. Style="{StaticResource MaterialDesignRaisedButton}"
  184. materialDesign:ButtonAssist.CornerRadius="10"
  185. ToolTip="MaterialDesignRaisedButton with Round Corners"
  186. Margin="15"
  187. Height="auto"
  188. HorizontalAlignment="Center"
  189. VerticalAlignment="Center"
  190. >
  191. <StackPanel>
  192. <TextBlock><Run Text="Limit(-)"/></TextBlock>
  193. </StackPanel>
  194. </Button>
  195. <materialDesign:Badged
  196. Badge="Current Pos"
  197. BadgeColorZoneMode="Dark"
  198. BadgePlacementMode="Top"
  199. BadgeForeground="Aqua"
  200. VerticalAlignment="Center"
  201. HorizontalAlignment="Center"
  202. Height="auto">
  203. <Button Margin="15" VerticalAlignment="Center" HorizontalAlignment="Center" Height="50" >
  204. <StackPanel>
  205. <TextBlock Text="0.000"/>
  206. </StackPanel>
  207. </Button>
  208. </materialDesign:Badged>
  209. <Button
  210. Style="{StaticResource MaterialDesignRaisedButton}"
  211. materialDesign:ButtonAssist.CornerRadius="10"
  212. ToolTip="MaterialDesignRaisedButton with Round Corners"
  213. Margin="15"
  214. Height="auto"
  215. HorizontalAlignment="Center"
  216. VerticalAlignment="Center">
  217. <StackPanel>
  218. <TextBlock><Run Text="Limit(+)"/></TextBlock>
  219. </StackPanel>
  220. </Button>
  221. </StackPanel>
  222. <StackPanel Margin="30,0,0,50" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Left">
  223. <Button
  224. Margin="5"
  225. Grid.Row="2"
  226. Grid.Column="1"
  227. HorizontalAlignment="Stretch"
  228. Height="auto">
  229. <StackPanel>
  230. <materialDesign:PackIcon Kind="ArrowLeftBoldCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
  231. <TextBlock><Run Text="Jog(-)"/></TextBlock>
  232. </StackPanel>
  233. </Button>
  234. <materialDesign:Badged
  235. Grid.Row="2"
  236. Grid.Column="2"
  237. Badge="Jog Velocity"
  238. BadgeColorZoneMode="Dark"
  239. BadgePlacementMode="Top"
  240. BadgeForeground="Aqua"
  241. VerticalAlignment="Center"
  242. HorizontalAlignment="Center">
  243. <Button Margin="15" VerticalAlignment="Center" HorizontalAlignment="Center" Height="60" Width="Auto" >
  244. <StackPanel>
  245. <TextBlock Text="0.000"/>
  246. </StackPanel>
  247. </Button>
  248. </materialDesign:Badged>
  249. <Button
  250. Margin="5"
  251. Grid.Row="2"
  252. Grid.Column="3"
  253. HorizontalAlignment="Stretch"
  254. Height="auto">
  255. <StackPanel>
  256. <materialDesign:PackIcon Kind="ArrowRightBoldCircleOutline" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="30" Width="auto"/>
  257. <TextBlock><Run Text="Jog(+)"/></TextBlock>
  258. </StackPanel>
  259. </Button>
  260. </StackPanel>
  261. </Grid>
  262. </Grid>
  263. </Grid>
  264. <Grid Grid.Column="1" Background="#37474f">
  265. <StackPanel>
  266. <Button Margin="7,20" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding AxisSelectCommand}"
  267. Style="{DynamicResource MaterialDesignRaisedButton}"
  268. materialDesign:ShadowAssist.ShadowDepth="Depth5">
  269. <StackPanel>
  270. <!--<materialDesign:PackIcon Kind="GearBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
  271. <TextBlock Text="Move To" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  272. </StackPanel>
  273. </Button>
  274. <Button Margin="7,20" HorizontalAlignment="Stretch" Height="90" BorderBrush="Gray" BorderThickness="2" Command="{Binding AxisSelectCommand}"
  275. Style="{DynamicResource MaterialDesignRaisedButton}"
  276. materialDesign:ShadowAssist.ShadowDepth="Depth5">
  277. <StackPanel>
  278. <!--<materialDesign:PackIcon Kind="GearBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>-->
  279. <TextBlock Text="Current" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  280. <TextBlock Text="To Target" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  281. </StackPanel>
  282. </Button>
  283. </StackPanel>
  284. </Grid>
  285. <Grid Grid.Column="2" HorizontalAlignment="Stretch" Background="#263238">
  286. <Border Margin="1" BorderBrush="#FF00FFD3" BorderThickness="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
  287. <StackPanel>
  288. <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOnCommand}">
  289. <StackPanel>
  290. <materialDesign:PackIcon Kind="PowerSettings" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  291. <TextBlock Text="Servo On" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  292. </StackPanel>
  293. </Button>
  294. <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding ServoOffCommand}">
  295. <StackPanel>
  296. <materialDesign:PackIcon Kind="PowerPlugOff" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  297. <TextBlock Text="Servo Off" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  298. </StackPanel>
  299. </Button>
  300. <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding FaultResetCommand}">
  301. <StackPanel>
  302. <materialDesign:PackIcon Kind="CircleArrows" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  303. <TextBlock Text="Fault Reset" VerticalAlignment="Stretch" HorizontalAlignment="Center"/>
  304. </StackPanel>
  305. </Button>
  306. <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding OriginCommand}">
  307. <StackPanel>
  308. <materialDesign:PackIcon Kind="Origin" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  309. <TextBlock Text="Origin" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
  310. </StackPanel>
  311. </Button>
  312. <Button Margin="5" HorizontalAlignment="Stretch" Height="Auto" BorderBrush="Gray" BorderThickness="2" Command="{Binding CloseDialogCommand}" CommandParameter="true">
  313. <StackPanel>
  314. <materialDesign:PackIcon Kind="ExitToApp" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Height="42" Width="auto"/>
  315. <TextBlock Text="Close" VerticalAlignment="Stretch" HorizontalAlignment="Center" />
  316. </StackPanel>
  317. </Button>
  318. </StackPanel>
  319. </Grid>
  320. <!--<StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,5,0,0">
  321. <Button x:Name="btnSend" HorizontalAlignment="Left" VerticalAlignment="Top" Width="100" Margin="0,0,20,0" Height="25" Command="{Binding CloseDialogCommand}" CommandParameter="true" Content="확인" Background="#FF1368BD" Style="{StaticResource MaterialDesignRaisedButton}"/>
  322. -->
  323. <!--Style="{DynamicResource btn_Send}"-->
  324. <!--
  325. <Button x:Name="btnCancel" HorizontalAlignment="Left" VerticalAlignment="Top" Width="100" Height="25" Content="취소" Command="{Binding CloseDialogCommand}" CommandParameter="false" Background="#FF1368BD" Style="{StaticResource MaterialDesignRaisedButton}"/>
  326. -->
  327. <!--Style="{DynamicResource btn_Close}"-->
  328. <!--
  329. </StackPanel>-->
  330. </Grid>
  331. </UserControl>