Exemple #1
0
        void ProgressGroupFinished(object sender, EventArgs e)
        {
            var group = (ProgressGroup)sender;

            lock (_SyncLock)
                ProgressGroups.Remove(group);

            OnPropertyChanged("HasRunning");
        }
Exemple #2
0
        public void Add(ProgressGroup group)
        {
            group.IsRegistered = true;
            group.Completed   += ProgressGroupFinished;

            lock (_SyncLock)
                ProgressGroups.Add(group);

            OnPropertyChanged("HasRunning");
        }
Exemple #3
0
        public void Register(ProgressGroup group)
        {
            bool contains;

            lock (_SyncLock)
                contains = ProgressGroups.Contains(group);

            if (!contains)
            {
                group.IsRegistered = true;
                group.Completed   += ProgressGroupFinished;

                lock (_SyncLock)
                    ProgressGroups.Add(group);

                OnPropertyChanged("HasRunning");
            }
        }