public static int GetNumberFromUser(bool edits, int max) { using (Controls.LevelNumber num = new Controls.LevelNumber(edits, max)) { if (num.ShowDialog() != DialogResult.OK) return -1; return num.Levels; } }