/// <summary> /// Конструктов класса <see cref="JobPageViewModel"/> /// </summary> public JobPageViewModel() { ProcessControlColleciton = new ObservableCollection <WorkloadControlViewModel>(); ProcessesInitialization = new RCommand(() => { ProcessesInitializationMethod(); }); StartAllLoadProcesses = new RCommand(() => { LaunchProcessCollection(); }); StopAllLoadProcesses = new RCommand(() => { StopingProcessCollection(); }); }
/// <summary> /// Предоставляем метод инициализации команд управления /// </summary> private void CommandInitialization() { AddStage = new RCommand(() => { AddingNewStage(); }); DeleteStage = new RCommand(() => { DeleteSelectedStage(); }); DeleteAllStages = new RCommand(() => { DeleteAllStagesInTable(); }); SetRepetitions = new RCommand(() => { SetEnteredNumber(); }); }
/// <summary> /// Предоставляет метод инициализации команд /// управления запущенным процессом /// </summary> private void CommandInitialization() { RunningTest = new RCommand(() => { RunningNewTimer(); }); StopTest = new RCommand(() => { StopTimer(); }); SuspendTest = new RCommand(() => { PauseTimer(); }); ResumeTest = new RCommand(() => { ReleaseTimer(); }); }
public ProgramDesignModel() { StageCollection = new ObservableCollection <ProgramViewModel>(); AddStage = new RCommand(() => { M_AddStage(); }); DeleteStage = new RCommand(() => { M_DeleteStage(); }); CleanStageTable = new RCommand(() => { M_CreanStageTable(); }); ImportStageTable = new RCommand(() => { M_ImportStageTable(); }); ExportStageTable = new RCommand(() => { M_ExportStageTable(); }); SetMaxLoadValue = new RCommand(() => { MessageBox.Show("Макс велью тоже пашет"); }); }
/// <summary> /// Конструктор класса /// </summary> public ConnectionViewModel() { ConnectedIP = new ObservableCollection <ConnectionViewModel>(); TcpClientColleciton = new List <TcpClient>(); NetworkStreamCollection = new List <NetworkStream>(); M_UpdateLanConnection(); UpdateLanCollection = new RCommand(() => { M_UpdateLanConnection(); }); ConnectionToLan = new RCommand(() => { string ip = SelectLanCollection.ConnectionIP; int port = 4001; ConnectionMethod(ip, port); ip = null; }); DisconnectionFromLan = new RCommand(() => { DisconnectionMethod(); }); }
public MainViewModel() { ConnectedButtonCollection = new ObservableCollection <ConnectedIPButtonViewModel>(); ConnectedPage.ConnectedPageCollection = new ObservableCollection <ConnectedPage>(); FramePageCollection = new ObservableCollection <Page> { new HomePage(), new JobPage(), new CommunicationPage(), new HelpAndInfoPage(), new SettingPage() }; #region Создание команд для управления главным окном Exit = new RCommand(() => { if (MainWindowExample != null) { MainWindowExample.Close(); } }); Resize = new RCommand(() => { if (MainWindowExample != null) { if (MainWindowExample.WindowState == WindowState.Normal) { MainWindowExample.WindowState = WindowState.Maximized; } else { MainWindowExample.WindowState = WindowState.Normal; } } }); Hidden = new RCommand(() => { if (MainWindowExample != null) { MainWindowExample.WindowState = WindowState.Minimized; } }); #endregion #region Создание команд для управления меню приложения OpenHomePage = new RCommand(() => { CurrentPage = FramePageCollection[0]; IoC.Get <CollectionViewModels>().CurrentPage = FramePageCollection[0]; }); OpenJobPage = new RCommand(() => { CurrentPage = FramePageCollection[1]; IoC.Get <CollectionViewModels>().CurrentPage = FramePageCollection[1]; }); OpenProgramPage = new RCommand(() => { //CurrentPage = FramePageCollection[]; }); OpenConnecitonPage = new RCommand(() => { CurrentPage = FramePageCollection[2]; IoC.Get <CollectionViewModels>().CurrentPage = FramePageCollection[2]; }); OpenInfoPage = new RCommand(() => { CurrentPage = FramePageCollection[3]; IoC.Get <CollectionViewModels>().CurrentPage = FramePageCollection[3]; }); OpenSettingPage = new RCommand(() => { CurrentPage = FramePageCollection[4]; IoC.Get <CollectionViewModels>().CurrentPage = FramePageCollection[4]; }); #endregion CurrentPage = new CommunicationPage(); }