Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 public EditConfigViewModel(Config config) {
     this.config = config;
     this.configsReader = new RepoConfigsReader();
     KeyGesture = config.KeyGesture;
     SupportsTesting = config.SupportsTesting;
     DefaultTheme = config.DefaultTheme;
     Configs = this.configsReader.RegisteredConfigs;
     UpdateDelay = AtomFeed.FeedWorker.UpdateDelay;
     RefreshUpdateCommand = DelegateCommandFactory.Create(AtomFeed.FeedWorker.Update);
     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();
 }