Esempio n. 1
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;
         }
     }
 }
Esempio n. 2
0
 internal static void NotifyAsyncFinish(CustomToolContext context)
 {
     WorkbenchSingleton.SafeThreadAsyncCall(
         delegate {
         activeToolRun         = null;
         CustomToolRun nextRun = toolRuns[0];
         toolRuns.RemoveAt(0);
         RunCustomTool(nextRun);
     });
 }
Esempio n. 3
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);
             }
         }
     });
 }
Esempio n. 4
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);
             }
         }
     });
 }
Esempio n. 5
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);
						}
					}
				});
		}
Esempio n. 6
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;
				}
			}
		}
Esempio n. 7
0
		internal static void NotifyAsyncFinish(CustomToolContext context)
		{
			WorkbenchSingleton.SafeThreadAsyncCall(
				delegate {
					activeToolRun = null;
					CustomToolRun nextRun = toolRuns[0];
					toolRuns.RemoveAt(0);
					RunCustomTool(nextRun);
				});
		}
Esempio n. 8
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);
             }
         }
     });
 }