コード例 #1
0
 public MainViewModel(IAppReduxDispatcher appReduxDispatcher, IUpdater updater, IAppUpdater appUpdater, Func <Server, ServerViewModel> serverViewModelFactory)
 {
     logger.Info($"Welcome to AutoMasshTik v{typeof(MainViewModel).Assembly.GetName().Version}");
     this.appReduxDispatcher     = appReduxDispatcher;
     this.updater                = updater;
     this.appUpdater             = appUpdater;
     this.serverViewModelFactory = serverViewModelFactory;
     state                                 = appReduxDispatcher.InitialState;
     ServerModels                          = state.Servers;
     Servers                               = new ObservableCollection <ServerViewModel>();
     StartUpdateCommand                    = new RelayCommand <UpdateMode>(StartUpdate, m => !IsUpdating);
     StopUpdateCommand                     = new RelayCommand(StopUpdate, () => IsUpdating);
     ToggleShowPasswordCommand             = new RelayCommand(ToggleShowPassword);
     this.appReduxDispatcher.StateChanged += AppReduxDispatcher_StateChanged;
 }
コード例 #2
0
ファイル: Updater.cs プロジェクト: MihaMarkic/AutoMasshTik
 public Updater(IAppReduxDispatcher appReduxDispatcher)
 {
     this.appReduxDispatcher = appReduxDispatcher;
 }