BackUpView.xaml 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <UserControl
  2. x:Class="FurnaceUI.Views.Parameter.BackUpView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:cal="http://www.caliburn.org"
  6. xmlns:converter1="clr-namespace:Aitex.Core.UI.Converters;assembly=MECF.Framework.UI.Core"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  9. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  10. xmlns:usercontrols="clr-namespace:MECF.Framework.UI.Client.ClientBase.UserControls;assembly=MECF.Framework.UI.Client"
  11. d:DesignHeight="700"
  12. d:DesignWidth="1000"
  13. mc:Ignorable="d">
  14. <UserControl.Resources>
  15. <Style BasedOn="{StaticResource ExModifyScrollBar}" TargetType="ScrollBar"/>
  16. <converter1:BoolToBoolReverseConverter x:Key="BoolToBoolReverseConverter"/>
  17. </UserControl.Resources>
  18. <Grid>
  19. <Grid IsEnabled="{Binding BusyIndicatorVisibility, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolToBoolReverseConverter}}">
  20. <Grid.RowDefinitions>
  21. <RowDefinition Height="65"/>
  22. <RowDefinition/>
  23. </Grid.RowDefinitions>
  24. <Border>
  25. <StackPanel Margin="10,10,0,0" Orientation="Horizontal">
  26. <Button
  27. Width="150"
  28. Height="50"
  29. Content="BackUp"
  30. FontFamily="Arial"
  31. FontSize="16"
  32. Foreground="{DynamicResource FG_Black}"
  33. IsEnabled="{Binding IsAllEnable, UpdateSourceTrigger=PropertyChanged}">
  34. <i:Interaction.Triggers>
  35. <i:EventTrigger EventName="Click">
  36. <cal:ActionMessage MethodName="BackUpClick"/>
  37. </i:EventTrigger>
  38. </i:Interaction.Triggers>
  39. </Button>
  40. <Button
  41. Width="150"
  42. Height="50"
  43. Margin="30,0,0,0"
  44. Command="{Binding CompareCommand}"
  45. Content="Compare"
  46. FontFamily="Arial"
  47. FontSize="16"
  48. Foreground="{DynamicResource FG_Black}"/>
  49. <Button
  50. Width="150"
  51. Height="50"
  52. Margin="30,0,0,0"
  53. Command="{Binding RollBackCommand}"
  54. Content="RollBack"
  55. FontFamily="Arial"
  56. FontSize="16"
  57. Foreground="{DynamicResource FG_Black}"
  58. IsEnabled="{Binding IsAllEnable, UpdateSourceTrigger=PropertyChanged}"/>
  59. <Button
  60. Width="150"
  61. Height="50"
  62. Margin="30,0,0,0"
  63. Content="Create ZIP"
  64. FontFamily="Arial"
  65. FontSize="16"
  66. Foreground="{DynamicResource FG_Black}"
  67. IsEnabled="{Binding IsAllEnable, UpdateSourceTrigger=PropertyChanged}">
  68. <i:Interaction.Triggers>
  69. <i:EventTrigger EventName="Click">
  70. <cal:ActionMessage MethodName="CreateZIP"/>
  71. </i:EventTrigger>
  72. </i:Interaction.Triggers>
  73. </Button>
  74. </StackPanel>
  75. </Border>
  76. <Border Grid.Row="1">
  77. <DataGrid
  78. Name="HTAUX"
  79. Grid.Row="1"
  80. Grid.Column="0"
  81. Grid.ColumnSpan="4"
  82. Height="700"
  83. Margin="10,0,25,0"
  84. HorizontalAlignment="Left"
  85. HorizontalContentAlignment="Stretch"
  86. AutoGenerateColumns="False"
  87. CanUserAddRows="False"
  88. CanUserReorderColumns="False"
  89. CanUserSortColumns="False"
  90. FontSize="14"
  91. IsReadOnly="True"
  92. ItemsSource="{Binding HistoryTableDatas, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
  93. ScrollViewer.CanContentScroll="True"
  94. ScrollViewer.HorizontalScrollBarVisibility="Auto"
  95. ScrollViewer.VerticalScrollBarVisibility="Auto"
  96. SelectedItem="{Binding SelectedItemHistory}"
  97. VirtualizingStackPanel.ScrollUnit="Pixel"
  98. Visibility="{Binding GridHistoryVisibility}">
  99. <DataGrid.Columns>
  100. <DataGridCheckBoxColumn Binding="{Binding IsSelect, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Header="IsSelected">
  101. <DataGridCheckBoxColumn.EditingElementStyle>
  102. <Style TargetType="CheckBox">
  103. <Setter Property="LayoutTransform">
  104. <Setter.Value>
  105. <ScaleTransform ScaleX="3.0" ScaleY="3.0"/>
  106. </Setter.Value>
  107. </Setter>
  108. </Style>
  109. </DataGridCheckBoxColumn.EditingElementStyle>
  110. <DataGridCheckBoxColumn.ElementStyle>
  111. <Style TargetType="CheckBox">
  112. <Setter Property="LayoutTransform">
  113. <Setter.Value>
  114. <ScaleTransform ScaleX="3.0" ScaleY="3.0"/>
  115. </Setter.Value>
  116. </Setter>
  117. </Style>
  118. </DataGridCheckBoxColumn.ElementStyle>
  119. </DataGridCheckBoxColumn>
  120. <DataGridTemplateColumn
  121. Width="300"
  122. Header="File Name"
  123. IsReadOnly="True">
  124. <DataGridTemplateColumn.CellTemplate>
  125. <DataTemplate>
  126. <TextBlock
  127. Width="auto"
  128. HorizontalAlignment="Center"
  129. VerticalAlignment="Center"
  130. IsEnabled="False"
  131. Text="{Binding Name}"/>
  132. </DataTemplate>
  133. </DataGridTemplateColumn.CellTemplate>
  134. </DataGridTemplateColumn>
  135. <DataGridTemplateColumn
  136. Width="300"
  137. Header="Operating Time"
  138. IsReadOnly="True">
  139. <DataGridTemplateColumn.CellTemplate>
  140. <DataTemplate>
  141. <TextBlock
  142. HorizontalAlignment="Center"
  143. VerticalAlignment="Center"
  144. IsEnabled="False"
  145. Text="{Binding ValueStr}"/>
  146. </DataTemplate>
  147. </DataGridTemplateColumn.CellTemplate>
  148. </DataGridTemplateColumn>
  149. </DataGrid.Columns>
  150. </DataGrid>
  151. </Border>
  152. </Grid>
  153. <usercontrols:BusyIndicator
  154. Canvas.Bottom="5"
  155. Width="Auto"
  156. Height="Auto"
  157. Padding="20,10"
  158. HorizontalAlignment="Center"
  159. VerticalAlignment="Center"
  160. HorizontalContentAlignment="Center"
  161. Panel.ZIndex="13"
  162. Background="{StaticResource Tab_BG}"
  163. BorderBrush="Gray"
  164. BorderThickness="3"
  165. Message="{Binding BusyIndicatorContent}"
  166. Visibility="{Binding BusyIndicatorVisibility, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource bool2VisibilityConverter}}"/>
  167. </Grid>
  168. </UserControl>