Exemplo n.º 1
0
        // вывод панели c окном помощи
        private void ShowInf(object xInfP)
        {
            if (xInfP != null)
            {
                xInf = xInfP;
            }

            if (xInf == null)
            {
                return;
            }

            // центровка панели
            Rectangle screen = Screen.PrimaryScreen.Bounds;

            if (screen.Width > 240)
            {
                pnHelp.Width    = screen.Width;
                tMainHelp.Width = screen.Width - 4;
                lMainHelp.Left  = (screen.Width - lMainHelp.Width) / 2;
            }
            pnHelp.Location = new Point((screen.Width - pnHelp.Width) / 2,
                                        (screen.Height - pnHelp.Height) / 2);

            nHelpPeriod = AppC.HELPLINES;
            nHelpInd    = 0;

            tHeadHelp.Visible  = false;
            tMainHelp.Location = new Point(2, 3);
            tMainHelp.Height   = 296;

            if (xInf.GetType().IsArray == true)
            {
                tMainHelp.Text = ((string[])xInf)[0];
            }
            else
            {
                tMainHelp.Text = NextInfPart();
            }

            pnHelp.Visible = true;
            ehCurrFunc    += new CurrFuncKeyHandler(HelpKeyDown);
            tFiction.Focus();
        }
Exemplo n.º 2
0
        // вход в режим ввода/корректировки параметров
        public void EditPars(int nReg, DocPars x, CTRL1ST FirstEd, AppC.VerifyEditFields dgVer, EditParsOver dgEnd)
        {
            xDP = x;
            if (x != null)
            {
                bQuitEdPars      = false;
                nCurFunc         = nReg;
                bWorkWithDocPars = true;
                //ServClass.dgVerEd = new VerifyEditFields(dgVer);
                dgOver = new EditParsOver(dgEnd);
                SetParFields(xDP);
                //EnableDocF(x.nTypD, 1);
                SetEditMode(true);

                CreateEdArrPar(FirstEd, dgVer);

                oldKeyH    = ehCurrFunc;
                ehCurrFunc = new CurrFuncKeyHandler(PPars_KeyDown);

//                WhereFocus(FirstEd);
            }
        }