public async Task UpdateTests(INotificationService notificationService) { CurrentFilter = null; var allTasks = await farmIntegrator.GetAllTasks(configSerializer.GetConfig().GetLocalRepositories().ToArray()); var actualState = await LoadTestsAsync(allTasks, notificationService); loggingService.SendMessage($"Start updating problems"); await((TestInfoContainer)actualState).UpdateProblems(); loggingService.SendMessage($"Almost there"); ActualState = actualState; }
public SettingsViewModel(IConfigSerializer configSerializer) { Title = "Settings"; this.configSerializer = configSerializer; Config = configSerializer.GetConfig(); Commands = UICommand.GenerateFromMessageButton(MessageButton.OKCancel, new DialogService(), MessageResult.OK, MessageResult.Cancel); Commands.Where(c => c.IsDefault).Single().Command = new DelegateCommand(Save, () => !IsAnyRepositoryDownloading()); Commands.Where(c => c.IsCancel).Single().Command = new DelegateCommand(Cancel, () => !IsAnyRepositoryDownloading()); }
public SettingsViewModel(IConfigSerializer configSerializer) { Title = "Settings"; _dispatcher = Dispatcher.CurrentDispatcher; _configSerializer = configSerializer; _platformProvider = ServiceLocator.Current.GetInstance <IPlatformProvider>(); Config = configSerializer.GetConfig(); Commands = UICommand.GenerateFromMessageButton(MessageButton.OKCancel, new DialogService(), MessageResult.OK, MessageResult.Cancel); Commands.Single(c => c.IsDefault).Command = new DelegateCommand(Save, AllowDialogButtons); Commands.Single(c => c.IsCancel).Command = new DelegateCommand(Cancel, AllowDialogButtons); }
void UpdateConfig() { loggingService.SendMessage("Checking config"); var config = configSerializer.GetConfig(false); if (Config != null && configSerializer.IsConfigEquals(config, Config)) { return; } Config = config; FillSolutions(); ServiceLocator.Current.GetInstance <IAppearanceService>()?.SetTheme(/*Config.ThemeName*/ "VS2017Light"); loggingService.SendMessage("Config loaded"); UpdateContent(); }
bool IsChanged() { return(!configSerializer.IsConfigEquals(configSerializer.GetConfig(false), Config)); }