- Timestamp:
- 01/27/14 14:13:02 (11 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.HLScript.Views/3.3/ScriptView.cs
r10400 r10401 26 26 using System.Linq; 27 27 using System.Windows.Forms; 28 using HeuristicLab.CodeEditor;29 28 using HeuristicLab.Common; 30 29 using HeuristicLab.Common.Resources; … … 34 33 namespace HeuristicLab.HLScript.Views { 35 34 36 [View(" HLScript View")]37 [Content(typeof( HLScript), true)]38 public partial class HLScriptView : NamedItemView {35 [View("Script View")] 36 [Content(typeof(Script), true)] 37 public partial class ScriptView : NamedItemView { 39 38 private bool running; 40 39 41 public new HLScript Content {42 get { return ( HLScript)base.Content; }43 set { base.Content = ( HLScript)value; }44 } 45 46 public HLScriptView() {40 public new Script Content { 41 get { return (Script)base.Content; } 42 set { base.Content = (Script)value; } 43 } 44 45 public ScriptView() { 47 46 InitializeComponent(); 48 47 } … … 70 69 private void Content_ScriptExecutionStarted(object sender, EventArgs e) { 71 70 Locked = true; 71 ReadOnly = true; 72 72 startStopButton.Image = VSImageLibrary.Stop; 73 73 } 74 74 private void Content_ScriptExecutionFinished(object sender, EventArgs e) { 75 75 Locked = false; 76 ReadOnly = false; 76 77 startStopButton.Image = VSImageLibrary.Play; 77 78 running = false; … … 110 111 protected override void SetEnabledStateOfControls() { 111 112 base.SetEnabledStateOfControls(); 112 startStopButton.Enabled = Content != null && !Locked; 113 showCodeButton.Enabled = Content != null && !string.IsNullOrEmpty(Content.CompilationUnitCode); 113 startStopButton.Enabled = Content != null && (!Locked || running); 114 114 codeEditor.Enabled = Content != null && !Locked && !ReadOnly; 115 115 } … … 125 125 running = true; 126 126 } 127 }128 129 private void showCodeButton_Click(object sender, EventArgs e) {130 new CodeViewer(Content.CompilationUnitCode).ShowDialog(this);131 127 } 132 128 … … 203 199 }); 204 200 errorListView.Items.Add(item); 205 outputTextBox.AppendText(string.Format("{0} {1} ({2}:{3}): {4}", item.SubItems[0].Text, item.SubItems[1].Text, item.SubItems[2].Text, item.SubItems[3].Text, item.SubItems[4].Text)); 201 outputTextBox.AppendText(string.Format("{0} {1} ({2}:{3}): {4}", 202 item.SubItems[0].Text, 203 item.SubItems[1].Text, 204 item.SubItems[2].Text, 205 item.SubItems[3].Text, 206 item.SubItems[4].Text)); 206 207 outputTextBox.AppendText(Environment.NewLine); 207 208 }
Note: See TracChangeset
for help on using the changeset viewer.