PrewetUIControl.xaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <UserControl x:Class="CyberX8_Themes.UserControls.PrewetUIControl"
  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:userControls="clr-namespace:CyberX8_Themes.UserControls"
  7. xmlns:customControls="clr-namespace:CyberX8_Themes.CustomControls"
  8. xmlns:converters="clr-namespace:CyberX8_Themes.Converters"
  9. xmlns:local="clr-namespace:CyberX8_Themes.UserControls"
  10. mc:Ignorable="d" Name="self"
  11. d:DesignHeight="450" d:DesignWidth="800">
  12. <UserControl.Resources>
  13. <converters:BoolToVisibility2 x:Key="boolToVisibility2"></converters:BoolToVisibility2>
  14. <converters:BoolToVisibility x:Key="boolToVisibility"></converters:BoolToVisibility>
  15. <converters:BoolToOrientation x:Key="boolToOrientation"></converters:BoolToOrientation>
  16. <Style x:Key="DisableContextMenuStyle" TargetType="userControls:Pump1">
  17. <Setter Property="IsEnabled" Value="False"/>
  18. </Style>
  19. <ContextMenu x:Key="IsPumpValveOpen">
  20. <MenuItem Header="Open" Click="OpenPumpValve_Click"/>
  21. <MenuItem Header="Close" Click="ClosePumpValve_Click"/>
  22. </ContextMenu>
  23. </UserControl.Resources>
  24. <Grid>
  25. <!--左边滑杆-->
  26. <Rectangle Margin="176,98,618,123" Panel.ZIndex="2" Stroke="White" StrokeThickness="0.5">
  27. <Rectangle.Fill>
  28. <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
  29. <GradientStop Offset="0" Color="White" />
  30. <GradientStop Offset="1" Color="DimGray" />
  31. </LinearGradientBrush>
  32. </Rectangle.Fill>
  33. </Rectangle>
  34. <Rectangle Fill="CornflowerBlue" Margin="174,150,624,123" Panel.ZIndex="1" Stroke="Black" StrokeThickness="0.2"/>
  35. <Rectangle Fill="DimGray" Margin="168,150,626,123" Panel.ZIndex="1" Stroke="Black" StrokeThickness="0.3"/>
  36. <Rectangle Fill="PowderBlue" Margin="182,150,606,123" Panel.ZIndex="1" Stroke="Gray" StrokeThickness="0.5"/>
  37. <Border Width="4" Background="Black" CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="186,160,610,279"/>
  38. <Border Width="4" Background="Black" CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="186,187,610,253"/>
  39. <Border Width="4" Background="Black" CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="186,216,610,224"/>
  40. <Border Width="4" Background="Black" CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="186,248,610,192"/>
  41. <!--右边滑杆-->
  42. <Rectangle Margin="380,98,414,122" Panel.ZIndex="2" Stroke="White" StrokeThickness="0.5">
  43. <Rectangle.Fill>
  44. <LinearGradientBrush StartPoint="1,0" EndPoint="0,0">
  45. <GradientStop Offset="0" Color="White" />
  46. <GradientStop Offset="1" Color="DimGray" />
  47. </LinearGradientBrush>
  48. </Rectangle.Fill>
  49. </Rectangle>
  50. <Rectangle Fill="DimGray" Margin="388,150,406,122" Panel.ZIndex="1" Stroke="Black" StrokeThickness="0.3"/>
  51. <Rectangle Fill="PowderBlue" Margin="368,150,420,122" Panel.ZIndex="1" Stroke="Gray" StrokeThickness="0.5"/>
  52. <Rectangle Fill="CornflowerBlue" Margin="386,150,412,122" Panel.ZIndex="1" Stroke="Black" StrokeThickness="0.2"/>
  53. <Border Width="4" Background="Black" CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="372,161,424,279"/>
  54. <Border Width="4" Background="Black" CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="372,187,424,253"/>
  55. <Border Width="4" Background="Black" CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="372,217,424,223"/>
  56. <Border Width="4" Background="Black" CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="372,248,424,192"/>
  57. <!-- 中间背景-->
  58. <Rectangle Fill="White" Stroke="Black" Margin="152,145,392,33" RadiusX="2" RadiusY="2" />
  59. <!-- 顶部背景-->
  60. <Rectangle Fill="White" Stroke="Black" Margin="134,97,378,299" RadiusX="1" RadiusY="1" />
  61. <!--WaferHolder UI-->
  62. <Polyline Opacity="0.6" Visibility="{Binding ElementName=self,Path=IsWaferHolder,Converter={StaticResource boolToVisibility2}}" Stroke="Black" Points="10,0 10,40 25,40 25,310 263,310 263,40 278,40 278,0 10,0" StrokeThickness="3" Margin="136,103,376,33">
  63. <Polyline.Fill>
  64. <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
  65. <GradientStop Color="Silver" Offset="0.0" />
  66. <GradientStop Color="White" Offset="0.5" />
  67. <GradientStop Color="Silver" Offset="1" />
  68. </LinearGradientBrush>
  69. </Polyline.Fill>
  70. </Polyline>
  71. <Ellipse Opacity="0.6" Visibility="{Binding ElementName=self,Path=IsWaferHolder,Converter={StaticResource boolToVisibility2}}" Margin="205,186,445,116">
  72. <Ellipse.Fill>
  73. <LinearGradientBrush EndPoint="0,0" StartPoint="1,1">
  74. <GradientStop Color="Silver" Offset="0.2" />
  75. <GradientStop Color="White" Offset="0.5" />
  76. <GradientStop Color="Silver" Offset="0.7" />
  77. <GradientStop Color="DarkGray" Offset="0.9"/>
  78. </LinearGradientBrush>
  79. </Ellipse.Fill>
  80. </Ellipse>
  81. <!-- 左边螺丝-->
  82. <userControls:Screw Width="15" Height="15" Margin="152,130,632,305"/>
  83. <userControls:Screw Width="15" Height="15" Margin="152,182,632,253"/>
  84. <userControls:Screw Width="15" Height="15" Margin="152,234,632,201"/>
  85. <userControls:Screw Width="15" Height="15" Margin="152,281,632,154"/>
  86. <userControls:Screw Width="15" Height="15" Margin="152,328,632,107" />
  87. <!-- 右边螺丝-->
  88. <userControls:Screw Width="15" Height="15" Margin="392,130,392,305"/>
  89. <userControls:Screw Width="15" Height="15" Margin="392,182,392,253"/>
  90. <userControls:Screw Width="15" Height="15" Margin="392,234,392,201"/>
  91. <userControls:Screw Width="15" Height="15" Margin="392,281,392,154"/>
  92. <userControls:Screw Width="15" Height="15" Margin="392,328,392,107" />
  93. <Rectangle Fill="Gray" Margin="378,50,412,352" RadiusX="1" RadiusY="1" />
  94. <Rectangle Fill="Black" Margin="378,50,420,352" />
  95. <Rectangle Margin="380,50,414,352" RadiusX="1" RadiusY="1">
  96. <Rectangle.Fill>
  97. <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
  98. <GradientStop Offset="0" Color="White" />
  99. <GradientStop Offset="1" Color="DimGray" />
  100. </LinearGradientBrush>
  101. </Rectangle.Fill>
  102. </Rectangle>
  103. <Rectangle Fill="Gray" Margin="174,49,616,353" RadiusX="1" RadiusY="1" />
  104. <Rectangle Fill="Black" Margin="174,49,624,353" />
  105. <Rectangle Margin="176,49,618,353" RadiusX="1" RadiusY="1">
  106. <Rectangle.Fill>
  107. <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
  108. <GradientStop Offset="0" Color="White" />
  109. <GradientStop Offset="1" Color="DimGray" />
  110. </LinearGradientBrush>
  111. </Rectangle.Fill>
  112. </Rectangle>
  113. <Rectangle Fill="White" Margin="152,348,612,33" RadiusX="1" RadiusY="1" Opacity="0.5" Stroke="Black" StrokeThickness="1"/>
  114. <Rectangle Fill="White" Margin="372,348,392,33" RadiusX="1" RadiusY="1" Opacity="0.5" Stroke="Black" StrokeThickness="1"/>
  115. <!--右边进水阀-->
  116. <userControls:FlowPipe Margin="406,380,294,62" IsFlowing="{Binding ElementName=self,Path=PumpData.PumpEnable}" IsReverse="True"/>
  117. <userControls:FlowPipe Margin="506,380,194,62" IsFlowing="{Binding ElementName=self,Path=PumpData.PumpEnable}" IsReverse="True"/>
  118. <Canvas Width="50" Height="80" Margin="441,370,309,0">
  119. <userControls:PrewetTankControl/>
  120. <Rectangle Width="20" Height="40" Canvas.Left="6" Canvas.Top="24" HorizontalAlignment="Left" VerticalAlignment="Top" Visibility="{Binding ElementName=self,Path=PumpData.PumpValve,Converter={StaticResource boolToVisibility2}}">
  121. <Rectangle.Fill>
  122. <SolidColorBrush Color="LimeGreen" Opacity="0.7"/>
  123. </Rectangle.Fill>
  124. </Rectangle>
  125. </Canvas>
  126. <Canvas Width="30" Height="30" Margin="491,370,279,50">
  127. <customControls:CommonValveControl Height="16" Width="16" Canvas.Left="7" Canvas.Top="6" HorizontalAlignment="Center" VerticalAlignment="Top"
  128. ValveOrientation="Horizontal" Status="{Binding ElementName=self,Path=PumpData.PumpValve}"
  129. IsCanEdit="True" ContextMenu="{StaticResource IsPumpValveOpen}"/>
  130. </Canvas>
  131. <Label Height="20" Width="40" FontSize="10" FontWeight="Bold" Content="DI In" Margin="602,373,158,57" />
  132. <Label Height="25" Width="90" FontSize="10" FontWeight="Bold" Content="Booster Pump" Margin="526,402,184,23" />
  133. <Border Width="35" Height="15" CornerRadius="17" Opacity="0.95" x:Name="border1" Margin="548,393,216,42">
  134. <Path Width="31" Height="10" Fill="Black" Stroke="Black" Stretch="Fill" Data="M213.333333 507.733333h725.333334v42.666667H204.8l145.066667 145.066667-29.866667 29.866666L128 533.333333 320 341.333333l29.866667 29.866667L213.333333 507.733333z"/>
  135. </Border>
  136. <Canvas Width="80" Height="80" Margin="526,313,194,57" Panel.ZIndex="2">
  137. <userControls:Pump1 RotateTransformValue="0" IsOpenPump="{Binding ElementName=self,Path=PumpData.PumpEnable,Mode=TwoWay}" Canvas.Top="10" HorizontalAlignment="Left" VerticalAlignment="Top"
  138. ModuleName="{Binding ElementName=self, Path=ModuleName}"/>
  139. </Canvas>
  140. <!--中间动画模块-->
  141. <Grid Width="400" Height="300" Panel.ZIndex="2" Margin="91,38,309,12">
  142. <Canvas x:Name="linmot" >
  143. <Image Source="pack://application:,,,/CyberX8_Themes;component/Themes/Images/parts/prewetMove.png"
  144. Height="98" Width="224" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="2" Canvas.Left="85"
  145. Canvas.Top="{Binding ElementName=self,Path=YaxleData}">
  146. </Image>
  147. <userControls:PrewetFLowControl IsShow="True" Panel.ZIndex="2" Canvas.Left="142" Canvas.Top="{Binding ElementName=self,Path=YaxleData}" Margin="0,-100,0,0" Visibility="{Binding ElementName=self,Path=PumpData.PumpValve,Converter={StaticResource boolToVisibility2}}" RenderTransformOrigin="0.5,0.5">
  148. <local:PrewetFLowControl.RenderTransform>
  149. <TransformGroup>
  150. <ScaleTransform/>
  151. <SkewTransform/>
  152. <RotateTransform Angle="180"/>
  153. <TranslateTransform/>
  154. </TransformGroup>
  155. </local:PrewetFLowControl.RenderTransform>
  156. </userControls:PrewetFLowControl>
  157. <userControls:PrewetFLowControl IsShow="True" Panel.ZIndex="2" Canvas.Left="136" Canvas.Top="{Binding ElementName=self,Path=YaxleData}" Margin="0,60,0,0" Visibility="{Binding ElementName=self,Path=PumpData.PumpValve,Converter={StaticResource boolToVisibility2}}"/>
  158. </Canvas>
  159. </Grid>
  160. <Rectangle x:Name="ErrorRectangle" Fill="Red" Height="234" VerticalAlignment="Bottom" Margin="199,0,437,42" Opacity="0.5" Panel.ZIndex="3"
  161. Visibility="{Binding ElementName=self,Path=IsError,Converter={StaticResource boolToVisibility2}}"/>
  162. </Grid>
  163. </UserControl>