Changeset 10343 for branches/DataPreprocessing
- Timestamp:
- 01/15/14 13:27:53 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Views/DataPreprocessingView.cs
r10342 r10343 19 19 private HistogramContent histogramContent; 20 20 21 private Dictionary<ListViewItem, IItem> listViewItemItemMapping;22 23 21 public DataPreprocessingView() { 24 22 InitializeComponent(); … … 30 28 } 31 29 30 //Create list view item for content list view 32 31 private ListViewItem CreateListViewItem(IItem item) { 33 32 ListViewItem listViewItem = new ListViewItem(); … … 38 37 listViewItem.ImageIndex = contentListView.SmallImageList.Images.Count - 1; 39 38 listViewItem.Tag = item; 39 40 40 return listViewItem; 41 41 } … … 54 54 55 55 //create view items 56 listViewItemItemMapping = new Dictionary<ListViewItem, IItem>();57 56 contentListView.SmallImageList = new ImageList(); 58 ListViewItem contentListViewItem = CreateListViewItem(dataGridContent); 59 listViewItemItemMapping[contentListViewItem] = dataGridContent; 57 ListViewItem contentListViewItem = CreateListViewItem(dataGridContent); 58 ListViewItem statisticsListViewItem = CreateListViewItem(statisticsContent); 59 ListViewItem filterListViewItem = CreateListViewItem(filterContent); 60 ListViewItem transformationListViewItem = CreateListViewItem(tranformationContent); 61 ListViewItem lineChartListViewItem = CreateListViewItem(lineChartContent); 62 ListViewItem histogramListViewItem = CreateListViewItem(histogramContent); 60 63 61 ListViewItem statisticsListViewItem = CreateListViewItem(statisticsContent); 62 listViewItemItemMapping[statisticsListViewItem] = statisticsContent; 63 64 ListViewItem filterListViewItem = CreateListViewItem(filterContent); 65 listViewItemItemMapping[filterListViewItem] = filterContent; 66 67 ListViewItem transformationListViewItem = CreateListViewItem(tranformationContent); 68 listViewItemItemMapping[transformationListViewItem] = tranformationContent; 69 70 ListViewItem lineChartListViewItem = CreateListViewItem(lineChartContent); 71 listViewItemItemMapping[lineChartListViewItem] = lineChartContent; 72 73 ListViewItem histogramListViewItem = CreateListViewItem(histogramContent); 74 listViewItemItemMapping[histogramListViewItem] = histogramContent; 75 76 //add view items 64 //add view items to content list view 77 65 contentListView.Items.Add(statisticsListViewItem); 78 66 contentListView.Items.Add(contentListViewItem); … … 97 85 if (contentListView.SelectedItems.Count > 0) { 98 86 ListViewItem listViewItem = (ListViewItem)contentListView.SelectedItems[0]; 99 //this.viewHost.Content = listViewItemItemMapping[listViewItem];100 87 this.viewHost.Content = (IItem)listViewItem.Tag; 101 88 } … … 103 90 104 91 private void listView1_DoubleClick(object sender, EventArgs e) { 105 ListViewItem listViewItem = (ListViewItem)contentListView.SelectedItems[0]; 106 MainFormManager.MainForm.ShowContent(listViewItemItemMapping[listViewItem]); 92 if (contentListView.SelectedItems.Count > 0) { 93 ListViewItem listViewItem = (ListViewItem)contentListView.SelectedItems[0]; 94 MainFormManager.MainForm.ShowContent((IItem)listViewItem.Tag); 95 } 107 96 } 108 97
Note: See TracChangeset
for help on using the changeset viewer.