public MainWindowVM(IRepo1Client repo) { repo.StatusChanged += (s, e) => AppendLog(e.Data); repo.UpdateInstalled += (s, e) => UpdatesInstalled = true; repo.OnWarning = x => AppendLog(x); repo.StartUpdateChecker("", ""); }
public MainWindowVM() { var cfg = LegacyCfg.ReadAndParse(); _repo = new Repo1Client(cfg.UniqueCfgKey); _repo.ReadLegacyCfg = () => LegacyCfg.Read(); StartTrackingCmd = new RelayCommand(x => _repo.StartUpdateChecker(cfg.Username, cfg.Password)); StartTrackingCmd.Execute(null); }
public static void CatchErrors(this IRepo1Client repo1Client, Application app, Action <string> errorLogger = null) => ThreadedAlerter.CatchErrors(app, PostIssueThen(repo1Client, errorLogger));
private static Action <string> PostIssueThen(IRepo1Client repo1Client, Action <string> errorLogger) => new Action <string>(msg => { repo1Client.PostRuntimeError(msg); errorLogger.Invoke(msg); });