chenzk 20 órája%!(EXTRA string=óta)
szülő
commit
3283e7d38d

+ 7 - 3
Framework/Common/CommonData/Vpw/VpwMainCommonData.cs

@@ -12,6 +12,7 @@ namespace MECF.Framework.Common.CommonData.Vpw
         public bool ChamberClosed { get { return _chamberClosed; } set { _chamberClosed = value;InvokePropertyChanged(nameof(ChamberClosed)); } }
 
         public bool ChamberOpened { get { return _chamberOpened; } set { _chamberOpened = value;InvokePropertyChanged(nameof(ChamberOpened)); } }
+        
         public bool ChamberClose { get { return _chamberClose; } set { _chamberClose = value;InvokePropertyChanged(nameof(ChamberClose)); } }
 
         public bool LeakDetected { get { return _leakDetected; } set { _leakDetected = value; InvokePropertyChanged(nameof(LeakDetected)); } }
@@ -22,11 +23,13 @@ namespace MECF.Framework.Common.CommonData.Vpw
        
         public bool VacuumPumpEnable { get { return _vacuumPumpEnable; } set { _vacuumPumpEnable = value;InvokePropertyChanged(nameof(VacuumPumpEnable)); } }
 
-        public bool VacuumPumpSpeedEable { get { return _vacuumPumpSpeedEnable; } set { _vacuumPumpSpeedEnable = value;InvokePropertyChanged(nameof(VacuumPumpSpeedEable)); } }
+        public bool VacuumPumpSpeedEnable { get { return _vacuumPumpSpeedEnable; } set { _vacuumPumpSpeedEnable = value;InvokePropertyChanged(nameof(VacuumPumpSpeedEnable)); } }
 
         public double VacuumPumpSpeed { get { return _vacuumPumpSpeed; } set { _vacuumPumpSpeed = value;InvokePropertyChanged(nameof(VacuumPumpSpeed)); } }
 
-        public bool BoosterPumpStatus { get { return _boosterPumpStatus; } set { _boosterPumpStatus = value;InvokePropertyChanged(nameof(BoosterPumpStatus)); } }
+        public bool BoosterPumpStatus { get { return _boosterPumpStatus; } set { _boosterPumpStatus = value; InvokePropertyChanged(nameof(BoosterPumpStatus)); } }
+        //待删除
+        public bool BoosterPumpIsAutoMode { get { return _boosterPumpIsAutoMode; } set { _boosterPumpIsAutoMode = value;InvokePropertyChanged(nameof(BoosterPumpIsAutoMode)); } }
 
         public double BoosterPumpSpeed { get { return _boosterPumpSpeed; } set { _boosterPumpSpeed = value; InvokePropertyChanged(nameof(BoosterPumpSpeed)); } }
         
@@ -77,7 +80,7 @@ namespace MECF.Framework.Common.CommonData.Vpw
         private double _vacuumPumpSpeed;
         private double _boosterPumpSpeed;
         private bool _boosterPumpEnable;
-        private bool _boosterPumpStatus;
+        private bool _boosterPumpIsAutoMode;
         private string _boosterPumpStatusContent;
         private string _boosterPumpModel;
         private double _boosterPumpCurrent;
@@ -90,6 +93,7 @@ namespace MECF.Framework.Common.CommonData.Vpw
         private bool _degasPurge;
         private bool _degasPumpEnable;
         private double _degasPumpPressure;
+        private bool _boosterPumpStatus;
         #endregion
     }
 }

+ 0 - 1
Framework/Common/DataCenter/IQueryDataService.cs

@@ -190,7 +190,6 @@ namespace MECF.Framework.Common.DataCenter
     [ServiceKnownType(typeof(Dictionary<string, ReplenPersistentValue>))]
     [ServiceKnownType(typeof(List<AlarmList>))]
     [ServiceKnownType(typeof(ObservableCollection<SignalTowerItem>))]
-    [ServiceKnownType(typeof(VpwCellCommonData))]
     public interface IQueryDataService
 	{
 		[OperationContract]

+ 3 - 3
Framework/Common/Persistent/VpwCell/VpwCellPersistentManager.cs

@@ -56,7 +56,7 @@ namespace MECF.Framework.Common.Persistent.VpwCell
             }
             catch (Exception ex)
             {
-                LOG.WriteLog(eEvent.ERR_VPWCELL, "System", "Load RinsePersistent xml exception");
+                LOG.WriteLog(eEvent.ERR_VPW, "System", "Load RinsePersistent xml exception");
             }
         }
         /// <summary>
@@ -92,12 +92,12 @@ namespace MECF.Framework.Common.Persistent.VpwCell
                 }
                 catch (Exception ex)
                 {
-                    LOG.WriteLog(eEvent.ERR_VPWCELL, module, "Update VpwCellPersistent xml file excepetion");
+                    LOG.WriteLog(eEvent.ERR_VPW, module, "Update VpwCellPersistent xml file excepetion");
                 }
             }
             else
             {
-                LOG.WriteLog(eEvent.ERR_VPWCELL, module, "Update VpwCellPersistent xml file excepetion");
+                LOG.WriteLog(eEvent.ERR_VPW, module, "Update VpwCellPersistent xml file excepetion");
             }
         }
     }

+ 4 - 0
Framework/Common/TwinCat/BeckhoffIOManager.cs

@@ -110,6 +110,10 @@ namespace MECF.Framework.Common.TwinCat
             foreach (BeckhoffOutput item in cfg.Controller.Outputs)
             {
                 string key = $"{item.Name}";
+                if (!lst.Contains(key))
+                {
+                    lst.Add(key);
+                }
                 if (item.Type == DIGITAL)
                 {
                     if (!_doMap.ContainsKey(key))

+ 3 - 3
PunkHPX8_Core/EventDefine.cs

@@ -157,9 +157,9 @@ namespace Aitex.Core.RT.Log{
 		INFO_WAGO = 6036,
 		WARN_WAGO = 6037,
 		ERR_WAGO = 6038,
-		INFO_VPWCELL = 6039,
-		WARN_VPWCELL = 6040,
-		ERR_VPWCELL = 6041,
+		INFO_VPW = 6039,
+		WARN_VPW = 6040,
+		ERR_VPW = 6041,
 		INFO_VPWMAIN = 6042,
 		WARN_VPWMAIN = 6043,
 		ERR_VPWMAIN = 6044,

+ 63 - 2
PunkHPX8_MainPages/ViewModels/VPWMainViewModel.cs

@@ -1,11 +1,14 @@
 using Aitex.Core.UI.MVVM;
 using MECF.Framework.Common.CommonData.Prewet;
+using MECF.Framework.Common.CommonData.PUF;
 using MECF.Framework.Common.CommonData.Vpw;
+using MECF.Framework.Common.DataCenter;
 using MECF.Framework.Common.Device.LinMot;
 using MECF.Framework.Common.OperationCenter;
 using MECF.Framework.Common.Persistent.Prewet;
 using MECF.Framework.Common.Persistent.VpwMain;
 using MECF.Framework.Common.RecipeCenter;
+using MECF.Framework.Common.Utilities;
 using Prism.Mvvm;
 using System;
 using System.Collections.Generic;
@@ -20,7 +23,7 @@ namespace PunkHPX8_MainPages.ViewModels
     public class VPWMainViewModel : BindableBase
     {
         #region 常量
-        private const string COMMONDATA = "CommonData";
+        private const string COMMONDATA = "CommonData1";
         private const string VPW = "vpw";
         private const string PERSISTENT_VALUE = "PersistentValue";
         #endregion
@@ -162,15 +165,65 @@ namespace PunkHPX8_MainPages.ViewModels
 
         #region Command指令
         public ICommand InitializeCommand { get; set; }
+        public ICommand HomeCommand { get; set; }
 
         #endregion
 
         public VPWMainViewModel()
         {
             InitializeCommand = new DelegateCommand<object>(InitializeAction);
+            HomeCommand = new DelegateCommand<object>(HomeAction);
         }
 
-
+        /// <summary>
+        /// 加载数据
+        /// </summary>
+        public void LoadData(string systemName)
+        {
+            Module = systemName;
+          
+            _rtDataKeys.Clear();
+            List<string> lst = new List<string>();
+            _rtDataValueDic = QueryDataClient.Instance.Service.PollData(lst);
+
+            _rtDataKeys.Add($"{Module}.{PERSISTENT_VALUE}");
+            _rtDataKeys.Add($"{Module}.{COMMONDATA}");
+            _rtDataKeys.Add($"{Module}.MachineState");
+
+            if (_timer == null)
+            {
+                _timer = new DispatcherTimer();
+                _timer.Interval = TimeSpan.FromMilliseconds(200);
+                _timer.Tick += Timer_Tick;
+            }
+            _timer.Start();
+        }
+        /// <summary>
+        /// 定时器执行
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void Timer_Tick(object sender, EventArgs e)
+        {
+            if (_rtDataKeys.Count != 0)
+            {
+                _rtDataValueDic = QueryDataClient.Instance.Service.PollData(_rtDataKeys);
+                if (_rtDataValueDic != null)
+                {
+                    VpwMainCommonData = CommonFunction.GetValue<VpwMainCommonData>(_rtDataValueDic, $"{Module}.{COMMONDATA}");
+                }
+            }
+        }
+        /// <summary>
+        /// 隐藏
+        /// </summary>
+        public void Hide()
+        {
+            if (_timer != null)
+            {
+                _timer.Stop();
+            }
+        }
 
 
         #region 指令Action
@@ -182,6 +235,14 @@ namespace PunkHPX8_MainPages.ViewModels
         {
             InvokeClient.Instance.Service.DoOperation($"{Module}.InitializeAll");
         }
+        /// <summary>
+        /// Home Action
+        /// </summary>
+        /// <param name="param"></param>
+        private void HomeAction(object param)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{Module}.Home");
+        }
         #endregion
 
 

+ 101 - 2
PunkHPX8_MainPages/Views/VPWMainView.xaml

@@ -8,8 +8,107 @@
              prism:ViewModelLocator.AutoWireViewModel="True"
              xmlns:local="clr-namespace:PunkHPX8_MainPages.Views"
              mc:Ignorable="d" x:Name="self"
-             d:DesignHeight="850" d:DesignWidth="1800">
+             d:DesignHeight="850" d:DesignWidth="1850">
     <Grid>
-            
+        <Grid.RowDefinitions>
+            <RowDefinition Height="70"/>
+            <RowDefinition Height="215"/>
+            <RowDefinition Height="160"/>
+            <RowDefinition Height="280"/>
+            <RowDefinition Height="150"/>
+            <RowDefinition/>
+        </Grid.RowDefinitions>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="610"></ColumnDefinition>
+            <ColumnDefinition Width="400"></ColumnDefinition>
+            <ColumnDefinition Width="600"></ColumnDefinition>
+            <ColumnDefinition Width="250"></ColumnDefinition>
+            <ColumnDefinition/>
+        </Grid.ColumnDefinitions>
+        <Grid Grid.Row="0" Grid.Column="0">
+            <Label Content="VPW MAIN"  FontSize="25" Margin="20,0,0,0" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Top" HorizontalAlignment="Left"></Label>
+        </Grid>
+
+        <Grid Grid.Row="0" Grid.Column="3">
+            <Label Content="Vacuum Prewet"  FontSize="25" Margin="20,0,0,0" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Top" HorizontalAlignment="Left"></Label>
+        </Grid>
+
+        <Grid Grid.Row="1" Grid.Column="0">
+            <UserControls:VPWBoosterPumpControl ModuleName="{Binding Module}"
+                                                InputPumpSpeed="{Binding VpwMainCommonData.BoosterPumpSpeed,Mode=TwoWay}"
+                                                PumpEnable="{Binding VpwMainCommonData.BoosterPumpEnable}"
+                                                StatusValue="{Binding VpwMainCommonData.BoosterPumpStatusContent}"
+                                                PumpSpeedAuto="{Binding VpwMainCommonData.BoosterPumpIsAutoMode}"
+                                                PressureCurrent="{Binding VpwMainCommonData.BoosterPumpCurrent}"
+                
+                ></UserControls:VPWBoosterPumpControl>
+        </Grid>
+        <Grid Grid.Row="2" Grid.Column="0">
+            <UserControls:VPWDegasControl ModuleName="{Binding Module}"
+                                          PumpEnable="{Binding VpwMainCommonData.DegasPumpEnable}"
+                                          PumpPressure="{Binding VpwMainCommonData.DegasPumpPressure}"
+                
+                ></UserControls:VPWDegasControl>
+        </Grid>
+        <Grid Grid.Row="3" Grid.Column="0">
+            <UserControls:VPWMainStateControl  Margin="5,20,0,0" ModuleName="{Binding Module}"
+                                               ChamberClose="{Binding VpwMainCommonData.ChamberClose}"
+                                               FluidInContainment="{Binding VpwMainCommonData.LeakDetected}"
+                                               DIWInletValveOpen="{Binding VpwMainCommonData.DiwEnable}"
+                                               WaterPressure="{Binding VpwMainCommonData.DiwPressure}"
+                                               
+                                               
+                                               
+                                               ></UserControls:VPWMainStateControl>
+        </Grid>
+        <Grid Grid.Row="4" Grid.Column="0">
+            <UserControls:VPWMainPurgeControl ModuleName="{Binding Module}"
+                                              PurgeValveEnable="{Binding VpwMainCommonData.DegasPurge}"
+                
+                ></UserControls:VPWMainPurgeControl>
+        </Grid>
+
+        <Grid Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Grid.RowSpan="4">
+            <UserControls:VPWMainUIControl ModuleName="{Binding Module}"
+                                           DIWProcessValve="{Binding VpwMainCommonData.DiwProcess}"
+                                           DIWDegasValve="{Binding VpwMainCommonData.DiwDegas}"
+                                           DegasAdjustValve="{Binding VpwMainCommonData.DegasAdjust}"
+                                           TotalFlow="{Binding VpwMainCommonData.DiwTotalFlow}"
+                
+                ></UserControls:VPWMainUIControl>
+        </Grid>
+
+        <Grid Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="2" Grid.RowSpan="2">
+            <UserControls:VPWMainVacuumPumpControl VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,0,50,50"
+                                                   ModuleName="{Binding Module}"
+                                                   PumpPressure="{Binding VpwMainCommonData.VacuumPumpPressure}"
+                                                   PumpPWREnable="{Binding VpwMainCommonData.VacuumPumpPower}"
+                                                   PumpEnable="{Binding VpwMainCommonData.VacuumPumpEnable}"
+                                                   PumpSpeedControlEnable="{Binding VpwMainCommonData.VacuumPumpSpeedEnable}"
+                                                   InputPumpSpeed="{Binding VpwMainCommonData.VacuumPumpSpeed,Mode=TwoWay}"
+                                                   ></UserControls:VPWMainVacuumPumpControl>
+        </Grid>
+
+
+        <Grid Grid.Row="1" Grid.Column="3" Margin="25,0,0,0">
+            <UserControls:OperatingModeControl Margin="0,50,0,0"></UserControls:OperatingModeControl>
+        </Grid>
+
+        <Grid Grid.Row="2" Grid.Column="3" Margin="25,0,0,0">
+            <UserControls:RecipeModeControl Margin="5,40,35,10"></UserControls:RecipeModeControl>
+        </Grid>
+
+        <Grid Grid.Row="0" Grid.Column="3" Grid.RowSpan="2">
+            <Button Margin="0,0,0,140" IsEnabled="{Binding IsAutoEnabled}" Style="{StaticResource SysBtnStyle}" Height="30" Width="120" HorizontalAlignment="Center" Content="Initialize" Command="{Binding InitializeCommand}" />
+        </Grid>
+        <Grid Grid.Row="2" Grid.Column="3" Grid.RowSpan="2">
+            <Button Margin="0,0,0,80" IsEnabled="{Binding IsAutoEnabled}" Style="{StaticResource SysBtnStyle}" Height="30" Width="120" HorizontalAlignment="Center" Content="Home" Command="{Binding HomeCommand}" />
+        </Grid>
+
+        <Label Grid.Row="1" Grid.Column="3" Margin="0,10,0,0" Content="Operating Mode"  FontSize="15" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Top" HorizontalAlignment="Center"></Label>
+        <Label Grid.Row="2" Grid.Column="3" Margin="0,10,0,0" Content="Recipe Mode"  FontSize="15" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Top" HorizontalAlignment="Center"></Label>
+
+
+
     </Grid>
 </UserControl>

+ 2 - 2
PunkHPX8_RT/Config/Devices/Beckhoffcfg - plctask.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <BeckhoffCfg>
-	<Controller Name="MASTER" IPAddress="192.168.0.200.1.1" PortAddress="851">
+	<Controller Name="MASTER" IPAddress="10.4.6.75.1.1" PortAddress="851">
 
 		<!-- Need to have at least one input and one output before Axis stuff -->
 
@@ -40,7 +40,7 @@
 		<Output Name="c_VPW_VACUUM_PUMP_ENABLE" Address="MAIN.VPW_DO_16CHANNEL_EL2809_101_8" Type="Digital" Invert="false" DataType="bool"/>
 		<Output Name="c_VPW_VACUUM_PUMP_SPEED_ENABLE" Address="MAIN.VPW_DO_16CHANNEL_EL2809_101_9" Type="Digital" Invert="false" DataType="bool"/>
 		<Output Name="c_VPW_VACUUM_PUMP_SPEED" Address="MAIN.VPW_AO_8CHANNEL_0_10V_EL4008_N104_1" Scaling="0=0,20=32767" Type="Analog" DataType="int"/>
-		<Output Name="c_VPW_BOOSTER_PUMP_SPPED" Address="MAIN.VPW_AO_8CHANNEL_0_10V_EL4008_N104_5" Scaling="0=0,20=32767" Type="Analog" DataType="int"/>
+		<Output Name="c_VPW_BOOSTER_PUMP_SPPED" Address="MAIN.VPW_AO_8CHANNEL_0_10V_EL4008_N104_5" Scaling="300=0,7300=32767" Type="Analog" DataType="int"/>
 		<Output Name="c_VPW_DIW_EABLE" Address="MAIN.VPW_PNEU_SMC_EX260_V01_V04" Type="Digital" BitOperated="true" Bit="0" DataType="byte"/>
 		<Output Name="c_VPW_DIW_PROCESS" Address="MAIN.VPW_PNEU_SMC_EX260_V01_V04" Type="Digital" BitOperated="true" Bit="1" DataType="byte"/>
 		<Output Name="c_VPW_DIW_DEGAS" Address="MAIN.VPW_PNEU_SMC_EX260_V05_V08" Type="Digital" BitOperated="true" Bit="0" DataType="byte"/>

+ 9 - 9
PunkHPX8_RT/Config/LogDefine.json

@@ -1408,29 +1408,29 @@
     {
     "Id": 6039,
     "Level": "Info",
-    "LogEnum": "INFO_VPWCELL",
+    "LogEnum": "INFO_VPW",
     "GlobalDescription_zh": "{0}。",
     "GlobalDescription_en": "{0}.",
-    "Module": "VPWCELL",
-    "Note": "VPWCELL Info"
+    "Module": "VPW",
+    "Note": "VPW Info"
   },
     {
     "Id": 6040,
     "Level": "Warning",
-    "LogEnum": "WARN_VPWCELL",
+    "LogEnum": "WARN_VPW",
     "GlobalDescription_zh": "{0}。",
     "GlobalDescription_en": "{0}.",
-    "Module": "VPWCELL",
-    "Note": "VPWCELL Warning"
+    "Module": "VPW",
+    "Note": "VPW Warning"
   },
     {
     "Id": 6041,
     "Level": "Error",
-    "LogEnum": "ERR_VPWCELL",
+    "LogEnum": "ERR_VPW",
     "GlobalDescription_zh": "{0}。",
     "GlobalDescription_en": "{0}.",
-    "Module": "VPWCELL",
-    "Note": "VPWCELL Error"
+    "Module": "VPW",
+    "Note": "VPW Error"
   },
      {
     "Id": 6042,

+ 20 - 3
PunkHPX8_RT/Devices/VpwMain/VpwMainDevice.cs

@@ -6,6 +6,7 @@ using MECF.Framework.Common.Beckhoff.ModuleIO;
 using MECF.Framework.Common.CommonData.Prewet;
 using MECF.Framework.Common.CommonData.Vpw;
 using MECF.Framework.Common.IOCore;
+using MECF.Framework.Common.Persistent.Prewet;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -18,7 +19,8 @@ namespace PunkHPX8_RT.Devices.VpwMain
     public class VpwMainDevice : BaseDevice, IDevice
     {
         #region 常量 
-        private const string COMMON_DATA = "CommonData";
+        private const string COMMON_DATA = "CommonData1";
+        private const string PERSISTENT_VALUE = "CommonData";
         private const string CHAMBER_CLOSED = "ChamberClosed";
         private const string CHAMBER_OPENED = "ChamberOpened";
         private const string CHAMBER_CLOSE = "ChamberClose";
@@ -100,7 +102,8 @@ namespace PunkHPX8_RT.Devices.VpwMain
         /// </summary>
         private void SubscribeData()
         {
-            
+            DATA.Subscribe($"{Module}.{PERSISTENT_VALUE}", () => null, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+            DATA.Subscribe($"{Module}.{COMMON_DATA}", () => CommonData, SubscriptionAttribute.FLAG.IgnoreSaveDB);
         }
         /// <summary>
         /// 订阅数据
@@ -183,6 +186,9 @@ namespace PunkHPX8_RT.Devices.VpwMain
 
             OP.Subscribe($"{Module}.ChamberUp", (cmd, para) => { return ChamberUp(); });
             OP.Subscribe($"{Module}.ChamberDown", (cmd, para) => { return ChamberDown(); });
+            
+            OP.Subscribe($"{Module}.BoosterPumpSpeedAuto", (cmd, para) => { return BoosterPumpSpeedAuto(); });
+            OP.Subscribe($"{Module}.BoosterPumpSpeedManual", (cmd, para) => { return BoosterPumpSpeedManual(); });
         }
         #endregion
 
@@ -342,7 +348,18 @@ namespace PunkHPX8_RT.Devices.VpwMain
         /// <returns></returns>
         public bool ChamberDown()
         {
-            return WriteVariableValue(CHAMBER_CLOSE, false);
+            return WriteVariableValue(CHAMBER_CLOSE, true);
+        }
+
+        public bool BoosterPumpSpeedAuto()
+        {
+            _commonData.BoosterPumpIsAutoMode = true;
+            return true;
+        }
+        public bool BoosterPumpSpeedManual()
+        {
+            _commonData.BoosterPumpIsAutoMode = false;
+            return true;
         }
         #endregion
 

+ 28 - 0
PunkHPX8_Themes/PunkHPX8_Themes.csproj

@@ -486,6 +486,18 @@
     <Compile Include="UserControls\VPWDegasControl.xaml.cs">
       <DependentUpon>VPWDegasControl.xaml</DependentUpon>
     </Compile>
+    <Compile Include="UserControls\VPWMainPurgeControl.xaml.cs">
+      <DependentUpon>VPWMainPurgeControl.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="UserControls\VPWMainStateControl.xaml.cs">
+      <DependentUpon>VPWMainStateControl.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="UserControls\VPWMainUIControl.xaml.cs">
+      <DependentUpon>VPWMainUIControl.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="UserControls\VPWMainVacuumPumpControl.xaml.cs">
+      <DependentUpon>VPWMainVacuumPumpControl.xaml</DependentUpon>
+    </Compile>
     <Compile Include="UserControls\VPWMotionControl.xaml.cs">
       <DependentUpon>VPWMotionControl.xaml</DependentUpon>
     </Compile>
@@ -1039,6 +1051,22 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="UserControls\VPWMainPurgeControl.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="UserControls\VPWMainStateControl.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="UserControls\VPWMainUIControl.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="UserControls\VPWMainVacuumPumpControl.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="UserControls\VPWMotionControl.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 1 - 1
PunkHPX8_Themes/UserControls/VPWBoosterPumpControl.xaml

@@ -29,7 +29,7 @@
                         <RowDefinition/>
                     </Grid.RowDefinitions>
                     <Grid.ColumnDefinitions>
-                        <ColumnDefinition Width="150"/>
+                        <ColumnDefinition Width="180"/>
                         <ColumnDefinition Width="30"/>
                         <ColumnDefinition Width="80"/>
                         <ColumnDefinition Width="80"/>

+ 3 - 3
PunkHPX8_Themes/UserControls/VPWBoosterPumpControl.xaml.cs

@@ -157,7 +157,7 @@ namespace PunkHPX8_Themes.UserControls
                     }
                     else
                     {
-                        InvokeClient.Instance.Service.DoOperation($"{ModuleName}.PumpSpeedKeyDown", paramValue);
+                        InvokeClient.Instance.Service.DoOperation($"{ModuleName}.BoosterPumpSpeed", paramValue);
                     }
 
                 }
@@ -168,12 +168,12 @@ namespace PunkHPX8_Themes.UserControls
 
         private void PumpOff_Click(object sender, RoutedEventArgs e)
         {
-            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.BoosterPumpOff");
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.BoosterPumpDisable");
         }
 
         private void PumpOn_Click(object sender, RoutedEventArgs e)
         {
-            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.BoosterPumpOn");
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.BoosterPumpEnable");
         }
 
         private void Auto_Click(object sender, RoutedEventArgs e)

+ 1 - 1
PunkHPX8_Themes/UserControls/VPWDegasControl.xaml

@@ -27,7 +27,7 @@
                         <RowDefinition/>
                     </Grid.RowDefinitions>
                     <Grid.ColumnDefinitions>
-                        <ColumnDefinition Width="150"/>
+                        <ColumnDefinition Width="180"/>
                         <ColumnDefinition Width="30"/>
                         <ColumnDefinition Width="80"/>
                         <ColumnDefinition Width="80"/>

+ 2 - 2
PunkHPX8_Themes/UserControls/VPWDegasControl.xaml.cs

@@ -97,12 +97,12 @@ namespace PunkHPX8_Themes.UserControls
 
         private void PumpOff_Click(object sender, RoutedEventArgs e)
         {
-            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasPumpOff");
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasPumpDisable");
         }
 
         private void PumpOn_Click(object sender, RoutedEventArgs e)
         {
-            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasPumpOn");
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasPumpEnable");
         }
     }
 }

+ 66 - 0
PunkHPX8_Themes/UserControls/VPWMainPurgeControl.xaml

@@ -0,0 +1,66 @@
+<UserControl x:Class="PunkHPX8_Themes.UserControls.VPWMainPurgeControl"
+             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:converters="clr-namespace:PunkHPX8_Themes.Converters"
+             xmlns:UserControls="clr-namespace:PunkHPX8_Themes.UserControls"
+             xmlns:Control="clr-namespace:MECF.Framework.UI.Core.Control;assembly=MECF.Framework.UI.Core"
+             xmlns:local="clr-namespace:PunkHPX8_Themes.UserControls"
+             mc:Ignorable="d" x:Name="self"
+             d:DesignHeight="110" d:DesignWidth="420">
+    <UserControl.Resources>
+        <converters:BoolToYellowColor x:Key="boolToYellowColor"></converters:BoolToYellowColor>
+        <converters:BoolToColor x:Key="boolToColor"></converters:BoolToColor>
+        <converters:BoolToColor2 x:Key="boolToColor2"></converters:BoolToColor2>
+        <converters:BoolToColor6 x:Key="boolToColor6"></converters:BoolToColor6>
+        <converters:BoolToBool x:Key="boolToBool"></converters:BoolToBool>
+    </UserControl.Resources>
+    <Border BorderBrush="Gray">
+        <Grid>
+            <GroupBox Header="Purge"  BorderBrush="DarkGray">
+                <Grid>
+                    <Grid.RowDefinitions>
+                        <RowDefinition Height="40"/>
+                        <RowDefinition Height="40"/>
+                        <RowDefinition/>
+                    </Grid.RowDefinitions>
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="180"/>
+                        <ColumnDefinition Width="30"/>
+                        <ColumnDefinition Width="80"/>
+                        <ColumnDefinition Width="80"/>
+                        <ColumnDefinition Width="30"/>
+                        <ColumnDefinition Width="60"/>
+                        <ColumnDefinition/>
+                    </Grid.ColumnDefinitions>
+                    <Grid Grid.Row="0" Grid.Column="0">
+                        <Label Content="Purge Valve" FontSize="15" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
+                    </Grid>
+                    <Grid Grid.Row="1" Grid.Column="0">
+                        <Button Style="{StaticResource SysBtnStyle}" Margin="15,0,0,0" Grid.Column="1" Height="25" Width="90" HorizontalAlignment="Left" Content="Purge" Click="Purge_Click"></Button>
+                    </Grid>
+                    <Grid Grid.Row="1" Grid.Column="1">
+                        <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
+                        Fill="{Binding IsPurge, Converter={StaticResource boolToColor}, ElementName=self}"/>
+                    </Grid>
+                    <Grid Grid.Row="0" Grid.Column="1">
+                        <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
+                            Fill="{Binding PurgeValveEnable, Converter={StaticResource boolToColor}, ElementName=self}"/>
+                    </Grid>
+                    <Grid Grid.Row="0" Grid.Column="2" >
+                        <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="On" Click="PurgeValveOn_Click"></Button>
+                    </Grid>
+                    <Grid Grid.Row="0" Grid.Column="3" >
+                        <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="Off" Click="PurgeValveOff_Click"></Button>
+                    </Grid>
+                    <Grid Grid.Row="0" Grid.Column="4">
+                        <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
+                Fill="{Binding PurgeValveEnable, Converter={StaticResource boolToColor2}, ElementName=self}"/>
+                    </Grid>
+
+                </Grid>
+            </GroupBox >
+        </Grid>
+    </Border >
+</UserControl>

+ 96 - 0
PunkHPX8_Themes/UserControls/VPWMainPurgeControl.xaml.cs

@@ -0,0 +1,96 @@
+using MECF.Framework.Common.OperationCenter;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PunkHPX8_Themes.UserControls
+{
+    /// <summary>
+    /// VPWMainPurgeControl.xaml 的交互逻辑
+    /// </summary>
+    public partial class VPWMainPurgeControl : UserControl
+    {
+        public VPWMainPurgeControl()
+        {
+            InitializeComponent();
+        }
+
+        public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(
+          "ModuleName", typeof(string), typeof(VPWMainPurgeControl),
+          new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// 模块名称
+        /// </summary>
+        public string ModuleName
+        {
+            get
+            {
+                return (string)this.GetValue(ModuleNameProperty);
+            }
+            set
+            {
+                this.SetValue(ModuleNameProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty PurgeValveEnableProperty = DependencyProperty.Register(
+            "PurgeValveEnable", typeof(bool), typeof(VPWMainPurgeControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// PurgeValveEnable
+        /// </summary>
+        public bool PurgeValveEnable
+        {
+            get
+            {
+                return (bool)this.GetValue(PurgeValveEnableProperty);
+            }
+            set
+            {
+                this.SetValue(PurgeValveEnableProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty IsPurgeProperty = DependencyProperty.Register(
+            "IsPurge", typeof(bool), typeof(VPWMainPurgeControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// IsPurge
+        /// </summary>
+        public bool IsPurge
+        {
+            get
+            {
+                return (bool)this.GetValue(IsPurgeProperty);
+            }
+            set
+            {
+                this.SetValue(IsPurgeProperty, value);
+            }
+        }
+
+        private void Purge_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.Purge");
+        }
+
+        private void PurgeValveOn_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.PurgeValveOn");
+        }
+
+        private void PurgeValveOff_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.PurgeValveOff");
+        }
+    }
+}

+ 106 - 0
PunkHPX8_Themes/UserControls/VPWMainStateControl.xaml

@@ -0,0 +1,106 @@
+<UserControl x:Class="PunkHPX8_Themes.UserControls.VPWMainStateControl"
+             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:converters="clr-namespace:PunkHPX8_Themes.Converters"
+             xmlns:UserControls="clr-namespace:PunkHPX8_Themes.UserControls"
+             xmlns:Control="clr-namespace:MECF.Framework.UI.Core.Control;assembly=MECF.Framework.UI.Core"
+             xmlns:local="clr-namespace:PunkHPX8_Themes.UserControls"
+             mc:Ignorable="d" x:Name="self"
+             d:DesignHeight="270" d:DesignWidth="420">
+    <UserControl.Resources>
+        <converters:BoolToYellowColor x:Key="boolToYellowColor"></converters:BoolToYellowColor>
+        <converters:BoolToColor x:Key="boolToColor"></converters:BoolToColor>
+        <converters:BoolToColor2 x:Key="boolToColor2"></converters:BoolToColor2>
+        <converters:BoolToColor6 x:Key="boolToColor6"></converters:BoolToColor6>
+        <converters:BoolToBool x:Key="boolToBool"></converters:BoolToBool>
+    </UserControl.Resources>
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="40"/>
+            <RowDefinition Height="40"/>
+            <RowDefinition Height="40"/>
+            <RowDefinition Height="40"/>
+            <RowDefinition Height="40"/>
+            <RowDefinition Height="40"/>
+            <RowDefinition/>
+        </Grid.RowDefinitions>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="180"/>
+            <ColumnDefinition Width="30"/>
+            <ColumnDefinition Width="80"/>
+            <ColumnDefinition Width="80"/>
+            <ColumnDefinition Width="30"/>
+            <ColumnDefinition Width="60"/>
+            <ColumnDefinition/>
+        </Grid.ColumnDefinitions>
+        <Grid Grid.Row="0" Grid.Column="0">
+            <Label Content="Machine State" FontSize="15" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
+        </Grid>
+        <Grid Grid.Row="1" Grid.Column="0">
+            <Label Content="Fluid In Containment" FontSize="15" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
+        </Grid>
+        <Grid Grid.Row="2" Grid.Column="0">
+            <Label Content="Water Pressure" FontSize="15" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
+        </Grid>
+        <Grid Grid.Row="3" Grid.Column="0">
+            <Label Content="Pressure Target" FontSize="15" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
+        </Grid>
+        <Grid Grid.Row="4" Grid.Column="0">
+            <Label Content="DIW Inlet Valve" FontSize="15" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
+        </Grid>
+        <Grid Grid.Row="5" Grid.Column="0">
+            <Label Content="Chamber" FontSize="15" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
+        </Grid>
+        <Grid Grid.Row="1" Grid.Column="1">
+            <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
+              Fill="{Binding FluidInContainment, Converter={StaticResource boolToColor}, ElementName=self}"/>
+        </Grid>
+        <Grid Grid.Row="4" Grid.Column="1">
+            <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
+                Fill="{Binding DIWInletValveOpen, Converter={StaticResource boolToColor}, ElementName=self}"/>
+        </Grid>
+        <Grid Grid.Row="4" Grid.Column="2" >
+            <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="Open" Click="DIWInletValveOpen_Click"></Button>
+        </Grid>
+        <Grid Grid.Row="4" Grid.Column="3" >
+            <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="Close" Click="DIWInletValveClose_Click"></Button>
+        </Grid>
+        <Grid Grid.Row="4" Grid.Column="4">
+            <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
+    Fill="{Binding DIWInletValveOpen, Converter={StaticResource boolToColor2}, ElementName=self}"/>
+        </Grid>
+
+        <Grid Grid.Row="5" Grid.Column="1">
+            <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
+    Fill="{Binding ChamberClose, Converter={StaticResource boolToColor2}, ElementName=self}"/>
+        </Grid>
+        <Grid Grid.Row="5" Grid.Column="2" >
+            <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="Open" Click="ChamberOpen_Click"></Button>
+        </Grid>
+        <Grid Grid.Row="5" Grid.Column="3" >
+            <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="Close" Click="ChamberClose_Click"></Button>
+        </Grid>
+        <Grid Grid.Row="5" Grid.Column="4">
+            <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
+Fill="{Binding ChamberClose, Converter={StaticResource boolToColor}, ElementName=self}"/>
+        </Grid>
+
+        <Border Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="4" Margin="5,5,5,5" Background="Black">
+            <TextBlock  Text="{Binding ElementName=self,Path=MachineState}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
+        </Border>
+        <Border Grid.Row="2" Grid.Column="1"  Grid.ColumnSpan="2" Margin="5,5,5,5" Background="Black" Width="50" VerticalAlignment="Center" HorizontalAlignment="Left">
+            <TextBlock  Text="{Binding ElementName=self,Path=WaterPressure}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
+        </Border>
+        <Border Grid.Row="2" Grid.Column="2"  Grid.ColumnSpan="2" Margin="32,5,5,5" Background="Black" Height="22" Width="50" VerticalAlignment="Center" HorizontalAlignment="Left">
+            <TextBlock  Text="Psi" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
+        </Border>
+        <Border Grid.Row="3" Grid.Column="1"  Grid.ColumnSpan="2" Margin="5,5,5,5" Background="Black" Width="50" VerticalAlignment="Center" HorizontalAlignment="Left">
+            <TextBlock  Text="{Binding ElementName=self,Path=PressureTarget}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
+        </Border>
+        <Border Grid.Row="3" Grid.Column="2"  Grid.ColumnSpan="2" Margin="32,5,5,5" Background="Black" Height="22" Width="50" VerticalAlignment="Center" HorizontalAlignment="Left">
+            <TextBlock  Text="Psi" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
+        </Border>
+    </Grid>
+</UserControl>

+ 187 - 0
PunkHPX8_Themes/UserControls/VPWMainStateControl.xaml.cs

@@ -0,0 +1,187 @@
+using MECF.Framework.Common.OperationCenter;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PunkHPX8_Themes.UserControls
+{
+    /// <summary>
+    /// VPWMainStateControl.xaml 的交互逻辑
+    /// </summary>
+    public partial class VPWMainStateControl : UserControl
+    {
+        public VPWMainStateControl()
+        {
+            InitializeComponent();
+        }
+
+        public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(
+          "ModuleName", typeof(string), typeof(VPWMainStateControl),
+          new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// 模块名称
+        /// </summary>
+        public string ModuleName
+        {
+            get
+            {
+                return (string)this.GetValue(ModuleNameProperty);
+            }
+            set
+            {
+                this.SetValue(ModuleNameProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty MachineStateProperty = DependencyProperty.Register(
+                "MachineState", typeof(string), typeof(VPWMainStateControl),
+                    new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// MachineState
+        /// </summary>
+        public string MachineState
+        {
+            get
+            {
+                return (string)this.GetValue(MachineStateProperty);
+            }
+            set
+            {
+                this.SetValue(MachineStateProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty FluidInContainmentProperty = DependencyProperty.Register(
+        "FluidInContainment", typeof(bool), typeof(VPWMainStateControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// FluidInContainment
+        /// </summary>
+        public bool FluidInContainment
+        {
+            get
+            {
+                return (bool)this.GetValue(FluidInContainmentProperty);
+            }
+            set
+            {
+                this.SetValue(FluidInContainmentProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty WaterPressureProperty = DependencyProperty.Register(
+            "WaterPressure", typeof(double), typeof(VPWMainStateControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// WaterPressure
+        /// </summary>
+        public double WaterPressure
+        {
+            get
+            {
+                return (double)this.GetValue(WaterPressureProperty);
+            }
+            set
+            {
+                this.SetValue(WaterPressureProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty PressureTargetProperty = DependencyProperty.Register(
+            "PressureTarget", typeof(double), typeof(VPWMainStateControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// PressureTarget
+        /// </summary>
+        public double PressureTarget
+        {
+            get
+            {
+                return (double)this.GetValue(PressureTargetProperty);
+            }
+            set
+            {
+                this.SetValue(PressureTargetProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty DIWInletValveOpenProperty = DependencyProperty.Register(
+            "DIWInletValveOpen", typeof(bool), typeof(VPWMainStateControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// DIWInletValveOpen
+        /// </summary>
+        public bool DIWInletValveOpen
+        {
+            get
+            {
+                return (bool)this.GetValue(DIWInletValveOpenProperty);
+            }
+            set
+            {
+                this.SetValue(DIWInletValveOpenProperty, value);
+            }
+        }
+
+
+        public static readonly DependencyProperty ChamberOpenProperty = DependencyProperty.Register(
+            "ChamberOpen", typeof(bool), typeof(VPWMainStateControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// ChamberOpen
+        /// </summary>
+        public bool ChamberOpen
+        {
+            get
+            {
+                return (bool)this.GetValue(ChamberOpenProperty);
+            }
+            set
+            {
+                this.SetValue(ChamberOpenProperty, value);
+            }
+        }
+        public static readonly DependencyProperty ChamberCloseProperty = DependencyProperty.Register(
+    "ChamberClose", typeof(bool), typeof(VPWMainStateControl), new FrameworkPropertyMetadata(true, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// ChamberClose
+        /// </summary>
+        public bool ChamberClose
+        {
+            get
+            {
+                return (bool)this.GetValue(ChamberCloseProperty);
+            }
+            set
+            {
+                this.SetValue(ChamberCloseProperty, value);
+            }
+        }
+
+        private void DIWInletValveOpen_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DIWInletValveOn");
+        }
+
+        private void DIWInletValveClose_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DIWInletValveOff");
+        }
+
+        private void ChamberOpen_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ChamberUp");
+        }
+
+        private void ChamberClose_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.ChamberDown");
+        }
+    }
+}

+ 149 - 0
PunkHPX8_Themes/UserControls/VPWMainUIControl.xaml

@@ -0,0 +1,149 @@
+<UserControl x:Class="PunkHPX8_Themes.UserControls.VPWMainUIControl"
+             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:userControls="clr-namespace:PunkHPX8_Themes.UserControls"
+             xmlns:customControls="clr-namespace:PunkHPX8_Themes.CustomControls"
+             xmlns:converters="clr-namespace:PunkHPX8_Themes.Converters"
+             xmlns:local="clr-namespace:PunkHPX8_Themes.UserControls"
+             mc:Ignorable="d" Name="self"
+             d:DesignHeight="800" d:DesignWidth="800">
+    <UserControl.Resources>
+        <converters:BoolToVisibility2 x:Key="boolToVisibility2"></converters:BoolToVisibility2>
+        <converters:BoolToVisibility x:Key="boolToVisibility"></converters:BoolToVisibility>
+        <converters:BoolToOrientation x:Key="boolToOrientation"></converters:BoolToOrientation>
+        <Style x:Key="DisableContextMenuStyle" TargetType="userControls:Pump1">
+            <Setter Property="IsEnabled" Value="False"/>
+        </Style>
+        <ContextMenu x:Key="DIWProcessValve">
+            <MenuItem Header="Open" Click="OpenDIWProcessValve_Click"/>
+            <MenuItem Header="Close" Click="CloseDIWProcessValve_Click"/>
+        </ContextMenu>
+        <ContextMenu x:Key="DIWDegasValve">
+            <MenuItem Header="Open" Click="OpenDIWDegasValve_Click"/>
+            <MenuItem Header="Close" Click="CloseDIWDegasValve_Click"/>
+        </ContextMenu>
+        <ContextMenu x:Key="DegasAdjustValve">
+            <MenuItem Header="Open" Click="OpenDegasAdjustValve_Click"/>
+            <MenuItem Header="Close" Click="CloseDegasAdjustValve_Click"/>
+        </ContextMenu>
+        <ContextMenu x:Key="VPW1VACValve">
+            <MenuItem Header="Open" Click="OpenVPW1VACValve_Click"/>
+            <MenuItem Header="Close" Click="CloseVPW1VACValve_Click"/>
+        </ContextMenu>
+        <ContextMenu x:Key="VPW2VACValve">
+            <MenuItem Header="Open" Click="OpenVPW2VACValve_Click"/>
+            <MenuItem Header="Close" Click="CloseVPW2VACValve_Click"/>
+        </ContextMenu>
+    </UserControl.Resources>
+    <Canvas>
+        <Grid Height="50" Width="100" Canvas.Left="50" Canvas.Top="98"  >
+            <Grid.RowDefinitions>
+                <RowDefinition Height="30"></RowDefinition>
+                <RowDefinition Height="20"></RowDefinition>
+            </Grid.RowDefinitions>
+            <Grid Grid.Row="0">
+                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
+                               Status="{Binding ElementName=self,Path=DIWProcessValve}"  
+                               IsCanEdit="True" 
+                               ContextMenu="{StaticResource DIWProcessValve}"/>
+            </Grid>
+            <Grid Grid.Row="1">
+                <Label Margin="12,0,0,0" Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="DIW Process" />
+            </Grid>
+        </Grid>
+
+        <Grid Height="50" Width="100" Canvas.Left="182" Canvas.Top="100" >
+            <Grid.RowDefinitions>
+                <RowDefinition Height="30"></RowDefinition>
+                <RowDefinition Height="20"></RowDefinition>
+            </Grid.RowDefinitions>
+            <Grid Grid.Row="0">
+                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
+                               Status="{Binding ElementName=self,Path=DIWDegasValve}"  
+                               IsCanEdit="True" 
+                               ContextMenu="{StaticResource DIWDegasValve}"/>
+            </Grid>
+            <Grid Grid.Row="1">
+                <Label Margin="12,0,0,0" Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="DIW Degas" />
+            </Grid>
+        </Grid>
+
+        <Grid Height="50" Width="100" Canvas.Left="321" Canvas.Top="100"  >
+            <Grid.RowDefinitions>
+                <RowDefinition Height="30"></RowDefinition>
+                <RowDefinition Height="20"></RowDefinition>
+            </Grid.RowDefinitions>
+            <Grid Grid.Row="0">
+                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
+                               Status="{Binding ElementName=self,Path=DegasAdjustValve}"  
+                               IsCanEdit="True" 
+                               ContextMenu="{StaticResource DegasAdjustValve}"/>
+            </Grid>
+            <Grid Grid.Row="1">
+                <Label Margin="12,0,0,0" Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="Degas Adjust" />
+            </Grid>
+        </Grid>
+
+        <Grid Height="50" Width="100" Canvas.Left="474" Canvas.Top="102" >
+            <Grid.RowDefinitions>
+                <RowDefinition Height="30"></RowDefinition>
+                <RowDefinition Height="20"></RowDefinition>
+            </Grid.RowDefinitions>
+            <Grid Grid.Row="0">
+                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
+                               Status="{Binding ElementName=self,Path=VPW1VACValve}"  
+                               IsCanEdit="True" 
+                               ContextMenu="{StaticResource VPW1VACValve}"/>
+            </Grid>
+            <Grid Grid.Row="1">
+                <Label Margin="12,0,0,0" Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="VPW 1 VAC" />
+            </Grid>
+        </Grid>
+
+        <Grid Height="50" Width="100" Canvas.Left="624" Canvas.Top="108" >
+            <Grid.RowDefinitions>
+                <RowDefinition Height="30"></RowDefinition>
+                <RowDefinition Height="20"></RowDefinition>
+            </Grid.RowDefinitions>
+            <Grid Grid.Row="0">
+                <customControls:CommonValveControl Height="16" Width="16"   ValveOrientation="Horizontal" 
+                               Status="{Binding ElementName=self,Path=VPW2VACValve}"  
+                               IsCanEdit="True" 
+                               ContextMenu="{StaticResource VPW2VACValve}"/>
+            </Grid>
+            <Grid Grid.Row="1">
+                <Label Margin="12,0,0,0" Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="VPW 2 VAC" />
+            </Grid>
+        </Grid>
+
+        <Grid Height="50" Width="120" Canvas.Left="330" Canvas.Top="24"  >
+            <Grid.RowDefinitions>
+                <RowDefinition Height="20"></RowDefinition>
+                <RowDefinition Height="30"></RowDefinition>
+            </Grid.RowDefinitions>
+            <Grid.ColumnDefinitions>
+                <ColumnDefinition Width="60"></ColumnDefinition>
+                <ColumnDefinition Width="60"></ColumnDefinition>
+            </Grid.ColumnDefinitions>
+            <Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Margin="0,0,10,0">
+                <Label Content="Total Flow" FontSize="10" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"/>
+            </Grid>
+            <Border Grid.Row="1" Grid.Column="0"  Margin="5,5,5,5" Background="Black" Width="50" VerticalAlignment="Center" HorizontalAlignment="Right">
+                <TextBlock  Text="{Binding ElementName=self,Path=TotalFlow}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
+            </Border>
+            <Border Grid.Row="1" Grid.Column="1"  Margin="0,5,0,5 " Background="Black" Height="22" Width="40" VerticalAlignment="Center" HorizontalAlignment="Left">
+                <TextBlock  Text="L/min" Foreground="Lime" FontSize="12" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+            </Border>
+        </Grid>
+
+        <userControls:ReservoirPump IsEnabled="{Binding IsEnabled}" ModuleName="{Binding ModuleName}" PumpType="BoosterPump" RotateTransformValue="0" IsOpenPump="{Binding IsBoosterPumpOpen,Mode=TwoWay}" Height="60" Width="60"  Tag="26" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="146" Canvas.Top="194" />
+        <userControls:ReservoirPump IsEnabled="{Binding IsEnabled}" ModuleName="{Binding ModuleName}" PumpType="DegasPump" RotateTransformValue="0" IsOpenPump="{Binding IsDegasPumpOpen,Mode=TwoWay}" Height="60" Width="60"   Tag="26" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="290" Canvas.Top="195" />
+        <userControls:ReservoirPump IsEnabled="{Binding IsEnabled}" ModuleName="{Binding ModuleName}" PumpType="VacuumPump" RotateTransformValue="0" IsOpenPump="{Binding IsVacuumPumpOpen,Mode=TwoWay}" Height="60" Width="60"   Tag="26" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="432" Canvas.Top="199"  />
+        <Label  Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="Booster Pump" Canvas.Left="128" Canvas.Top="266" />
+        <Label  Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="Degas Pump" Canvas.Left="273" Canvas.Top="268" />
+        <Label  Height="20" Width="100" FontSize="10"  FontWeight="Bold" Content="Vacuum Pump" Canvas.Left="423" Canvas.Top="270" />
+
+    </Canvas>
+</UserControl>

+ 250 - 0
PunkHPX8_Themes/UserControls/VPWMainUIControl.xaml.cs

@@ -0,0 +1,250 @@
+using MECF.Framework.Common.OperationCenter;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PunkHPX8_Themes.UserControls
+{
+    /// <summary>
+    /// VPWMainUIControl.xaml 的交互逻辑
+    /// </summary>
+    public partial class VPWMainUIControl : UserControl
+    {
+        public VPWMainUIControl()
+        {
+            InitializeComponent();
+        }
+
+        public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(
+          "ModuleName", typeof(string), typeof(VPWMainUIControl),
+          new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// 模块名称
+        /// </summary>
+        public string ModuleName
+        {
+            get
+            {
+                return (string)this.GetValue(ModuleNameProperty);
+            }
+            set
+            {
+                this.SetValue(ModuleNameProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty DIWProcessValveProerty = DependencyProperty.Register(
+            "DIWProcessValve", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// DIWProcessValve
+        /// </summary>
+        public bool DIWProcessValve
+        {
+            get
+            {
+                return (bool)this.GetValue(DIWProcessValveProerty);
+            }
+            set
+            {
+                this.SetValue(DIWProcessValveProerty, value);
+            }
+        }
+
+        public static readonly DependencyProperty DIWDegasValveProerty = DependencyProperty.Register(
+            "DIWDegasValve", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// DIWDegasValve
+        /// </summary>
+        public bool DIWDegasValve
+        {
+            get
+            {
+                return (bool)this.GetValue(DIWDegasValveProerty);
+            }
+            set
+            {
+                this.SetValue(DIWDegasValveProerty, value);
+            }
+        }
+
+        public static readonly DependencyProperty DegasAdjustValveProerty = DependencyProperty.Register(
+            "DegasAdjustValve", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// DegasAdjustValve
+        /// </summary>
+        public bool DegasAdjustValve
+        {
+            get
+            {
+                return (bool)this.GetValue(DegasAdjustValveProerty);
+            }
+            set
+            {
+                this.SetValue(DegasAdjustValveProerty, value);
+            }
+        }
+
+        public static readonly DependencyProperty VPW1VACValveProerty = DependencyProperty.Register(
+           "VPW1VACValve", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// VPW1VACValve
+        /// </summary>
+        public bool VPW1VACValve
+        {
+            get
+            {
+                return (bool)this.GetValue(VPW1VACValveProerty);
+            }
+            set
+            {
+                this.SetValue(VPW1VACValveProerty, value);
+            }
+        }
+
+        public static readonly DependencyProperty VPW2VACValveProerty = DependencyProperty.Register(
+           "VPW2VACValve", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// VPW2VACValve
+        /// </summary>
+        public bool VPW2VACValve
+        {
+            get
+            {
+                return (bool)this.GetValue(VPW2VACValveProerty);
+            }
+            set
+            {
+                this.SetValue(VPW2VACValveProerty, value);
+            }
+        }
+
+        public static readonly DependencyProperty IsBoosterPumpOpenProerty = DependencyProperty.Register(
+                "IsBoosterPumpOpen", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// IsBoosterPumpOpen
+        /// </summary>
+        public bool IsBoosterPumpOpen
+        {
+            get
+            {
+                return (bool)this.GetValue(IsBoosterPumpOpenProerty);
+            }
+            set
+            {
+                this.SetValue(IsBoosterPumpOpenProerty, value);
+            }
+        }
+
+        public static readonly DependencyProperty IsDegasPumpOpenProerty = DependencyProperty.Register(
+            "IsDegasPumpOpen", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// IsDegasPumpOpen
+        /// </summary>
+        public bool IsDegasPumpOpen
+        {
+            get
+            {
+                return (bool)this.GetValue(IsDegasPumpOpenProerty);
+            }
+            set
+            {
+                this.SetValue(IsDegasPumpOpenProerty, value);
+            }
+        }
+
+        public static readonly DependencyProperty IsVacuumPumpOpenProerty = DependencyProperty.Register(
+            "IsVacuumPumpOpen", typeof(bool), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        ///IsVacuumPumpOpen
+        /// </summary>
+        public bool IsVacuumPumpOpen
+        {
+            get
+            {
+                return (bool)this.GetValue(IsVacuumPumpOpenProerty);
+            }
+            set
+            {
+                this.SetValue(IsVacuumPumpOpenProerty, value);
+            }
+        }
+
+        public static readonly DependencyProperty TotalFlowProperty = DependencyProperty.Register(
+        "TotalFlow", typeof(double), typeof(VPWMainUIControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// TotalFlow
+        /// </summary>
+        public double TotalFlow
+        {
+            get
+            {
+                return (double)this.GetValue(TotalFlowProperty);
+            }
+            set
+            {
+                this.SetValue(TotalFlowProperty, value);
+            }
+        }
+
+        private void OpenDIWProcessValve_Click(object sender, RoutedEventArgs e)
+        {
+            //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DIWInletValveOff");
+        }
+
+        private void CloseDIWProcessValve_Click(object sender, RoutedEventArgs e)
+        {
+            //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasAdjustOn");
+        }
+
+
+        private void OpenDIWDegasValve_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DiwDegasValveOn");
+        }
+        private void CloseDIWDegasValve_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DiwDegasValveOff");
+        }
+
+
+        private void OpenDegasAdjustValve_Click(object sender, RoutedEventArgs e)
+        {
+             InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasAdjustOn");
+        }
+        private void CloseDegasAdjustValve_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasAdjustOff");
+        }
+
+
+        private void OpenVPW1VACValve_Click(object sender, RoutedEventArgs e)
+        {
+            //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasAdjustOn");
+        }
+        private void CloseVPW1VACValve_Click(object sender, RoutedEventArgs e)
+        {
+            //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasAdjustOn");
+        }
+
+
+        private void OpenVPW2VACValve_Click(object sender, RoutedEventArgs e)
+        {
+            //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasAdjustOn");
+        }
+        private void CloseVPW2VACValve_Click(object sender, RoutedEventArgs e)
+        {
+            //InvokeClient.Instance.Service.DoOperation($"{ModuleName}.DegasAdjustOn");
+        }
+    }
+}

+ 118 - 0
PunkHPX8_Themes/UserControls/VPWMainVacuumPumpControl.xaml

@@ -0,0 +1,118 @@
+<UserControl x:Class="PunkHPX8_Themes.UserControls.VPWMainVacuumPumpControl"
+             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:converters="clr-namespace:PunkHPX8_Themes.Converters"
+             xmlns:UserControls="clr-namespace:PunkHPX8_Themes.UserControls"
+             xmlns:Control="clr-namespace:MECF.Framework.UI.Core.Control;assembly=MECF.Framework.UI.Core"
+             xmlns:local="clr-namespace:PunkHPX8_Themes.UserControls"
+             mc:Ignorable="d" x:Name="self"
+             d:DesignHeight="230" d:DesignWidth="420">
+    <UserControl.Resources>
+        <converters:BoolToYellowColor x:Key="boolToYellowColor"></converters:BoolToYellowColor>
+        <converters:BoolToColor x:Key="boolToColor"></converters:BoolToColor>
+        <converters:BoolToColor2 x:Key="boolToColor2"></converters:BoolToColor2>
+        <converters:BoolToColor6 x:Key="boolToColor6"></converters:BoolToColor6>
+        <converters:BoolToBool x:Key="boolToBool"></converters:BoolToBool>
+    </UserControl.Resources>
+    <Border BorderBrush="Gray">
+        <Grid>
+            <GroupBox Header="Vacuum Pump"  BorderBrush="DarkGray">
+                <Grid>
+                    <Grid.RowDefinitions>
+                        <RowDefinition Height="40"/>
+                        <RowDefinition Height="40"/>
+                        <RowDefinition Height="40"/>
+                        <RowDefinition Height="40"/>
+                        <RowDefinition Height="40"/>
+                        <RowDefinition/>
+                    </Grid.RowDefinitions>
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition Width="180"/>
+                        <ColumnDefinition Width="30"/>
+                        <ColumnDefinition Width="80"/>
+                        <ColumnDefinition Width="80"/>
+                        <ColumnDefinition Width="30"/>
+                        <ColumnDefinition Width="60"/>
+                        <ColumnDefinition/>
+                    </Grid.ColumnDefinitions>
+                    <Grid Grid.Row="0" Grid.Column="0">
+                        <Label Content="Pump PWR" FontSize="15" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
+                    </Grid>
+                    <Grid Grid.Row="1" Grid.Column="0">
+                        <Label Content="Pump Enable" FontSize="15" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
+                    </Grid>
+                    <Grid Grid.Row="2" Grid.Column="0">
+                        <Label Content="Pump Control" FontSize="15" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
+                    </Grid>
+                  
+                    <Grid Grid.Row="4" Grid.Column="0">
+                        <Label Content="Pump Pressure" FontSize="15" FontWeight="Bold" VerticalContentAlignment="Center" HorizontalContentAlignment="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10,0,0,0"/>
+                    </Grid>
+
+                    <Grid Grid.Row="0" Grid.Column="1">
+                        <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
+                                Fill="{Binding PumpPWREnable, Converter={StaticResource boolToColor}, ElementName=self}"/>
+                    </Grid>
+                    <Grid Grid.Row="0" Grid.Column="2" >
+                        <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="On" Click="PumpPWROn_Click"></Button>
+                    </Grid>
+                    <Grid Grid.Row="0" Grid.Column="3" >
+                        <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="Off" Click="PumpPWROff_Click"></Button>
+                    </Grid>
+                    <Grid Grid.Row="0" Grid.Column="4">
+                        <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
+                    Fill="{Binding PumpPWREnable, Converter={StaticResource boolToColor2}, ElementName=self}"/>
+                    </Grid>
+
+                    <Grid Grid.Row="1" Grid.Column="1">
+                        <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
+                    Fill="{Binding PumpEnable, Converter={StaticResource boolToColor}, ElementName=self}"/>
+                    </Grid>
+                    <Grid Grid.Row="1" Grid.Column="2" >
+                        <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="On" Click="PumpEnableOn_Click"></Button>
+                    </Grid>
+                    <Grid Grid.Row="1" Grid.Column="3" >
+                        <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="off" Click="PumpEnableOff_Click"></Button>
+                    </Grid>
+                    <Grid Grid.Row="1" Grid.Column="4">
+                        <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
+                Fill="{Binding PumpEnable, Converter={StaticResource boolToColor2}, ElementName=self}"/>
+                    </Grid>
+
+                    <Grid Grid.Row="2" Grid.Column="1">
+                        <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
+           Fill="{Binding PumpSpeedControlEnable, Converter={StaticResource boolToColor}, ElementName=self}"/>
+                    </Grid>
+                    <Grid Grid.Row="2" Grid.Column="2" >
+                        <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="On" Click="PumpControlOn_Click"></Button>
+                    </Grid>
+                    <Grid Grid.Row="2" Grid.Column="3" >
+                        <Button Style="{StaticResource SysBtnStyle}" Margin="0,0,0,0" Grid.Column="1" Height="25" Width="60" HorizontalAlignment="Center" Content="off" Click="PumpControlOff_Click"></Button>
+                    </Grid>
+                    <Grid Grid.Row="2" Grid.Column="4">
+                        <Ellipse Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Silver"
+       Fill="{Binding PumpSpeedControlEnable, Converter={StaticResource boolToColor2}, ElementName=self}"/>
+                    </Grid>
+
+
+
+                    <Control:NumbericTextBox Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="15" FontWeight="Bold" Height="22" Width="50" Margin="5,0,5,0"
+                        Value="{Binding ElementName=self,Path=InputPumpSpeed,Mode=TwoWay}"  
+                        KeyOperation="{Binding ElementName=self,Path=KeyDownCommand}"
+                        IsEnabled="{Binding PumpSpeedControlEnable}"/>
+                    <TextBlock Grid.Row="3" Background="White"   Grid.Column="2" Grid.ColumnSpan="2" VerticalAlignment="Center" HorizontalAlignment="Center"  FontSize="15" FontWeight="Bold" Height="22" Width="50" Margin="5,0,50,0" Text="V"/>
+
+                    <Border Grid.Row="4" Grid.Column="1"  Grid.ColumnSpan="2" Margin="5,5,5,5" Background="Black" Width="50" VerticalAlignment="Center" HorizontalAlignment="Left">
+                        <TextBlock  Text="{Binding ElementName=self,Path=PumpPressure}" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
+                    </Border>
+                    <Border Grid.Row="4" Grid.Column="2"  Grid.ColumnSpan="2" Margin="32,5,5,5" Background="Black" Height="22" Width="50" VerticalAlignment="Center" HorizontalAlignment="Left">
+                        <TextBlock  Text="Kpa" Foreground="Lime" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Left"/>
+                    </Border>
+
+                </Grid>
+            </GroupBox >
+        </Grid>
+    </Border >
+</UserControl>

+ 195 - 0
PunkHPX8_Themes/UserControls/VPWMainVacuumPumpControl.xaml.cs

@@ -0,0 +1,195 @@
+using Aitex.Core.UI.MVVM;
+using Aitex.Core.Utilities;
+using MECF.Framework.Common.OperationCenter;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PunkHPX8_Themes.UserControls
+{
+    /// <summary>
+    /// VPWMainVacuumPumpControl.xaml 的交互逻辑
+    /// </summary>
+    public partial class VPWMainVacuumPumpControl : UserControl
+    {
+        public VPWMainVacuumPumpControl()
+        {
+            KeyDownCommand = new DelegateCommand<object[]>(KeyDownAction);
+            InitializeComponent();
+            
+        }
+
+
+
+
+        #region 属性
+        public static readonly DependencyProperty ModuleNameProperty = DependencyProperty.Register(
+           "ModuleName", typeof(string), typeof(VPWMainVacuumPumpControl),
+           new FrameworkPropertyMetadata("", FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// 模块名称
+        /// </summary>
+        public string ModuleName
+        {
+            get
+            {
+                return (string)this.GetValue(ModuleNameProperty);
+            }
+            set
+            {
+                this.SetValue(ModuleNameProperty, value);
+            }
+        }
+
+
+        public static readonly DependencyProperty InputPumpSpeedProperty = DependencyProperty.Register(
+        "InputPumpSpeed", typeof(short), typeof(VPWMainVacuumPumpControl), new FrameworkPropertyMetadata((short)300, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// InputLowThreshold
+        /// </summary>
+        public short InputPumpSpeed
+        {
+            get
+            {
+                return (short)this.GetValue(InputPumpSpeedProperty);
+            }
+            set
+            {
+                this.SetValue(InputPumpSpeedProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty PumpEnableProperty = DependencyProperty.Register(
+            "PumpEnable", typeof(bool), typeof(VPWMainVacuumPumpControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// PumpEnable
+        /// </summary>
+        public bool PumpEnable
+        {
+            get
+            {
+                return (bool)this.GetValue(PumpEnableProperty);
+            }
+            set
+            {
+                this.SetValue(PumpEnableProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty PumpPWREnableProperty = DependencyProperty.Register(
+            "PumpPWREnable", typeof(bool), typeof(VPWMainVacuumPumpControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// PumpPWREnable
+        /// </summary>
+        public bool PumpPWREnable
+        {
+            get
+            {
+                return (bool)this.GetValue(PumpPWREnableProperty);
+            }
+            set
+            {
+                this.SetValue(PumpPWREnableProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty PumpSpeedControlEnableProperty = DependencyProperty.Register(
+        "PumpSpeedControlEnable", typeof(bool), typeof(VPWMainVacuumPumpControl), new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// PumpSpeedControlEnable
+        /// </summary>
+        public bool PumpSpeedControlEnable
+        {
+            get
+            {
+                return (bool)this.GetValue(PumpSpeedControlEnableProperty);
+            }
+            set
+            {
+                this.SetValue(PumpSpeedControlEnableProperty, value);
+            }
+        }
+
+        public static readonly DependencyProperty PumpPressureProperty = DependencyProperty.Register(
+        "PumpPressure", typeof(double), typeof(VPWMainVacuumPumpControl), new FrameworkPropertyMetadata(0.0, FrameworkPropertyMetadataOptions.AffectsRender));
+        /// <summary>
+        /// PumpPressure
+        /// </summary>
+        public double PumpPressure
+        {
+            get
+            {
+                return (double)this.GetValue(PumpPressureProperty);
+            }
+            set
+            {
+                this.SetValue(PumpPressureProperty, value);
+            }
+        }
+
+
+        #endregion
+        [IgnorePropertyChange]
+        public ICommand KeyDownCommand
+        {
+            get;
+            private set;
+        }
+
+        private void KeyDownAction(object[] param)
+        {
+            if (param.Length >= 1)
+            {
+                if (short.TryParse(param[1].ToString(), out short paramValue))
+                {
+                     InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VacuumPumpSpeed", paramValue);  
+                }
+            }
+        }
+        #region 按钮事件
+
+
+        #endregion
+
+        private void PumpPWROn_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VacuumPumpPowerOn");
+        }
+
+        private void PumpPWROff_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VacuumPumpPowerOff");
+        }
+
+        private void PumpEnableOn_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VacuumPumpEnable");
+        }
+
+        private void PumpEnableOff_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VacuumPumpDisable");
+        }
+
+        private void PumpControlOn_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VacuumPumpSpeedEnable");
+        }
+
+        private void PumpControlOff_Click(object sender, RoutedEventArgs e)
+        {
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.VacuumPumpSpeedDisable");
+        }
+    }
+}