- Timestamp:
- 09/09/11 12:12:42 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Solution Views/NamedDataAnalysisSolutionView.cs
r6652 r6729 30 30 [Content(typeof(DataAnalysisSolution), true)] 31 31 public partial class NamedDataAnalysisSolutionView : NamedItemView { 32 private Type contentType; 33 private DataAnalysisSolutionView view; 34 32 35 public NamedDataAnalysisSolutionView() { 33 36 InitializeComponent(); … … 41 44 protected override void OnContentChanged() { 42 45 base.OnContentChanged(); 43 panel.Controls.Clear();44 46 45 if (Content != null) { 47 if (Content == null) { 48 panel.Controls.Clear(); 49 } else if (Content.GetType() == contentType && view != null) { 50 view.Content = Content; 51 } else { 52 view = null; 53 contentType = Content.GetType(); 54 panel.Controls.Clear(); 46 55 var viewType = MainFormManager.GetViewTypes(Content.GetType(), true).Where(t => typeof(DataAnalysisSolutionView).IsAssignableFrom(t)).FirstOrDefault(); 47 56 if (viewType != null) { 48 v ar view = (DataAnalysisSolutionView)Activator.CreateInstance(viewType);57 view = (DataAnalysisSolutionView)Activator.CreateInstance(viewType); 49 58 view.Dock = DockStyle.Fill; 50 59 view.Content = Content;
Note: See TracChangeset
for help on using the changeset viewer.