Ejemplo n.º 1
0
        public MainWindowVM(IRepo1Client repo)
        {
            repo.StatusChanged += (s, e) => AppendLog(e.Data);
            
            repo.UpdateInstalled += (s, e) 
                => UpdatesInstalled = true;

            repo.OnWarning = x => AppendLog(x);

            repo.StartUpdateChecker("", "");
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public static void CatchErrors(this IRepo1Client repo1Client, Application app, Action <string> errorLogger = null)
 => ThreadedAlerter.CatchErrors(app, PostIssueThen(repo1Client, errorLogger));
Ejemplo n.º 4
0
 private static Action <string> PostIssueThen(IRepo1Client repo1Client, Action <string> errorLogger)
 => new Action <string>(msg =>
 {
     repo1Client.PostRuntimeError(msg);
     errorLogger.Invoke(msg);
 });