Beispiel #1
0
        public static double getDouble(bool req)
        {
            // Paramtéer TRUE = Kötelezően nem lehet 0 hosszú
            double tmpD = 0;
            frmTouchNumKeyboard ft = new frmTouchNumKeyboard(InputType.Double);

            if (req)
            {
                while (tmpD == 0)
                {
                    ft.ShowDialog();
                    if (ft.DialogResult == DialogResult.OK)
                    {
                        tmpD = Convert.ToDouble(ft.ResultString);

                    }
                }
            }
            else
            {
                ft.ShowDialog();
                if (ft.DialogResult == DialogResult.OK)
                {
                    tmpD = Convert.ToDouble(ft.ResultString);

                }
            }

            return (tmpD);
        }
Beispiel #2
0
        public static int getInt2(bool req)
        {
            // Paramtéer TRUE = Kötelezően nem lehet 0 hosszú
            int tmpInt = 0;
            frmTouchNumKeyboard ft = new frmTouchNumKeyboard(InputType.Number);

            if (req)
            {
                while (tmpInt == 0)
                {
                    ft.ShowDialog();
                    if (ft.DialogResult == DialogResult.OK)
                    {
                        tmpInt = Convert.ToInt16(ft.ResultString);

                    }
                }
            }
            else
            {
                ft.ShowDialog();
                if (ft.DialogResult == DialogResult.OK)
                {
                    tmpInt = Convert.ToInt16(ft.ResultString);

                }
            }

            return (tmpInt);
        }