public static int getInt(bool req) { // Paramtéer TRUE = Kötelezően nem lehet 0 hosszú int tmpInt = 0; frmTouchKeyboard ft = new frmTouchKeyboard(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); }
public static string getString(bool req, string def) { // Paramtéer TRUE = Kötelezően nem lehet 0 hosszú string tmpStr = ""; frmTouchKeyboard ft = new frmTouchKeyboard(InputType.String); if (req) { while (tmpStr.Length == 0) { ft.start_string = def; ft.ShowDialog(); if (ft.DialogResult == DialogResult.OK) { tmpStr = ft.ResultString; } } } else { ft.start_string = def; ft.ShowDialog(); if (ft.DialogResult == DialogResult.OK) { tmpStr = ft.ResultString; } } return (tmpStr); }