- Timestamp:
- 01/29/10 16:26:43 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/View.cs
r2711 r2723 58 58 public bool IsShown { 59 59 get { return this.isShown; } 60 private set { this.isShown = value; } 60 61 } 61 62 … … 64 65 bool firstTimeShown = mainform.GetForm(this) == null; 65 66 66 MainFormManager.GetMainForm<MainForm>().ShowView(this,firstTimeShown); 67 this.IsShown = true; 68 mainform.ShowView(this, firstTimeShown); 67 69 if (firstTimeShown) { 68 70 Form form = mainform.GetForm(this); … … 70 72 form.FormClosing += new FormClosingEventHandler(OnClosingHelper); 71 73 } 72 this.OnShown(new ViewShownEventArgs(this, firstTimeShown));74 this.OnShown(new ViewShownEventArgs(this, firstTimeShown)); 73 75 } 74 76 … … 76 78 MainForm mainform = MainFormManager.GetMainForm<MainForm>(); 77 79 Form form = mainform.GetForm(this); 78 if (form != null) 80 if (form != null) { 81 this.IsShown = false; 79 82 mainform.CloseView(this); 83 } 80 84 } 81 85 … … 83 87 MainForm mainform = MainFormManager.GetMainForm<MainForm>(); 84 88 Form form = mainform.GetForm(this); 85 if (form != null) 86 mainform.CloseView(this,closeReason); 89 if (form != null) { 90 this.IsShown = false; 91 mainform.CloseView(this, closeReason); 92 } 87 93 } 88 94 89 95 public new void Hide() { 96 this.IsShown = false; 90 97 MainFormManager.GetMainForm<MainForm>().HideView(this); 91 98 this.OnHidden(new EventArgs()); … … 107 114 108 115 protected virtual void OnShown(ViewShownEventArgs e) { 109 this.isShown = true;110 116 } 111 117 112 118 protected virtual void OnHidden(EventArgs e) { 113 this.isShown = false;114 119 } 115 120 … … 140 145 141 146 protected virtual void OnClosed(FormClosedEventArgs e) { 142 this.isShown = false;143 147 } 144 148
Note: See TracChangeset
for help on using the changeset viewer.