Esempio n. 1
0
 private void DoCommand()
 {
     if (CommandDlg.Open())
     {
         CreateNodeItems(true);
     }
 }
Esempio n. 2
0
        //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);
        }