Esempio n. 1
0
 public InternalProgressBarMonitor(ProgressBarMonitor widget)
 {
     this.widget = widget;
     widget.buttonCancel.Clicked += OnCancelClicked;
 }
Esempio n. 2
0
		void RunInstall (Gtk.Alignment commandBox, Update update)
		{
			installing = true;
			
			ProgressBarMonitor monitorBar = new ProgressBarMonitor ();
			monitorBar.ShowErrorsDialog = true;
			monitorBar.Show ();
			commandBox.Child.Destroy ();
			commandBox.Add (monitorBar);
			
			IAsyncOperation oper = update.InstallAction (monitorBar.CreateProgressMonitor ());
			oper.Completed += delegate {
				DispatchService.GuiDispatch (delegate {
					monitorBar.Hide ();
					Gtk.Label result = new Gtk.Label ();
					if (oper.Success)
						result.Text = GettextCatalog.GetString ("Completed");
					else
						result.Text = GettextCatalog.GetString ("Failed");
					commandBox.Child.Destroy ();
					commandBox.Add (result);
					result.Show ();
					installing = false;
					
					if (installQueue.Count > 0)
						installQueue.Dequeue ()();
				});
			};
		}
Esempio n. 3
0
 public InternalProgressBarMonitor(ProgressBarMonitor widget)
 {
     this.widget = widget;
     widget.buttonCancel.Clicked += OnCancelClicked;
 }
Esempio n. 4
0
		void RunInstall (HBox labelBox, Update update)
		{
			installing = true;
			
			ProgressBarMonitor monitorBar = new ProgressBarMonitor ();
			monitorBar.ShowErrorsDialog = true;
			monitorBar.Show ();
			labelBox.PackStart (monitorBar, false, false, 0);
			
			IAsyncOperation oper = update.InstallAction (monitorBar.CreateProgressMonitor ());
			oper.Completed += delegate {
				DispatchService.GuiDispatch (delegate {
					monitorBar.Hide ();
					Gtk.Label result = new Gtk.Label ();
					if (oper.Success)
						result.Text = GettextCatalog.GetString ("Completed");
					else
						result.Text = GettextCatalog.GetString ("Failed");
					labelBox.PackStart (result, false, false, 0);
					result.Show ();
					installing = false;
					
					if (installQueue.Count > 0)
						installQueue.Dequeue ()();
				});
			};
		}