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; }
public Updater(IAppReduxDispatcher appReduxDispatcher) { this.appReduxDispatcher = appReduxDispatcher; }