Changeset 6760 for branches/PersistenceSpeedUp/HeuristicLab.Analysis.Views/3.3/DataTableHistoryView.cs
- Timestamp:
- 09/14/11 13:59:25 (13 years ago)
- Location:
- branches/PersistenceSpeedUp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceSpeedUp
- Property svn:ignore
-
old new 12 12 *.psess 13 13 *.vsp 14 *.docstates
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/PersistenceSpeedUp/HeuristicLab.Analysis.Views/3.3/DataTableHistoryView.cs
r5445 r6760 20 20 #endregion 21 21 22 using System.Collections.Generic; 22 23 using System.Windows.Forms; 23 24 using HeuristicLab.Core.Views; … … 27 28 [View("DataTableHistory View")] 28 29 [Content(typeof(DataTableHistory), true)] 29 public partial class DataTableHistoryView : MovieView<DataTable> {30 public partial class DataTableHistoryView : MovieView<DataTable>, IConfigureableView { 30 31 public DataTableHistoryView() { 31 32 InitializeComponent(); 32 33 itemsGroupBox.Text = "Data Table"; 33 34 } 35 36 public void ShowConfiguration() { 37 DataTable current = viewHost.Content as DataTable; 38 if (current == null) return; 39 using (DataTableVisualPropertiesDialog dialog = new DataTableVisualPropertiesDialog(current)) { 40 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 } 47 foreach (DataTable dt in Content) { 48 if (current == dt) continue; 49 dt.VisualProperties = (DataTableVisualProperties)current.VisualProperties.Clone(); 50 foreach (DataRow row in current.Rows) { 51 if (!dt.Rows.ContainsKey(row.Name)) continue; 52 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; 56 } 57 } 58 } 59 } 60 34 61 } 35 62 }
Note: See TracChangeset
for help on using the changeset viewer.