TemplateWindow.xaml 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. <Window
  2. x:Class="SHJX.Service.View.View.TemplateWindow"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:pu="clr-namespace:Panuon.UI.Silver;assembly=Panuon.UI.Silver"
  9. Title="任务模板"
  10. Width="1000"
  11. Height="665"
  12. AllowsTransparency="True"
  13. Background="Transparent"
  14. ResizeMode="NoResize"
  15. WindowStartupLocation="CenterScreen"
  16. WindowStyle="None"
  17. mc:Ignorable="d">
  18. <Grid>
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="0.8*" />
  21. <RowDefinition Height="1*" />
  22. <RowDefinition Height="10*" />
  23. <RowDefinition Height="1*" />
  24. </Grid.RowDefinitions>
  25. <Border
  26. Grid.Row="0"
  27. Grid.RowSpan="4"
  28. Margin="5"
  29. Background="White"
  30. BorderBrush="#99CCCC"
  31. BorderThickness="3">
  32. <Border.Effect>
  33. <DropShadowEffect
  34. BlurRadius="10"
  35. Opacity="0.8"
  36. ShadowDepth="0"
  37. Color="#CCCCCC" />
  38. </Border.Effect>
  39. </Border>
  40. <Border
  41. Grid.Row="0"
  42. Margin="5"
  43. Background="#99CCCC" />
  44. <Grid
  45. x:Name="TemplateTag"
  46. Grid.Row="0"
  47. MouseLeftButtonDown="TemplateTag_MouseLeftButtonDown">
  48. <TextBlock
  49. Margin="10,0,0,0"
  50. VerticalAlignment="Center"
  51. FontSize="13"
  52. FontWeight="Black"
  53. Foreground="White"
  54. Text="模板设置" />
  55. <Button
  56. x:Name="btn_template_close"
  57. Width="25"
  58. Height="25"
  59. Margin="0,0,10,0"
  60. Padding="0"
  61. HorizontalAlignment="Right"
  62. pu:ButtonHelper.ButtonStyle="Hollow"
  63. pu:ButtonHelper.ClickStyle="Sink"
  64. pu:ButtonHelper.CornerRadius="20"
  65. pu:ButtonHelper.HoverBrush="#66CCCC"
  66. Background="Transparent"
  67. BorderBrush="Transparent"
  68. Click="btn_template_close_Click"
  69. Cursor="Hand">
  70. <Image
  71. Width="25"
  72. Height="25"
  73. Source="/SHJX.Service.Resource;component/Resources/关闭.png" />
  74. </Button>
  75. </Grid>
  76. <Border
  77. Grid.Row="1"
  78. Width="970"
  79. Height="40"
  80. VerticalAlignment="Center"
  81. CornerRadius="8">
  82. <TextBox
  83. x:Name="TemplateSearch"
  84. Width="200"
  85. Height="30"
  86. Margin="15,0"
  87. HorizontalAlignment="Right"
  88. pu:TextBoxHelper.CornerRadius="10"
  89. pu:TextBoxHelper.FocusedBorderBrush="#99CCCC"
  90. pu:TextBoxHelper.FocusedShadowColor="#99CCCC"
  91. pu:TextBoxHelper.Watermark="根据节点名称查找"
  92. BorderBrush="#99CCCC"
  93. Cursor="IBeam"
  94. Foreground="#99CCCC">
  95. <i:Interaction.Triggers>
  96. <i:EventTrigger EventName="TextChanged">
  97. <i:InvokeCommandAction Command="{Binding TemplateSearchChangedCommand}" CommandParameter="{Binding ElementName=TemplateSearch}" />
  98. </i:EventTrigger>
  99. </i:Interaction.Triggers>
  100. </TextBox>
  101. </Border>
  102. <Border
  103. Grid.Row="2"
  104. Width="970"
  105. CornerRadius="8">
  106. <GroupBox
  107. Width="940"
  108. Height="510"
  109. HorizontalAlignment="Center"
  110. VerticalAlignment="Center"
  111. pu:GroupBoxHelper.CornerRadius="8"
  112. pu:GroupBoxHelper.IsSplitLineVisible="True"
  113. pu:GroupBoxHelper.ShadowColor="#66CCCC"
  114. BorderBrush="#99CCCC"
  115. Foreground="#99CCCC"
  116. Header="任务模板">
  117. <ScrollViewer
  118. Grid.Row="0"
  119. HorizontalAlignment="Stretch"
  120. BorderBrush="#99CCCC"
  121. Cursor="Hand"
  122. HorizontalScrollBarVisibility="Disabled"
  123. VerticalScrollBarVisibility="Auto">
  124. <DataGrid
  125. x:Name="dg_template"
  126. Width="925"
  127. Height="460"
  128. pu:DataGridHelper.ColumnHorizontalContentAlignment="Center"
  129. pu:DataGridHelper.HeaderBackground="#5099CCCC"
  130. pu:DataGridHelper.HeaderForeground="White"
  131. pu:DataGridHelper.HeaderMinHeight="45"
  132. pu:DataGridHelper.HoverBackground="#5066CCCC"
  133. pu:DataGridHelper.SelectedBackground="#5099CCCC"
  134. BorderBrush="#99CCCC"
  135. CanUserAddRows="False"
  136. Foreground="#99CCCC"
  137. ItemsSource="{Binding DetailInfos, Mode=TwoWay}"
  138. SelectedItem="{Binding SelectedEmployee, Mode=TwoWay}"
  139. SelectionMode="Extended">
  140. <pu:DataGridHelper.AutoGenerateCheckBoxStyle>
  141. <Style BasedOn="{StaticResource {x:Type CheckBox}}" TargetType="CheckBox">
  142. <Setter Property="pu:CheckBoxHelper.CheckBoxStyle" Value="Switch" />
  143. <Style.Triggers>
  144. <DataTrigger Binding="{Binding Path=(pu:CheckBoxHelper.CheckBoxStyle), RelativeSource={RelativeSource Self}}" Value="Switch">
  145. <Setter Property="pu:CheckBoxHelper.CheckedBackground" Value="#99CCCC" />
  146. </DataTrigger>
  147. </Style.Triggers>
  148. </Style>
  149. </pu:DataGridHelper.AutoGenerateCheckBoxStyle>
  150. <DataGrid.ContextMenu>
  151. <ContextMenu Name="dgmenu1" StaysOpen="true">
  152. <MenuItem Command="{Binding InsertOneDataCommand}" Header="数据增加" />
  153. <MenuItem Command="{Binding DeleteOneDataCommand}" Header="删除选中" />
  154. <MenuItem Command="{Binding UpdateOneDataCommand}" Header="类型修改" />
  155. </ContextMenu>
  156. </DataGrid.ContextMenu>
  157. </DataGrid>
  158. </ScrollViewer>
  159. </GroupBox>
  160. </Border>
  161. <Border
  162. Grid.Row="3"
  163. Width="970"
  164. Height="40"
  165. VerticalAlignment="Center"
  166. CornerRadius="8"
  167. Cursor="Hand">
  168. <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
  169. <Button
  170. Width="90"
  171. Height="30"
  172. Margin="0,0,10,0"
  173. pu:ButtonHelper.ClickStyle="Sink"
  174. pu:ButtonHelper.CornerRadius="12"
  175. pu:ButtonHelper.HoverBrush="#66CCCC"
  176. Background="#99CCCC"
  177. BorderBrush="#FFF"
  178. Command="{Binding InterfaceDisplayCommand}"
  179. Content="界面数据导入"
  180. Cursor="Hand"
  181. FontFamily="{StaticResource FontAwesome}"
  182. Foreground="#FFF" />
  183. <Button
  184. Width="90"
  185. Height="30"
  186. Margin="0,0,10,0"
  187. pu:ButtonHelper.ClickStyle="Sink"
  188. pu:ButtonHelper.CornerRadius="12"
  189. pu:ButtonHelper.HoverBrush="#66CCCC"
  190. Background="#99CCCC"
  191. BorderBrush="#FFF"
  192. Command="{Binding ImportTemplateToInterfaceCommand}"
  193. Content="导出至界面"
  194. Cursor="Hand"
  195. FontFamily="{StaticResource FontAwesome}"
  196. Foreground="#FFF" />
  197. <Button
  198. Width="90"
  199. Height="30"
  200. Margin="0,0,10,0"
  201. pu:ButtonHelper.ClickStyle="Sink"
  202. pu:ButtonHelper.CornerRadius="12"
  203. pu:ButtonHelper.HoverBrush="#66CCCC"
  204. Background="#99CCCC"
  205. BorderBrush="#FFF"
  206. Command="{Binding ImportTemplateCommand}"
  207. Content="模板导入"
  208. Cursor="Hand"
  209. FontFamily="{StaticResource FontAwesome}"
  210. Foreground="#FFF" />
  211. <Button
  212. Width="90"
  213. Height="30"
  214. Margin="0,0,15,0"
  215. pu:ButtonHelper.ClickStyle="Sink"
  216. pu:ButtonHelper.CornerRadius="12"
  217. pu:ButtonHelper.HoverBrush="#66CCCC"
  218. Background="#99CCCC"
  219. BorderBrush="#FFF"
  220. Command="{Binding SavaTemplateCommand}"
  221. Content="模板导出"
  222. Cursor="Hand"
  223. FontFamily="{StaticResource FontAwesome}"
  224. Foreground="#FFF" />
  225. </StackPanel>
  226. </Border>
  227. </Grid>
  228. </Window>