|
@@ -16,6 +16,7 @@ using Prism.Services.Dialogs;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Collections.ObjectModel;
|
|
|
+using System.Configuration;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
@@ -38,7 +39,8 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
|
|
|
private List<OptionConfigDto> _optionConfigs;
|
|
|
private bas_plc_test_scheme bas_Plc_Test_Scheme;//测试方案
|
|
|
private int schDtlMainId = 0;//测试方案明细主键id
|
|
|
-
|
|
|
+ private int delayTime = Convert.ToInt32(ConfigurationManager.AppSettings["DelayTime"]);
|
|
|
+ private int longDelayTime = Convert.ToInt32(ConfigurationManager.AppSettings["LongDelayTime"]);
|
|
|
public EditItemDetailViewModel(IDialogService dialog, IEventAggregator aggregator, IRegionManager regionManager, IOptionConfigService optionConfigService, IBasicPlcTestSchemeService basicPlcTestSchemeService, IBasicPlcTestSchemeDtlService basicPlcTestSchemeDtlService, IBasicDeviceKindService iBasicDeviceKindService, IMapper mapper, ILogger logger)
|
|
|
{
|
|
|
_dialog = dialog;
|
|
@@ -142,6 +144,7 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
|
|
|
}
|
|
|
TestName = findresult.ItemName;
|
|
|
SelectTest = findresult.ItemType;
|
|
|
+ SelectTime = findresult.ItemTime.ToString();
|
|
|
//前置项解析
|
|
|
string preconStr = findresult.Precondition.ToString();
|
|
|
if (!string.IsNullOrEmpty(preconStr))
|
|
@@ -484,6 +487,12 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
|
|
|
OutJudgeLogicKinds.Add(logic.ContentOption);
|
|
|
|
|
|
}
|
|
|
+ //测试时间
|
|
|
+
|
|
|
+
|
|
|
+ TestTimeList.Add(delayTime.ToString());
|
|
|
+ TestTimeList.Add(longDelayTime.ToString());
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
@@ -646,6 +655,7 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
|
|
|
schDtlDto.ItemName = TestName;
|
|
|
|
|
|
schDtlDto.ItemType = SelectTest;
|
|
|
+ schDtlDto.ItemTime =Convert.ToInt32(SelectTime);
|
|
|
schDtlDto.Precondition = prefixJsonStr;
|
|
|
schDtlDto.PreconditionDescribe = BeforeDetail;
|
|
|
schDtlDto.Action = inJsonStr;
|
|
@@ -888,6 +898,22 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
|
|
|
get { return selectTest; }
|
|
|
set { selectTest = value; RaisePropertyChanged(); }
|
|
|
}
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 测试时间
|
|
|
+ /// </summary>
|
|
|
+ private string selectTime;
|
|
|
+ public string SelectTime
|
|
|
+ {
|
|
|
+ get { return selectTime; }
|
|
|
+ set { selectTime = value; RaisePropertyChanged(); }
|
|
|
+ }
|
|
|
+ private ObservableCollection<string> testTimeList = new ObservableCollection<string>();
|
|
|
+ public ObservableCollection<string> TestTimeList
|
|
|
+ {
|
|
|
+ get { return testTimeList; }
|
|
|
+ set { testTimeList = value; RaisePropertyChanged(); }
|
|
|
+ }
|
|
|
/// <summary>
|
|
|
/// 判定类型(前置项)
|
|
|
/// </summary>
|