예제 #1
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 ()();
				});
			};
		}
예제 #2
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 ()();
				});
			};
		}