Пример #1
0
		internal static void NotifyAsyncFinish(CustomToolContext context)
		{
			WorkbenchSingleton.SafeThreadAsyncCall(
				delegate {
					activeToolRun = null;
					if(toolRuns.Count > 0) {
						CustomToolRun nextRun = toolRuns.Dequeue();
						if(nextRun != null) {						
							RunCustomTool(nextRun);
						}
					}
				});
		}
Пример #2
0
		internal static void NotifyAsyncFinish(CustomToolContext context)
		{
			WorkbenchSingleton.SafeThreadAsyncCall(
				delegate {
					activeToolRun = null;
					CustomToolRun nextRun = toolRuns[0];
					toolRuns.RemoveAt(0);
					RunCustomTool(nextRun);
				});
		}
Пример #3
0
		static void RunCustomTool(CustomToolRun run)
		{
			if (activeToolRun != null) {
				toolRuns.Enqueue(run);
			} else {
				try {
					run.customTool.GenerateCode(run.baseItem, run.context);
				} catch (Exception ex) {
					LoggingService.Error(ex);
					run.context.MessageView.AppendLine("Custom tool '" + run.baseItem.CustomTool + "' failed.");
					if (run.showMessageBoxOnErrors) {
						MessageService.ShowError("Custom tool '" + run.baseItem.CustomTool
						                         + "' failed:" + Environment.NewLine + ex.ToString());
					}
				}
				if (run.context.RunningSeparateThread) {
					activeToolRun = run;
				}
			}
		}
Пример #4
0
 internal static void NotifyAsyncFinish(CustomToolContext context)
 {
     SD.MainThread.InvokeAsyncAndForget(delegate {
         activeToolRun = null;
         if (toolRuns.Count > 0) {
             CustomToolRun nextRun = toolRuns.Dequeue();
             if (nextRun != null) {
                 RunCustomTool(nextRun);
             }
         }
     });
 }