public ServiceViewModel()
 {
     CopyDatabase = new CommandViewModel("Копіювати базу", new RelayCommand(
                                             p => CopyDabase(),
                                             p => { return(true); },
                                             "Tune"));
     DeleteDatabase = new CommandViewModel("Видалити базу", new RelayCommand(
                                               p => DeleteDabase(),
                                               p => { return(true); },
                                               "Tune"));
 }
Esempio n. 2
0
        public SwitchModeViewModel(IChannel modeChannel)
        {
            _modeChannel     = modeChannel;
            ToServiceCommand = new CommandViewModel("Режим наладки", new AskRelayCommand(
                                                        x => { ToService(); OnRequestClose(); },
                                                        x => { return(Convert.ToInt32(_modeChannel.Value) != 0); },
                                                        "Control"));

            ToManualCommand = new CommandViewModel("Ручной Режим", new AskRelayCommand(
                                                       x => { ToManual(); OnRequestClose(); },
                                                       x => { return(Convert.ToInt32(_modeChannel.Value) != 1); },
                                                       "Control"));

            ToAutoCommand = new CommandViewModel("Автоматический Режим", new AskRelayCommand(
                                                     x => { ToAuto(); OnRequestClose(); },
                                                     x => { return(Convert.ToInt32(_modeChannel.Value) != 2); },
                                                     "Control"));
        }