Exemplo n.º 1
0
		public ProcedureViewModel(Procedure procedure)
		{
			ShowStepsCommand = new RelayCommand(OnShowSteps);
			ShowVariablesCommand = new RelayCommand(OnShowVariables);
			ShowArgumentsCommand = new RelayCommand(OnShowArguments);
			ShowConditionsCommand = new RelayCommand(OnShowConditions);

			Procedure = procedure;
			procedure.PlanElementUIDsChanged += UpdateVisualizationState;
			StepsViewModel = new StepsViewModel(procedure);
			VariablesViewModel = new VariablesViewModel(procedure);
			ArgumentsViewModel = new ArgumentsViewModel(procedure);
			ConditionsViewModel = new ConditionsViewModel(procedure);

			MenuTypes = new ObservableRangeCollection<MenuType>
			{
				MenuType.IsSteps,
				MenuType.IsVariables,
				MenuType.IsArguments,
				MenuType.IsConditions
			};
			SelectedMenuType = MenuTypes.FirstOrDefault();
		}
Exemplo n.º 2
0
		public ProcedureViewModel(Procedure procedure)
		{
			Procedure = procedure;
			ArgumentsViewModel = new ArgumentsViewModel(procedure);
			RunCommand = new RelayCommand(OnRun);
		}
		public ProcedureArgumentsViewModel(Procedure procedure)
		{
			Title = procedure.Name;
			SaveCaption = "Выполнить";
			ArgumentViewModels = new ArgumentsViewModel(procedure);
		}