Example #1
0
 public RepoWatcher(StatusRepo repo, Action <StatusInfo> action)
 {
     _repo   = repo;
     _action = action;
     _repo.PropertyChanged += RepoOnPropertyChanged;
     _action(repo.Info);
 }
Example #2
0
 public Status(string item, StatusRepo repo, double progress = 0, int speed = 0,
               TimeSpan?eta = null, RepoStatus action = RepoStatus.Waiting) : base(item, progress, speed, eta, action)
 {
     Repo = repo;
     Repo.AddItem(this);
     Color = "Green";
 }
Example #3
0
        public static IDisposable Monitor(this StatusRepo This, ProgressLeaf leaf, bool inclProgress = false)
        {
            var c      = new AverageContainer2(20);
            var isZero = true;

            return(new RepoWatcher(This, current => Call(leaf, inclProgress, c, current.Speed, current.Progress)));
        }