Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4522


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
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.Designer.cs

    r4102 r4522  
    103103      this.problemTabPage.Controls.Add(this.openProblemButton);
    104104      this.problemTabPage.Controls.Add(this.newProblemButton);
     105      this.problemTabPage.AllowDrop = true;
    105106      this.problemTabPage.Location = new System.Drawing.Point(4, 22);
    106107      this.problemTabPage.Name = "problemTabPage";
     
    110111      this.problemTabPage.Text = "Problem";
    111112      this.problemTabPage.UseVisualStyleBackColor = true;
     113      this.problemTabPage.DragDrop += new System.Windows.Forms.DragEventHandler(this.problemTabPage_DragDrop);
     114      this.problemTabPage.DragEnter += new System.Windows.Forms.DragEventHandler(this.problemTabPage_DragEnterOver);
     115      this.problemTabPage.DragOver += new System.Windows.Forms.DragEventHandler(this.problemTabPage_DragEnterOver);
    112116      //
    113117      // problemViewHost
    114118      //
    115       this.problemViewHost.AllowDrop = true;
    116119      this.problemViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    117120                  | System.Windows.Forms.AnchorStyles.Left)
     
    125128      this.problemViewHost.TabIndex = 3;
    126129      this.problemViewHost.ViewType = null;
    127       this.problemViewHost.DragDrop += new System.Windows.Forms.DragEventHandler(this.problemViewHost_DragDrop);
    128       this.problemViewHost.DragEnter += new System.Windows.Forms.DragEventHandler(this.problemViewHost_DragEnterOver);
    129       this.problemViewHost.DragOver += new System.Windows.Forms.DragEventHandler(this.problemViewHost_DragEnterOver);
    130130      //
    131131      // openProblemButton
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs

    r4216 r4522  
    259259      Content.Prepare(false);
    260260    }
    261     protected virtual void problemViewHost_DragEnterOver(object sender, DragEventArgs e) {
     261    protected virtual void problemTabPage_DragEnterOver(object sender, DragEventArgs e) {
    262262      e.Effect = DragDropEffects.None;
    263263      Type type = e.Data.GetData("Type") as Type;
     
    270270      }
    271271    }
    272     protected virtual void problemViewHost_DragDrop(object sender, DragEventArgs e) {
     272    protected virtual void problemTabPage_DragDrop(object sender, DragEventArgs e) {
    273273      if (e.Effect != DragDropEffects.None) {
    274274        IProblem problem = e.Data.GetData("Value") as IProblem;
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.Designer.cs

    r4011 r4522  
    9494      // algorithmTabPage
    9595      //
     96      this.algorithmTabPage.AllowDrop = true;
    9697      this.algorithmTabPage.Controls.Add(this.algorithmViewHost);
    9798      this.algorithmTabPage.Controls.Add(this.openAlgorithmButton);
     
    104105      this.algorithmTabPage.Text = "Algorithm";
    105106      this.algorithmTabPage.UseVisualStyleBackColor = true;
     107      this.algorithmTabPage.DragOver += new System.Windows.Forms.DragEventHandler(this.algorithmTabPage_DragEnterOver);
     108      this.algorithmTabPage.DragDrop += new System.Windows.Forms.DragEventHandler(this.algorithmTabPage_DragDrop);
     109      this.algorithmTabPage.DragEnter += new System.Windows.Forms.DragEventHandler(this.algorithmTabPage_DragEnterOver);
    106110      //
    107111      // algorithmViewHost
    108112      //
    109113      this.algorithmViewHost.Content = null;
    110       this.algorithmViewHost.AllowDrop = true;
    111114      this.algorithmViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    112115                  | System.Windows.Forms.AnchorStyles.Left)
     
    117120      this.algorithmViewHost.TabIndex = 3;
    118121      this.algorithmViewHost.ViewType = null;
    119       this.algorithmViewHost.DragOver += new System.Windows.Forms.DragEventHandler(this.algorithmViewHost_DragEnterOver);
    120       this.algorithmViewHost.DragDrop += new System.Windows.Forms.DragEventHandler(this.algorithmViewHost_DragDrop);
    121       this.algorithmViewHost.DragEnter += new System.Windows.Forms.DragEventHandler(this.algorithmViewHost_DragEnterOver);
    122122      //
    123123      // openAlgorithmButton
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/BatchRunView.cs

    r4216 r4522  
    234234      Content.Prepare(false);
    235235    }
    236     private void algorithmViewHost_DragEnterOver(object sender, DragEventArgs e) {
     236    private void algorithmTabPage_DragEnterOver(object sender, DragEventArgs e) {
    237237      e.Effect = DragDropEffects.None;
    238238      if (ReadOnly)
     
    247247      }
    248248    }
    249     private void algorithmViewHost_DragDrop(object sender, DragEventArgs e) {
     249    private void algorithmTabPage_DragDrop(object sender, DragEventArgs e) {
    250250      if (e.Effect != DragDropEffects.None) {
    251251        IAlgorithm algorithm = e.Data.GetData("Value") as IAlgorithm;
  • 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.