Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/08/16 14:40:02 (8 years ago)
Author:
gkronber
Message:

#2434: merged trunk changes r12934:14026 from trunk to branch

Location:
branches/crossvalidation-2434
Files:
7 edited
2 copied

Legend:

Unmodified
Added
Removed
  • branches/crossvalidation-2434

  • branches/crossvalidation-2434/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.Designer.cs

    r12012 r14029  
    2020#endregion
    2121
    22 using System.Windows.Forms;
    2322
    2423namespace HeuristicLab.Scripting.Views {
     
    4746    /// </summary>
    4847    private void InitializeComponent() {
    49       this.components = new System.ComponentModel.Container();
    50       this.startStopButton = new System.Windows.Forms.Button();
    5148      this.splitContainer2 = new System.Windows.Forms.SplitContainer();
    5249      this.variableStoreView = new HeuristicLab.Scripting.Views.VariableStoreView();
    5350      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
     51      this.infoTabControl.SuspendLayout();
     52      this.outputTabPage.SuspendLayout();
     53      this.errorListTabPage.SuspendLayout();
     54      ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
     55      this.splitContainer1.Panel1.SuspendLayout();
     56      this.splitContainer1.Panel2.SuspendLayout();
     57      this.splitContainer1.SuspendLayout();
    5458      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    5559      ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
     
    5963      this.SuspendLayout();
    6064      //
    61       // nameTextBox
     65      // executionTimeLabel
    6266      //
    63       this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
    64       this.errorProvider.SetIconPadding(this.nameTextBox, 2);
    65       this.nameTextBox.Location = new System.Drawing.Point(60, 0);
    66       this.nameTextBox.Size = new System.Drawing.Size(750, 20);
     67      this.executionTimeLabel.Location = new System.Drawing.Point(409, 3);
    6768      //
    68       // infoLabel
     69      // executionTimeTextBox
    6970      //
    70       this.infoLabel.Location = new System.Drawing.Point(816, 4);
     71      this.executionTimeTextBox.Location = new System.Drawing.Point(498, 0);
    7172      //
    72       // startStopButton
     73      // infoTabControl
    7374      //
    74       this.startStopButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Play;
    75       this.startStopButton.Location = new System.Drawing.Point(36, 26);
    76       this.startStopButton.Name = "startStopButton";
    77       this.startStopButton.Size = new System.Drawing.Size(24, 24);
    78       this.startStopButton.TabIndex = 1;
    79       this.startStopButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
    80       this.toolTip.SetToolTip(this.startStopButton, "Run (F5)");
    81       this.startStopButton.UseVisualStyleBackColor = true;
    82       this.startStopButton.Click += new System.EventHandler(this.StartStopButtonOnClick);
     75      this.infoTabControl.Size = new System.Drawing.Size(637, 110);
     76      //
     77      // splitContainer1
     78      //
     79      this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)));
     80      this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
     81      this.splitContainer1.Location = new System.Drawing.Point(0, 0);
     82      this.splitContainer1.Size = new System.Drawing.Size(637, 543);
     83      this.splitContainer1.SplitterDistance = 427;
    8384      //
    8485      // splitContainer2
     
    101102      this.splitContainer2.SplitterDistance = 637;
    102103      this.splitContainer2.TabIndex = 7;
    103       //
    104       // splitContainer1
    105       //
    106       this.splitContainer1.Location = new System.Drawing.Point(0, 0);
    107       this.splitContainer1.Dock = DockStyle.Fill;
    108104      //
    109105      // variableStoreView
     
    132128      this.viewHost.ViewType = null;
    133129      //
    134       // ScriptView
     130      // CSharpScriptView
    135131      //
    136132      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    137133      this.Controls.Add(this.splitContainer2);
    138       this.Controls.Add(this.startStopButton);
    139       this.Name = "ScriptView";
    140       this.Size = new System.Drawing.Size(835, 602);
     134      this.Name = "CSharpScriptView";
     135      this.Controls.SetChildIndex(this.infoTextLabel, 0);
     136      this.Controls.SetChildIndex(this.compileButton, 0);
    141137      this.Controls.SetChildIndex(this.startStopButton, 0);
    142138      this.Controls.SetChildIndex(this.splitContainer2, 0);
     
    144140      this.Controls.SetChildIndex(this.nameTextBox, 0);
    145141      this.Controls.SetChildIndex(this.infoLabel, 0);
     142      this.infoTabControl.ResumeLayout(false);
     143      this.outputTabPage.ResumeLayout(false);
     144      this.outputTabPage.PerformLayout();
     145      this.errorListTabPage.ResumeLayout(false);
     146      this.splitContainer1.Panel1.ResumeLayout(false);
     147      this.splitContainer1.Panel2.ResumeLayout(false);
     148      this.splitContainer1.Panel2.PerformLayout();
     149      ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
     150      this.splitContainer1.ResumeLayout(false);
     151      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    146152      this.splitContainer2.Panel1.ResumeLayout(false);
    147153      this.splitContainer2.Panel2.ResumeLayout(false);
     
    155161    #endregion
    156162
    157     protected System.Windows.Forms.Button startStopButton;
    158163    protected System.Windows.Forms.SplitContainer splitContainer2;
    159164    protected MainForm.WindowsForms.ViewHost viewHost;
  • branches/crossvalidation-2434/HeuristicLab.Scripting.Views/3.3/CSharpScriptView.cs

    r12012 r14029  
    2121
    2222using System;
    23 using System.Drawing;
    24 using System.Threading;
    2523using System.Windows.Forms;
    2624using HeuristicLab.Common;
    27 using HeuristicLab.Common.Resources;
    2825using HeuristicLab.MainForm;
    2926
     
    3229  [View("C# Script View")]
    3330  [Content(typeof(CSharpScript), true)]
    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 
    40     protected bool Running { get; set; }
     31  public partial class CSharpScriptView : ExecutableScriptView {
    4132
    4233    public new CSharpScript Content {
     
    5142    protected override void RegisterContentEvents() {
    5243      base.RegisterContentEvents();
    53       Content.ScriptExecutionStarted += ContentOnScriptExecutionStarted;
    54       Content.ScriptExecutionFinished += ContentOnScriptExecutionFinished;
    5544      Content.ConsoleOutputChanged += ContentOnConsoleOutputChanged;
    5645    }
    5746
    5847    protected override void DeregisterContentEvents() {
    59       Content.ScriptExecutionStarted -= ContentOnScriptExecutionStarted;
    60       Content.ScriptExecutionFinished -= ContentOnScriptExecutionFinished;
    6148      Content.ConsoleOutputChanged -= ContentOnConsoleOutputChanged;
    6249      base.DeregisterContentEvents();
     
    6451
    6552    #region Content event handlers
    66     protected virtual void ContentOnScriptExecutionStarted(object sender, EventArgs e) {
    67       if (InvokeRequired)
    68         Invoke((Action<object, EventArgs>)ContentOnScriptExecutionStarted, sender, e);
    69       else {
    70         Locked = true;
    71         ReadOnly = true;
    72         startStopButton.Image = VSImageLibrary.Stop;
    73         toolTip.SetToolTip(startStopButton, "Stop (Shift+F5)");
    74         UpdateInfoTextLabel(ScriptExecutionStartedMessage, SystemColors.ControlText);
    75         infoTabControl.SelectedTab = outputTabPage;
    76       }
    77     }
    78     protected virtual void ContentOnScriptExecutionFinished(object sender, EventArgs<Exception> e) {
    79       if (InvokeRequired)
    80         Invoke((Action<object, EventArgs<Exception>>)ContentOnScriptExecutionFinished, sender, e);
    81       else {
    82         Locked = false;
    83         ReadOnly = false;
    84         startStopButton.Image = VSImageLibrary.Play;
    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 
    98         Running = false;
    99       }
    100     }
    10153    protected virtual void ContentOnConsoleOutputChanged(object sender, EventArgs<string> e) {
    10254      if (InvokeRequired)
     
    11668      }
    11769    }
    118 
    119     protected override void SetEnabledStateOfControls() {
    120       base.SetEnabledStateOfControls();
    121       startStopButton.Enabled = Content != null && (!Locked || Running);
    122     }
    123 
    124     protected virtual void StartStopButtonOnClick(object sender, EventArgs e) {
    125       if (Running) {
    126         Content.Kill();
    127       } else
    128         if (Compile()) {
    129           outputTextBox.Clear();
    130           Running = true;
    131           Content.ExecuteAsync();
    132         }
    133     }
    134 
    135     #region global HotKeys
    136     protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {
    137       switch (keyData) {
    138         case Keys.F5:
    139           if (Content != null && !Locked && !Running) {
    140             if (Compile()) {
    141               outputTextBox.Clear();
    142               Content.ExecuteAsync();
    143               Running = true;
    144             }
    145           }
    146           return true;
    147         case Keys.F5 | Keys.Shift:
    148           if (Running) Content.Kill();
    149           return true;
    150         case Keys.F6:
    151           if (!Running) base.ProcessCmdKey(ref msg, keyData);
    152           return true;
    153       }
    154       return base.ProcessCmdKey(ref msg, keyData);
    155     }
    156     #endregion
    15770  }
    15871}
  • branches/crossvalidation-2434/HeuristicLab.Scripting.Views/3.3/HeuristicLab.Scripting.Views-3.3.csproj

    r11807 r14029  
    9797    <Compile Include="CSharpScriptView.Designer.cs">
    9898      <DependentUpon>CSharpScriptView.cs</DependentUpon>
     99    </Compile>
     100    <Compile Include="ExecutableScriptView.cs">
     101      <SubType>UserControl</SubType>
     102    </Compile>
     103    <Compile Include="ExecutableScriptView.Designer.cs">
     104      <DependentUpon>ExecutableScriptView.cs</DependentUpon>
    99105    </Compile>
    100106    <Compile Include="ScriptView.cs">
  • branches/crossvalidation-2434/HeuristicLab.Scripting.Views/3.3/Plugin.cs.frame

    r12753 r14029  
    2323
    2424namespace HeuristicLab.Scripting.Views {
    25   [Plugin("HeuristicLab.Scripting.Views", "3.3.12.$WCREV$")]
     25  [Plugin("HeuristicLab.Scripting.Views", "3.3.13.$WCREV$")]
    2626  [PluginFile("HeuristicLab.Scripting.Views-3.3.dll", PluginFileType.Assembly)]
    2727  [PluginDependency("HeuristicLab.CodeEditor", "3.4")]
  • branches/crossvalidation-2434/HeuristicLab.Scripting.Views/3.3/Properties/AssemblyInfo.cs.frame

    r12753 r14029  
    5555// [assembly: AssemblyVersion("1.0.*")]
    5656[assembly: AssemblyVersion("3.3.0.0")]
    57 [assembly: AssemblyFileVersion("3.3.12.$WCREV$")]
     57[assembly: AssemblyFileVersion("3.3.13.$WCREV$")]
  • branches/crossvalidation-2434/HeuristicLab.Scripting.Views/3.3/ScriptView.Designer.cs

    r12473 r14029  
    118118      // infoTabControl
    119119      //
     120      this.infoTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     121            | System.Windows.Forms.AnchorStyles.Left)
     122            | System.Windows.Forms.AnchorStyles.Right)));
    120123      this.infoTabControl.Controls.Add(this.outputTabPage);
    121124      this.infoTabControl.Controls.Add(this.errorListTabPage);
    122       this.infoTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
    123       this.infoTabControl.Location = new System.Drawing.Point(0, 0);
     125      this.infoTabControl.Location = new System.Drawing.Point(0, 2);
    124126      this.infoTabControl.Name = "infoTabControl";
    125127      this.infoTabControl.SelectedIndex = 0;
    126       this.infoTabControl.Size = new System.Drawing.Size(832, 112);
     128      this.infoTabControl.Size = new System.Drawing.Size(832, 110);
    127129      this.infoTabControl.TabIndex = 1;
    128130      //
     
    133135      this.outputTabPage.Name = "outputTabPage";
    134136      this.outputTabPage.Padding = new System.Windows.Forms.Padding(3);
    135       this.outputTabPage.Size = new System.Drawing.Size(824, 86);
     137      this.outputTabPage.Size = new System.Drawing.Size(824, 84);
    136138      this.outputTabPage.TabIndex = 1;
    137139      this.outputTabPage.Text = "Output";
     
    147149      this.outputTextBox.ReadOnly = true;
    148150      this.outputTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
    149       this.outputTextBox.Size = new System.Drawing.Size(818, 80);
     151      this.outputTextBox.Size = new System.Drawing.Size(818, 78);
    150152      this.outputTextBox.TabIndex = 0;
    151153      this.outputTextBox.WordWrap = false;
Note: See TracChangeset for help on using the changeset viewer.