public IProgressMonitor BeginProgress (string title)
		{
			progressStarted = true;
			
			logView.Clear ();
			monitor = logView.GetProgressMonitor ();
			asyncOperation = monitor.AsyncOperation;
			
			Gtk.Application.Invoke (delegate {
				window.HasNewData = false;
				window.HasErrors = false;
				window.IsWorking = true;
				buttonStop.Sensitive = true;
			});
			
			monitor.AsyncOperation.Completed += delegate {
				EndProgress ();
			};
			
			return monitor;
		}
			public LogViewProgressConsole (LogViewProgressMonitor monitor)
			{
				this.monitor = monitor;
				CancellationSource = monitor.CancellationTokenSource;
			}
			public override void Dispose ()
			{
				if (monitor != null) {
					var m = monitor; // Avoid recursive dispose, since the monitor also disposes this console
					monitor = null;
					m.Dispose ();
				}
				base.Dispose ();
			}
		public OutputProgressMonitor BeginProgress (string title)
		{
			progressStarted = true;
			
			logView.Clear ();
			monitor = (LogViewProgressMonitor) logView.GetProgressMonitor ();

			DispatchService.GuiDispatch (delegate {
				window.HasNewData = false;
				window.HasErrors = false;
				window.IsWorking = true;
				buttonStop.Sensitive = true;
			});
			
			monitor.Completed += delegate {
				EndProgress ();
			};
			
			return monitor;
		}
		public OutputProgressMonitor BeginProgress (string title)
		{
			progressStarted = true;
			
			logView.Clear ();
			monitor = (LogViewProgressMonitor) logView.GetProgressMonitor ();

			Runtime.RunInMainThread (delegate {
				Window.HasNewData = false;
				Window.HasErrors = false;
				Window.IsWorking = true;
				buttonStop.Sensitive = true;
			});
			
			monitor.Completed += delegate {
				EndProgress ();
			};
			
			return monitor;
		}
Exemple #6
0
 public QueuedEndTask(LogViewProgressMonitor monitor)
 {
     Monitor = monitor;
 }
Exemple #7
0
 public LogViewProgressConsole(LogViewProgressMonitor monitor)
 {
     this.monitor       = monitor;
     CancellationSource = monitor.CancellationTokenSource;
 }
Exemple #8
0
 public QueuedBeginTask(LogViewProgressMonitor monitor, string name, int totalWork)
 {
     Monitor   = monitor;
     TotalWork = totalWork;
     Name      = name;
 }
Exemple #9
0
 public QueuedTextWrite(LogViewProgressMonitor monitor, string text, TextTag tag)
 {
     Monitor = monitor;
     Text    = new System.Text.StringBuilder(text);
     Tag     = tag;
 }
Exemple #10
0
        public void WriteError(LogViewProgressMonitor monitor, string text)
        {
            var w = new QueuedTextWrite(monitor, text, errorTag);

            addQueuedUpdate(w);
        }
Exemple #11
0
        internal void EndTask(LogViewProgressMonitor monitor)
        {
            var et = new QueuedEndTask(monitor);

            addQueuedUpdate(et);
        }
Exemple #12
0
        internal void BeginTask(LogViewProgressMonitor monitor, string name, int totalWork)
        {
            var bt = new QueuedBeginTask(monitor, name, totalWork);

            addQueuedUpdate(bt);
        }