Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/27/14 14:13:02 (11 years ago)
Author:
jkarder
Message:

#2136:

  • renamed some HLScript files
  • fixed a bug where variables could be renamed while a script was running
  • the complete source code is now always visible
  • removed "show generated code" feature
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.HLScript.Views/3.3/ScriptView.cs

    r10400 r10401  
    2626using System.Linq;
    2727using System.Windows.Forms;
    28 using HeuristicLab.CodeEditor;
    2928using HeuristicLab.Common;
    3029using HeuristicLab.Common.Resources;
     
    3433namespace HeuristicLab.HLScript.Views {
    3534
    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 {
    3938    private bool running;
    4039
    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() {
    4746      InitializeComponent();
    4847    }
     
    7069    private void Content_ScriptExecutionStarted(object sender, EventArgs e) {
    7170      Locked = true;
     71      ReadOnly = true;
    7272      startStopButton.Image = VSImageLibrary.Stop;
    7373    }
    7474    private void Content_ScriptExecutionFinished(object sender, EventArgs e) {
    7575      Locked = false;
     76      ReadOnly = false;
    7677      startStopButton.Image = VSImageLibrary.Play;
    7778      running = false;
     
    110111    protected override void SetEnabledStateOfControls() {
    111112      base.SetEnabledStateOfControls();
    112       startStopButton.Enabled = Content != null && !Locked;
    113       showCodeButton.Enabled = Content != null && !string.IsNullOrEmpty(Content.CompilationUnitCode);
     113      startStopButton.Enabled = Content != null && (!Locked || running);
    114114      codeEditor.Enabled = Content != null && !Locked && !ReadOnly;
    115115    }
     
    125125          running = true;
    126126        }
    127     }
    128 
    129     private void showCodeButton_Click(object sender, EventArgs e) {
    130       new CodeViewer(Content.CompilationUnitCode).ShowDialog(this);
    131127    }
    132128
     
    203199        });
    204200        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));
    206207        outputTextBox.AppendText(Environment.NewLine);
    207208      }
Note: See TracChangeset for help on using the changeset viewer.