コード例 #1
0
 ///<inheritdoc/>
 public override void RemoveAll()
 {
     if (this == Application.Top)
     {
         MenuBar?.Dispose();
         MenuBar = null;
         StatusBar?.Dispose();
         StatusBar = null;
     }
     base.RemoveAll();
 }
コード例 #2
0
 internal void RemoveMenuStatusBar(View view)
 {
     if (view is MenuBar)
     {
         MenuBar?.Dispose();
         MenuBar = null;
     }
     if (view is StatusBar)
     {
         StatusBar?.Dispose();
         StatusBar = null;
     }
 }
コード例 #3
0
ファイル: ContextMenu.cs プロジェクト: migueldeicaza/gui.cs
 /// <inheritdoc/>
 public void Dispose()
 {
     if (IsShow)
     {
         menuBar.MenuAllClosed -= MenuBar_MenuAllClosed;
         menuBar.Dispose();
         menuBar = null;
         IsShow  = false;
     }
     if (container != null)
     {
         container.Closing -= Container_Closing;
         container.Resized -= Container_Resized;
     }
 }
コード例 #4
0
 ///<inheritdoc/>
 public override void Remove(View view)
 {
     if (this is Toplevel && ((Toplevel)this).MenuBar != null)
     {
         if (view is MenuBar)
         {
             MenuBar?.Dispose();
             MenuBar = null;
         }
         if (view is StatusBar)
         {
             StatusBar?.Dispose();
             StatusBar = null;
         }
     }
     base.Remove(view);
 }