public static void PointNumber(uint buffer, ContainersCollection containersCollection) { try { switch (ProgramWork.PointType(buffer, containersCollection)) { case 1: Console.WriteLine("Please Write Number Points "); buffer = uint.Parse(Console.ReadLine()); containersCollection.AutoGenereted1DPosition(buffer); break; case 2: Console.WriteLine("Please Write Number Points "); buffer = uint.Parse(Console.ReadLine()); containersCollection.AutoGenereted2DPosition(buffer); break; case 3: Console.WriteLine("Please Write Number Points "); buffer = uint.Parse(Console.ReadLine()); containersCollection.AutoGenereted3DPosition(buffer); break; default: PointNumber(buffer, containersCollection); break; } } catch (ArgumentNullException exp) { Console.WriteLine(exp); PointNumber(buffer, containersCollection); } catch (FormatException exp) { Console.WriteLine(exp); PointNumber(buffer, containersCollection); } }
public static void Dialog(ContainersCollection containersCollection) { string answer; uint buffer = 0; Console.WriteLine("Genereted Collection Automatic? Please Write Y/N"); answer = Console.ReadLine(); if (answer == "y") { containersCollection.Automatic(2, 2, 2, 2); } else if (answer == "n") { ProgramWork.ContainerNumber(buffer, containersCollection); ProgramWork.MatrixNumber(buffer, containersCollection); ProgramWork.PositionNumber(buffer, containersCollection); ProgramWork.PointNumber(buffer, containersCollection); } else { Dialog(containersCollection); } }