public void Open() { try { var dlg = new ConsoleGuiSelectOne(_activator.CoreChildProvider); if (dlg.ShowDialog()) { var edit = new ConsoleGuiEdit(_activator, dlg.Selected); edit.ShowDialog(); } } catch (Exception e) { _activator.ShowException("Unexpected error in open/edit", e); } }
protected override void ActivateImpl(object o) { IRevertable m = o as IRevertable; if (o is IMasqueradeAs masq) { if (masq.MasqueradingAs() is IRevertable underlyingObject) { m = underlyingObject; } } if (m != null) { var view = new ConsoleGuiEdit(this, m) { Modal = true }; Application.Run(view); } }