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 ();
			}
Example #4
0
		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;
		}
Example #6
0
 public QueuedEndTask(LogViewProgressMonitor monitor)
 {
     Monitor = monitor;
 }
Example #7
0
 public LogViewProgressConsole(LogViewProgressMonitor monitor)
 {
     this.monitor       = monitor;
     CancellationSource = monitor.CancellationTokenSource;
 }
Example #8
0
 public QueuedBeginTask(LogViewProgressMonitor monitor, string name, int totalWork)
 {
     Monitor   = monitor;
     TotalWork = totalWork;
     Name      = name;
 }
Example #9
0
 public QueuedTextWrite(LogViewProgressMonitor monitor, string text, TextTag tag)
 {
     Monitor = monitor;
     Text    = new System.Text.StringBuilder(text);
     Tag     = tag;
 }
Example #10
0
        public void WriteError(LogViewProgressMonitor monitor, string text)
        {
            var w = new QueuedTextWrite(monitor, text, errorTag);

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

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

            addQueuedUpdate(bt);
        }