| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266 | <UserControl x:Class="PunkHPX8_Themes.UserControls.MetalSHUIControl"             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:PunkHPX8_Themes.UserControls"             xmlns:userControls="clr-namespace:PunkHPX8_Themes.UserControls"             xmlns:customControls="clr-namespace:PunkHPX8_Themes.CustomControls"             xmlns:converters="clr-namespace:PunkHPX8_Themes.Converters"             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>        <converters:BoolToColor x:Key="boolToColor"/>        <converters:BoolToBool x:Key="boolToBool"/>        <Style x:Key="DisableContextMenuStyle" TargetType="userControls:Pump1">            <Setter Property="IsEnabled" Value="False"/>        </Style>        <ContextMenu x:Key="IsClampValveOpen">            <MenuItem Header="Open" Click="OpenClampValve_Click"/>            <MenuItem Header="Close" Click="CloseClampValve_Click"/>        </ContextMenu>        <ContextMenu x:Key="CellCirculationValve">            <MenuItem Header="Flow" Click="OpenCellFlow_Click"/>            <MenuItem Header="Bypass" Click="OpenCellBypass_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"/>        <!--reservoir背景-->        <Polyline Fill="White" Stroke="LightGray" Points="0,0 0,400 450,400 450,25 100,25 100,0 0,0" StrokeThickness="3" Margin="175,65,175,-60"/>        <Polyline Fill="LightGray" Stroke="LightGray" Points="90,0 90,35 450,35 450,25 100,25 100,0 90,0" StrokeThickness="3" Margin="175,65,175,-60"/>        <!-- 中间背景-->        <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,93,204,43">            <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,156,273,146">            <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 Fill="White" Opacity="0.5" Margin="323,340,441,41" RadiusX="1" RadiusY="1" Stroke="Black" StrokeThickness="1"/>        <Rectangle Fill="White" Opacity="0.5" Margin="543,340,221,41" RadiusX="1" RadiusY="1" Stroke="Black" StrokeThickness="1"/>        <!--中间动画模块-->        <Grid Width="400" Height="300"  Panel.ZIndex="2" Margin="262,80,138,70">            <Canvas x:Name="linmot" >                <Image Source="pack://application:,,,/PunkHPX8_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>        <Grid  Panel.ZIndex="2" Margin="291,89,174,13">            <Canvas >                <Canvas.RenderTransform>                    <!-- 定义平移变换 -->                    <TranslateTransform x:Name="imageTranslate"/>                </Canvas.RenderTransform>                <Canvas.Style>                    <Style TargetType="Canvas">                        <!-- 设置数据触发器 -->                        <Style.Triggers>                            <DataTrigger Binding="{Binding IsRunLinmot}" Value="True">                                <DataTrigger.EnterActions>                                    <BeginStoryboard>                                        <Storyboard>                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)" RepeatBehavior="Forever">                                                <LinearDoubleKeyFrame Value="0" KeyTime="0:0:0"/>                                                <LinearDoubleKeyFrame Value="50" KeyTime="0:0:2"/>                                                <LinearDoubleKeyFrame Value="0" KeyTime="0:0:4"/>                                            </DoubleAnimationUsingKeyFrames>                                        </Storyboard>                                    </BeginStoryboard>                                </DataTrigger.EnterActions>                                <DataTrigger.ExitActions>                                    <BeginStoryboard>                                        <Storyboard>                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.Y)">                                                <LinearDoubleKeyFrame Value="25" KeyTime="0:0:0"/>                                                <LinearDoubleKeyFrame Value="0" KeyTime="0:0:2"/>                                            </DoubleAnimationUsingKeyFrames>                                        </Storyboard>                                    </BeginStoryboard>                                </DataTrigger.ExitActions>                            </DataTrigger>                        </Style.Triggers>                    </Style>                </Canvas.Style>                <Image Source="pack://application:,,,/PunkHPX8_Themes;component/Themes/Images/parts/MetalFence.png" x:Name="metalLinmot"HorizontalAlignment="Center" VerticalAlignment="Top" Panel.ZIndex="2" Canvas.Left="54" Width="215" Height="181" Canvas.Top="25">                </Image>            </Canvas>        </Grid>        <Rectangle x:Name="ErrorRectangle" Fill="Red" Height="234" VerticalAlignment="Bottom" Margin="370,0,266,73" Opacity="0.5" Panel.ZIndex="3"           Visibility="{Binding ElementName=self,Path=IsError,Converter={StaticResource boolToVisibility2}}"/>        <!--Clamp Valve On-->        <userControls:FlowPipe Margin="212,112,492,330" Width="94" IsReverse="False"/>        <Rectangle  Fill="lime" Height="6" Margin="215,113,497,331" Opacity="0.5"Visibility="{Binding IsClampValveOpen,ElementName=self,Converter={StaticResource boolToVisibility2}}"/>        <Label  Height="25" FontSize="13"  FontWeight="Bold" Content="Clamp Valve" Margin="175,83,505,342"  />        <Canvas Width="30" Height="30" Margin="240,101,530,319">            <customControls:CommonValveControl Height="16" Width="16" Canvas.Left="7" Canvas.Top="6" HorizontalAlignment="Center" VerticalAlignment="Top"                                            ValveOrientation="Horizontal" Status="{Binding IsClampValveOpen, ElementName=self}"                                           IsCanEdit="True" ContextMenu="{StaticResource IsClampValveOpen}" RenderTransformOrigin="-0.75,0.312"/>        </Canvas>        <!--Cell Circulation-->        <userControls:Fan Width="45" Height="46" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="102,366,0,0" RenderTransformOrigin="0.5,0.5" Panel.ZIndex="1" ContextMenu="{StaticResource CellCirculationValve}">            <userControls:Fan.RenderTransform>                <TransformGroup>                    <ScaleTransform/>                    <SkewTransform/>                    <RotateTransform Angle="0"/>                    <TranslateTransform/>                </TransformGroup>            </userControls:Fan.RenderTransform>        </userControls:Fan>        <userControls:FlowPipe Margin="130,340,620,102"  Width="50" IsFlowing="{Binding ElementName=self,Path=IsCellCirculationValveOn,Converter={StaticResource boolToBool}}" IsReverse="False"/>        <userControls:FlowPipe Margin="128,351,650,91"  Width="22" IsFlowing="{Binding ElementName=self,Path=IsCellCirculationValveOn,Converter={StaticResource boolToBool}}" RotateTransformValue="90" IsReverse="True"/>        <userControls:Pipe2  RotateTransformValue="-90" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="121,354,0,0" />        <userControls:FlowPipe Margin="131,431,349,11" Width="320" IsFlowing="{Binding ElementName=self,Path=IsCellCirculationValveOn}" IsReverse="False"/>        <userControls:FlowPipe Margin="463,408,317,34" Width="20" IsFlowing="{Binding ElementName=self,Path=IsCellCirculationValveOn}" RotateTransformValue="90" IsReverse="True"/>        <userControls:FlowPipe Margin="128,408,650,34"  Width="22" RotateTransformValue="90" IsFlowing="{Binding ElementName=self,Path=IsCellCirculationValveOn}" IsReverse="False"/>        <userControls:Pipe2  RotateTransformValue="90" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="464,427,0,0" />        <userControls:Pipe2  RotateTransformValue="180" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="134,440,0,0" />        <userControls:FlowPipe Margin="-110,385,690,57" Width="220" IsFlowing="{Binding ElementName=self,Path=IsCellPumpOn}" IsReverse="False"/>        <userControls:FlowPipe Margin="-111,315,845,127" Width="66" IsFlowing="{Binding ElementName=self,Path=IsCellPumpOn}" RotateTransformValue="90" IsReverse="False"/>        <userControls:FlowPipe Margin="-110,304,622,138" Width="288" IsFlowing="{Binding ElementName=self,Path=IsCellPumpOn}" IsReverse="True"/>        <userControls:Pipe2  RotateTransformValue="-90" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-118,318,0,0" />        <userControls:Pipe2  RotateTransformValue="180" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-105,394,0,0" />        <Canvas Width="50" Height="80" Margin="52,385,698,-15" Visibility="{Binding ElementName=self,Path=IsSingalPump,Converter={StaticResource boolToVisibility2}}">            <userControls:PrewetTankControl/>            <Rectangle Width="20" Height="40" Canvas.Left="6" Canvas.Top="24" HorizontalAlignment="Left" VerticalAlignment="Top"                        Visibility="{Binding ElementName=self,Path=IsCellPumpOn,Converter={StaticResource boolToVisibility2}}"                       Fill="Lime"/>        </Canvas>        <Canvas Width="60" Height="80" Margin="-30,326,770,44" Panel.ZIndex="2">            <userControls:Pump1 RotateTransformValue="0" Width="60"  IsOpenPump="{Binding ElementName=self,Path=IsCellPumpOn,Mode=TwoWay}" Canvas.Top="10" HorizontalAlignment="Left" VerticalAlignment="Center"                        ModuleName="{Binding ElementName=self, Path=ModuleName}" Canvas.Left="-35"                         Visibility="{Binding ElementName=self,Path=IsSingalPump,Converter={StaticResource boolToVisibility2}}"/>        </Canvas>        <Polygon Width="10" Points="0,10 20,0 20,20" Fill="Black" StrokeThickness="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-34,394,0,0" RenderTransformOrigin="0.5,0.5">            <Polygon.RenderTransform>                <TransformGroup>                    <ScaleTransform/>                    <SkewTransform/>                    <RotateTransform Angle="-180"/>                    <TranslateTransform/>                </TransformGroup>            </Polygon.RenderTransform>        </Polygon>        <Polygon Points="0,0 30,0 30,4 0,4" Fill="Black" StrokeThickness="1" Canvas.Left="10" Canvas.Top="8" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-54,402,0,0"/>        <Label Content="Filter Purge Enable"  FontSize="13" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="-119,0,0,16"/>        <Ellipse Grid.Column="0" Width="16" Height="16" Fill="{Binding ElementName=self,Path=IsCellPumpOn,Converter={StaticResource boolToColor}}" HorizontalAlignment="Right" Stroke="Silver" Margin="0,413,766,21"/>        <Label Content="Cell Flow"  FontSize="13" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="26,0,0,112"/>        <Border Margin="10,340,690,86" Background="Black">            <TextBlock  Text="{Binding ElementName=self,Path=MetalData.CellFlow,StringFormat=\{0:F1\} L/min,Mode=TwoWay}" Foreground="Lime" FontSize="13" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>        </Border>    </Grid></UserControl>
 |