public void Update() { IsInitialized = false; SendBeforeUpdateMessage(); RepoConfigs = new RepoConfigsReader(); TestConfigs = new TestConfigsReader(); Repositories = Config.Repositories.With(x => x.Where(IsValidConfig).Select(repo => new RepositoryViewModel(repo.Name, repo, this))).With(x => x.ToList()); IsInitialized = true; SendUpdateMessage(); }
public EditConfigViewModel(Config config) { this.config = config; this.configsReader = new RepoConfigsReader(); KeyGesture = config.KeyGesture; SupportsTesting = config.SupportsTesting; DefaultTheme = config.DefaultTheme; ScrollBarMode = (ScrollBarMode)config.ScrollBarMode; Configs = this.configsReader.RegisteredConfigs; CommonXaml = GetWpf2SlKey("Common"); DiagramXaml = GetWpf2SlKey("Diagram"); XPFGITXaml = GetWpf2SlKey("XPF"); Repositories = CreateEditRepositories(config); Repositories.CollectionChanged += RepositoriesOnCollectionChanged; AlwaysSure4 = AlwaysSure3 = AlwaysSure2 = AlwaysSure1 = config.AlwaysSure; TestByDefault = config.TestByDefault; UpdateWpf2SLProperties = new AsyncCommand(OnUpdateWpf2SLProperties); UpdateTokens(); }