private bool GetSwim() { while (true) { ShowOnConsole("your divider for swim workout"); SwimDivider = CheckData.ChengeDot(Console.ReadLine()); if (!CheckEsc(SwimDivider)) { return(false); } if (CheckRegister.CheckFloat(SwimDivider)) { return(true); } Console.Clear(); string s = "Divider must be bigger than 0."; int middle = (Console.WindowWidth - s.Length) / 2; Console.SetCursorPosition(middle, Console.CursorTop); Console.WriteLine(s); } }
private bool GetGoal() { while (true) { ShowOnConsole("your monthly goal(km)"); Goal = CheckData.ChengeDot(Console.ReadLine()); if (!CheckEsc(Goal)) { return(false); } if (CheckRegister.CheckFloat(Goal)) { return(true); } Console.Clear(); string s = "Goal must be bigger than 0."; int middle = (Console.WindowWidth - s.Length) / 2; Console.SetCursorPosition(middle, Console.CursorTop); Console.WriteLine(s); } }