Changeset 13628 for trunk/sources/HeuristicLab.MainForm.WindowsForms
- Timestamp:
- 02/19/16 11:08:00 (9 years ago)
- Location:
- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockForm.cs ¶
r13614 r13628 32 32 /// </summary> 33 33 internal partial class DockForm : DockContent { 34 public DockForm(IView view ) {34 public DockForm(IView view, bool allowContextMenu) { 35 35 InitializeComponent(); 36 36 this.view = view; 37 this.allowContextMenu = allowContextMenu; 38 37 39 if (view != null) { 38 40 if (view is UserControl) { … … 90 92 get { return this.view; } 91 93 } 94 private readonly bool allowContextMenu; 92 95 93 96 private void UpdateText() { … … 117 120 #region Context Menu Events 118 121 private void contextMenuStrip_Opening(object sender, System.ComponentModel.CancelEventArgs e) { 122 if (!allowContextMenu) { 123 e.Cancel = true; 124 return; 125 } 126 119 127 var contentView = View as IContentView; 120 128 var content = contentView != null ? contentView.Content : null; -
TabularUnified trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/MainForms/DockingMainForm.cs ¶
r12012 r13628 25 25 namespace HeuristicLab.MainForm.WindowsForms { 26 26 public partial class DockingMainForm : MainForm { 27 28 public bool AllowContexMenu { get; set; } 29 27 30 public DockingMainForm() 28 31 : base() { 29 32 InitializeComponent(); 33 AllowContexMenu = true; 30 34 } 31 35 public DockingMainForm(Type userInterfaceItemType) 32 36 : base(userInterfaceItemType) { 33 37 InitializeComponent(); 38 AllowContexMenu = true; 34 39 } 35 40 public DockingMainForm(Type userInterfaceItemType, bool showContentInViewHost) … … 60 65 61 66 protected override Form CreateForm(IView view) { 62 return new DockForm(view );67 return new DockForm(view, AllowContexMenu); 63 68 } 64 69
Note: See TracChangeset
for help on using the changeset viewer.