| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 | <UserControl x:Class="CyberX8_Themes.UserControls.MetalCMUIControl"             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"              xmlns:local="clr-namespace:CyberX8_Themes.UserControls"             xmlns:converters="clr-namespace:CyberX8_Themes.Converters"             xmlns:userControls="clr-namespace:CyberX8_Themes.UserControls"             xmlns:customControls="clr-namespace:CyberX8_Themes.CustomControls"             mc:Ignorable="d" x:Name="self"             d:DesignHeight="450" d:DesignWidth="800">    <UserControl.Resources>        <converters:BoolToVisibility2 x:Key="boolToVisibility2"></converters:BoolToVisibility2>        <converters:BoolToOrientation x:Key="boolToOrientation"></converters:BoolToOrientation>        <Style x:Key="DisableContextMenuStyle" TargetType="userControls:Pump1">            <Setter Property="IsEnabled" Value="False"/>        </Style>        <ContextMenu x:Key="ClampValve">            <MenuItem Header="Open" Click="ClampValveOn_Click"/>            <MenuItem Header="Close" Click="ClampValveOff_Click"/>        </ContextMenu>        <ContextMenu x:Key="UnclampValve">            <MenuItem Header="Open" Click="UnclampValveOn_Click"/>            <MenuItem Header="Close" Click="UnclampValveOff_Click"/>        </ContextMenu>        <ContextMenu x:Key="CellFlowValve">            <MenuItem Header="Open" Click="CellFlowValveOn_Click"/>            <MenuItem Header="Close" Click="CellFlowValveOff_Click"/>        </ContextMenu>    </UserControl.Resources>    <Grid>        <!--左边滑杆-->        <Rectangle Margin="347,90,447,131" Panel.ZIndex="2" Stroke="White" StrokeThickness="0.5">            <Rectangle.Fill>                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">                    <GradientStop Offset="0" Color="White" />                    <GradientStop Offset="1" Color="DimGray" />                </LinearGradientBrush>            </Rectangle.Fill>        </Rectangle>        <Rectangle Fill="CornflowerBlue" Margin="345,142,453,131" Panel.ZIndex="1" Stroke="Black" StrokeThickness="0.2"/>        <Rectangle Fill="DimGray" Margin="339,142,455,131" Panel.ZIndex="1" Stroke="Black" StrokeThickness="0.3"/>        <Rectangle Fill="PowderBlue" Margin="353,142,435,131" Panel.ZIndex="1" Stroke="Gray" StrokeThickness="0.5"/>        <Border  Width="4" Background="Black"   CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="357,152,439,287"/>        <Border  Width="4" Background="Black"   CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="357,179,439,261"/>        <Border  Width="4" Background="Black"   CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="357,208,439,232"/>        <Border  Width="4" Background="Black"   CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="357,240,439,200"/>        <!--右边滑杆-->        <Rectangle Margin="551,90,243,130" Panel.ZIndex="2" Stroke="White" StrokeThickness="0.5">            <Rectangle.Fill>                <LinearGradientBrush StartPoint="1,0" EndPoint="0,0">                    <GradientStop Offset="0" Color="White" />                    <GradientStop Offset="1" Color="DimGray" />                </LinearGradientBrush>            </Rectangle.Fill>        </Rectangle>        <Rectangle Fill="DimGray" Margin="559,142,235,130" Panel.ZIndex="1" Stroke="Black" StrokeThickness="0.3"/>        <Rectangle Fill="PowderBlue" Margin="539,142,249,130" Panel.ZIndex="1" Stroke="Gray" StrokeThickness="0.5"/>        <Rectangle Fill="CornflowerBlue" Margin="557,142,241,130" Panel.ZIndex="1" Stroke="Black" StrokeThickness="0.2"/>        <Border  Width="4" Background="Black"   CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="543,153,253,287"/>        <Border  Width="4" Background="Black"   CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="543,179,253,261"/>        <Border  Width="4" Background="Black"   CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="543,209,253,231"/>        <Border  Width="4" Background="Black"   CornerRadius="5,5,5,5" Panel.ZIndex="1" Margin="543,240,253,200"/>        <!-- 中间背景-->        <Rectangle Fill="White" Stroke="Black"  Margin="323,137,221,41" RadiusX="2" RadiusY="2" />        <!-- 顶部背景-->        <Rectangle Fill="White" Stroke="Black"  Margin="305,89,207,307" RadiusX="1" RadiusY="1" />        <!--WaferHolder UI-->        <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="308,95,204,41">            <Polyline.Fill>                <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">                    <GradientStop Color="Silver" Offset="0.0" />                    <GradientStop Color="White" Offset="0.5" />                    <GradientStop Color="Silver" Offset="1" />                </LinearGradientBrush>            </Polyline.Fill>        </Polyline>        <Ellipse Opacity="0.6"  Visibility="{Binding ElementName=self,Path=IsWaferHolder,Converter={StaticResource boolToVisibility2}}"  Margin="377,166,273,136">            <Ellipse.Fill>                <LinearGradientBrush EndPoint="0,0" StartPoint="1,1">                    <GradientStop Color="Silver" Offset="0.2" />                    <GradientStop Color="White" Offset="0.5" />                    <GradientStop Color="Silver" Offset="0.7" />                    <GradientStop Color="DarkGray" Offset="0.9"/>                </LinearGradientBrush>            </Ellipse.Fill>        </Ellipse>        <!-- 左边螺丝-->        <userControls:Screw Width="15" Height="15" Margin="324,122,462,313"/>        <userControls:Screw Width="15" Height="15" Margin="324,174,462,261"/>        <userControls:Screw Width="15" Height="15" Margin="324,226,462,209"/>        <userControls:Screw Width="15" Height="15" Margin="324,273,462,162"/>        <userControls:Screw Width="15" Height="15" Margin="324,320,462,115" />        <!-- 右边螺丝-->        <userControls:Screw Width="15" Height="15" Margin="564,122,222,313"/>        <userControls:Screw Width="15" Height="15" Margin="564,174,222,261"/>        <userControls:Screw Width="15" Height="15" Margin="564,226,222,209"/>        <userControls:Screw Width="15" Height="15" Margin="564,273,222,162"/>        <userControls:Screw Width="15" Height="15" Margin="564,320,222,115" />        <Rectangle Fill="Gray" Margin="549,42,241,360" RadiusX="1" RadiusY="1" />        <Rectangle Fill="Black" Margin="549,42,249,360"  />        <Rectangle  Margin="551,42,243,360" RadiusX="1" RadiusY="1">            <Rectangle.Fill>                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">                    <GradientStop Offset="0" Color="White" />                    <GradientStop Offset="1" Color="DimGray" />                </LinearGradientBrush>            </Rectangle.Fill>        </Rectangle>        <Rectangle Fill="Gray" Margin="345,41,445,361" RadiusX="1" RadiusY="1" />        <Rectangle Fill="Black" Margin="345,41,453,361"  />        <Rectangle  Margin="347,41,447,361" RadiusX="1" RadiusY="1">            <Rectangle.Fill>                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">                    <GradientStop Offset="0" Color="White" />                    <GradientStop Offset="1" Color="DimGray" />                </LinearGradientBrush>            </Rectangle.Fill>        </Rectangle>        <Rectangle  Opacity="0.5" Fill="White" Margin="323,340,441,41" RadiusX="1" RadiusY="1" Stroke="Black" StrokeThickness="1"/>        <Rectangle  Opacity="0.5" Fill="White" Margin="543,340,221,41" RadiusX="1" RadiusY="1" Stroke="Black" StrokeThickness="1"/>        <!--Circulation Valve-->        <userControls:FlowPipe Margin="105,372,582,70" Width="113" IsFlowing="{Binding ElementName=self,Path=IsCirculationValveOn}" IsReverse="True"/>        <userControls:FlowPipe Margin="225,372,475,70" IsFlowing="{Binding ElementName=self,Path=IsCirculationValveOn}" IsReverse="True"/>        <Canvas Width="30" Height="30" Margin="205,362,565,58">            <customControls:CommonValveControl Height="16" Width="16" Canvas.Left="7" Canvas.Top="6" HorizontalAlignment="Center" VerticalAlignment="Top"                                           Status="{Binding ElementName=self,Path=IsCirculationValveOn}" ValveOrientation="Horizontal"                                             IsCanEdit="True" ContextMenu="{StaticResource CellFlowValve}"/>        </Canvas>        <Label  Height="25" FontSize="13"  FontWeight="Bold" Content="Circulation" Margin="175,342,543,83"  />        <Border Width="35" Height="15" CornerRadius="17"  Opacity="0.95" x:Name="border1" Margin="152,404,612,31" RenderTransformOrigin="0.5,0.5">            <Border.RenderTransform>                <TransformGroup>                    <ScaleTransform/>                    <SkewTransform/>                    <RotateTransform Angle="180.232"/>                    <TranslateTransform/>                </TransformGroup>            </Border.RenderTransform>        </Border>        <!--中间动画模块-->        <Grid Width="400" Height="300"  Panel.ZIndex="2" Margin="262,80,138,70">            <Canvas x:Name="linmot" >                <Image Source="pack://application:,,,/CyberX8_Themes;component/Themes/Images/parts/metalMove.png"                    Height="98" Width="224" HorizontalAlignment="Left" VerticalAlignment="Top" Panel.ZIndex="2" Canvas.Left="85"                    Canvas.Top="{Binding ElementName=self,Path=YaxleData}">                </Image>            </Canvas>        </Grid>        <Rectangle x:Name="GrowingRectangle" Fill="PaleGreen" Height="0" VerticalAlignment="Bottom" Margin="359,0,257,42">            <Rectangle.Style>                <Style TargetType="Rectangle">                    <Style.Triggers>                        <DataTrigger Binding="{Binding ElementName=self,Path=PumpData.PumpValve}" Value="True">                            <DataTrigger.EnterActions>                                <BeginStoryboard x:Name="GrowingStoryboard">                                    <Storyboard >                                        <DoubleAnimation Storyboard.TargetProperty="Height" To="50" Duration="0:0:30"/>                                    </Storyboard>                                </BeginStoryboard>                            </DataTrigger.EnterActions>                            <DataTrigger.ExitActions>                                <StopStoryboard BeginStoryboardName="GrowingStoryboard"/>                            </DataTrigger.ExitActions>                        </DataTrigger>                    </Style.Triggers>                </Style>            </Rectangle.Style>        </Rectangle>        <Rectangle x:Name="ErrorRectangle" Fill="Transparent" Height="234" VerticalAlignment="Bottom" Margin="370,0,266,50" Opacity="0.5" Panel.ZIndex="3"               Visibility="{Binding ElementName=self,Path=IsError,Converter={StaticResource boolToVisibility2}}"/>        <!--Clamp Valve On-->        <userControls:FlowPipe Margin="105,100,595,342" IsFlowing="{Binding IsClampValveOn, ElementName=self}" IsReverse="False"/>        <userControls:FlowPipe Margin="207,100,493,342" IsFlowing="{Binding IsClampValveOn, ElementName=self}" IsReverse="False"/>        <Label  Height="25" FontSize="13"  FontWeight="Bold" Content="Clamp Valve On" Margin="156,70,525,355"  />        <Canvas Width="30" Height="30" Margin="190,89,580,331">            <customControls:CommonValveControl Height="16" Width="16" Canvas.Left="7" Canvas.Top="6" HorizontalAlignment="Center" VerticalAlignment="Top"                                                Status="{Binding ElementName=self,Path=IsClampValveOn}" ValveOrientation="Horizontal"                                               IsCanEdit="True"  RenderTransformOrigin="-0.75,0.312"/>           </Canvas>        <!--Clamp Valve Off-->        <userControls:FlowPipe Margin="207,126,493,316" IsFlowing="{Binding IsUnclampValveOn, ElementName=self}" IsReverse="False"/>        <userControls:FlowPipe Margin="105,126,595,316" IsFlowing="{Binding IsUnclampValveOn, ElementName=self}" IsReverse="False"/>        <Canvas Width="30" Height="30" Margin="190,116,580,304">            <customControls:CommonValveControl Height="16" Width="16" Canvas.Left="7" Canvas.Top="6" HorizontalAlignment="Center" VerticalAlignment="Top"                                                Status="{Binding ElementName=self,Path=IsUnclampValveOn}" ValveOrientation="Horizontal"                                                IsCanEdit="True" />        </Canvas>        <Label  Height="25" FontSize="13"  FontWeight="Bold" Content="Clamp Valve Off" Margin="156,139,525,286"  />    </Grid></UserControl>
 |