- Timestamp:
- 01/28/15 14:32:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.cs
r11834 r11836 21 21 22 22 using System; 23 using System.Drawing; 24 using System.Threading; 23 25 using System.Windows.Forms; 24 26 using HeuristicLab.Common; … … 31 33 [Content(typeof(CSharpScript), true)] 32 34 public partial class CSharpScriptView : ScriptView { 35 private const string ScriptExecutionStartedMessage = "Script execution started"; 36 private const string ScriptExecutionCanceledMessage = "Script execution canceled"; 37 private const string ScriptExecutionSuccessfulMessage = "Script execution successful"; 38 private const string ScriptExecutionFailedMessage = "Script execution failed"; 39 33 40 protected bool Running { get; set; } 34 41 … … 65 72 startStopButton.Image = VSImageLibrary.Stop; 66 73 toolTip.SetToolTip(startStopButton, "Stop (Shift+F5)"); 74 UpdateInfoTextLabel(ScriptExecutionStartedMessage, SystemColors.ControlText); 67 75 infoTabControl.SelectedTab = outputTabPage; 68 76 } … … 76 84 startStopButton.Image = VSImageLibrary.Play; 77 85 toolTip.SetToolTip(startStopButton, "Run (F5)"); 86 87 var ex = e.Value; 88 if (ex == null) { 89 UpdateInfoTextLabel(ScriptExecutionSuccessfulMessage, Color.DarkGreen); 90 } else if (ex is ThreadAbortException) { 91 // the execution was canceled by the user 92 UpdateInfoTextLabel(ScriptExecutionCanceledMessage, Color.DarkOrange); 93 } else { 94 UpdateInfoTextLabel(ScriptExecutionFailedMessage, Color.DarkRed); 95 PluginInfrastructure.ErrorHandling.ShowErrorDialog(this, ex); 96 } 97 78 98 Running = false; 79 var ex = e.Value;80 if (ex != null)81 PluginInfrastructure.ErrorHandling.ShowErrorDialog(this, ex);82 99 } 83 100 }
Note: See TracChangeset
for help on using the changeset viewer.