public void Add(FileReceiver fileReceiver) { FileProgressObject widget = AddFileProgress(fileReceiver); this.vbox.PackStart(widget, false, false, 2); this.ShowAll(); }
protected FileProgressObject AddFileProgress(FileReceiver fileReceiver) { FileProgressObject widget = new FileProgressObject(fileReceiver); widget.Delete += new BlankEventHandler(OnDeleteClicked); this.progressObjects.Add(fileReceiver, widget); return(widget); }
public void Update(FileReceiver fileReceiver) { FileProgressObject widget = Lookup(fileReceiver); if (widget != null) { widget.Update(); } }
public void Remove(FileReceiver fileReceiver) { FileProgressObject widget = Lookup(fileReceiver); if (widget != null) { this.vbox.Remove(widget); DelFileProgress(widget, fileReceiver); } }
private void Remove (object sender) { FileProgressObject fileProgress = (FileProgressObject) sender; object fileInfo = fileProgress.FileInfo; if (fileInfo.GetType() == typeof(FileSender)) { FileSender fs = (FileSender) fileInfo; Protocol.UploadManager.Abort(fs); window.Viewer.Remove(fs); } else if (fileInfo.GetType() == typeof(FileReceiver)) { FileReceiver fr = (FileReceiver) fileInfo; Protocol.DownloadManager.Abort(fr); window.Viewer.Remove(fr); } }
protected void DelFileProgress(FileProgressObject widget, object fileInfo) { widget.Delete -= new BlankEventHandler(OnDeleteClicked); this.progressObjects.Remove(fileInfo); }