SequenceView.xaml 30 KB

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