Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/27/10 03:10:17 (14 years ago)
Author:
swagner
Message:

Enabled users to choose whether a parameter should be collected in each run or not (#1113)

Location:
trunk/sources/HeuristicLab.Parameters.Views/3.3
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ConstrainedValueParameterView.Designer.cs

    r3281 r4332  
    4646    private void InitializeComponent() {
    4747      this.valueGroupBox = new System.Windows.Forms.GroupBox();
     48      this.showInRunCheckBox = new System.Windows.Forms.CheckBox();
    4849      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    4950      this.valueComboBox = new System.Windows.Forms.ComboBox();
     
    5152      this.valueGroupBox.SuspendLayout();
    5253      this.SuspendLayout();
    53       //
    54       // dataTypeLabel
    55       //
    56       this.dataTypeLabel.Location = new System.Drawing.Point(3, 55);
    5754      //
    5855      // dataTypeTextBox
     
    7875                  | System.Windows.Forms.AnchorStyles.Left)
    7976                  | System.Windows.Forms.AnchorStyles.Right)));
     77      this.valueGroupBox.Controls.Add(this.showInRunCheckBox);
    8078      this.valueGroupBox.Controls.Add(this.viewHost);
    8179      this.valueGroupBox.Controls.Add(this.valueComboBox);
     
    8785      this.valueGroupBox.Text = "Value";
    8886      //
     87      // showInRunCheckBox
     88      //
     89      this.showInRunCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     90      this.showInRunCheckBox.AutoSize = true;
     91      this.showInRunCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
     92      this.showInRunCheckBox.Checked = true;
     93      this.showInRunCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
     94      this.showInRunCheckBox.Location = new System.Drawing.Point(290, 21);
     95      this.showInRunCheckBox.Name = "showInRunCheckBox";
     96      this.showInRunCheckBox.Size = new System.Drawing.Size(90, 17);
     97      this.showInRunCheckBox.TabIndex = 1;
     98      this.showInRunCheckBox.Text = "&Show in Run:";
     99      this.toolTip.SetToolTip(this.showInRunCheckBox, "Check to show the value of this parameter in each run.");
     100      this.showInRunCheckBox.UseVisualStyleBackColor = true;
     101      this.showInRunCheckBox.CheckedChanged += new System.EventHandler(this.showInRunCheckBox_CheckedChanged);
     102      //
    89103      // viewHost
    90104      //
     
    92106                  | System.Windows.Forms.AnchorStyles.Left)
    93107                  | System.Windows.Forms.AnchorStyles.Right)));
     108      this.viewHost.Caption = "View";
    94109      this.viewHost.Content = null;
    95110      this.viewHost.Location = new System.Drawing.Point(6, 46);
    96111      this.viewHost.Name = "viewHost";
     112      this.viewHost.ReadOnly = false;
    97113      this.viewHost.Size = new System.Drawing.Size(374, 185);
    98       this.viewHost.TabIndex = 0;
     114      this.viewHost.TabIndex = 2;
    99115      this.viewHost.ViewType = null;
    100116      //
     
    107123      this.valueComboBox.Location = new System.Drawing.Point(6, 19);
    108124      this.valueComboBox.Name = "valueComboBox";
    109       this.valueComboBox.Size = new System.Drawing.Size(374, 21);
    110       this.valueComboBox.TabIndex = 1;
     125      this.valueComboBox.Size = new System.Drawing.Size(278, 21);
     126      this.valueComboBox.TabIndex = 0;
    111127      this.toolTip.SetToolTip(this.valueComboBox, "Selected Value");
    112128      this.valueComboBox.SelectedIndexChanged += new System.EventHandler(this.valueComboBox_SelectedIndexChanged);
     
    128144      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    129145      this.valueGroupBox.ResumeLayout(false);
     146      this.valueGroupBox.PerformLayout();
    130147      this.ResumeLayout(false);
    131148      this.PerformLayout();
     
    138155    protected HeuristicLab.MainForm.WindowsForms.ViewHost viewHost;
    139156    protected System.Windows.Forms.ComboBox valueComboBox;
     157    protected System.Windows.Forms.CheckBox showInRunCheckBox;
    140158  }
    141159}
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ConstrainedValueParameterView.cs

    r4257 r4332  
    6161    /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    6262    protected override void DeregisterContentEvents() {
     63      Content.GetsCollectedChanged -= new EventHandler(Content_GetsCollectedChanged);
    6364      Content.ValidValues.ItemsAdded -= new CollectionItemsChangedEventHandler<T>(ValidValues_ItemsAdded);
    6465      Content.ValidValues.ItemsRemoved -= new CollectionItemsChangedEventHandler<T>(ValidValues_ItemsRemoved);
     
    7475    protected override void RegisterContentEvents() {
    7576      base.RegisterContentEvents();
     77      Content.GetsCollectedChanged += new EventHandler(Content_GetsCollectedChanged);
    7678      Content.ValidValues.ItemsAdded += new CollectionItemsChangedEventHandler<T>(ValidValues_ItemsAdded);
    7779      Content.ValidValues.ItemsRemoved += new CollectionItemsChangedEventHandler<T>(ValidValues_ItemsRemoved);
     
    8385      base.OnContentChanged();
    8486      if (Content == null) {
     87        showInRunCheckBox.Checked = false;
    8588        viewHost.Content = null;
    8689        FillValueComboBox();
     
    8891        SetDataTypeTextBoxText();
    8992        FillValueComboBox();
     93        showInRunCheckBox.Checked = Content.GetsCollected;
    9094        viewHost.ViewType = null;
    9195        viewHost.Content = Content.Value;
     
    97101      valueGroupBox.Enabled = Content != null;
    98102      valueComboBox.Enabled = (valueComboBox.Items.Count > 0) && !ReadOnly;
     103      showInRunCheckBox.Enabled = Content != null && !ReadOnly;
    99104    }
    100105
    101     private void FillValueComboBox() {
     106    protected virtual void FillValueComboBox() {
    102107      valueComboBox.SelectedIndexChanged -= new EventHandler(valueComboBox_SelectedIndexChanged);
    103108      valueComboBoxItems.Clear();
     
    119124
    120125    #region Content Events
    121     private void Content_ValueChanged(object sender, EventArgs e) {
     126    protected virtual void Content_ValueChanged(object sender, EventArgs e) {
    122127      if (InvokeRequired)
    123128        Invoke(new EventHandler(Content_ValueChanged), sender, e);
     
    129134      }
    130135    }
    131     private void ValidValues_ItemsAdded(object sender, CollectionItemsChangedEventArgs<T> e) {
     136    protected virtual void ValidValues_ItemsAdded(object sender, CollectionItemsChangedEventArgs<T> e) {
    132137      if (InvokeRequired)
    133138        Invoke(new CollectionItemsChangedEventHandler<T>(ValidValues_ItemsAdded), sender, e);
     
    135140        FillValueComboBox();
    136141    }
    137     private void ValidValues_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<T> e) {
     142    protected virtual void ValidValues_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<T> e) {
    138143      if (InvokeRequired)
    139144        Invoke(new CollectionItemsChangedEventHandler<T>(ValidValues_ItemsRemoved), sender, e);
     
    141146        FillValueComboBox();
    142147    }
    143     private void ValidValues_CollectionReset(object sender, CollectionItemsChangedEventArgs<T> e) {
     148    protected virtual void ValidValues_CollectionReset(object sender, CollectionItemsChangedEventArgs<T> e) {
    144149      if (InvokeRequired)
    145150        Invoke(new CollectionItemsChangedEventHandler<T>(ValidValues_CollectionReset), sender, e);
     
    147152        FillValueComboBox();
    148153    }
     154    protected virtual void Content_GetsCollectedChanged(object sender, EventArgs e) {
     155      if (InvokeRequired)
     156        Invoke(new EventHandler(Content_GetsCollectedChanged), sender, e);
     157      else
     158        showInRunCheckBox.Checked = Content != null && Content.GetsCollected;
     159    }
    149160    #endregion
    150161
    151     private void valueComboBox_SelectedIndexChanged(object sender, EventArgs e) {
     162    protected virtual void valueComboBox_SelectedIndexChanged(object sender, EventArgs e) {
    152163      if (valueComboBox.SelectedIndex >= 0)
    153164        Content.Value = valueComboBoxItems[valueComboBox.SelectedIndex];
     165    }
     166    protected virtual void showInRunCheckBox_CheckedChanged(object sender, EventArgs e) {
     167      if (Content != null) Content.GetsCollected = showInRunCheckBox.Checked;
    154168    }
    155169
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/HeuristicLab.Parameters.Views-3.3.csproj

    r4065 r4332  
    9494  </PropertyGroup>
    9595  <ItemGroup>
     96    <Reference Include="HeuristicLab.Data-3.3">
     97      <HintPath>..\..\HeuristicLab.Data\3.3\bin\Debug\HeuristicLab.Data-3.3.dll</HintPath>
     98    </Reference>
     99    <Reference Include="HeuristicLab.Data.Views-3.3">
     100      <HintPath>..\..\HeuristicLab.Data.Views\3.3\bin\Debug\HeuristicLab.Data.Views-3.3.dll</HintPath>
     101    </Reference>
     102    <Reference Include="HeuristicLab.Optimization-3.3">
     103      <HintPath>..\..\HeuristicLab.Optimization\3.3\bin\Debug\HeuristicLab.Optimization-3.3.dll</HintPath>
     104    </Reference>
    96105    <Reference Include="System" />
    97106    <Reference Include="System.Core">
     
    100109    <Reference Include="System.Drawing" />
    101110    <Reference Include="System.Windows.Forms" />
     111    <Reference Include="System.Windows.Forms.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
    102112    <Reference Include="System.Xml.Linq">
    103113      <RequiredTargetFramework>3.5</RequiredTargetFramework>
     
    182192      <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project>
    183193      <Name>HeuristicLab.MainForm-3.3</Name>
     194    </ProjectReference>
     195    <ProjectReference Include="..\..\HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj">
     196      <Project>{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}</Project>
     197      <Name>HeuristicLab.Optimization.Views-3.3</Name>
    184198    </ProjectReference>
    185199    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueLookupParameterView.Designer.cs

    r4011 r4332  
    4747    private void InitializeComponent() {
    4848      this.valueGroupBox = new System.Windows.Forms.GroupBox();
     49      this.showInRunCheckBox = new System.Windows.Forms.CheckBox();
    4950      this.valueViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    5051      this.clearValueButton = new System.Windows.Forms.Button();
     
    9091                  | System.Windows.Forms.AnchorStyles.Left)
    9192                  | System.Windows.Forms.AnchorStyles.Right)));
     93      this.valueGroupBox.Controls.Add(this.showInRunCheckBox);
    9294      this.valueGroupBox.Controls.Add(this.valueViewHost);
    9395      this.valueGroupBox.Controls.Add(this.clearValueButton);
     
    100102      this.valueGroupBox.Text = "Value";
    101103      //
    102       // viewHost
     104      // showInRunCheckBox
     105      //
     106      this.showInRunCheckBox.AutoSize = true;
     107      this.showInRunCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
     108      this.showInRunCheckBox.Checked = true;
     109      this.showInRunCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
     110      this.showInRunCheckBox.Location = new System.Drawing.Point(66, 24);
     111      this.showInRunCheckBox.Name = "showInRunCheckBox";
     112      this.showInRunCheckBox.Size = new System.Drawing.Size(90, 17);
     113      this.showInRunCheckBox.TabIndex = 2;
     114      this.showInRunCheckBox.Text = "&Show in Run:";
     115      this.toolTip.SetToolTip(this.showInRunCheckBox, "Check to show the value of this parameter in each run.");
     116      this.showInRunCheckBox.UseVisualStyleBackColor = true;
     117      this.showInRunCheckBox.CheckedChanged += new System.EventHandler(this.showInRunCheckBox_CheckedChanged);
     118      //
     119      // valueViewHost
    103120      //
    104121      this.valueViewHost.AllowDrop = true;
    105       this.valueViewHost.Content = null;
    106122      this.valueViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    107123                  | System.Windows.Forms.AnchorStyles.Left)
    108124                  | System.Windows.Forms.AnchorStyles.Right)));
     125      this.valueViewHost.Caption = "View";
     126      this.valueViewHost.Content = null;
    109127      this.valueViewHost.Location = new System.Drawing.Point(6, 49);
    110128      this.valueViewHost.Name = "valueViewHost";
     129      this.valueViewHost.ReadOnly = false;
    111130      this.valueViewHost.Size = new System.Drawing.Size(374, 156);
    112       this.valueViewHost.TabIndex = 0;
     131      this.valueViewHost.TabIndex = 3;
    113132      this.valueViewHost.ViewType = null;
    114       this.valueViewHost.DragOver += new System.Windows.Forms.DragEventHandler(this.valueViewHostPanel_DragEnterOver);
    115133      this.valueViewHost.DragDrop += new System.Windows.Forms.DragEventHandler(this.valueViewHost_DragDrop);
    116134      this.valueViewHost.DragEnter += new System.Windows.Forms.DragEventHandler(this.valueViewHostPanel_DragEnterOver);
     135      this.valueViewHost.DragOver += new System.Windows.Forms.DragEventHandler(this.valueViewHostPanel_DragEnterOver);
    117136      //
    118137      // clearValueButton
     
    178197      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    179198      this.valueGroupBox.ResumeLayout(false);
     199      this.valueGroupBox.PerformLayout();
    180200      this.ResumeLayout(false);
    181201      this.PerformLayout();
     
    191211    protected System.Windows.Forms.TextBox actualNameTextBox;
    192212    protected System.Windows.Forms.Label actualNameLabel;
     213    protected System.Windows.Forms.CheckBox showInRunCheckBox;
    193214  }
    194215}
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueLookupParameterView.cs

    r4257 r4332  
    6161    protected override void DeregisterContentEvents() {
    6262      Content.ActualNameChanged -= new EventHandler(Content_ActualNameChanged);
     63      Content.GetsCollectedChanged -= new EventHandler(Content_GetsCollectedChanged);
    6364      Content.ValueChanged -= new EventHandler(Content_ValueChanged);
    6465      base.DeregisterContentEvents();
     
    7273      base.RegisterContentEvents();
    7374      Content.ActualNameChanged += new EventHandler(Content_ActualNameChanged);
     75      Content.GetsCollectedChanged += new EventHandler(Content_GetsCollectedChanged);
    7476      Content.ValueChanged += new EventHandler(Content_ValueChanged);
    7577    }
     
    7981      if (Content == null) {
    8082        actualNameTextBox.Text = "-";
     83        showInRunCheckBox.Checked = false;
    8184        valueViewHost.Content = null;
    8285      } else {
    8386        SetDataTypeTextBoxText();
    8487        actualNameTextBox.Text = Content.ActualName;
     88        showInRunCheckBox.Checked = Content.GetsCollected;
    8589        valueViewHost.ViewType = null;
    8690        valueViewHost.Content = Content.Value;
     
    9498      setValueButton.Enabled = Content != null && !ReadOnly;
    9599      clearValueButton.Enabled = Content != null && Content.Value != null && !ReadOnly;
     100      showInRunCheckBox.Enabled = Content != null && !ReadOnly;
    96101      valueGroupBox.Enabled = Content != null;
    97102    }
     
    112117        valueViewHost.Content = Content != null ? Content.Value : null;
    113118      }
     119    }
     120    protected virtual void Content_GetsCollectedChanged(object sender, EventArgs e) {
     121      if (InvokeRequired)
     122        Invoke(new EventHandler(Content_GetsCollectedChanged), sender, e);
     123      else
     124        showInRunCheckBox.Checked = Content != null && Content.GetsCollected;
    114125    }
    115126
     
    134145    protected virtual void clearValueButton_Click(object sender, EventArgs e) {
    135146      Content.Value = null;
     147    }
     148    protected virtual void showInRunCheckBox_CheckedChanged(object sender, EventArgs e) {
     149      if (Content != null) Content.GetsCollected = showInRunCheckBox.Checked;
    136150    }
    137151    protected virtual void valueViewHostPanel_DragEnterOver(object sender, DragEventArgs e) {
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueParameterView.Designer.cs

    r4011 r4332  
    4747    private void InitializeComponent() {
    4848      this.valueGroupBox = new System.Windows.Forms.GroupBox();
     49      this.showInRunCheckBox = new System.Windows.Forms.CheckBox();
    4950      this.valueViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    5051      this.clearValueButton = new System.Windows.Forms.Button();
     
    7677                  | System.Windows.Forms.AnchorStyles.Left)
    7778                  | System.Windows.Forms.AnchorStyles.Right)));
     79      this.valueGroupBox.Controls.Add(this.showInRunCheckBox);
    7880      this.valueGroupBox.Controls.Add(this.valueViewHost);
    7981      this.valueGroupBox.Controls.Add(this.clearValueButton);
     
    8688      this.valueGroupBox.Text = "Value";
    8789      //
    88       // viewHost
     90      // showInRunCheckBox
     91      //
     92      this.showInRunCheckBox.AutoSize = true;
     93      this.showInRunCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
     94      this.showInRunCheckBox.Checked = true;
     95      this.showInRunCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
     96      this.showInRunCheckBox.Location = new System.Drawing.Point(66, 24);
     97      this.showInRunCheckBox.Name = "showInRunCheckBox";
     98      this.showInRunCheckBox.Size = new System.Drawing.Size(90, 17);
     99      this.showInRunCheckBox.TabIndex = 2;
     100      this.showInRunCheckBox.Text = "&Show in Run:";
     101      this.toolTip.SetToolTip(this.showInRunCheckBox, "Check to show the value of this parameter in each run.");
     102      this.showInRunCheckBox.UseVisualStyleBackColor = true;
     103      this.showInRunCheckBox.CheckedChanged += new System.EventHandler(this.showInRunCheckBox_CheckedChanged);
     104      //
     105      // valueViewHost
    89106      //
    90107      this.valueViewHost.AllowDrop = true;
    91       this.valueViewHost.Content = null;
    92108      this.valueViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    93109                  | System.Windows.Forms.AnchorStyles.Left)
    94110                  | System.Windows.Forms.AnchorStyles.Right)));
     111      this.valueViewHost.Caption = "View";
     112      this.valueViewHost.Content = null;
    95113      this.valueViewHost.Location = new System.Drawing.Point(6, 49);
    96       this.valueViewHost.Name = "viewHost";
     114      this.valueViewHost.Name = "valueViewHost";
     115      this.valueViewHost.ReadOnly = false;
    97116      this.valueViewHost.Size = new System.Drawing.Size(374, 182);
    98       this.valueViewHost.TabIndex = 0;
     117      this.valueViewHost.TabIndex = 3;
    99118      this.valueViewHost.ViewType = null;
    100       this.valueViewHost.DragOver += new System.Windows.Forms.DragEventHandler(this.valueViewHost_DragEnterOver);
    101119      this.valueViewHost.DragDrop += new System.Windows.Forms.DragEventHandler(this.valueViewHost_DragDrop);
    102120      this.valueViewHost.DragEnter += new System.Windows.Forms.DragEventHandler(this.valueViewHost_DragEnterOver);
     121      this.valueViewHost.DragOver += new System.Windows.Forms.DragEventHandler(this.valueViewHost_DragEnterOver);
    103122      //
    104123      // clearValueButton
     
    112131      this.toolTip.SetToolTip(this.clearValueButton, "Clear Value");
    113132      this.clearValueButton.UseVisualStyleBackColor = true;
    114       this.clearValueButton.Click += new System.EventHandler(this.setValueButton_Click);
     133      this.clearValueButton.Click += new System.EventHandler(this.clearValueButton_Click);
    115134      //
    116135      // setValueButton
     
    123142      this.toolTip.SetToolTip(this.setValueButton, "Set Value");
    124143      this.setValueButton.UseVisualStyleBackColor = true;
    125       this.setValueButton.Click += new System.EventHandler(this.changeValueButton_Click);
     144      this.setValueButton.Click += new System.EventHandler(this.setValueButton_Click);
    126145      //
    127146      // ValueParameterView
     
    141160      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    142161      this.valueGroupBox.ResumeLayout(false);
     162      this.valueGroupBox.PerformLayout();
    143163      this.ResumeLayout(false);
    144164      this.PerformLayout();
     
    152172    protected System.Windows.Forms.Button setValueButton;
    153173    protected System.Windows.Forms.Button clearValueButton;
     174    protected System.Windows.Forms.CheckBox showInRunCheckBox;
    154175  }
    155176}
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueParameterView.cs

    r4257 r4332  
    6161    /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
    6262    protected override void DeregisterContentEvents() {
     63      Content.GetsCollectedChanged -= new EventHandler(Content_GetsCollectedChanged);
    6364      Content.ValueChanged -= new EventHandler(Content_ValueChanged);
    6465      base.DeregisterContentEvents();
     
    7172    protected override void RegisterContentEvents() {
    7273      base.RegisterContentEvents();
     74      Content.GetsCollectedChanged += new EventHandler(Content_GetsCollectedChanged);
    7375      Content.ValueChanged += new EventHandler(Content_ValueChanged);
    7476    }
     
    7779      base.OnContentChanged();
    7880      if (Content == null) {
    79         clearValueButton.Visible = true;
     81        showInRunCheckBox.Checked = false;
    8082        valueViewHost.Content = null;
    8183      } else {
    8284        SetDataTypeTextBoxText();
    83         clearValueButton.Visible = !(Content is ValueParameter<T>);
     85        showInRunCheckBox.Checked = Content.GetsCollected;
    8486        valueViewHost.ViewType = null;
    8587        valueViewHost.Content = Content.Value;
     
    9092      base.SetEnabledStateOfControls();
    9193      setValueButton.Enabled = Content != null && !ReadOnly;
    92       clearValueButton.Enabled = Content != null && Content.Value != null && !ReadOnly;
     94      clearValueButton.Enabled = Content != null && Content.Value != null && !(Content is ValueParameter<T>) && !ReadOnly;
     95      showInRunCheckBox.Enabled = Content != null && !ReadOnly;
    9396      valueGroupBox.Enabled = Content != null;
    9497    }
     
    99102      else {
    100103        SetDataTypeTextBoxText();
    101         clearValueButton.Enabled = Content != null && Content.Value != null && !ReadOnly;
     104        clearValueButton.Enabled = Content != null && Content.Value != null && !(Content is ValueParameter<T>) && !ReadOnly;
    102105        valueViewHost.ViewType = null;
    103106        valueViewHost.Content = Content != null ? Content.Value : null;
    104107      }
    105108    }
     109    protected virtual void Content_GetsCollectedChanged(object sender, EventArgs e) {
     110      if (InvokeRequired)
     111        Invoke(new EventHandler(Content_GetsCollectedChanged), sender, e);
     112      else
     113        showInRunCheckBox.Checked = Content != null && Content.GetsCollected;
     114    }
    106115
    107     protected virtual void changeValueButton_Click(object sender, EventArgs e) {
     116    protected virtual void setValueButton_Click(object sender, EventArgs e) {
    108117      if (typeSelectorDialog == null) {
    109118        typeSelectorDialog = new TypeSelectorDialog();
     
    120129      }
    121130    }
    122     protected virtual void setValueButton_Click(object sender, EventArgs e) {
     131    protected virtual void clearValueButton_Click(object sender, EventArgs e) {
    123132      Content.Value = null;
     133    }
     134    protected virtual void showInRunCheckBox_CheckedChanged(object sender, EventArgs e) {
     135      if (Content != null) Content.GetsCollected = showInRunCheckBox.Checked;
    124136    }
    125137    protected virtual void valueViewHost_DragEnterOver(object sender, DragEventArgs e) {
Note: See TracChangeset for help on using the changeset viewer.