Example #1
0
 public void Remove(DownloadedFile df)
 {
     
     if (files.Remove(df) && FileRemoved != null)
     {
         FileRemoved.Invoke(this, EventArgs.Empty);
     }
     InvokePropertyChanged("Files");
 }
Example #2
0
        public void Add(DownloadedFile df)
        {
            df.PropertyChanged += (a, b) => {
                if (FilesChanged != null)
                {
                    FilesChanged.Invoke(this, EventArgs.Empty);
                }

                InvokePropertyChanged(b.PropertyName);
            };
            files.Add(df);
            if (FileAdded != null)
            {
                FileAdded.Invoke(this, EventArgs.Empty);
            }

            InvokePropertyChanged("Files");
        }