public virtual void DismissDialog () { if (dialog == null) return; dialog.RemoveFromPainter (); dialog = null; }
public virtual void ShowDialog (UIDialog dialog) { Console.WriteLine ("showing {0}", dialog); if (this.dialog != null) throw new Exception ("only one active dialog is allowed"); this.dialog = dialog; dialog.Load (); dialog.Ready += delegate () { dialog.AddToPainter (); }; }