private void DoCommand() { if (CommandDlg.Open()) { CreateNodeItems(true); } }
//internal MainWindow owner; //public void InitOwner(MainWindow owner) //{ // this.owner = owner; // SetIStyle(); //} //public void SetIStyle() //{ // if (owner != null) // { // this.StylePainter = owner.CurrentStylePainter; // foreach (Control c in this.Controls) // { // if (c is Nistec.WinForms.ILayout) // { // ((Nistec.WinForms.ILayout)c).StylePainter = owner.CurrentStylePainter; // } // } // } //} #endregion public static bool Open() { bool ok = false; CommandDlg frm = new CommandDlg(); //frm.LoadSettings(AddItemDlg); DialogResult dr = frm.ShowDialog(); if (dr == DialogResult.OK) { ok = true; frm.Close(); } return(ok); }