Changeset 16692 for branches/2521_ProblemRefactoring/HeuristicLab.DataPreprocessing.Views/3.4/ViewShortcutListView.cs
- Timestamp:
- 03/18/19 17:24:30 (5 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2521_ProblemRefactoring/HeuristicLab.DataPreprocessing.Views
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.DataPreprocessing.Views/3.4
- Property svn:ignore
-
old new 1 1 ComparisonFilterView.resx 2 2 FilterView.resx 3 *.user
-
- Property svn:ignore
-
branches/2521_ProblemRefactoring/HeuristicLab.DataPreprocessing.Views/3.4/ViewShortcutListView.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 21 21 22 22 using System; 23 using HeuristicLab.Common;24 23 using HeuristicLab.Core; 25 24 using HeuristicLab.Core.Views; … … 30 29 [Content(typeof(IItemList<IViewShortcut>), true)] 31 30 public partial class ViewShortcutListView : ItemListView<IViewShortcut> { 32 33 31 public ViewShortcutListView() { 34 32 InitializeComponent(); 35 itemsGroupBox.Text = "View Shortcuts"; 33 Controls.Clear(); 34 Controls.Add(splitContainer); 35 splitContainer.Panel1.Controls.Clear(); 36 splitContainer.Panel1.Controls.Add(itemsListView); 37 splitContainer.Panel2.Controls.Clear(); 38 splitContainer.Panel2.Controls.Add(viewHost); 36 39 } 37 40 … … 39 42 //Clone chart items 40 43 protected override void itemsListView_DoubleClick(object sender, EventArgs e) { 41 if (itemsListView.SelectedItems.Count == 1) { 42 IViewShortcut item = itemsListView.SelectedItems[0].Tag as IViewShortcut; 43 if (item != null) { 44 45 if (item is IViewChartShortcut) 46 item = (IViewChartShortcut)item.Clone(new Cloner()); 47 48 IContentView view = MainFormManager.MainForm.ShowContent(item); 49 if (view != null) { 50 view.ReadOnly = ReadOnly; 51 view.Locked = Locked; 52 } 44 if (itemsListView.SelectedItems.Count != 1) return; 45 IViewShortcut item = itemsListView.SelectedItems[0].Tag as IViewShortcut; 46 if (item == null) return; 47 try { 48 item = (IViewShortcut)item.Clone(); 49 var view = MainFormManager.MainForm.ShowContent(item); 50 if (view != null) { 51 view.ReadOnly = ReadOnly; 52 view.Locked = Locked; 53 53 } 54 } catch (NullReferenceException) { 55 // cloning for preprocessing not done properly yet 54 56 } 55 57 }
Note: See TracChangeset
for help on using the changeset viewer.