终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CodeCanvasPanel.xaml 14 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <UserControl x:Class="BeDesignerSCADA.Controls.CodeCanvasPanel"
  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:local="clr-namespace:BeDesignerSCADA.Controls"
  7. xmlns:icon="http://metro.mahapps.com/winfx/xaml/iconpacks"
  8. mc:Ignorable="d"
  9. d:DesignHeight="900" d:DesignWidth="1400">
  10. <UserControl.Resources>
  11. <ResourceDictionary>
  12. <ResourceDictionary.MergedDictionaries>
  13. <ResourceDictionary Source="/可视化配置工具;component/Themes/Styles.xaml"></ResourceDictionary>
  14. <ResourceDictionary Source="/BPASmartClient.SCADAControl;component/Themes/Generic.xaml" />
  15. </ResourceDictionary.MergedDictionaries>
  16. </ResourceDictionary>
  17. </UserControl.Resources>
  18. <Grid>
  19. <Grid.ColumnDefinitions>
  20. <ColumnDefinition Width="245"/>
  21. <ColumnDefinition/>
  22. <ColumnDefinition Width="320"/>
  23. </Grid.ColumnDefinitions>
  24. <!--左侧选择区域-->
  25. <TabControl x:Name="LeftSelectTab" SelectedIndex="0">
  26. <TabItem Header="页面编辑">
  27. <Border BorderThickness="1" BorderBrush="#FFA9A9A9" Background="Transparent" >
  28. <Grid >
  29. </Grid>
  30. </Border>
  31. </TabItem>
  32. <TabItem Header="组件列表">
  33. <Border BorderThickness="1" BorderBrush="#FFA9A9A9" Background="Transparent">
  34. </Border>
  35. </TabItem>
  36. <TabItem Header="菜单布局">
  37. <Border BorderThickness="1" BorderBrush="#FFA9A9A9" Background="Transparent">
  38. </Border>
  39. </TabItem>
  40. </TabControl>
  41. <!--中间控制区域-->
  42. <DockPanel Grid.Column="1">
  43. <!--按钮控制-->
  44. <DockPanel LastChildFill="False" DockPanel.Dock="Top" Height="24" Margin="4 4 4 0">
  45. <Button Margin="5" Grid.Column="2" Click="OnNew" Name="ButtonNew" ToolTip="创建新工程" Focusable="True" Width="24">
  46. <Button.Template>
  47. <ControlTemplate>
  48. <icon:PackIconModern x:Name="Icon" Kind="PageCode"/>
  49. <ControlTemplate.Triggers>
  50. <Trigger Property="IsEnabled" Value="False">
  51. <Setter TargetName="Icon" Property="Foreground" Value="Gray"/>
  52. </Trigger>
  53. <Trigger Property="IsMouseOver" Value="True">
  54. <Setter TargetName="Icon" Property="Foreground" Value="Green"/>
  55. </Trigger>
  56. </ControlTemplate.Triggers>
  57. </ControlTemplate>
  58. </Button.Template>
  59. </Button>
  60. <Button Margin="5" Grid.Column="2" Click="OnOpen" Name="ButtonOpen" IsEnabled="True" ToolTip="" Width="24">
  61. <Button.Template>
  62. <ControlTemplate>
  63. <icon:PackIconModern x:Name="Icon" Kind="FolderOpen"/>
  64. <ControlTemplate.Triggers>
  65. <Trigger Property="IsEnabled" Value="False">
  66. <Setter TargetName="Icon" Property="Foreground" Value="Gray"/>
  67. </Trigger>
  68. <Trigger Property="IsMouseOver" Value="True">
  69. <Setter TargetName="Icon" Property="Foreground" Value="Green"/>
  70. </Trigger>
  71. </ControlTemplate.Triggers>
  72. </ControlTemplate>
  73. </Button.Template>
  74. </Button>
  75. <Button Margin="5" Grid.Column="2" Click="OnSave" Name="ButtonSave" IsEnabled="False" ToolTip="" Width="24">
  76. <Button.Template>
  77. <ControlTemplate>
  78. <icon:PackIconModern x:Name="Icon" Kind="Save"/>
  79. <ControlTemplate.Triggers>
  80. <Trigger Property="IsEnabled" Value="False">
  81. <Setter TargetName="Icon" Property="Foreground" Value="Gray"/>
  82. </Trigger>
  83. <Trigger Property="IsMouseOver" Value="True">
  84. <Setter TargetName="Icon" Property="Foreground" Value="Green"/>
  85. </Trigger>
  86. </ControlTemplate.Triggers>
  87. </ControlTemplate>
  88. </Button.Template>
  89. </Button>
  90. <Button Margin="5" Grid.Column="2" Name="ButtonSaveAs" IsEnabled="False" ToolTip="" Width="24" Click="OnSaveAs">
  91. <Button.Template>
  92. <ControlTemplate>
  93. <icon:PackIconModern x:Name="Icon" Kind="Archive"/>
  94. <ControlTemplate.Triggers>
  95. <Trigger Property="IsEnabled" Value="False">
  96. <Setter TargetName="Icon" Property="Foreground" Value="Gray"/>
  97. </Trigger>
  98. <Trigger Property="IsMouseOver" Value="True">
  99. <Setter TargetName="Icon" Property="Foreground" Value="Green"/>
  100. </Trigger>
  101. </ControlTemplate.Triggers>
  102. </ControlTemplate>
  103. </Button.Template>
  104. </Button>
  105. <Button Margin="5" Grid.Column="2" Name="ButtonPrint" IsEnabled="False" ToolTip="" Width="24" Visibility="Collapsed" Click="OnPrint">
  106. <Button.Template>
  107. <ControlTemplate>
  108. <icon:PackIconModern x:Name="Icon" Kind="Printer"/>
  109. <ControlTemplate.Triggers>
  110. <Trigger Property="IsEnabled" Value="False">
  111. <Setter TargetName="Icon" Property="Foreground" Value="Gray"/>
  112. </Trigger>
  113. <Trigger Property="IsMouseOver" Value="True">
  114. <Setter TargetName="Icon" Property="Foreground" Value="Green"/>
  115. </Trigger>
  116. </ControlTemplate.Triggers>
  117. </ControlTemplate>
  118. </Button.Template>
  119. </Button>
  120. <Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}"/>
  121. <Button Margin="5" Grid.Column="2" Name="ButtonCopy" IsEnabled="{Binding ElementName=Editor, Path=IsCopyEnabled}" ToolTip="" Width="24" Click="OnCopy">
  122. <Button.Template>
  123. <ControlTemplate>
  124. <icon:PackIconModern x:Name="Icon" Kind="PageCopy"/>
  125. <ControlTemplate.Triggers>
  126. <Trigger Property="IsEnabled" Value="False">
  127. <Setter TargetName="Icon" Property="Foreground" Value="Gray"/>
  128. </Trigger>
  129. <Trigger Property="IsMouseOver" Value="True">
  130. <Setter TargetName="Icon" Property="Foreground" Value="Green"/>
  131. </Trigger>
  132. </ControlTemplate.Triggers>
  133. </ControlTemplate>
  134. </Button.Template>
  135. </Button>
  136. <Button Margin="5" Grid.Column="2" Name="ButtonPaste" IsEnabled="{Binding ElementName=Editor, Path=IsPasteEnabled}" ToolTip="" Width="24" Click="OnPaste">
  137. <Button.Template>
  138. <ControlTemplate>
  139. <icon:PackIconModern x:Name="Icon" Kind="ClipboardPaste"/>
  140. <ControlTemplate.Triggers>
  141. <Trigger Property="IsEnabled" Value="False">
  142. <Setter TargetName="Icon" Property="Foreground" Value="Gray"/>
  143. </Trigger>
  144. <Trigger Property="IsMouseOver" Value="True">
  145. <Setter TargetName="Icon" Property="Foreground" Value="Green"/>
  146. </Trigger>
  147. </ControlTemplate.Triggers>
  148. </ControlTemplate>
  149. </Button.Template>
  150. </Button>
  151. <Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}"/>
  152. <Button Margin="5" Grid.Column="2" Click="OnStartRun" Name="ButtonStart" IsEnabled="False" ToolTip="" Width="24">
  153. <Button.Template>
  154. <ControlTemplate>
  155. <icon:PackIconModern x:Name="Icon" Kind="ControlPlay"/>
  156. <ControlTemplate.Triggers>
  157. <Trigger Property="IsEnabled" Value="False">
  158. <Setter TargetName="Icon" Property="Foreground" Value="Gray"/>
  159. </Trigger>
  160. <Trigger Property="IsMouseOver" Value="True">
  161. <Setter TargetName="Icon" Property="Foreground" Value="DarkBlue"/>
  162. </Trigger>
  163. </ControlTemplate.Triggers>
  164. </ControlTemplate>
  165. </Button.Template>
  166. </Button>
  167. <Button Margin="5" Grid.Column="3" Click="OnStopRun" Name="ButtonStop" IsEnabled="False" Visibility="Visible" ToolTip="">
  168. <Button.Template>
  169. <ControlTemplate TargetType="Button">
  170. <icon:PackIconModern x:Name="Icon" Kind="ControlStop"/>
  171. <ControlTemplate.Triggers>
  172. <Trigger Property="IsEnabled" Value="False">
  173. <Setter TargetName="Icon" Property="Foreground" Value="Gray"/>
  174. </Trigger>
  175. <Trigger Property="IsMouseOver" Value="True">
  176. <Setter TargetName="Icon" Property="Foreground" Value="DarkBlue"/>
  177. </Trigger>
  178. </ControlTemplate.Triggers>
  179. </ControlTemplate>
  180. </Button.Template>
  181. </Button>
  182. <Button Margin="5" Grid.Column="3" Click="OnClearError" IsEnabled="False" Name="ButtonClearError" Visibility="Visible" ToolTip="" Width="24">
  183. <Button.Template>
  184. <ControlTemplate TargetType="Button">
  185. <icon:PackIconModern x:Name="Icon" Kind="StarRemove"/>
  186. <ControlTemplate.Triggers>
  187. <Trigger Property="IsEnabled" Value="False">
  188. <Setter TargetName="Icon" Property="Foreground" Value="Gray"/>
  189. <Setter TargetName="Icon" Property="Spin" Value="False"/>
  190. </Trigger>
  191. </ControlTemplate.Triggers>
  192. </ControlTemplate>
  193. </Button.Template>
  194. </Button>
  195. <ToggleButton Name="ButtonHighligh" ToolTip="" IsChecked="False" Width="24"
  196. Click="OnHighlightClicked">
  197. <ToggleButton.Template>
  198. <ControlTemplate TargetType="ToggleButton">
  199. <icon:PackIconModern x:Name="Icon" Kind="Flag"/>
  200. <ControlTemplate.Triggers>
  201. <Trigger Property="IsEnabled" Value="False">
  202. <Setter TargetName="Icon" Property="Foreground" Value="Gray"/>
  203. </Trigger>
  204. <Trigger Property="IsChecked" Value="True">
  205. <Setter TargetName="Icon" Property="Foreground" Value="Green"/>
  206. </Trigger>
  207. </ControlTemplate.Triggers>
  208. </ControlTemplate>
  209. </ToggleButton.Template>
  210. </ToggleButton>
  211. <Slider ToolTip="运行速度" Minimum="0" Maximum="100" Margin="15, 0" Value="20" Name="SliderSpeeder"
  212. Width="150" VerticalAlignment="Center" ValueChanged="OnSpeedValueChanged"/>
  213. </DockPanel>
  214. <!--中间画布-->
  215. <Border BorderThickness="1" BorderBrush="{StaticResource AccentBrush}" Margin="4">
  216. <Border.Background>
  217. <ImageBrush ImageSource="../Images/bj.png" Stretch="UniformToFill"/>
  218. </Border.Background>
  219. <Grid>
  220. <Grid.ColumnDefinitions>
  221. <ColumnDefinition/>
  222. <ColumnDefinition Width="auto"/>
  223. </Grid.ColumnDefinitions>
  224. <ScrollViewer VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible">
  225. <Grid>
  226. <!--画布区域-->
  227. </Grid>
  228. </ScrollViewer>
  229. <TextBlock HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,20,20" FontSize="16" Foreground="Red">分辨率:1920×1080</TextBlock>
  230. </Grid>
  231. </Border>
  232. </DockPanel>
  233. <!--右侧属性栏-->
  234. <Grid Grid.Column="2">
  235. <TabControl x:Name="ReditSeleceTab" SelectedIndex="0">
  236. <TabItem Header="属性栏">
  237. </TabItem>
  238. </TabControl>
  239. </Grid>
  240. </Grid>
  241. </UserControl>