TMChamber.xaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. <UserControl x:Class="Venus_Themes.UserControls.TMChamber"
  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:Venus_Themes.UserControls"
  7. xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
  8. xmlns:converters="clr-namespace:Venus_Themes.Converters"
  9. mc:Ignorable="d"
  10. d:DesignHeight="450" d:DesignWidth="800" Name="tmChamber" Opacity="0.9">
  11. <UserControl.Resources>
  12. <Style TargetType="Rectangle" x:Key="doorAnimation">
  13. <Setter Property="Width" Value="200"/>
  14. <Style.Triggers>
  15. <DataTrigger Binding="{Binding ElementName=tmChamber,Path=DoorIsOpen}" Value="True">
  16. <DataTrigger.EnterActions>
  17. <BeginStoryboard>
  18. <Storyboard>
  19. <DoubleAnimation Storyboard.TargetProperty="Width" To="40" Duration="0:0:1"/>
  20. </Storyboard>
  21. </BeginStoryboard>
  22. </DataTrigger.EnterActions>
  23. <DataTrigger.ExitActions>
  24. <BeginStoryboard>
  25. <Storyboard>
  26. <DoubleAnimation Storyboard.TargetProperty="Width" To="200" Duration="0:0:1"/>
  27. </Storyboard>
  28. </BeginStoryboard>
  29. </DataTrigger.ExitActions>
  30. </DataTrigger>
  31. </Style.Triggers>
  32. </Style>
  33. <converters:BoolToBool x:Key="BoolToBool"/>
  34. <Storyboard x:Key="WaterStoryboard">
  35. <PointAnimation Storyboard.TargetName="bs_Water" Storyboard.TargetProperty="Point1" From="15,-10" To="15,10" Duration="00:00:1" AutoReverse="True" RepeatBehavior="Forever"></PointAnimation>
  36. <PointAnimation Storyboard.TargetName="bs_Water" Storyboard.TargetProperty="Point2" From="35,10" To="35,-10" Duration="00:00:2.5" AutoReverse="True" RepeatBehavior="Forever"></PointAnimation>
  37. </Storyboard>
  38. <Storyboard x:Key="WaterWidth">
  39. <DoubleAnimation Storyboard.TargetName="rec_Water" Storyboard.TargetProperty="Height" Duration="0:0:0.3">
  40. </DoubleAnimation>
  41. </Storyboard>
  42. </UserControl.Resources>
  43. <UserControl.Triggers>
  44. <EventTrigger RoutedEvent="Loaded">
  45. <BeginStoryboard Storyboard="{StaticResource WaterStoryboard}"></BeginStoryboard>
  46. <BeginStoryboard Storyboard="{StaticResource WaterWidth}"></BeginStoryboard>
  47. </EventTrigger>
  48. </UserControl.Triggers>
  49. <Viewbox Stretch="Fill">
  50. <Viewbox.RenderTransform>
  51. <TransformGroup>
  52. <RotateTransform Angle="{Binding ElementName=tmChamber,Path=RotateTransformValue}"/>
  53. </TransformGroup>
  54. </Viewbox.RenderTransform>
  55. <Border>
  56. <Canvas Width="200" Height="200" Grid.Row="1">
  57. <Border Canvas.Top="-54" Canvas.Left="-9" Height="44" Width="277" Background="Transparent" BorderBrush="Gainsboro" BorderThickness="0,0,3,3" CornerRadius="3" Visibility="{Binding ElementName=tmChamber,Path=IsVenting,Converter={StaticResource bool2VisibilityConverter}}">
  58. <Border Background="Transparent" CornerRadius="1" BorderBrush="Black" BorderThickness="3,3,0,0">
  59. <StackPanel Margin="-160,0,0,0" Height="44">
  60. <StackPanel Width="49" Margin="-40 0 45 10">
  61. <StackPanel.RenderTransform>
  62. <RotateTransform Angle="-90" CenterX="19.5" CenterY="10"></RotateTransform>
  63. </StackPanel.RenderTransform>
  64. <!--矩形-->
  65. <Rectangle x:Name="rec_Water" Fill="#42a5f5" Height="{Binding ElementName=tmChamber,Path=PercentValue,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="50" Margin="-20,6,0,0"/>
  66. <!--水波-->
  67. <Path Fill="#42a5f5" Margin="0,-16,0,0" Height="10" Stretch="Fill">
  68. <Path.RenderTransform>
  69. <RotateTransform Angle="180" CenterX="19.5" CenterY="10"></RotateTransform>
  70. </Path.RenderTransform>
  71. <Path.Data>
  72. <PathGeometry>
  73. <PathFigure StartPoint="0,0">
  74. <BezierSegment x:Name="bs_Water" Point1="15,-5" Point2="35,5" Point3="50,0"></BezierSegment>
  75. <PolyLineSegment Points="50,10 0,10"></PolyLineSegment>
  76. </PathFigure>
  77. </PathGeometry>
  78. </Path.Data>
  79. </Path>
  80. </StackPanel>
  81. </StackPanel>
  82. </Border>
  83. </Border>
  84. <StackPanel Canvas.Top="-50" Canvas.Left="-5" Orientation="Horizontal" VerticalAlignment="Center" Visibility="{Binding ElementName=tmChamber,Path=PMVisibility}">
  85. <TextBlock FontSize="30" Text="{Binding ElementName=tmChamber,Path=Name}"/>
  86. <TextBlock FontSize="30" Text="(" HorizontalAlignment="Center"/>
  87. <TextBlock FontSize="30" Text="{Binding ElementName=tmChamber,Path=PressureValue,StringFormat=F0}" HorizontalAlignment="Center"/>
  88. <TextBlock FontSize="30" Text="mtorr)" HorizontalAlignment="Center"/>
  89. </StackPanel>
  90. <Polygon Stroke="Black" StrokeThickness="2" Points="00,200 0,3 3,0 197,0 200,3 200,200" Visibility="{Binding ElementName=tmChamber,Path=PMVisibility}">
  91. <Polygon.Fill>
  92. <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
  93. <GradientStop Color="Silver" Offset="0.0" />
  94. <GradientStop Color="White" Offset="0.5" />
  95. <GradientStop Color="Silver" Offset="1" />
  96. </LinearGradientBrush>
  97. </Polygon.Fill>
  98. </Polygon>
  99. <!--<Path Stroke="Gray" Canvas.Left="-20" StrokeThickness="2" Visibility="{Binding ElementName=tmChamber,Path=PMVisibility}">
  100. <Path.Data>
  101. <GeometryGroup>
  102. -->
  103. <!--<PathGeometry Figures="M 200,100 A 80,80 1 1 1 200,99.9"/>-->
  104. <!--
  105. <PathGeometry Figures="M 190,100 A 70,70 1 1 1 190,99.9" />
  106. <PathGeometry Figures="M 180,100 A 60,60 1 1 1 180,99.9" />
  107. <PathGeometry Figures="M 170,100 A 50,50 1 1 1 170,99.9" />
  108. <PathGeometry Figures="M 160,100 A 40,40 1 1 1 160,99.9" />
  109. <PathGeometry Figures="M 150,100 A 30,30 1 1 1 150,99.9" />
  110. </GeometryGroup>
  111. </Path.Data>
  112. </Path>-->
  113. <Viewbox Stretch="Uniform" Width="200" Height="200" Canvas.Top="-15" Canvas.Left="2" Visibility="{Binding ElementName=tmChamber,Path=PMVisibility}">
  114. <Canvas UseLayoutRounding="False" Width="93.693" Height="112.5" HorizontalAlignment="Left" VerticalAlignment="Top">
  115. <Canvas Width="72.522" Height="72.521" Canvas.Left="10.473" Canvas.Top="28.781">
  116. <Path Data="F1M10.473,65.041C10.473,85.068,26.708,101.302,46.734,101.302L46.734,101.302C66.761,101.302,82.995,85.068,82.995,65.041L82.995,65.041C82.995,45.015,66.761,28.781,46.734,28.781L46.734,28.781C26.708,28.781,10.473,45.015,10.473,65.041" Stretch="Fill" Width="72.522" Height="72.521" Canvas.Left="0" Canvas.Top="0">
  117. <Path.Fill>
  118. <RadialGradientBrush Center="0.5,0.5" RadiusX="0.5" RadiusY="0.5" GradientOrigin="0.5,0.5">
  119. <RadialGradientBrush.GradientStops>
  120. <GradientStop Color="#FFE5E2DF" Offset="0" />
  121. <GradientStop Color="#FFFFFFFF" Offset="0" />
  122. <GradientStop Color="#FFADAEB0" Offset="0.52" />
  123. <GradientStop Color="sc#1, 0.238698155, 0.250727534, 0.259264916" Offset="0.82" />
  124. <GradientStop Color="#FF454F52" Offset="1" />
  125. </RadialGradientBrush.GradientStops>
  126. </RadialGradientBrush>
  127. </Path.Fill>
  128. </Path>
  129. <Path Data="M46.8477,55.6938C52.0087,55.6938 56.1937,59.8788 56.1937,65.0398 56.1937,70.2008 52.0087,74.3858 46.8477,74.3858 41.6857,74.3858 37.5007,70.2008 37.5007,65.0398 37.5007,59.8788 41.6857,55.6938 46.8477,55.6938z" Stretch="Fill" Stroke="White" StrokeThickness="0.25" Width="18.943" Height="18.942" Canvas.Left="26.903" Canvas.Top="26.788" />
  130. </Canvas>
  131. <Canvas Name="Group_Center" Tag="#00000000,#FF008000,Original,0,None" Width="5.857" Height="5.855" Canvas.Left="43.919" Canvas.Top="62.113">
  132. <Path Data="M46.8477,62.1133C48.4637,62.1133 49.7757,63.4243 49.7757,65.0413 49.7757,66.6583 48.4637,67.9683 46.8477,67.9683 45.2307,67.9683 43.9187,66.6583 43.9187,65.0413 43.9187,63.4243 45.2307,62.1133 46.8477,62.1133z" Stretch="Fill" Fill="LightBlue" Stroke="#FF4C4C4C" StrokeThickness="0.25" Width="6.107" Height="6.105" Canvas.Left="-0.125" Canvas.Top="-0.125" />
  133. </Canvas>
  134. <Canvas Name="Group_Ring" Tag="#00000000,#FF008000,Original,0,None" Width="56.555" Height="56.556" Canvas.Left="18.57" Canvas.Top="36.762">
  135. <Path Data="M46.8477,46.3472C57.1717,46.3472 65.5407,54.7172 65.5407,65.0412 65.5407,75.3652 57.1717,83.7342 46.8477,83.7342 36.5227,83.7342 28.1537,75.3652 28.1537,65.0412 28.1537,54.7172 36.5227,46.3472 46.8477,46.3472z" Stretch="Fill" Stroke="White" StrokeThickness="0.25" Width="37.637" Height="37.637" Canvas.Left="9.459" Canvas.Top="9.46" />
  136. <Path Data="M46.8477,36.8872C62.3957,36.8872 74.9997,49.4912 74.9997,65.0402 74.9997,80.5882 62.3957,93.1932 46.8477,93.1932 31.2987,93.1932 18.6947,80.5882 18.6947,65.0402 18.6947,49.4912 31.2987,36.8872 46.8477,36.8872z" Stretch="Fill" Stroke="White" StrokeThickness="0.25" Width="56.555" Height="56.556" />
  137. </Canvas>
  138. </Canvas>
  139. </Viewbox>
  140. <Rectangle Fill="Silver" Width="200" VerticalAlignment="Top" Height="20" Canvas.Top="200" Canvas.Left="-2"/>
  141. <Rectangle Cursor="Hand" DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl,AncestorLevel=1}}" Style="{StaticResource doorAnimation}" Fill="DimGray" VerticalAlignment="Top" Height="20" Canvas.Top="200" Canvas.Left="-2" Name="door1">
  142. <Rectangle.ContextMenu >
  143. <ContextMenu>
  144. <MenuItem Header="Open Door" Click="OpenDoor_Click" IsChecked="{Binding DoorIsOpen}" IsEnabled="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}"/>
  145. <MenuItem Header="Close Door" Click="CloseDoor_Click" IsChecked="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}" IsEnabled="{Binding DoorIsOpen}"/>
  146. </ContextMenu>
  147. </Rectangle.ContextMenu>
  148. </Rectangle>
  149. <Rectangle Cursor="Hand" DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=UserControl,AncestorLevel=1}}" Style="{StaticResource doorAnimation}" Fill="DimGray" VerticalAlignment="Top" Height="20" Canvas.Top="200" Canvas.Left="-2" Name="door2">
  150. <Rectangle.RenderTransform >
  151. <RotateTransform CenterX="102" CenterY="10" Angle="180"/>
  152. </Rectangle.RenderTransform>
  153. <Rectangle.ContextMenu >
  154. <ContextMenu>
  155. <MenuItem Header="Open Door" Click="OpenDoor_Click" IsChecked="{Binding DoorIsOpen}" IsEnabled="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}"/>
  156. <MenuItem Header="Close Door" Click="CloseDoor_Click" IsChecked="{Binding DoorIsOpen,Converter={StaticResource BoolToBool}}" IsEnabled="{Binding DoorIsOpen}"/>
  157. </ContextMenu>
  158. </Rectangle.ContextMenu>
  159. </Rectangle>
  160. <Viewbox Width="126" Height="126" Canvas.Left="39" Canvas.Top="38">
  161. <local:WaferCtrl WaferData="{Binding ElementName=tmChamber, Path=RobotWafer}"/>
  162. </Viewbox>
  163. </Canvas>
  164. </Border>
  165. </Viewbox>
  166. </UserControl>