Procházet zdrojové kódy

注释加热带相关逻辑/修改bug

git-svn-id: http://10.4.3.168:50001/svn/Furnace@85 dbcde07d-dcf5-c148-8a84-ac3097b7778e
Jiangjinyuan před 1 měsícem
rodič
revize
0fc55f61db

+ 4 - 4
Furnace/FurnaceRT/Config/IO/ELK/DeviceModelGasLine.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <DeviceModelDefine type="Furnace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  >
 
-	<IoHeaterBands  classType="FurnaceRT.Devices.IoHeaterBand2" assembly="FurnaceRT">
+	<!--<IoHeaterBands  classType="FurnaceRT.Devices.IoHeaterBand2" assembly="FurnaceRT">
     <IoHeaterBand2 id="CH1" display="GaslineHeaterCH1" schematicId="" unit="" module=""  aiPV="AI_CH1PV" aiControlOutput="AI_CH1WorkingOutput"  diAlarmOutput="DI_CH1AlarmOutput" doOutRangeAlarmInhibit="DO_CH1OutRangeAlarmInhibit" doF2CLNAlarmInhibit="DO_CH1F2CLNAlarmInhibit" doChannelInhibit="DO_CH1ChannelInhibit" aoSetPoint="AO_CH1SV" aoAlarmHigher="AO_CH1AlarmHigherPoint" aoAlarmLower="AO_CH1AlarmLowerPoint" aoAlarmInhibit="AO_CH1SensorBreakAlarmInhibit" aioType="float" />
     <IoHeaterBand2 id="CH2" display="GaslineHeaterCH2" schematicId="" unit="" module=""  aiPV="AI_CH2PV" aiControlOutput="AI_CH2WorkingOutput"  diAlarmOutput="DI_CH2AlarmOutput" doOutRangeAlarmInhibit="DO_CH2OutRangeAlarmInhibit" doF2CLNAlarmInhibit="DO_CH2F2CLNAlarmInhibit" doChannelInhibit="DO_CH2ChannelInhibit" aoSetPoint="AO_CH2SV" aoAlarmHigher="AO_CH2AlarmHigherPoint" aoAlarmLower="AO_CH2AlarmLowerPoint" aoAlarmInhibit="AO_CH2SensorBreakAlarmInhibit" aioType="float" />
     <IoHeaterBand2 id="CH3" display="GaslineHeaterCH3" schematicId="" unit="" module=""  aiPV="AI_CH3PV" aiControlOutput="AI_CH3WorkingOutput"  diAlarmOutput="DI_CH3AlarmOutput" doOutRangeAlarmInhibit="DO_CH3OutRangeAlarmInhibit" doF2CLNAlarmInhibit="DO_CH3F2CLNAlarmInhibit" doChannelInhibit="DO_CH3ChannelInhibit" aoSetPoint="AO_CH3SV" aoAlarmHigher="AO_CH3AlarmHigherPoint" aoAlarmLower="AO_CH3AlarmLowerPoint" aoAlarmInhibit="AO_CH3SensorBreakAlarmInhibit" aioType="float" />
@@ -18,8 +18,8 @@
     <IoHeaterBand2 id="CH14" display="GaslineHeaterCH14" schematicId="" unit="" module=""  aiPV="AI_CH14PV" aiControlOutput="AI_CH14WorkingOutput"  diAlarmOutput="DI_CH14AlarmOutput" doOutRangeAlarmInhibit="DO_CH14OutRangeAlarmInhibit" doF2CLNAlarmInhibit="DO_CH14F2CLNAlarmInhibit" doChannelInhibit="DO_CH14ChannelInhibit" aoSetPoint="AO_CH14SV" aoAlarmHigher="AO_CH14AlarmHigherPoint" aoAlarmLower="AO_CH14AlarmLowerPoint" aoAlarmInhibit="AO_CH14SensorBreakAlarmInhibit" aioType="float" />
     <IoHeaterBand2 id="CH15" display="GaslineHeaterCH15" schematicId="" unit="" module=""  aiPV="AI_CH15PV" aiControlOutput="AI_CH15WorkingOutput"  diAlarmOutput="DI_CH15AlarmOutput" doOutRangeAlarmInhibit="DO_CH15OutRangeAlarmInhibit" doF2CLNAlarmInhibit="DO_CH15F2CLNAlarmInhibit" doChannelInhibit="DO_CH15ChannelInhibit" aoSetPoint="AO_CH15SV" aoAlarmHigher="AO_CH15AlarmHigherPoint" aoAlarmLower="AO_CH15AlarmLowerPoint" aoAlarmInhibit="AO_CH15SensorBreakAlarmInhibit" aioType="float" />
     <IoHeaterBand2 id="CH16" display="GaslineHeaterCH16" schematicId="" unit="" module=""  aiPV="AI_CH16PV" aiControlOutput="AI_CH16WorkingOutput"  diAlarmOutput="DI_CH16AlarmOutput" doOutRangeAlarmInhibit="DO_CH16OutRangeAlarmInhibit" doF2CLNAlarmInhibit="DO_CH16F2CLNAlarmInhibit" doChannelInhibit="DO_CH16ChannelInhibit" aoSetPoint="AO_CH16SV" aoAlarmHigher="AO_CH16AlarmHigherPoint" aoAlarmLower="AO_CH16AlarmLowerPoint" aoAlarmInhibit="AO_CH16SensorBreakAlarmInhibit" aioType="float" />
-	</IoHeaterBands>
-	<IoAlarmSignals classType="Aitex.Core.RT.Device.Unit.IoAlarmSignal" assembly="MECF.Framework.RT.EquipmentLibrary">
+	</IoHeaterBands>-->
+	<!--<IoAlarmSignals classType="Aitex.Core.RT.Device.Unit.IoAlarmSignal" assembly="MECF.Framework.RT.EquipmentLibrary">
 		<IoAlarmSignal id="AlarmSignalSensorBreak"			diSignalsplay="SensorBreakAlarm"				diSignal="DI_SensorBreakAlarm"			alarmTrigValue="true"/>
 		<IoAlarmSignal id="AlarmSignalTempOutRange"			diSignalsplay="TempOutRangeAlarm"				diSignal="DI_TempOutRangeAlarm"			alarmTrigValue="true"/>
 		<IoAlarmSignal id="AlarmSignalCLN"		diSignalsplay="CLNAlarm"			diSignal="DI_CLNAlarm"		alarmTrigValue="true"/>
@@ -27,6 +27,6 @@
 	<IoTriggers classType="FurnaceRT.Devices.IoTrigger2" assembly="FurnaceRT">
 		<IoTrigger2 id="PowerOn" display="PowerOn" schematicId="" unit="" doTrigger="DO_PowerOn"/>
     <IoTrigger2 id="RecipeChange" display="RecipeChange" schematicId="" unit="" aoTrigger="AO_RecipeChange"/>
-	</IoTriggers>
+	</IoTriggers>-->
 
 </DeviceModelDefine>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 3 - 423
Furnace/FurnaceRT/Config/IO/ELK/DeviceModelPM.xml


+ 2 - 2
Furnace/FurnaceRT/Config/IO/ELK/_ioDefineGasLine.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <IO_DEFINE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-  <Dig_In>
+  <!--<Dig_In>
     <DI_ITEM Index="0"	Name="DI_CH1AlarmOutput" BufferOffset="0"	Addr="15564"	Description="CH1 Alarm Output"/>
     <DI_ITEM Index="2"	Name="DI_CH2AlarmOutput" BufferOffset="2"	Addr="15566"	Description="CH2 Alarm Output"/>
     <DI_ITEM Index="4"	Name="DI_CH3AlarmOutput" BufferOffset="4"	Addr="15568"	Description="CH3 Alarm Output"/>
@@ -172,5 +172,5 @@
     <AO_ITEM Index="124"	Name="AO_CH15AlarmLowerPoint" BufferOffset="124" Addr="15752"	Description="CH15 Alarm Lower Point"/>
     <AO_ITEM Index="126"	Name="AO_CH16AlarmLowerPoint" BufferOffset="126" Addr="15754"	Description="CH16 Alarm Lower Point"/>
     <AO_ITEM Index="226" Name="AO_RecipeChange" BufferOffset="226" Addr="15854"	Description="Recipe Change"/>
-  </Ana_Out>
+  </Ana_Out>-->
 </IO_DEFINE>

+ 30 - 11
Furnace/FurnaceUI/Views/Recipes/RecipeJobViewModel.cs

@@ -276,11 +276,17 @@ namespace FurnaceUI.Views.Recipes
             }
         }
 
+        private bool _isEnabledNewRecipe = false;
         public bool IsEnabledNewRecipe
         {
             get
             {
-                return !IsSingleFile;
+                return _isEnabledNewRecipe;
+            }
+            set
+            {
+                _isEnabledNewRecipe = value;
+                NotifyOfPropertyChange(nameof(IsEnabledNewRecipe));
             }
         }
 
@@ -288,7 +294,7 @@ namespace FurnaceUI.Views.Recipes
         {
             get
             {
-                return editMode == EditMode.Edit ;
+                return editMode == EditMode.Edit;
             }
         }
 
@@ -581,8 +587,20 @@ namespace FurnaceUI.Views.Recipes
                 this.editMode = EditMode.None;
             }
             this.UpdateView();
+            GetIsEnabledNewRecipe();
         }
+        private void GetIsEnabledNewRecipe()
+        {
 
+            if (!IsSingleFile && ProcessTypeFileList != null && ProcessTypeFileList.FirstOrDefault() != null && ProcessTypeFileList.FirstOrDefault().FileListByProcessType != null && ProcessTypeFileList.FirstOrDefault().FileListByProcessType.Count > 0)
+            {
+                IsEnabledNewRecipe = true;
+            }
+            else
+            {
+                IsEnabledNewRecipe = false;
+            }
+        }
         #region folder
 
         public void SelectRecipeType()
@@ -831,6 +849,7 @@ namespace FurnaceUI.Views.Recipes
             _recipeProvider.DeleteRecipeFolder(prefix, CurrentFileNode.Name);
 
             ReloadRecipeFileList(CurrentChamberType, CurrentProcessType, "", false, true);
+            GetIsEnabledNewRecipe();
         }
 
         public void RenameFolder()
@@ -1407,8 +1426,8 @@ namespace FurnaceUI.Views.Recipes
             }
         }
 
-      
-       
+
+
         public void EditRecipe()
         {
             CGlobal.RecipeProcessEditViewEnable = true;
@@ -1469,17 +1488,17 @@ namespace FurnaceUI.Views.Recipes
 
         public void ExportRecipe()
         {
-           
+
         }
 
         public void HistoryRecipe()
         {
-           
+
         }
 
-       
 
-      
+
+
 
 
         #endregion
@@ -1493,7 +1512,7 @@ namespace FurnaceUI.Views.Recipes
             }
         }
 
-       
+
         public void SavePermission()
         {
             CurrentRecipe.Clear();
@@ -1515,7 +1534,7 @@ namespace FurnaceUI.Views.Recipes
             CurrentRecipe.RecipePermission = dialog.RecipePermission;
             CurrentRecipe.Description = dialog.RecipeComment;
             CurrentRecipe.RecipeLevel = CurrentFileNode.Level;
-          
+
             _recipeProvider.SaveRecipe(CurrentRecipe.PrefixPath, CurrentRecipe.Name, CurrentRecipe.GetXmlString());
 
             //ReloadRecipeFileList(CurrentChamberType, CurrentProcessType, CurrentFileNode.FullPath, false);
@@ -1649,5 +1668,5 @@ namespace FurnaceUI.Views.Recipes
         }
 
     }
-   
+
 }

+ 20 - 1
Furnace/FurnaceUI/Views/Recipes/RecipeLayoutViewModel.cs

@@ -286,11 +286,17 @@ namespace FurnaceUI.Views.Recipes
             }
         }
 
+        private bool _isEnabledNewRecipe = false;
         public bool IsEnabledNewRecipe
         {
             get
             {
-                return !IsSingleFile;
+                return _isEnabledNewRecipe;
+            }
+            set
+            {
+                _isEnabledNewRecipe = value;
+                NotifyOfPropertyChange(nameof(IsEnabledNewRecipe));
             }
         }
 
@@ -590,8 +596,20 @@ namespace FurnaceUI.Views.Recipes
                 this.editMode = EditMode.None;
             }
             this.UpdateView();
+            GetIsEnabledNewRecipe();
         }
+        private void GetIsEnabledNewRecipe()
+        {
 
+            if (!IsSingleFile && ProcessTypeFileList != null && ProcessTypeFileList.FirstOrDefault() != null && ProcessTypeFileList.FirstOrDefault().FileListByProcessType != null && ProcessTypeFileList.FirstOrDefault().FileListByProcessType.Count > 0)
+            {
+                IsEnabledNewRecipe = true;
+            }
+            else
+            {
+                IsEnabledNewRecipe = false;
+            }
+        }
         #region folder
 
         public void SelectRecipeType()
@@ -839,6 +857,7 @@ namespace FurnaceUI.Views.Recipes
             _recipeProvider.DeleteRecipeFolder(prefix, CurrentFileNode.Name);
 
             ReloadRecipeFileList(CurrentChamberType, CurrentProcessType, "", false, true);
+            GetIsEnabledNewRecipe();
         }
 
         public void RenameFolder()

+ 32 - 4
Furnace/FurnaceUI/Views/Recipes/RecipeViewModel.cs

@@ -1,4 +1,5 @@
 using Aitex.Core.RT.Log;
+using Aitex.Core.UI.Control;
 using Aitex.Sorter.Common;
 using Caliburn.Micro;
 using Caliburn.Micro.Core;
@@ -296,11 +297,18 @@ namespace FurnaceUI.Views.Recipes
             }
         }
 
+
+        private bool _isEnabledNewRecipe = false;
         public bool IsEnabledNewRecipe
         {
             get
             {
-                return !IsSingleFile;
+                return _isEnabledNewRecipe;
+            }
+            set
+            {
+                _isEnabledNewRecipe = value;
+                NotifyOfPropertyChange(nameof(IsEnabledNewRecipe));
             }
         }
 
@@ -602,8 +610,27 @@ namespace FurnaceUI.Views.Recipes
                 this.editMode = EditMode.None;
             }
             this.UpdateView();
+            //       public bool IsEnabledNewRecipe
+            //{
+            //    get
+            //    {
+            //        return !IsSingleFile;
+            //    }
+            //}
+            GetIsEnabledNewRecipe();
         }
+        private void GetIsEnabledNewRecipe()
+        {
 
+            if (!IsSingleFile && ProcessTypeFileList != null && ProcessTypeFileList.FirstOrDefault() != null && ProcessTypeFileList.FirstOrDefault().FileListByProcessType != null && ProcessTypeFileList.FirstOrDefault().FileListByProcessType.Count > 0)
+            {
+                IsEnabledNewRecipe = true;
+            }
+            else
+            {
+                IsEnabledNewRecipe = false;
+            }
+        }
         #region folder
 
         public void SelectRecipeType()
@@ -851,6 +878,7 @@ namespace FurnaceUI.Views.Recipes
             _recipeProvider.DeleteRecipeFolder(prefix, CurrentFileNode.Name);
 
             ReloadRecipeFileList(CurrentChamberType, CurrentProcessType, "", false, true);
+            GetIsEnabledNewRecipe();
         }
 
         public void RenameFolder()
@@ -1354,9 +1382,9 @@ namespace FurnaceUI.Views.Recipes
             }
             CurrentRecipe.Name = dialog.FileName;
             CurrentRecipe.Description = dialog.Comment;
-            CurrentRecipe.ReviseTime= DateTime.Now;
-            CurrentRecipe.PrefixPath= prefix;
-          this.Save(CurrentRecipe, false);
+            CurrentRecipe.ReviseTime = DateTime.Now;
+            CurrentRecipe.PrefixPath = prefix;
+            this.Save(CurrentRecipe, false);
             //ReloadRecipeFileList(CurrentChamberType, CurrentProcessType, newName, false);
             ProcessTypeFileItem item = ProcessTypeFileList.FirstOrDefault(x => x.ProcessType == CurrentProcessType);
             item.FileListByProcessType = RecipeSequenceTreeBuilder.GetFileNodeParameterList($"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}");// RecipeSequenceTreeBuilder.BuildFileNode(prefix, selectedFile, selectionIsFolder, recipes)[0].Files;