Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/08/15 15:32:12 (9 years ago)
Author:
dglaser
Message:

#2388: Merged trunk into HiveStatistics branch

Location:
branches/HiveStatistics/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources

  • branches/HiveStatistics/sources/HeuristicLab.DataPreprocessing.Views

    • Property svn:mergeinfo set to (toggle deleted branches)
      /stable/HeuristicLab.DataPreprocessing.Viewsmergedeligible
      /trunk/sources/HeuristicLab.DataPreprocessing.Viewsmergedeligible
      /branches/1721-RandomForestPersistence/HeuristicLab.DataPreprocessing.Views10321-10322
      /branches/Algorithms.GradientDescent/HeuristicLab.DataPreprocessing.Views5516-5520
      /branches/Benchmarking/sources/HeuristicLab.DataPreprocessing.Views6917-7005
      /branches/CloningRefactoring/HeuristicLab.DataPreprocessing.Views4656-4721
      /branches/CodeEditor/HeuristicLab.DataPreprocessing.Views11700-11806
      /branches/DataAnalysis Refactoring/HeuristicLab.DataPreprocessing.Views5471-5808
      /branches/DataAnalysis SolutionEnsembles/HeuristicLab.DataPreprocessing.Views5815-6180
      /branches/DataAnalysis/HeuristicLab.DataPreprocessing.Views4458-4459,​4462,​4464
      /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views10085-11101
      /branches/DataPreprocessingImprovements/HeuristicLab.DataPreprocessing.Views12054-12675
      /branches/GP.Grammar.Editor/HeuristicLab.DataPreprocessing.Views6284-6795
      /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.DataPreprocessing.Views5060
      /branches/HLScript/HeuristicLab.DataPreprocessing.Views10331-10358
      /branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.DataPreprocessing.Views11570-12508
      /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.DataPreprocessing.Views6123-9799
      /branches/LogResidualEvaluator/HeuristicLab.DataPreprocessing.Views10202-10483
      /branches/NET40/sources/HeuristicLab.DataPreprocessing.Views5138-5162
      /branches/NSGA-II Changes/HeuristicLab.DataPreprocessing.Views12033-12122
      /branches/ParallelEngine/HeuristicLab.DataPreprocessing.Views5175-5192
      /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.DataPreprocessing.Views7568-7810
      /branches/QAPAlgorithms/HeuristicLab.DataPreprocessing.Views6350-6627
      /branches/Restructure trunk solution/HeuristicLab.DataPreprocessing.Views6828
      /branches/RuntimeOptimizer/HeuristicLab.DataPreprocessing.Views8943-9078
      /branches/ScatterSearch (trunk integration)/HeuristicLab.DataPreprocessing.Views7787-8333
      /branches/SlaveShutdown/HeuristicLab.DataPreprocessing.Views8944-8956
      /branches/SpectralKernelForGaussianProcesses/HeuristicLab.DataPreprocessing.Views10204-10479
      /branches/SuccessProgressAnalysis/HeuristicLab.DataPreprocessing.Views5370-5682
      /branches/Trunk/HeuristicLab.DataPreprocessing.Views6829-6865
      /branches/UnloadJobs/HeuristicLab.DataPreprocessing.Views9168-9215
      /branches/VNS/HeuristicLab.DataPreprocessing.Views5594-5752
      /branches/histogram/HeuristicLab.DataPreprocessing.Views5959-6341
  • branches/HiveStatistics/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs

    r12012 r12689  
    6161      dataGridView.KeyDown += dataGridView_KeyDown;
    6262      dataGridView.MouseUp += dataGridView_MouseUp;
    63       dataGridView.ColumnHeaderMouseClick += dataGridView_ColumnHeaderMouseClick;
    6463      contextMenuCell.Items.Add(ShowHideColumns);
    6564      _highlightedCellsBackground = new Dictionary<int, IList<int>>();
     
    127126
    128127      string errorMessage;
    129       if (Content != null) {
     128      if (!String.IsNullOrEmpty(e.FormattedValue.ToString())) {
    130129        if (dataGridView.IsCurrentCellInEditMode && Content.FilterLogic.IsFiltered) {
    131130          errorMessage = "A filter is active, you cannot modify data. Press ESC to exit edit mode.";
     
    164163    }
    165164
    166     private void dataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
     165    protected override void dataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
     166      if (Content != null) {
     167        if (e.Button == System.Windows.Forms.MouseButtons.Left) {
     168          dataGridView.Focus();
     169          dataGridView.ClearSelection();
     170          dataGridView.SelectionChanged -= dataGridView_SelectionChanged;
     171          for (int i = 0; i < dataGridView.RowCount; i++) {
     172            if (i + 1 == dataGridView.RowCount)
     173              dataGridView.SelectionChanged += dataGridView_SelectionChanged;
     174            dataGridView[e.ColumnIndex, i].Selected = true;
     175          }
     176        } else if (Content.SortableView) {
     177          SortColumn(e.ColumnIndex);
     178        }
     179      }
    167180      searchIterator = null;
    168181    }
     
    437450    private void dataGridView_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) {
    438451      if (Content == null) return;
    439       if (e.Button == System.Windows.Forms.MouseButtons.Right) {
     452      if (e.Button == System.Windows.Forms.MouseButtons.Right && !(e.ColumnIndex != -1 && e.RowIndex == -1)) {
    440453        if (e.ColumnIndex == -1 || e.RowIndex == -1) {
    441454          replaceValueOverColumnToolStripMenuItem.Visible = false;
     
    474487    private void dataGridView_KeyDown(object sender, KeyEventArgs e) {
    475488      var selectedRows = dataGridView.SelectedRows;
    476       if (e.KeyCode == Keys.Delete && selectedRows.Count > 0) {
    477         List<int> rows = new List<int>();
    478         for (int i = 0; i < selectedRows.Count; ++i) {
    479           rows.Add(selectedRows[i].Index);
    480         }
    481         Content.DeleteRow(rows);
    482       } else if (e.Control && e.KeyCode == Keys.F) {
    483         CreateFindAndReplaceDialog();
    484         findAndReplaceDialog.ActivateSearch();
    485       } else if (e.Control && e.KeyCode == Keys.R) {
    486         CreateFindAndReplaceDialog();
    487         findAndReplaceDialog.ActivateReplace();
     489      var selectedCells = dataGridView.SelectedCells;
     490      if (!Content.FilterLogic.IsFiltered) { //data is in read only mode....
     491        if (e.KeyCode == Keys.Delete && selectedCells.Count == Content.Rows && selectedCells.Count > 0) {
     492          Content.DeleteColumn(selectedCells[0].ColumnIndex);
     493        } else if (e.KeyCode == Keys.Delete && selectedRows.Count > 0) {
     494          List<int> rows = new List<int>();
     495          for (int i = 0; i < selectedRows.Count; ++i) {
     496            int index = (sortedColumnIndices.Count != 0) ? (Convert.ToInt32(selectedRows[i].HeaderCell.Value) - 1) :
     497              selectedRows[i].Index;
     498            rows.Add(index);
     499          }
     500          Content.DeleteRows(rows);
     501        } else if (e.Control && e.KeyCode == Keys.F) {
     502          CreateFindAndReplaceDialog();
     503          findAndReplaceDialog.ActivateSearch();
     504        } else if (e.Control && e.KeyCode == Keys.R) {
     505          CreateFindAndReplaceDialog();
     506          findAndReplaceDialog.ActivateReplace();
     507        }
    488508      }
    489509    }
Note: See TracChangeset for help on using the changeset viewer.