コード例 #1
0
		public IncrementValueStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			IncrementValueStep = (IncrementValueStep)stepViewModel.Step;
			IncrementTypes = AutomationHelper.GetEnumObs<IncrementType>();
			ResultArgument = new ArgumentViewModel(IncrementValueStep.ResultArgument, stepViewModel.Update, null, false);
		}
コード例 #2
0
		public RviAlarmStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			RviAlarmStep = (RviAlarmStep)stepViewModel.Step;
			NameArgument = new ArgumentViewModel(RviAlarmStep.NameArgument, stepViewModel.Update, null);
			NameArgument.ExplicitValue.MinIntValue = 0;
		}
コード例 #3
0
		public ExportOrganisationListStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			ExportOrganisationListStep = (ExportOrganisationListStep)stepViewModel.Step;
			IsWithDeleted = new ArgumentViewModel(ExportOrganisationListStep.IsWithDeleted, stepViewModel.Update, UpdateContent);
			PathArgument = new ArgumentViewModel(ExportOrganisationListStep.PathArgument, stepViewModel.Update, UpdateContent);
		}
コード例 #4
0
		public ControlOpcDaTagStepViewModel(StepViewModel stepViewModel, ControlElementType controlElementType)
			: base(stepViewModel)
		{
			ControlOpcDaTagStep = (ControlOpcDaTagStep)stepViewModel.Step;
			ControlElementType = controlElementType;
			ValueArgument = new ArgumentViewModel(ControlOpcDaTagStep.ValueArgument, stepViewModel.Update, UpdateContent, controlElementType == ControlElementType.Set);
		}
コード例 #5
0
		public CheckPermissionStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			CheckPermissionStep = (CheckPermissionStep)stepViewModel.Step;
			PermissionArgument = new ArgumentViewModel(CheckPermissionStep.PermissionArgument, stepViewModel.Update, UpdateContent);
			ResultArgument = new ArgumentViewModel(CheckPermissionStep.ResultArgument, stepViewModel.Update, UpdateContent, false);
		}
コード例 #6
0
		public void UpdateArguments()
		{
			Arguments = new List<ArgumentViewModel>();
			int i = 0;
			if (ScheduleProcedure.Arguments == null)
				ScheduleProcedure.Arguments = new List<Argument>();
			foreach (var variable in Procedure.Arguments)
			{
				var argument = new Argument();
				if (ScheduleProcedure.Arguments.Count <= i)
				{
					argument = InitializeArgumemt(variable);
				}
				else
				{
					if (!CheckSignature(ScheduleProcedure.Arguments[i], variable))
					{
						argument = InitializeArgumemt(variable);
					}
					else
						argument = ScheduleProcedure.Arguments[i];
				}
				var argumentViewModel = new ArgumentViewModel(argument, null, null, true, CallingProcedure != null);
				argumentViewModel.Name = variable.Name;
				argumentViewModel.IsList = variable.IsList;
				argumentViewModel.Update(GetVariables(argumentViewModel), argumentViewModel.ExplicitType, argumentViewModel.EnumType, argumentViewModel.ObjectType, argumentViewModel.IsList);
				Arguments.Add(argumentViewModel);
				i++;
			}
			ScheduleProcedure.Arguments = new List<Argument>();
			foreach (var argument in Arguments)
				ScheduleProcedure.Arguments.Add(argument.Argument);
			OnPropertyChanged(() => Arguments);
		}
コード例 #7
0
		public GetJournalItemStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			GetJournalItemStep = (GetJournalItemStep)stepViewModel.Step;
			ResultArgument = new ArgumentViewModel(GetJournalItemStep.ResultArgument, stepViewModel.Update, UpdateContent, false);
			JournalColumnTypes = AutomationHelper.GetEnumObs<JournalColumnType>();
		}
コード例 #8
0
		public StopRecordStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			StopRecordStep = (StopRecordStep)stepViewModel.Step;
			EventUIDArgument = new ArgumentViewModel(StopRecordStep.EventUIDArgument, stepViewModel.Update, UpdateContent, false);
			CameraArgument = new ArgumentViewModel(StopRecordStep.CameraArgument, stepViewModel.Update, null);
		}
コード例 #9
0
		public ControlGKFireZoneStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			ControlGKFireZoneStep = (ControlGKFireZoneStep)stepViewModel.Step;
			Commands = AutomationHelper.GetEnumObs<ZoneCommandType>();
			GKFireZoneArgument = new ArgumentViewModel(ControlGKFireZoneStep.GKFireZoneArgument, stepViewModel.Update, null);
			SelectedCommand = ControlGKFireZoneStep.ZoneCommandType;
		}
コード例 #10
0
		public ForeachStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			ForeachStep = (ForeachStep)stepViewModel.Step;
			ListArgument = new ArgumentViewModel(ForeachStep.ListArgument, stepViewModel.Update, UpdateContent, false);
			ListArgument.UpdateVariableHandler += UpdateItemVariable;
			ItemArgument = new ArgumentViewModel(ForeachStep.ItemArgument, stepViewModel.Update, UpdateContent, false);
		}
コード例 #11
0
		public GetObjectPropertyStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			GetObjectPropertyStep = (GetObjectPropertyStep)stepViewModel.Step;
			ObjectArgument = new ArgumentViewModel(GetObjectPropertyStep.ObjectArgument, stepViewModel.Update, UpdateContent);
			ObjectTypes = AutomationHelper.GetEnumObs<ObjectType>();
			ResultArgument = new ArgumentViewModel(GetObjectPropertyStep.ResultArgument, stepViewModel.Update, UpdateContent, false);
		}
コード例 #12
0
		public ShowPropertyStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			ShowPropertyStep = (ShowPropertyStep)stepViewModel.Step;
			ObjectArgument = new ArgumentViewModel(ShowPropertyStep.ObjectArgument, stepViewModel.Update, null);
			ObjectTypes = new ObservableCollection<ObjectType>(AutomationHelper.GetEnumList<ObjectType>().FindAll(x => x != ObjectType.Organisation));
			IsServerContext = Procedure.ContextType == ContextType.Server;
		}
コード例 #13
0
ファイル: PauseStepViewModel.cs プロジェクト: xbadcode/Rubezh
		public PauseStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			PauseStep = (PauseStep)stepViewModel.Step;
			TimeTypes = AutomationHelper.GetEnumObs<TimeType>();
			PauseArgument = new ArgumentViewModel(PauseStep.PauseArgument, stepViewModel.Update, null);
			PauseArgument.ExplicitValue.MinIntValue = 0;
		}
コード例 #14
0
		public GetListCountStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			GetListCountStep = (GetListCountStep)stepViewModel.Step;
			ListArgument = new ArgumentViewModel(GetListCountStep.ListArgument, stepViewModel.Update, UpdateContent, false);
			CountArgument = new ArgumentViewModel(GetListCountStep.CountArgument, stepViewModel.Update, UpdateContent, false);
			CountArgument.ExplicitType = ExplicitType.Integer;
		}
コード例 #15
0
		public ControlPumpStationStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			ControlPumpStationStep = (ControlPumpStationStep)stepViewModel.Step;
			Commands = AutomationHelper.GetEnumObs<PumpStationCommandType>();
			PumpStationArgument = new ArgumentViewModel(ControlPumpStationStep.PumpStationArgument, stepViewModel.Update, null);
			SelectedCommand = ControlPumpStationStep.PumpStationCommandType;
		}
コード例 #16
0
		public RandomStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			RandomStep = (RandomStep)stepViewModel.Step;
			MaxValueArgument = new ArgumentViewModel(RandomStep.MaxValueArgument, stepViewModel.Update, UpdateContent);
			MaxValueArgument.ExplicitValue.MinIntValue = 1;
			ResultArgument = new ArgumentViewModel(RandomStep.ResultArgument, stepViewModel.Update, UpdateContent, false);
		}
コード例 #17
0
		public RunProgramStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{

			RunProgramStep = (RunProgramStep)stepViewModel.Step;
			PathArgument = new ArgumentViewModel(RunProgramStep.PathArgument, stepViewModel.Update, UpdateContent);
			ParametersArgument = new ArgumentViewModel(RunProgramStep.ParametersArgument, stepViewModel.Update, UpdateContent);
		}
コード例 #18
0
		public ControlDelayStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			ControlDelayStep = (ControlDelayStep)stepViewModel.Step;
			Commands = AutomationHelper.GetEnumObs<DelayCommandType>();
			DelayArgument = new ArgumentViewModel(ControlDelayStep.DelayArgument, stepViewModel.Update, null);
			SelectedCommand = ControlDelayStep.DelayCommandType;
		}
コード例 #19
0
		public ControlVisualStepViewModel(StepViewModel stepViewModel, ControlElementType controlElementType)
			: base(stepViewModel)
		{
			ControlVisualStep = (ControlVisualStep)stepViewModel.Step;
			ControlElementType = controlElementType;
			IsServerContext = Procedure.ContextType == ContextType.Server;
			ValueArgument = new ArgumentViewModel(ControlVisualStep.Argument, stepViewModel.Update, UpdateContent, controlElementType == ControlElementType.Set);
		}
コード例 #20
0
ファイル: PtzStepViewModel.cs プロジェクト: xbadcode/Rubezh
		public PtzStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			PtzStep = (PtzStep)stepViewModel.Step;
			CameraArgument = new ArgumentViewModel(PtzStep.CameraArgument, stepViewModel.Update, null);
			PtzNumberArgument = new ArgumentViewModel(PtzStep.PtzNumberArgument, stepViewModel.Update, null);
			PtzNumberArgument.ExplicitValue.MinIntValue = 1;
			PtzNumberArgument.ExplicitValue.MaxIntValue = 100;
		}
コード例 #21
0
		public ShowDialogStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			ShowDialogStep = (ShowDialogStep)stepViewModel.Step;
			IsServerContext = Procedure.ContextType == ContextType.Server;
			WindowUIDArgument = new ArgumentViewModel(ShowDialogStep.WindowIDArgument, stepViewModel.Update, UpdateContent);
			ProcedureLayoutCollectionViewModel = new ProcedureLayoutCollectionViewModel(ShowDialogStep.LayoutFilter);
			IsServerContext = Procedure.ContextType == ContextType.Server;
		}
コード例 #22
0
		public ExportConfigurationStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			ExportConfigurationStep = (ExportConfigurationStep)stepViewModel.Step;
			IsExportDevices = new ArgumentViewModel(ExportConfigurationStep.IsExportDevices, stepViewModel.Update, UpdateContent);
			IsExportZones = new ArgumentViewModel(ExportConfigurationStep.IsExportZones, stepViewModel.Update, UpdateContent);
			IsExportDoors = new ArgumentViewModel(ExportConfigurationStep.IsExportDoors, stepViewModel.Update, UpdateContent);
			PathArgument = new ArgumentViewModel(ExportConfigurationStep.PathArgument, stepViewModel.Update, UpdateContent);
		}
コード例 #23
0
		public JournalStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			JournalStep = (JournalStep)stepViewModel.Step;
			MessageArgument = new ArgumentViewModel(JournalStep.MessageArgument, stepViewModel.Update, null);
			ExplicitTypes = new ObservableCollection<ExplicitType>(AutomationHelper.GetEnumList<ExplicitType>());
			EnumTypes = AutomationHelper.GetEnumObs<EnumType>();
			ObjectTypes = AutomationHelper.GetEnumObs<ObjectType>();
		}
コード例 #24
0
		public ChangeListStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			ChangeListStep = (ChangeListStep)stepViewModel.Step;
			ListArgument = new ArgumentViewModel(ChangeListStep.ListArgument, stepViewModel.Update, UpdateContent, false);
			ListArgument.UpdateVariableHandler = UpdateItemArgument;
			ItemArgument = new ArgumentViewModel(ChangeListStep.ItemArgument, stepViewModel.Update, UpdateContent);
			ChangeTypes = AutomationHelper.GetEnumObs<ChangeType>();
		}
コード例 #25
0
		public HttpRequestStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			HttpRequestStep = (HttpRequestStep)stepViewModel.Step;
			UrlArgument = new ArgumentViewModel(HttpRequestStep.UrlArgument, stepViewModel.Update, UpdateContent);
			ContentArgument = new ArgumentViewModel(HttpRequestStep.ContentArgument, stepViewModel.Update, UpdateContent);
			ResponseArgument = new ArgumentViewModel(HttpRequestStep.ResponseArgument, stepViewModel.Update, UpdateContent, false);
			HttpMethods = AutomationHelper.GetEnumObs<HttpMethod>();
		}
コード例 #26
0
		public StartRecordStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			StartRecordStep = (StartRecordStep)stepViewModel.Step;
			EventUIDArgument = new ArgumentViewModel(StartRecordStep.EventUIDArgument, stepViewModel.Update, UpdateContent, false);
			TimeoutArgument = new ArgumentViewModel(StartRecordStep.TimeoutArgument, stepViewModel.Update, UpdateContent);
			CameraArgument = new ArgumentViewModel(StartRecordStep.CameraArgument, stepViewModel.Update, null);
			TimeTypes = AutomationHelper.GetEnumObs<TimeType>();
			SelectedTimeType = StartRecordStep.TimeType;
		}
コード例 #27
0
		public ExportJournalStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			ExportJournalStep = (ExportJournalStep)stepViewModel.Step;
			IsExportJournalArgument = new ArgumentViewModel(ExportJournalStep.IsExportJournalArgument, stepViewModel.Update, UpdateContent);
			IsExportPassJournalArgument = new ArgumentViewModel(ExportJournalStep.IsExportPassJournalArgument, stepViewModel.Update, UpdateContent);
			MinDateArgument = new ArgumentViewModel(ExportJournalStep.MinDateArgument, stepViewModel.Update, UpdateContent);
			MaxDateArgument = new ArgumentViewModel(ExportJournalStep.MaxDateArgument, stepViewModel.Update, UpdateContent);
			PathArgument = new ArgumentViewModel(ExportJournalStep.PathArgument, stepViewModel.Update, UpdateContent);
		}
コード例 #28
0
		public ControlGKDeviceStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			ControlGkDeviceStep = (ControlGKDeviceStep)stepViewModel.Step;
			GKDeviceArgument = new ArgumentViewModel(ControlGkDeviceStep.GKDeviceArgument, stepViewModel.Update, null);
			GKDeviceArgument.UpdateVariableScopeHandler = Update;
			GKDeviceArgument.ExplicitValue.UpdateObjectHandler += Update;
			Commands = new ObservableCollection<CommandType>();
			Update();
		}
コード例 #29
0
		public GetListItemStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			GetListItemStep = (GetListItemStep)stepViewModel.Step;
			ListArgument = new ArgumentViewModel(GetListItemStep.ListArgument, stepViewModel.Update, UpdateContent, false);
			ListArgument.UpdateVariableHandler += UpdateItemVariable;
			ItemArgument = new ArgumentViewModel(GetListItemStep.ItemArgument, stepViewModel.Update, UpdateContent, false);
			IndexArgument = new ArgumentViewModel(GetListItemStep.IndexArgument, stepViewModel.Update, UpdateContent);
			PositionTypes = AutomationHelper.GetEnumObs<PositionType>();
		}
コード例 #30
0
		public SetValueStepViewModel(StepViewModel stepViewModel)
			: base(stepViewModel)
		{
			SetValueStep = (SetValueStep)stepViewModel.Step;
			SourceArgument = new ArgumentViewModel(SetValueStep.SourceArgument, stepViewModel.Update, UpdateContent);
			TargetArgument = new ArgumentViewModel(SetValueStep.TargetArgument, stepViewModel.Update, UpdateContent, false);
			ExplicitTypes = AutomationHelper.GetEnumObs<ExplicitType>();
			EnumTypes = AutomationHelper.GetEnumObs<EnumType>();
			ObjectTypes = AutomationHelper.GetEnumObs<ObjectType>();
			SelectedExplicitType = SetValueStep.ExplicitType;
		}