private void TransferEndedHandler (TransferStatusArgs args) { updateProgress = false; Giver.Application.Instance.FileTransferStarted -= FileTransferStartedHandler; Giver.Application.Instance.TransferProgress -= TransferProgressHandler; Giver.Application.Instance.TransferEnded -= TransferEndedHandler; Gtk.Application.Invoke (delegate { progressBar.Hide (); ProgressText = string.Empty; progressLabel.Hide (); }); }
private void TransferStartedHandler (TransferStatusArgs args) { if(targets.ContainsKey(args.TargetServiceInfo.ID)) { TargetService ts = targets[args.TargetServiceInfo.ID]; ts.SetupTransferEventHandlers(); } }
private void TransferProgressHandler (TransferStatusArgs args) { progressFraction = ((double)args.TotalBytesTransferred) / ((double)args.TotalBytes); }
private void FileTransferStartedHandler (TransferStatusArgs args) { Gtk.Application.Invoke ( delegate { ProgressText = Services.PlatformService.GetString ("Giving: {0}", args.Name); progressBar.Text = Services.PlatformService.GetString ("{0} of {1}", args.CurrentCount, args.TotalCount); }); if(!updateProgress) { updateProgress = true; GLib.Timeout.Add(50, UpdateProgressBar); } }
private void TransferEndedHandler (TransferStatusArgs args) { if(TransferEnded != null) TransferEnded(args); }
private void TransferProgressHandler (TransferStatusArgs args) { if(TransferProgress != null) TransferProgress(args); }
private void FileTransferStartedHandler (TransferStatusArgs args) { if(FileTransferStarted != null) FileTransferStarted(args); }