SequenceView.xaml 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. <UserControl x:Class="VirgoUI.Client.Models.Recipe.Sequence.SequenceView"
  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:Recipelib="clr-namespace:RecipeEditorLib.DGExtension;assembly=RecipeEditorLib"
  7. xmlns:cal="http://www.caliburn.org"
  8. xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
  9. xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
  10. xmlns:local="clr-namespace:VirgoUI.Client.Models.Recipe"
  11. xmlns:controls="clr-namespace:OpenSEMI.Controls.Controls;assembly=OpenSEMI.Ctrlib"
  12. mc:Ignorable="d" IsEnabled="{Binding PageEnabled}"
  13. d:DesignHeight="450" d:DesignWidth="1200">
  14. <UserControl.Resources>
  15. <DataTemplate x:Key="ParamTemplate">
  16. <Grid Width="250" Margin="0,5">
  17. <Grid.LayoutTransform>
  18. <TransformGroup>
  19. <RotateTransform Angle="-90"/>
  20. <ScaleTransform ScaleX="1" ScaleY="-1" />
  21. </TransformGroup>
  22. </Grid.LayoutTransform>
  23. <TextBlock Text="{Binding DisplayName}" FontFamily="Arial" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5,0"/>
  24. </Grid>
  25. </DataTemplate>
  26. <DataTemplate x:Key="TemplateTextBlock">
  27. <Grid>
  28. <Grid.LayoutTransform>
  29. <TransformGroup>
  30. <RotateTransform Angle="-90"/>
  31. <ScaleTransform ScaleX="1" ScaleY="-1" />
  32. </TransformGroup>
  33. </Grid.LayoutTransform>
  34. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" Width="150" Height="30">
  35. <TextBlock Visibility="{Binding Visible}" Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14" Width="Auto" />
  36. </Border>
  37. </Grid>
  38. </DataTemplate>
  39. <DataTemplate x:Key="TemplateStep">
  40. <Grid>
  41. <Grid.LayoutTransform>
  42. <TransformGroup>
  43. <RotateTransform Angle="-90"/>
  44. <ScaleTransform ScaleX="1" ScaleY="-1" />
  45. </TransformGroup>
  46. </Grid.LayoutTransform>
  47. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Padding="5,1" Width="150" Height="30">
  48. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  49. <ctrl:CheckBoxExt IsChecked="{Binding Checked}" CheckBoxSaved="{Binding IsSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="0,4"/>
  50. <TextBlock Visibility="{Binding Visible}" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14"/>
  51. </StackPanel>
  52. </Border>
  53. </Grid>
  54. </DataTemplate>
  55. <DataTemplate x:Key="TemplateText">
  56. <Grid>
  57. <Grid.LayoutTransform>
  58. <TransformGroup>
  59. <RotateTransform Angle="-90"/>
  60. <ScaleTransform ScaleX="1" ScaleY="-1" />
  61. </TransformGroup>
  62. </Grid.LayoutTransform>
  63. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" Width="150" Height="30">
  64. <ctrl:TextBoxEx Visibility="{Binding Visible}" IsEnabled="{Binding IsEnabled}" TextSaved="{Binding IsSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14" Width="Auto" />
  65. </Border>
  66. </Grid>
  67. </DataTemplate>
  68. <DataTemplate x:Key="TemplateSignInteger">
  69. <Grid>
  70. <Grid.LayoutTransform>
  71. <TransformGroup>
  72. <RotateTransform Angle="-90"/>
  73. <ScaleTransform ScaleX="1" ScaleY="-1" />
  74. </TransformGroup>
  75. </Grid.LayoutTransform>
  76. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" Width="150">
  77. <ctrl:TextBoxEx Visibility="{Binding Visible}" EditBoxMode="SignInteger" TextSaved="{Binding IsSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding IsEnabled}" Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14" Width="Auto" />
  78. </Border>
  79. </Grid>
  80. </DataTemplate>
  81. <DataTemplate x:Key="TemplateRecipeSelection">
  82. <Grid>
  83. <Grid.LayoutTransform>
  84. <TransformGroup>
  85. <RotateTransform Angle="-90"/>
  86. <ScaleTransform ScaleX="1" ScaleY="-1" />
  87. </TransformGroup>
  88. </Grid.LayoutTransform>
  89. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" Width="150" Height="30">
  90. <Grid>
  91. <Grid.ColumnDefinitions>
  92. <ColumnDefinition />
  93. <ColumnDefinition Width="Auto"/>
  94. </Grid.ColumnDefinitions>
  95. <ctrl:TextBoxEx Visibility="{Binding Visible}" IsEnabled="{Binding IsEnabled}" TextSaved="{Binding IsSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14" Width="Auto"/>
  96. <Button Grid.Column="1" Content="..." Visibility="{Binding Visible}" Width="30" Height="20" Margin="5,0,0,0">
  97. <i:Interaction.Triggers>
  98. <i:EventTrigger EventName="Click">
  99. <cal:ActionMessage MethodName="SelectRecipe">
  100. <cal:Parameter Value="{Binding}" />
  101. </cal:ActionMessage>
  102. </i:EventTrigger>
  103. </i:Interaction.Triggers>
  104. </Button>
  105. </Grid>
  106. </Border>
  107. </Grid>
  108. </DataTemplate>
  109. <DataTemplate x:Key="TemplateCombox">
  110. <Grid>
  111. <Grid.LayoutTransform>
  112. <TransformGroup>
  113. <RotateTransform Angle="-90"/>
  114. <ScaleTransform ScaleX="1" ScaleY="-1" />
  115. </TransformGroup>
  116. </Grid.LayoutTransform>
  117. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" Width="150">
  118. <ctrl:ComboBoxExt Style="{StaticResource ResourceKey={x:Type ComboBox}}" Visibility="{Binding Visible}" ComboBoxSaved="{Binding IsSaved, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEnabled="{Binding IsEnabled}" DisplayMemberPath="DisplayName" SelectedValuePath="ControlName" SelectedValue="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" ItemsSource="{Binding Options}"/>
  119. </Border>
  120. </Grid>
  121. </DataTemplate>
  122. <DataTemplate x:Key="TemplateMultiSelection">
  123. <Grid>
  124. <Grid.LayoutTransform>
  125. <TransformGroup>
  126. <RotateTransform Angle="-90"/>
  127. <ScaleTransform ScaleX="1" ScaleY="-1" />
  128. </TransformGroup>
  129. </Grid.LayoutTransform>
  130. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Padding="5,1" MinHeight="30">
  131. <ListBox ItemsSource="{Binding Options}" Visibility="{Binding Visible}">
  132. <ListBox.ItemTemplate>
  133. <DataTemplate>
  134. <StackPanel Orientation="Horizontal" Margin="5,5">
  135. <CheckBox IsChecked="{Binding IsChecked, UpdateSourceTrigger=PropertyChanged}"/>
  136. <TextBlock Text="{Binding DisplayName}"/>
  137. </StackPanel>
  138. </DataTemplate>
  139. </ListBox.ItemTemplate>
  140. <ListBox.ItemsPanel>
  141. <ItemsPanelTemplate>
  142. <WrapPanel Width="139" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  143. </ItemsPanelTemplate>
  144. </ListBox.ItemsPanel>
  145. </ListBox>
  146. </Border>
  147. </Grid>
  148. </DataTemplate>
  149. <DataTemplate x:Key="ParamExpander">
  150. <Grid>
  151. <Grid.ColumnDefinitions>
  152. <ColumnDefinition/>
  153. <ColumnDefinition/>
  154. </Grid.ColumnDefinitions>
  155. <TextBlock Text="{Binding DisplayName}"/>
  156. <Expander Grid.Column="1" HorizontalAlignment="Left"
  157. HorizontalContentAlignment="Left"
  158. VerticalAlignment="Stretch"
  159. IsExpanded="{Binding IsExpanded}"
  160. VerticalContentAlignment="Stretch">
  161. <i:Interaction.Triggers>
  162. <i:EventTrigger EventName="Expanded">
  163. <cal:ActionMessage MethodName="ParamsExpanded">
  164. <cal:Parameter Value="{Binding}" />
  165. </cal:ActionMessage>
  166. </i:EventTrigger>
  167. <i:EventTrigger EventName="Collapsed">
  168. <cal:ActionMessage MethodName="ParamsCollapsed">
  169. <cal:Parameter Value="{Binding}" />
  170. </cal:ActionMessage>
  171. </i:EventTrigger>
  172. </i:Interaction.Triggers>
  173. </Expander>
  174. <Grid.LayoutTransform>
  175. <TransformGroup>
  176. <RotateTransform Angle="-90"/>
  177. <ScaleTransform ScaleX="1" ScaleY="-1" />
  178. </TransformGroup>
  179. </Grid.LayoutTransform>
  180. </Grid>
  181. </DataTemplate>
  182. <DataTemplate x:Key="TemplateExpander">
  183. <TextBlock HorizontalAlignment="Left" FontFamily="Arial" FontSize="14" VerticalAlignment="Center">
  184. <TextBlock.LayoutTransform>
  185. <TransformGroup>
  186. <RotateTransform Angle="-90"/>
  187. <ScaleTransform ScaleX="1" ScaleY="-1" />
  188. </TransformGroup>
  189. </TextBlock.LayoutTransform>
  190. </TextBlock>
  191. </DataTemplate>
  192. <HierarchicalDataTemplate x:Key="FolderTemplate" ItemsSource="{Binding Files}">
  193. <StackPanel Orientation="Horizontal" Tag="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}, Path=DataContext}">
  194. <Image x:Name="ExpandImage" Source="../../../Styles/Folder_Close.png" Width="14" Height="12" Margin="2,0,0,0" VerticalAlignment="Center"/>
  195. <TextBlock Text="{Binding Name}" Margin="5,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
  196. <StackPanel.ContextMenu>
  197. <ContextMenu DataContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}">
  198. <MenuItem Header="Create Sequence" Command="{Binding NewSequenceCommand}"></MenuItem>
  199. <Separator/>
  200. <MenuItem Header="Create Folder" Command="{Binding NewFolderCommand}">
  201. </MenuItem>
  202. <MenuItem Header="Delete Folder" Command="{Binding DeleteFolderCommand}">
  203. </MenuItem>
  204. </ContextMenu>
  205. </StackPanel.ContextMenu>
  206. </StackPanel>
  207. <HierarchicalDataTemplate.Triggers>
  208. <Trigger Property="IsEnabled" Value="false">
  209. <Setter Property="Image.Source" TargetName="ExpandImage" Value="../../../Styles/Folder_Unable.png"/>
  210. </Trigger>
  211. <!--<DataTrigger Binding="{Binding HasItems}" Value="True">
  212. <Setter Property="Image.Source" TargetName="ExpandImage" Value="Folder_Open.png"/>
  213. </DataTrigger>-->
  214. </HierarchicalDataTemplate.Triggers>
  215. </HierarchicalDataTemplate>
  216. <HierarchicalDataTemplate x:Key="FileTemplate" ItemsSource="{Binding Files}">
  217. <StackPanel Orientation="Horizontal" Tag="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}, Path=DataContext}">
  218. <Path Data="M0.5,5.125 L5.125,5.125 5.125,0.5 M5.1,0.5 L15.5,0.5 15.5,19.5 0.5,19.5 C0.5,14.7 0.5,10 0.5,5.1 2,3.6 3.6,2 5.1,0.5 z M8.1,8.5 L8.2,8.5 z M8.1,11.5 L8.2,11.5 z M8.1,14.5 L8.2,14.5 z" Fill="#FFF3F3F3" HorizontalAlignment="Left" Stretch="Fill" Stroke="#FF454545" Width="13" Height="16"/>
  219. <TextBlock Text="{Binding Name}" Margin="5,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
  220. <StackPanel.ContextMenu>
  221. <ContextMenu DataContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}">
  222. <MenuItem Header="Save As..." Command="{Binding SaveAsCommand}">
  223. </MenuItem>
  224. <MenuItem Header="Rename Sequence" Command="{Binding RenameCommand}">
  225. </MenuItem>
  226. <MenuItem Header="Delete Sequence" Command="{Binding DeleteSequenceCommand}">
  227. </MenuItem>
  228. </ContextMenu>
  229. </StackPanel.ContextMenu>
  230. </StackPanel>
  231. </HierarchicalDataTemplate>
  232. <local:FolderOrFileTemplateSelector x:Key="FolderFileTemplateSelector" FolderTemplate="{StaticResource FolderTemplate}" FileTemplate="{StaticResource FileTemplate}"/>
  233. </UserControl.Resources>
  234. <Grid HorizontalAlignment="Left">
  235. <Grid.ColumnDefinitions>
  236. <ColumnDefinition Width="Auto" MinWidth="275"/>
  237. <ColumnDefinition />
  238. </Grid.ColumnDefinitions>
  239. <GridSplitter HorizontalAlignment="Right" Width="5" BorderThickness="0,8" Margin="0,0,-5,0">
  240. <GridSplitter.Background>
  241. <SolidColorBrush/>
  242. </GridSplitter.Background>
  243. </GridSplitter>
  244. <Grid>
  245. <Grid.RowDefinitions>
  246. <RowDefinition Height="Auto"/>
  247. <RowDefinition />
  248. </Grid.RowDefinitions>
  249. <StackPanel>
  250. <StackPanel Orientation="Horizontal">
  251. <Button Content="New" Width="85" Height="30" IsEnabled="{Binding EnableNew}">
  252. <i:Interaction.Triggers>
  253. <i:EventTrigger EventName="Click">
  254. <cal:ActionMessage MethodName="NewSequence">
  255. </cal:ActionMessage>
  256. </i:EventTrigger>
  257. </i:Interaction.Triggers>
  258. </Button>
  259. <Button Content="Rename" Margin="10,0,0,0" Width="85" Height="30" IsEnabled="{Binding EnableReName}">
  260. <i:Interaction.Triggers>
  261. <i:EventTrigger EventName="Click">
  262. <cal:ActionMessage MethodName="RenameSequence">
  263. </cal:ActionMessage>
  264. </i:EventTrigger>
  265. </i:Interaction.Triggers>
  266. </Button>
  267. <Button Content="Delete" Margin="10,0,0,0" Width="85" Height="30" IsEnabled="{Binding EnableDelete}">
  268. <i:Interaction.Triggers>
  269. <i:EventTrigger EventName="Click">
  270. <cal:ActionMessage MethodName="DeleteSequence">
  271. </cal:ActionMessage>
  272. </i:EventTrigger>
  273. </i:Interaction.Triggers>
  274. </Button>
  275. </StackPanel>
  276. </StackPanel>
  277. <Border Grid.Row="1" Margin="0,5,0,0" BorderBrush="{DynamicResource Tab_BD}" BorderThickness="1" Background="{DynamicResource Tab_BG}">
  278. <TreeView x:Name="PART_TREE" Grid.Row="1" Margin="5" ItemsSource="{Binding Files[0].Files}" ItemTemplateSelector="{StaticResource FolderFileTemplateSelector}"
  279. VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling"
  280. Height="{Binding Path=ActualHeight,ElementName=PART_BORDER, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}">
  281. <!--Height should add for VirtualizingPanel, otherwise the App will be slow-->
  282. <TreeView.ItemContainerStyle>
  283. <Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource ResourceKey={x:Type TreeViewItem}}">
  284. <Setter Property="IsExpanded" Value="True"></Setter>
  285. </Style>
  286. </TreeView.ItemContainerStyle>
  287. <i:Interaction.Triggers>
  288. <i:EventTrigger EventName="SelectedItemChanged">
  289. <cal:ActionMessage MethodName="TreeSelectChanged">
  290. <cal:Parameter Value="{Binding SelectedItem, ElementName=PART_TREE}" />
  291. </cal:ActionMessage>
  292. </i:EventTrigger>
  293. <i:EventTrigger EventName="MouseRightButtonDown">
  294. <cal:ActionMessage MethodName="TreeRightMouseDown">
  295. <cal:Parameter Value="$eventargs" />
  296. </cal:ActionMessage>
  297. </i:EventTrigger>
  298. </i:Interaction.Triggers>
  299. <TreeView.ContextMenu>
  300. <ContextMenu>
  301. <MenuItem Header="New Sequence" Command="{Binding NewSequenceInParentCommand}"></MenuItem>
  302. <Separator/>
  303. <MenuItem Header="New Folder" Command="{Binding NewFolderInParentCommand}">
  304. </MenuItem>
  305. </ContextMenu>
  306. </TreeView.ContextMenu>
  307. </TreeView>
  308. </Border>
  309. </Grid>
  310. <Grid Grid.Column="1">
  311. <Grid.RowDefinitions>
  312. <RowDefinition Height="Auto"/>
  313. <RowDefinition />
  314. </Grid.RowDefinitions>
  315. <Grid Width="900" HorizontalAlignment="Left" Margin="10,0,0,0">
  316. <Grid.ColumnDefinitions>
  317. <ColumnDefinition Width="100"/>
  318. <ColumnDefinition Width="10*"/>
  319. <ColumnDefinition Width="100"/>
  320. <ColumnDefinition Width="8*"/>
  321. <ColumnDefinition Width="8*"/>
  322. <ColumnDefinition Width="Auto"/>
  323. </Grid.ColumnDefinitions>
  324. <Grid.RowDefinitions>
  325. <RowDefinition Height="30"/>
  326. <RowDefinition Height="30"/>
  327. <RowDefinition Height="Auto"/>
  328. </Grid.RowDefinitions>
  329. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
  330. <TextBlock Text="Name" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="16" FontFamily="Arial" VerticalAlignment="Center"/>
  331. </Border>
  332. <Border Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  333. <ctrl:TextBoxEx AllowBackgroundChange="False" IsEnabled="false" Text="{Binding CurrentSequence.Name}" TextWrapping="Wrap" VerticalAlignment="Center" MinWidth="100" Width="Auto"/>
  334. </Border>
  335. <Border Grid.Column="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
  336. <TextBlock Text="Create" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="16" FontFamily="Arial" VerticalAlignment="Center"/>
  337. </Border>
  338. <Border Grid.Column="3" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  339. <TextBlock Text="{Binding CurrentSequence.Creator}" HorizontalAlignment="Left" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center" MinWidth="100" Width="Auto"/>
  340. </Border>
  341. <Border Grid.Column="4" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  342. <TextBlock Text="{Binding CurrentSequence.CreateTime}" HorizontalAlignment="Left" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center" MinWidth="100" Width="Auto"/>
  343. </Border>
  344. <Border Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
  345. <TextBlock Text="Description" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="16" FontFamily="Arial" VerticalAlignment="Center"/>
  346. </Border>
  347. <Border Grid.Row="1" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  348. <ctrl:TextBoxEx Text="{Binding CurrentSequence.Description}" TextSaved="{Binding IsSavedDesc, Mode=TwoWay}" TextWrapping="Wrap" VerticalAlignment="Center" MinWidth="100" Width="Auto"/>
  349. </Border>
  350. <Border Grid.Row="1" Grid.Column="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
  351. <TextBlock Text="Revise" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="16" FontFamily="Arial" VerticalAlignment="Center"/>
  352. </Border>
  353. <Border Grid.Row="1" Grid.Column="3" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  354. <TextBlock Text="{Binding CurrentSequence.Revisor}" HorizontalAlignment="Left" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center" Width="120"/>
  355. </Border>
  356. <Border Grid.Row="1" Grid.Column="4" BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  357. <TextBlock Text="{Binding CurrentSequence.ReviseTime}" HorizontalAlignment="Left" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" FontSize="14" FontFamily="Arial" VerticalAlignment="Center" MinWidth="140"/>
  358. </Border>
  359. </Grid>
  360. <Grid Grid.Row="1" Margin="10,10,0,0">
  361. <Grid.RowDefinitions>
  362. <RowDefinition Height="50"/>
  363. <RowDefinition />
  364. </Grid.RowDefinitions>
  365. <Grid>
  366. <StackPanel Orientation="Horizontal">
  367. <Button Content="Append" Width="90" Height="30" IsEnabled="{Binding EnableStep}">
  368. <i:Interaction.Triggers>
  369. <i:EventTrigger EventName="Click">
  370. <cal:ActionMessage MethodName="AddStep">
  371. </cal:ActionMessage>
  372. </i:EventTrigger>
  373. </i:Interaction.Triggers>
  374. </Button>
  375. <Button Content="Insert" Margin="10,0,0,0" Width="90" Height="30" IsEnabled="{Binding EnableStep}">
  376. <i:Interaction.Triggers>
  377. <i:EventTrigger EventName="Click">
  378. <cal:ActionMessage MethodName="AppendStep">
  379. </cal:ActionMessage>
  380. </i:EventTrigger>
  381. </i:Interaction.Triggers>
  382. </Button>
  383. <Button Content="Copy" Margin="10,0,0,0" Width="90" Height="30" IsEnabled="{Binding EnableStep}">
  384. <i:Interaction.Triggers>
  385. <i:EventTrigger EventName="Click">
  386. <cal:ActionMessage MethodName="CopyStep">
  387. </cal:ActionMessage>
  388. </i:EventTrigger>
  389. </i:Interaction.Triggers>
  390. </Button>
  391. <Button Content="Paste" Margin="10,0,0,0" Width="90" Height="30" IsEnabled="{Binding EnableStep}">
  392. <i:Interaction.Triggers>
  393. <i:EventTrigger EventName="Click">
  394. <cal:ActionMessage MethodName="PasteStep">
  395. </cal:ActionMessage>
  396. </i:EventTrigger>
  397. </i:Interaction.Triggers>
  398. </Button>
  399. <Button Content="Delete" Margin="10,0,0,0" Width="90" Height="30" IsEnabled="{Binding EnableStep}">
  400. <i:Interaction.Triggers>
  401. <i:EventTrigger EventName="Click">
  402. <cal:ActionMessage MethodName="DeleteStep">
  403. </cal:ActionMessage>
  404. </i:EventTrigger>
  405. </i:Interaction.Triggers>
  406. </Button>
  407. <Border Margin="10,0,0,0" Width="150" Height="50" Visibility="{Binding ThicknessVisibility}" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Content}" Grid.Row="4" Padding="10,0" >
  408. <StackPanel VerticalAlignment="Center">
  409. <CheckBox FontSize="12" Margin="3" Content="Thin Wafer(薄片)" IsChecked="{Binding CurrentSequence.IsThin}"></CheckBox>
  410. <CheckBox FontSize="12" Margin="3" Content="Thick Wafer(厚片)" IsChecked="{Binding CurrentSequence.IsThick}"></CheckBox>
  411. </StackPanel>
  412. </Border>
  413. <Button Margin="50,0,0,0" Width="90" Height="30" Content="Reload">
  414. <i:Interaction.Triggers>
  415. <i:EventTrigger EventName="Click">
  416. <cal:ActionMessage MethodName="ReloadSequence">
  417. </cal:ActionMessage>
  418. </i:EventTrigger>
  419. </i:Interaction.Triggers>
  420. </Button>
  421. <Button Margin="10,0,0,0" Width="90" Height="30" Content="Save" IsEnabled="{Binding EnableSave}">
  422. <i:Interaction.Triggers>
  423. <i:EventTrigger EventName="Click">
  424. <cal:ActionMessage MethodName="SaveSequence">
  425. </cal:ActionMessage>
  426. </i:EventTrigger>
  427. </i:Interaction.Triggers>
  428. </Button>
  429. </StackPanel>
  430. </Grid>
  431. <Grid Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top">
  432. <controls:XDataGrid x:Name="dgCustom" AlternationCount="2" HeadersVisibility="Column" AutoGenerateColumns="False" GridLinesVisibility="None" Background="#00FFFFFF" CanUserAddRows="False" UseHorizontalScrolling="True"
  433. VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling">
  434. <controls:XDataGrid.LayoutTransform>
  435. <TransformGroup>
  436. <RotateTransform Angle="-90"/>
  437. <ScaleTransform ScaleX="1" ScaleY="-1" />
  438. </TransformGroup>
  439. </controls:XDataGrid.LayoutTransform>
  440. </controls:XDataGrid>
  441. <Grid>
  442. <Grid.ColumnDefinitions>
  443. <ColumnDefinition MaxWidth="263"/>
  444. <ColumnDefinition Width="Auto"/>
  445. </Grid.ColumnDefinitions>
  446. <Rectangle Fill="{DynamicResource Table_BD}" Height="1" VerticalAlignment="Top"/>
  447. </Grid>
  448. </Grid>
  449. </Grid>
  450. </Grid>
  451. </Grid>
  452. </UserControl>