- Timestamp:
- 01/13/15 13:15:03 (9 years ago)
- Location:
- stable
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 11555,11557,11592,11736
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Core.Views/3.3/NestingLevelErrorControl.cs
r11555 r11748 27 27 namespace HeuristicLab.Core.Views { 28 28 public partial class NestingLevelErrorControl : UserControl { 29 public Func<IContent> Content { get; set; } 29 private Func<IContent> Content { get; set; } 30 private Type ViewType { get; set; } 30 31 31 public NestingLevelErrorControl() { 32 public NestingLevelErrorControl(Func<IContent> content, Type viewType) 33 : base() { 32 34 InitializeComponent(); 35 Content = content; 36 ViewType = viewType; 33 37 } 34 38 35 39 private void showButton_Click(object sender, System.EventArgs e) { 36 if (Content != null) { 37 if (MainFormManager.MainForm.ShowContent(Content()) == null) { 38 using (TypeSelectorDialog dialog = new TypeSelectorDialog()) { 39 dialog.Caption = "Unable to find view for content. Please choose a appropriate view."; 40 dialog.TypeSelector.Configure(typeof(IContentView), false, false); 41 42 if (dialog.ShowDialog(this) == DialogResult.OK) { 43 MainFormManager.MainForm.ShowContent(Content(), dialog.TypeSelector.SelectedType); 44 } 45 } 46 } 40 if (Content != null && ViewType != null) { 41 MainFormManager.MainForm.ShowContent(Content(), ViewType); 47 42 } 48 43 }
Note: See TracChangeset
for help on using the changeset viewer.