Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/27/10 16:45:31 (14 years ago)
Author:
mkommend
Message:

Enabled dropping of values on various views (ticket #1155).

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

Legend:

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

    r4477 r4522  
    8888      // valueGroupBox
    8989      //
     90      this.valueGroupBox.AllowDrop = true;
    9091      this.valueGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    9192                  | System.Windows.Forms.AnchorStyles.Left)
     
    101102      this.valueGroupBox.TabStop = false;
    102103      this.valueGroupBox.Text = "Value";
     104      this.valueGroupBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.valueGroupBox_DragDrop);
     105      this.valueGroupBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.valueGroupBox_DragEnterOver);
     106      this.valueGroupBox.DragOver += new System.Windows.Forms.DragEventHandler(this.valueGroupBox_DragEnterOver);
    103107      //
    104108      // showInRunCheckBox
     
    119123      // valueViewHost
    120124      //
    121       this.valueViewHost.AllowDrop = true;
    122125      this.valueViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    123126                  | System.Windows.Forms.AnchorStyles.Left)
     
    131134      this.valueViewHost.TabIndex = 3;
    132135      this.valueViewHost.ViewType = null;
    133       this.valueViewHost.DragDrop += new System.Windows.Forms.DragEventHandler(this.valueViewHost_DragDrop);
    134       this.valueViewHost.DragEnter += new System.Windows.Forms.DragEventHandler(this.valueViewHostPanel_DragEnterOver);
    135       this.valueViewHost.DragOver += new System.Windows.Forms.DragEventHandler(this.valueViewHostPanel_DragEnterOver);
     136
    136137      //
    137138      // clearValueButton
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueLookupParameterView.cs

    r4477 r4522  
    9999      clearValueButton.Enabled = Content != null && Content.Value != null && !ReadOnly;
    100100      showInRunCheckBox.Enabled = Content != null && !ReadOnly;
    101       valueGroupBox.Enabled = Content != null;
    102101    }
    103102
     
    149148      if (Content != null) Content.GetsCollected = showInRunCheckBox.Checked;
    150149    }
    151     protected virtual void valueViewHostPanel_DragEnterOver(object sender, DragEventArgs e) {
     150    protected virtual void valueGroupBox_DragEnterOver(object sender, DragEventArgs e) {
    152151      e.Effect = DragDropEffects.None;
    153152      Type type = e.Data.GetData("Type") as Type;
     
    160159      }
    161160    }
    162     protected virtual void valueViewHost_DragDrop(object sender, DragEventArgs e) {
     161    protected virtual void valueGroupBox_DragDrop(object sender, DragEventArgs e) {
    163162      if (e.Effect != DragDropEffects.None) {
    164163        T value = e.Data.GetData("Value") as T;
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueParameterView.Designer.cs

    r4332 r4522  
    7474      // valueGroupBox
    7575      //
     76      this.valueGroupBox.AllowDrop = true;
    7677      this.valueGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    7778                  | System.Windows.Forms.AnchorStyles.Left)
     
    8788      this.valueGroupBox.TabStop = false;
    8889      this.valueGroupBox.Text = "Value";
     90      this.valueGroupBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.valueGroupBox_DragDrop);
     91      this.valueGroupBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.valueGroupBox_DragEnterOver);
     92      this.valueGroupBox.DragOver += new System.Windows.Forms.DragEventHandler(this.valueGroupBox_DragEnterOver);
    8993      //
    9094      // showInRunCheckBox
     
    116120      this.valueViewHost.Size = new System.Drawing.Size(374, 182);
    117121      this.valueViewHost.TabIndex = 3;
    118       this.valueViewHost.ViewType = null;
    119       this.valueViewHost.DragDrop += new System.Windows.Forms.DragEventHandler(this.valueViewHost_DragDrop);
    120       this.valueViewHost.DragEnter += new System.Windows.Forms.DragEventHandler(this.valueViewHost_DragEnterOver);
    121       this.valueViewHost.DragOver += new System.Windows.Forms.DragEventHandler(this.valueViewHost_DragEnterOver);
     122      this.valueViewHost.ViewType = null;   
    122123      //
    123124      // clearValueButton
  • trunk/sources/HeuristicLab.Parameters.Views/3.3/ValueParameterView.cs

    r4332 r4522  
    9494      clearValueButton.Enabled = Content != null && Content.Value != null && !(Content is ValueParameter<T>) && !ReadOnly;
    9595      showInRunCheckBox.Enabled = Content != null && !ReadOnly;
    96       valueGroupBox.Enabled = Content != null;
    9796    }
    9897
     
    135134      if (Content != null) Content.GetsCollected = showInRunCheckBox.Checked;
    136135    }
    137     protected virtual void valueViewHost_DragEnterOver(object sender, DragEventArgs e) {
     136    protected virtual void valueGroupBox_DragEnterOver(object sender, DragEventArgs e) {
    138137      e.Effect = DragDropEffects.None;
    139138      Type type = e.Data.GetData("Type") as Type;
     
    146145      }
    147146    }
    148     protected virtual void valueViewHost_DragDrop(object sender, DragEventArgs e) {
     147    protected virtual void valueGroupBox_DragDrop(object sender, DragEventArgs e) {
    149148      if (e.Effect != DragDropEffects.None) {
    150149        T value = e.Data.GetData("Value") as T;
Note: See TracChangeset for help on using the changeset viewer.