Changeset 13024 for trunk/sources/HeuristicLab.Scripting.Views
- Timestamp:
- 10/16/15 13:31:14 (9 years ago)
- Location:
- trunk/sources/HeuristicLab.Scripting.Views/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.Designer.cs
r12012 r13024 52 52 this.variableStoreView = new HeuristicLab.Scripting.Views.VariableStoreView(); 53 53 this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost(); 54 this.executionTimeTextBox = new System.Windows.Forms.TextBox(); 55 this.executionTimeLabel = new System.Windows.Forms.Label(); 56 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); 57 this.splitContainer1.Panel1.SuspendLayout(); 58 this.splitContainer1.SuspendLayout(); 54 59 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 55 60 ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); … … 58 63 this.splitContainer2.SuspendLayout(); 59 64 this.SuspendLayout(); 65 // 66 // splitContainer1.Panel1 67 // 68 this.splitContainer1.Panel1.Controls.Add(this.executionTimeTextBox); 69 this.splitContainer1.Panel1.Controls.Add(this.executionTimeLabel); 70 this.splitContainer1.Panel1.Controls.SetChildIndex(this.executionTimeTextBox, 0); 71 this.splitContainer1.Panel1.Controls.SetChildIndex(this.executionTimeLabel, 0); 72 this.splitContainer1.Size = new System.Drawing.Size(637, 543); 60 73 // 61 74 // nameTextBox … … 132 145 this.viewHost.ViewType = null; 133 146 // 147 // executionTimeTextBox 148 // 149 this.executionTimeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 150 this.executionTimeTextBox.Location = new System.Drawing.Point(483, 390); 151 this.executionTimeTextBox.Name = "executionTimeTextBox"; 152 this.executionTimeTextBox.ReadOnly = true; 153 this.executionTimeTextBox.Size = new System.Drawing.Size(137, 20); 154 this.executionTimeTextBox.TabIndex = 17; 155 // 156 // executionTimeLabel 157 // 158 this.executionTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 159 this.executionTimeLabel.AutoSize = true; 160 this.executionTimeLabel.Location = new System.Drawing.Point(394, 393); 161 this.executionTimeLabel.Name = "executionTimeLabel"; 162 this.executionTimeLabel.Size = new System.Drawing.Size(83, 13); 163 this.executionTimeLabel.TabIndex = 16; 164 this.executionTimeLabel.Text = "&Execution Time:"; 165 // 134 166 // ScriptView 135 167 // … … 144 176 this.Controls.SetChildIndex(this.nameTextBox, 0); 145 177 this.Controls.SetChildIndex(this.infoLabel, 0); 178 this.splitContainer1.Panel1.ResumeLayout(false); 179 this.splitContainer1.Panel1.PerformLayout(); 180 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); 181 this.splitContainer1.ResumeLayout(false); 146 182 this.splitContainer2.Panel1.ResumeLayout(false); 147 183 this.splitContainer2.Panel2.ResumeLayout(false); … … 159 195 protected MainForm.WindowsForms.ViewHost viewHost; 160 196 protected VariableStoreView variableStoreView; 197 protected TextBox executionTimeTextBox; 198 protected Label executionTimeLabel; 161 199 } 162 200 } -
trunk/sources/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.cs
r12012 r13024 54 54 Content.ScriptExecutionFinished += ContentOnScriptExecutionFinished; 55 55 Content.ConsoleOutputChanged += ContentOnConsoleOutputChanged; 56 Content.ExecutionTimeChanged += ContentOnExecutionTimeChanged; 56 57 } 57 58 … … 60 61 Content.ScriptExecutionFinished -= ContentOnScriptExecutionFinished; 61 62 Content.ConsoleOutputChanged -= ContentOnConsoleOutputChanged; 63 Content.ExecutionTimeChanged -= ContentOnExecutionTimeChanged; 62 64 base.DeregisterContentEvents(); 63 65 } … … 106 108 } 107 109 } 110 protected virtual void ContentOnExecutionTimeChanged(object sender, EventArgs eventArgs) { 111 if (InvokeRequired) 112 Invoke((Action<object, EventArgs>)ContentOnExecutionTimeChanged, sender, eventArgs); 113 else { 114 executionTimeTextBox.Text = Content == null ? "-" : Content.ExecutionTime.ToString(); 115 } 116 } 108 117 #endregion 109 118 … … 112 121 if (Content == null) { 113 122 variableStoreView.Content = null; 123 executionTimeTextBox.Text = "-"; 114 124 } else { 115 125 variableStoreView.Content = Content.VariableStore; 126 executionTimeTextBox.Text = Content.ExecutionTime.ToString(); 116 127 } 117 128 } … … 127 138 } else 128 139 if (Compile()) { 129 130 131 132 140 outputTextBox.Clear(); 141 Running = true; 142 Content.ExecuteAsync(); 143 } 133 144 } 134 145
Note: See TracChangeset
for help on using the changeset viewer.