- Timestamp:
- 01/10/19 13:29:27 (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/2947_ConfigurableIndexedDataTable (added) merged: 16148-16150,16156,16520,16524
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Analysis.Views
- Property svn:mergeinfo changed
/branches/2947_ConfigurableIndexedDataTable/HeuristicLab.Analysis.Views (added) merged: 16149-16150,16520,16524
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Analysis.Views/3.3/DataTableVisualPropertiesDialog.cs
r15583 r16527 27 27 28 28 namespace HeuristicLab.Analysis.Views { 29 public partial class DataTableVisualPropertiesDialog : Form{29 public partial class DataTableVisualPropertiesDialog<TDataRow> : Form where TDataRow : class, IDataRow { 30 30 protected bool SuppressEvents { get; set; } 31 protected DataTableContent { get; private set; }31 protected IDataTable<TDataRow> Content { get; private set; } 32 32 private DataTableVisualProperties originalDataTableVPs; 33 33 private Dictionary<string, DataRowVisualProperties> originalDataRowVPs; … … 36 36 public IEnumerable<string> RowsWithModifiedDisplayNames { get { return modifiedDisplayNames.AsEnumerable(); } } 37 37 38 public DataTableVisualPropertiesDialog( DataTabledataTable) {38 public DataTableVisualPropertiesDialog(IDataTable<TDataRow> dataTable) { 39 39 InitializeComponent(); 40 40 #region Prepare controls … … 51 51 originalDataTableVPs = (DataTableVisualProperties)Content.VisualProperties.Clone(); 52 52 originalDataRowVPs = new Dictionary<string, DataRowVisualProperties>(); 53 foreach ( DataRowrow in Content.Rows)53 foreach (var row in Content.Rows) 54 54 originalDataRowVPs.Add(row.Name, (DataRowVisualProperties)row.VisualProperties.Clone()); 55 55 … … 62 62 63 63 private void RegisterContentEvents() { 64 foreach ( DataRowrow in Content.Rows) {64 foreach (var row in Content.Rows) { 65 65 row.VisualProperties.PropertyChanged += new PropertyChangedEventHandler(Row_VisualProperties_PropertyChanged); 66 66 } … … 68 68 69 69 private void DeregisterContentEvents() { 70 foreach ( DataRowrow in Content.Rows) {70 foreach (var row in Content.Rows) { 71 71 row.VisualProperties.PropertyChanged -= new PropertyChangedEventHandler(Row_VisualProperties_PropertyChanged); 72 72 } … … 80 80 81 81 private void Row_VisualProperties_PropertyChanged(object sender, PropertyChangedEventArgs e) { 82 foreach ( DataRowrow in Content.Rows) {82 foreach (var row in Content.Rows) { 83 83 if (e.PropertyName == "DisplayName" && row.VisualProperties == sender) { 84 84 modifiedDisplayNames.Add(row.Name); … … 109 109 private void cancelButton_Click(object sender, System.EventArgs e) { 110 110 DialogResult = DialogResult.Cancel; 111 foreach ( DataRowrow in Content.Rows) {111 foreach (var row in Content.Rows) { 112 112 row.VisualProperties = originalDataRowVPs[row.Name]; 113 113 } … … 160 160 private void FillSeriesListView() { 161 161 seriesListView.SelectedIndices.Clear(); 162 foreach ( DataRowrow in Content.Rows) {162 foreach (var row in Content.Rows) { 163 163 seriesListView.Items.Add(new ListViewItem(row.Name, 0)); 164 164 } … … 168 168 169 169 private void UpdateAllSeriesPositions() { 170 Dictionary<string, DataRow>rows = Content.Rows.ToDictionary(x => x.Name);170 var rows = Content.Rows.ToDictionary(x => x.Name); 171 171 Content.Rows.Clear(); 172 172 for (int i = 0; i < seriesListView.Items.Count; i++) {
Note: See TracChangeset
for help on using the changeset viewer.