Changeset 10401 for trunk/sources/HeuristicLab.HLScript.Views
- Timestamp:
- 01/27/14 14:13:02 (10 years ago)
- Location:
- trunk/sources/HeuristicLab.HLScript.Views/3.3
- Files:
-
- 2 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.HLScript.Views/3.3/HeuristicLab.HLScript.Views-3.3.csproj
r10391 r10401 86 86 <ItemGroup> 87 87 <None Include="Plugin.cs.frame" /> 88 <Compile Include=" HLScriptView.cs">88 <Compile Include="ScriptView.cs"> 89 89 <SubType>UserControl</SubType> 90 90 </Compile> 91 <Compile Include=" HLScriptView.Designer.cs">92 <DependentUpon> HLScriptView.cs</DependentUpon>91 <Compile Include="ScriptView.Designer.cs"> 92 <DependentUpon>ScriptView.cs</DependentUpon> 93 93 </Compile> 94 94 <Compile Include="Plugin.cs" /> -
trunk/sources/HeuristicLab.HLScript.Views/3.3/ScriptView.Designer.cs
r10400 r10401 21 21 22 22 namespace HeuristicLab.HLScript.Views { 23 partial class HLScriptView {23 partial class ScriptView { 24 24 /// <summary> 25 25 /// Required designer variable. … … 46 46 private void InitializeComponent() { 47 47 this.compilationLabel = new System.Windows.Forms.Label(); 48 this.showCodeButton = new System.Windows.Forms.Button();49 48 this.startStopButton = new System.Windows.Forms.Button(); 50 49 this.errorListView = new System.Windows.Forms.ListView(); … … 61 60 this.outputTabPage = new System.Windows.Forms.TabPage(); 62 61 this.outputTextBox = new System.Windows.Forms.TextBox(); 62 this.variableStoreView = new HeuristicLab.HLScript.Views.VariableStoreView(); 63 63 this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 64 this.variableStoreView = new HeuristicLab.HLScript.Views.VariableStoreView();65 64 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 66 65 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); … … 92 91 this.compilationLabel.AutoSize = true; 93 92 this.compilationLabel.ForeColor = System.Drawing.SystemColors.ControlDarkDark; 94 this.compilationLabel.Location = new System.Drawing.Point( 63, 32);93 this.compilationLabel.Location = new System.Drawing.Point(33, 32); 95 94 this.compilationLabel.Name = "compilationLabel"; 96 95 this.compilationLabel.Size = new System.Drawing.Size(69, 13); 97 96 this.compilationLabel.TabIndex = 3; 98 97 this.compilationLabel.Text = "Not compiled"; 99 //100 // showCodeButton101 //102 this.showCodeButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.PrintPreview;103 this.showCodeButton.Location = new System.Drawing.Point(33, 26);104 this.showCodeButton.Name = "showCodeButton";105 this.showCodeButton.Size = new System.Drawing.Size(24, 24);106 this.showCodeButton.TabIndex = 2;107 this.showCodeButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;108 this.toolTip.SetToolTip(this.showCodeButton, "Show generated code");109 this.showCodeButton.UseVisualStyleBackColor = true;110 this.showCodeButton.Click += new System.EventHandler(this.showCodeButton_Click);111 98 // 112 99 // startStopButton … … 179 166 // splitContainer1 180 167 // 181 this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 182 | System.Windows.Forms.AnchorStyles.Left) 168 this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 169 | System.Windows.Forms.AnchorStyles.Left) 183 170 | System.Windows.Forms.AnchorStyles.Right))); 184 171 this.splitContainer1.Location = new System.Drawing.Point(3, 56); … … 260 247 this.outputTextBox.TabIndex = 0; 261 248 this.outputTextBox.WordWrap = false; 249 // 250 // variableStoreView 251 // 252 this.variableStoreView.Caption = "ItemCollection View"; 253 this.variableStoreView.Content = null; 254 this.variableStoreView.Dock = System.Windows.Forms.DockStyle.Fill; 255 this.variableStoreView.Location = new System.Drawing.Point(0, 0); 256 this.variableStoreView.Name = "variableStoreView"; 257 this.variableStoreView.ReadOnly = false; 258 this.variableStoreView.Size = new System.Drawing.Size(188, 543); 259 this.variableStoreView.TabIndex = 0; 262 260 // 263 261 // viewHost … … 275 273 this.viewHost.ViewType = null; 276 274 // 277 // variableStoreView 278 // 279 this.variableStoreView.Caption = "ItemCollection View"; 280 this.variableStoreView.Content = null; 281 this.variableStoreView.Dock = System.Windows.Forms.DockStyle.Fill; 282 this.variableStoreView.Location = new System.Drawing.Point(0, 0); 283 this.variableStoreView.Name = "variableStoreView"; 284 this.variableStoreView.ReadOnly = false; 285 this.variableStoreView.Size = new System.Drawing.Size(188, 543); 286 this.variableStoreView.TabIndex = 0; 287 // 288 // HLScriptView 275 // ScriptView 289 276 // 290 277 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; … … 292 279 this.Controls.Add(this.startStopButton); 293 280 this.Controls.Add(this.compilationLabel); 294 this.Controls.Add(this.showCodeButton); 295 this.Name = "HLScriptView"; 281 this.Name = "ScriptView"; 296 282 this.Size = new System.Drawing.Size(835, 602); 297 this.Controls.SetChildIndex(this.showCodeButton, 0);298 283 this.Controls.SetChildIndex(this.compilationLabel, 0); 299 284 this.Controls.SetChildIndex(this.startStopButton, 0); … … 322 307 #endregion 323 308 324 private System.Windows.Forms.Button showCodeButton;325 309 private System.Windows.Forms.Label compilationLabel; 326 310 private System.Windows.Forms.Button startStopButton; -
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 } -
trunk/sources/HeuristicLab.HLScript.Views/3.3/VariableStoreView.cs
r10358 r10401 114 114 removeButton.Enabled = !Locked && !ReadOnly && variableListView.SelectedItems.Count > 0; 115 115 variableListView.Enabled = true; 116 variableListView.LabelEdit = !Locked && !ReadOnly; 116 117 } 117 118 }
Note: See TracChangeset
for help on using the changeset viewer.