Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/20/11 17:07:01 (12 years ago)
Author:
abeham
Message:

#1603

  • Made display name change transparent
  • Changed ok button

#1611

  • added warning and added label to show image size
  • fixed controls resizing
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis.Views/3.3/DataTableHistoryView.cs

    r6628 r7216  
    2020#endregion
    2121
    22 using System.Collections.Generic;
     22using System.Linq;
    2323using System.Windows.Forms;
    2424using HeuristicLab.Core.Views;
    2525using HeuristicLab.MainForm;
     26using System.Collections.Generic;
    2627
    2728namespace HeuristicLab.Analysis.Views {
     
    3940      using (DataTableVisualPropertiesDialog dialog = new DataTableVisualPropertiesDialog(current)) {
    4041        if (dialog.ShowDialog() != DialogResult.OK) return;
    41         Dictionary<string, bool> changeDisplayName = new Dictionary<string, bool>();
    42         foreach (DataRow row in current.Rows) {
    43           var answer = MessageBox.Show("Change display name for series " + row.Name + " to " + row.VisualProperties.DisplayName + " for all frames?", "Confirm change", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
    44           if (answer == DialogResult.Cancel) return;
    45           changeDisplayName[row.Name] = (answer == DialogResult.Yes);
    46         }
     42        HashSet<string> modifiedDisplayNames = new HashSet<string>(dialog.RowsWithModifiedDisplayNames);
    4743        foreach (DataTable dt in Content) {
    4844          if (current == dt) continue;
     
    5147            if (!dt.Rows.ContainsKey(row.Name)) continue;
    5248            string oldDisplayName = dt.Rows[row.Name].VisualProperties.DisplayName;
    53             var props = (DataRowVisualProperties)row.VisualProperties.Clone();
    54             if (!changeDisplayName[row.Name]) props.DisplayName = oldDisplayName;
    55             dt.Rows[row.Name].VisualProperties = props;
     49            dt.Rows[row.Name].VisualProperties = (DataRowVisualProperties)row.VisualProperties.Clone();
     50            if (!modifiedDisplayNames.Contains(row.Name))
     51              dt.Rows[row.Name].VisualProperties.DisplayName = oldDisplayName;
    5652          }
    5753        }
Note: See TracChangeset for help on using the changeset viewer.