Exemple #1
0
 public MainWindowViewModel(MenuColorViewModel menuColorViewModel,
                            StreamOverlayViewModel streamOverlayViewModel,
                            NameBiddingViewModel nameBiddingViewModel,
                            SettingsViewModel settingsViewModel,
                            IShowTwitchAuthCommand showTwitchAuthCommand,
                            IChatBot chatBot,
                            IDataStore <CharacterNameBid> dataStore)
 {
     MenuColorViewModel     = menuColorViewModel;
     NameBiddingViewModel   = nameBiddingViewModel;
     SettingsViewModel      = settingsViewModel;
     StreamOverlayViewModel = streamOverlayViewModel;
     ChatBot              = chatBot;
     ConnectBotCommand    = new SimpleCommand(x => ChatBot.Connect());
     DisconnectBotCommand = new SimpleCommand(x => ChatBot.Disconnect());
     OpenTwitchAuthWindow = showTwitchAuthCommand;
 }
Exemple #2
0
 public SettingsViewModel(ISettingsStore settingsStore, IDialogService dialogService,
                          IShowTwitchAuthCommand showTwitchAuthCommand)
 {
     _settingsStore      = settingsStore;
     _dialogService      = dialogService;
     SaveSettingsCommand = new SimpleCommand(x =>
     {
         if (_dialogService.ConfirmDialog("Saving will overwrite your previously saved settings. OK?"))
         {
             _settingsStore.SaveSettings();
         }
     });
     LoadSettingsCommand = new SimpleCommand(x =>
     {
         if (_dialogService.ConfirmDialog("Loading will replace your current settings. OK?"))
         {
             _settingsStore.LoadSettings();
         }
     });
     OpenTwitchAuthWindow = showTwitchAuthCommand;
 }