Explorar o código

fix 仿真模式下 只备份3条最新记录

jiangjy hai 1 día
pai
achega
cccfe3c8d4
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      Furnace/FurnaceRT/Equipments/PMs/PMMethods.cs

+ 4 - 3
Furnace/FurnaceRT/Equipments/PMs/PMMethods.cs

@@ -109,7 +109,8 @@ namespace FurnaceRT.Equipments.PMs
         }
         private void CreateZIPMethod()
         {
-            _backUpFileMaxNumber = SC.GetValue<int>("System.BackUpFileMaxNumber");
+            _backUpFileMaxNumber = SC.GetValue<bool>("System.IsSimulatorMode") ? 3 : SC.GetValue<int>("System.BackUpFileMaxNumber");
+
             var startupPath = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileVersionInfo.FileVersion;
             string sourcePath = Path.GetDirectoryName(PathManager.GetAppDir());
             string zipPath = $"{PathManager.GetAppDir()}\\ZIP";
@@ -232,7 +233,7 @@ namespace FurnaceRT.Equipments.PMs
         }
         private async void BackUpFileDataMethod()
         {
-            _backUpFileMaxNumber = SC.GetValue<int>("System.BackUpFileMaxNumber");
+            _backUpFileMaxNumber = SC.GetValue<bool>("System.IsSimulatorMode") ? 3 : SC.GetValue<int>("System.BackUpFileMaxNumber");
             var dateTime = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss");
             string sourcePath = $"{PathManager.GetAppDir()}";
             string newSourcePath = $"{PathManager.GetCfgDir()}";
@@ -432,7 +433,7 @@ namespace FurnaceRT.Equipments.PMs
             return result;
         }
 
-        public void TriggerJobAutoStart(string recipe,  RecipeExecEntryEnum recipeExecEntryEnumValue)
+        public void TriggerJobAutoStart(string recipe, RecipeExecEntryEnum recipeExecEntryEnumValue)
         {
             RecipeExecEntryEnumValue = recipeExecEntryEnumValue;
             CheckToPostMessage((int)MSG.RunOtherRecipe, recipe, "Process");