Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11875


Ignore:
Timestamp:
02/03/15 14:31:34 (10 years ago)
Author:
mkommend
Message:

#2265: Merged r11467, r11469 and r11470 into stable.

Location:
stable
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/MainForm.Designer.cs

    r11170 r11875  
    8787      this.ResumeLayout(false);
    8888      this.PerformLayout();
    89 
    9089    }
    9190
  • stable/HeuristicLab.Optimizer/3.3/OptimizerDockingMainForm.Designer.cs

    r11170 r11875  
    5858      this.ResumeLayout(false);
    5959      this.PerformLayout();
    60 
     60      //
     61      // toolStrip
     62      //
     63      this.toolStrip.AllowDrop = true;
     64      this.toolStrip.DragEnter += optimizerMainForm_DragEnter;
     65      this.toolStrip.DragDrop += optimizerMainForm_DragDrop;
     66      //
     67      // menuStrip
     68      //
     69      this.menuStrip.AllowDrop = true;
     70      this.menuStrip.DragEnter += optimizerMainForm_DragEnter;
     71      this.menuStrip.DragDrop += optimizerMainForm_DragDrop;
    6172    }
    6273
  • stable/HeuristicLab.Optimizer/3.3/OptimizerDockingMainForm.cs

    r11170 r11875  
    8686    protected override void OnClosing(CancelEventArgs e) {
    8787      base.OnClosing(e);
    88       if (MainFormManager.MainForm.Views.OfType<IContentView>().Any(v=>v.Content is IStorableContent)) {
     88      if (MainFormManager.MainForm.Views.OfType<IContentView>().Any(v => v.Content is IStorableContent)) {
    8989        if (MessageBox.Show(this, "Some views are still opened. If their content has not been saved, it will be lost after closing. Do you really want to close HeuristicLab Optimizer?", "Close Optimizer", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.No)
    9090          e.Cancel = true;
     
    118118      }
    119119    }
     120
     121    private void optimizerMainForm_DragEnter(object sender, DragEventArgs e) {
     122      // perform type checking to ensure that the data being dragged is of an acceptable type
     123      e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None;
     124
     125    }
     126
     127    private void optimizerMainForm_DragDrop(object sender, DragEventArgs e) {
     128      if (e.Data.GetDataPresent(DataFormats.FileDrop)) {
     129        string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
     130        FileManager.OpenFiles(files);
     131      }
     132    }
    120133  }
    121134}
  • stable/HeuristicLab.Optimizer/3.3/OptimizerMultipleDocumentMainForm.Designer.cs

    r11170 r11875  
    5858      this.ResumeLayout(false);
    5959      this.PerformLayout();
    60 
     60      //
     61      // toolStrip
     62      //
     63      this.toolStrip.AllowDrop = true;
     64      this.toolStrip.DragEnter += optimizerMainForm_DragEnter;
     65      this.toolStrip.DragDrop += optimizerMainForm_DragDrop;
     66      //
     67      // menuStrip
     68      //
     69      this.menuStrip.AllowDrop = true;
     70      this.menuStrip.DragEnter += optimizerMainForm_DragEnter;
     71      this.menuStrip.DragDrop += optimizerMainForm_DragDrop;
    6172    }
    6273
  • stable/HeuristicLab.Optimizer/3.3/OptimizerMultipleDocumentMainForm.cs

    r11170 r11875  
    118118      }
    119119    }
     120
     121    private void optimizerMainForm_DragEnter(object sender, DragEventArgs e) {
     122      // perform type checking to ensure that the data being dragged is of an acceptable type
     123      e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None;
     124
     125    }
     126
     127    private void optimizerMainForm_DragDrop(object sender, DragEventArgs e) {
     128      if (e.Data.GetDataPresent(DataFormats.FileDrop)) {
     129        string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
     130        FileManager.OpenFiles(files);
     131      }
     132    }
    120133  }
    121134}
  • stable/HeuristicLab.Optimizer/3.3/OptimizerSingleDocumentMainForm.Designer.cs

    r11170 r11875  
    5858      this.ResumeLayout(false);
    5959      this.PerformLayout();
    60 
     60      //
     61      // toolStrip
     62      //
     63      this.toolStrip.AllowDrop = true;
     64      this.toolStrip.DragEnter += optimizerMainForm_DragEnter;
     65      this.toolStrip.DragDrop += optimizerMainForm_DragDrop;
     66      //
     67      // menuStrip
     68      //
     69      this.menuStrip.AllowDrop = true;
     70      this.menuStrip.DragEnter += optimizerMainForm_DragEnter;
     71      this.menuStrip.DragDrop += optimizerMainForm_DragDrop;
    6172    }
    6273
  • stable/HeuristicLab.Optimizer/3.3/OptimizerSingleDocumentMainForm.cs

    r11170 r11875  
    118118      }
    119119    }
     120
     121    private void optimizerMainForm_DragEnter(object sender, DragEventArgs e) {
     122      // perform type checking to ensure that the data being dragged is of an acceptable type
     123      e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None;
     124
     125    }
     126
     127    private void optimizerMainForm_DragDrop(object sender, DragEventArgs e) {
     128      if (e.Data.GetDataPresent(DataFormats.FileDrop)) {
     129        string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
     130        FileManager.OpenFiles(files);
     131      }
     132    }
    120133  }
    121134}
Note: See TracChangeset for help on using the changeset viewer.