Ejemplo n.º 1
0
        public Instruction Execute(BhavWiz i, int wizType)
        {
            pjse.ABhavOperandWiz wiz = null;
            switch (wizType)
            {
            case 0: wiz = new pjse.BhavOperandWizards.BhavOperandWizRaw(i); break;

            case 1: wiz = i.Wizard(); break;

            default: wiz = new pjse.BhavOperandWizards.BhavOperandWizDefault(i); break;
            }
            if (wiz == null)
            {
                return(null);
            }

            Panel pn = wiz.bhavPrimWizPanel;

            pn.Parent   = this;
            pn.Top      = 0;
            pn.Left     = 0;
            pn.TabIndex = 1;
            pn_Resize(pn, null);
            pn.Resize += new EventHandler(pn_Resize);
            wiz.Execute();

            DialogResult dr = ShowDialog();

            Close();

            switch (dr)
            {
            case DialogResult.OK:
                return(wiz.Write());

            default:
                return(null);
            }
        }