| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 | 
							- using Caliburn.Micro;
 
- using Caliburn.Micro.Core;
 
- using System;
 
- using System.Collections.Generic;
 
- using System.Linq;
 
- using System.Text;
 
- using System.Threading.Tasks;
 
- using System.Windows;
 
- using FurnaceUI.Models;
 
- namespace FurnaceUI.Views.Editors
 
- {
 
-     public class RecipeRFPressureSettingViewModel : FurnaceUIViewModelBase
 
-     {
 
-         private string _rfSwitch = "0";
 
-         public string RFSwitch
 
-         {
 
-             get
 
-             {
 
-                 return _rfSwitch;
 
-             }
 
-             set
 
-             {
 
-                 _rfSwitch = value;
 
-                 NotifyOfPropertyChange("RFSwitch");
 
-             }
 
-         }
 
-         private string _rfSetPointValue = "0";
 
-         public string RFSetPointValue
 
-         {
 
-             get
 
-             {
 
-                 return _rfSetPointValue;
 
-             }
 
-             set
 
-             {
 
-                 _rfSetPointValue = value;
 
-                 NotifyOfPropertyChange("RFSetPointValue");
 
-             }
 
-         }
 
-         private string _c1SetPointValue = "0";
 
-         public string C1SetPointValue
 
-         {
 
-             get
 
-             {
 
-                 return _c1SetPointValue;
 
-             }
 
-             set
 
-             {
 
-                 _c1SetPointValue = value;
 
-                 NotifyOfPropertyChange("C1SetPointValue");
 
-             }
 
-         }
 
-         private string _c2SetPointValue = "0";
 
-         public string C2SetPointValue
 
-         {
 
-             get
 
-             {
 
-                 return _c2SetPointValue;
 
-             }
 
-             set
 
-             {
 
-                 _c2SetPointValue = value;
 
-                 NotifyOfPropertyChange("C2SetPointValue");
 
-             }
 
-         }
 
-         private string _c1AlarmWatchSetPointValue = "None";
 
-         public string C1AlarmWatchSetPointValue
 
-         {
 
-             get
 
-             {
 
-                 return _c1AlarmWatchSetPointValue;
 
-             }
 
-             set
 
-             {
 
-                 _c1AlarmWatchSetPointValue = value;
 
-                 NotifyOfPropertyChange("C1AlarmWatchSetPointValue");
 
-             }
 
-         }
 
-         private string _c2AlarmWatchSetPointValue = "None";
 
-         public string C2AlarmWatchSetPointValue
 
-         {
 
-             get
 
-             {
 
-                 return _c2AlarmWatchSetPointValue;
 
-             }
 
-             set
 
-             {
 
-                 _c2AlarmWatchSetPointValue = value;
 
-                 NotifyOfPropertyChange("C2AlarmWatchSetPointValue");
 
-             }
 
-         }
 
-         private string _forwardPowerAlarmWatchSetPointValue = "None";
 
-         public string ForwardPowerAlarmWatchSetPointValue
 
-         {
 
-             get
 
-             {
 
-                 return _forwardPowerAlarmWatchSetPointValue;
 
-             }
 
-             set
 
-             {
 
-                 _forwardPowerAlarmWatchSetPointValue = value;
 
-                 NotifyOfPropertyChange("ForwardPowerAlarmWatchSetPointValue");
 
-             }
 
-         }
 
-         private string _prAlarmWatchSetPointValue = "None";
 
-         public string PrAlarmWatchSetPointValue
 
-         {
 
-             get
 
-             {
 
-                 return _prAlarmWatchSetPointValue;
 
-             }
 
-             set
 
-             {
 
-                 _prAlarmWatchSetPointValue = value;
 
-                 NotifyOfPropertyChange("PrAlarmWatchSetPointValue");
 
-             }
 
-         }
 
-         private string _pIAlarmWatchSetPointValue = "None";
 
-         public string PIAlarmWatchSetPointValue
 
-         {
 
-             get
 
-             {
 
-                 return _pIAlarmWatchSetPointValue;
 
-             }
 
-             set
 
-             {
 
-                 _pIAlarmWatchSetPointValue = value;
 
-                 NotifyOfPropertyChange("PIAlarmWatchSetPointValue");
 
-             }
 
-         }
 
-         private string _vppAlarmWatchWatchSetPointValue = "None";
 
-         public string VppAlarmWatchSetPointValue
 
-         {
 
-             get
 
-             {
 
-                 return _vppAlarmWatchWatchSetPointValue;
 
-             }
 
-             set
 
-             {
 
-                 _vppAlarmWatchWatchSetPointValue = value;
 
-                 NotifyOfPropertyChange("VppAlarmWatchSetPointValue");
 
-             }
 
-         }
 
-         private string _vdcAlarmWatchSetPointValue = "None";
 
-         public string VdcAlarmWatchSetPointValue
 
-         {
 
-             get
 
-             {
 
-                 return _vdcAlarmWatchSetPointValue;
 
-             }
 
-             set
 
-             {
 
-                 _vdcAlarmWatchSetPointValue = value;
 
-                 NotifyOfPropertyChange("VdcAlarmWatchSetPointValue");
 
-             }
 
-         }
 
-         public string SetPointValue { get; set; }
 
-         public string AlarmWatchTableValue { get; set; }
 
-         public string RecipeSetPointValue { get; set; }
 
-         public bool IsSwitchOnCheck { get; set; }
 
-         public bool IsSwitchOffCheck { get; set; }
 
-         protected override void OnActivate()
 
-         {
 
-             base.OnActivate();
 
-             IsSwitchOnCheck = RFSwitch == "On" ? true : false;
 
-             IsSwitchOffCheck = !IsSwitchOnCheck;
 
-         }
 
-         public void RFSwitchCmd(string value)
 
-         {
 
-             IsSwitchOnCheck = value == "On" ? true : false;
 
-             IsSwitchOffCheck = !IsSwitchOnCheck;
 
-             RFSwitch = value == "On" ? "On" : "Off";
 
-         }
 
-         public void RFSettingCmd(string value)
 
-         {
 
-             var windowManager = IoC.Get<IWindowManager>();
 
-             RecipeRFPressureSettingValueViewModel recipeRFPressureSettingValueViewModel = new RecipeRFPressureSettingValueViewModel();
 
-             recipeRFPressureSettingValueViewModel.SelectPressureValue = RFSetPointValue;
 
-             switch (value)
 
-             {
 
-                 case "RF":
 
-                     recipeRFPressureSettingValueViewModel.SetPointName = "RFPower";
 
-                     break;
 
-                 case "C1":
 
-                     recipeRFPressureSettingValueViewModel.SetPointName = "MatchC1";
 
-                     break;
 
-                 case "C2":
 
-                     recipeRFPressureSettingValueViewModel.SetPointName = "MatchC2";
 
-                     break;
 
-             }
 
-             if ((bool)(windowManager as WindowManager)?.ShowDialogWithTitle(recipeRFPressureSettingValueViewModel, null, "SetPoint Setting"))
 
-             {
 
-                 switch (value)
 
-                 {
 
-                     case "RF":
 
-                         RFSetPointValue = recipeRFPressureSettingValueViewModel.SelectPressureValue;
 
-                         break;
 
-                     case "C1":
 
-                         C1SetPointValue = recipeRFPressureSettingValueViewModel.SelectC1Value;
 
-                         break;
 
-                     case "C2":
 
-                         C2SetPointValue = recipeRFPressureSettingValueViewModel.SelectC2Value;
 
-                         break;
 
-                 }
 
-             }
 
-         }
 
-         public void RFAlarmSettingCmd(string value)
 
-         {
 
-             var windowManager = IoC.Get<IWindowManager>();
 
-             RecipeRFAlarmTableSettingViewModel recipeRFAlarmTableSettingViewModel = new RecipeRFAlarmTableSettingViewModel();
 
-             switch (value)
 
-             {
 
-                 case "C1 Alarm":
 
-                     recipeRFAlarmTableSettingViewModel.SetPointName = "C1AlarmWatch";
 
-                     break;
 
-                 case "Vpp Alarm":
 
-                     recipeRFAlarmTableSettingViewModel.SetPointName = "VppAlarmWatch";
 
-                     break;
 
-                 case "ForWardPower Alarm":
 
-                     recipeRFAlarmTableSettingViewModel.SetPointName = "ForwardPowerAlarmWatch";
 
-                     break;
 
-                 case "Pr Alarm":
 
-                     recipeRFAlarmTableSettingViewModel.SetPointName = "PrAlarmWatch";
 
-                     break;
 
-                 case "PI Alarm":
 
-                     recipeRFAlarmTableSettingViewModel.SetPointName = "PIAlarmWatch";
 
-                     break;
 
-                 case "C2 Alarm":
 
-                     recipeRFAlarmTableSettingViewModel.SetPointName = "C2AlarmWatch";
 
-                     break;
 
-                 case "Vdc Alarm":
 
-                     recipeRFAlarmTableSettingViewModel.SetPointName = "VdcAlarmWatch";
 
-                     break;
 
-             }
 
-             if ((bool)(windowManager as WindowManager)?.ShowDialogWithTitle(recipeRFAlarmTableSettingViewModel, null, "SetPoint Setting"))
 
-             {
 
-                 switch (value)
 
-                 {
 
-                     case "ForWardPower Alarm":
 
-                         ForwardPowerAlarmWatchSetPointValue = recipeRFAlarmTableSettingViewModel.SelectForwardPowerValue;
 
-                         break;
 
-                     case "Pr Alarm":
 
-                         PrAlarmWatchSetPointValue = recipeRFAlarmTableSettingViewModel.SelectPrAlarmWatchValue;
 
-                         break;
 
-                     case "PI Alarm":
 
-                         PIAlarmWatchSetPointValue = recipeRFAlarmTableSettingViewModel.SelectPIAlarmWatchValue;
 
-                         break;
 
-                     case "C1 Alarm":
 
-                         C1AlarmWatchSetPointValue = recipeRFAlarmTableSettingViewModel.SelectC1AlarmValue;
 
-                         break;
 
-                     case "C2 Alarm":
 
-                         C2AlarmWatchSetPointValue = recipeRFAlarmTableSettingViewModel.SelectC2AlarmValue;
 
-                         break;
 
-                     case "Vpp Alarm":
 
-                         VppAlarmWatchSetPointValue = recipeRFAlarmTableSettingViewModel.SelectVppAlarmWatchValue;
 
-                         break;
 
-                     case "Vdc Alarm":
 
-                         VdcAlarmWatchSetPointValue = recipeRFAlarmTableSettingViewModel.SelectVdcAlarmWatchValue;
 
-                         break;
 
-                 }
 
-             }
 
-         }
 
-         public void SaveCmd()
 
-         {
 
-             ((Window)GetView()).DialogResult = true;
 
-         }
 
-         public void CloseCmd()
 
-         {
 
-             ((Window)GetView()).DialogResult = false;
 
-         }
 
-     }
 
- }
 
 
  |