public static void GetVehData(VehCate vehCategs) { var vehInfo = new VehicInfo(); Console.ForegroundColor = ConsoleColor.Green; Console.Write("Please select make number: "); var vehmake = Enum.GetNames(typeof(VehMake)); //Hyundai, Ford, Kia for (var i = 0; i < vehmake.Length; i++) { Console.Write($" {i + 1 }. {vehmake[i]} "); } Console.ResetColor(); Console.WriteLine(); Console.Write("You've entered: "); Console.ForegroundColor = ConsoleColor.Yellow; var cmake = Convert.ToInt32(Console.ReadLine()); var cmakes = (VehMake)Enum.Parse(typeof(VehMake), vehmake[cmake - 1]); vehInfo.Tes(cmakes, vehCategs);//Elantra, Tuson, F150, F250, Rio, Rio5 var model = vehInfo.Model; Console.ResetColor(); Console.ForegroundColor = ConsoleColor.Green; foreach (string str in Enum.GetNames(typeof(VehType)))//Manual, Automatic, TwoWheelDrv, FrWheelDrv { Console.Write(str + ": "); } Console.ResetColor(); Console.WriteLine(); Console.Write("You've entered: "); var cusType = Console.ReadLine(); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("Select Color (Case Sensitive): Red, Gray, and Black"); Console.ResetColor(); Console.Write("You've entered: "); var Vcolor = Console.ReadLine(); vehInfo.CusColor(Vcolor); var vehFactory = VehFactory.VehHistory(vehCategs, cmakes, model: model, color: Vcolor); }
private static void GetVehData(VehCate x, string name) { var vehInfo = new VehicInfo(); Console.ForegroundColor = ConsoleColor.Green; Console.Write("Please select make number: "); var vehmake = Enum.GetNames(typeof(VehMake)); //Hyundai, Ford, Kia for (var i = 0; i < vehmake.Length; i++) { Console.Write($" {i + 1 }. {vehmake[i]} "); } Console.ResetColor(); Console.WriteLine(); Console.Write("You've entered: "); Console.ForegroundColor = ConsoleColor.Yellow; var cmake = Convert.ToInt32(Console.ReadLine()); var cmakes = (VehMake)Enum.Parse(typeof(VehMake), vehmake[cmake - 1]); vehInfo.Tes(cmakes, x);//Elantra, Tuson, F150, F250, Rio, Rio5 var model = vehInfo.Model; Console.ResetColor(); Console.ForegroundColor = ConsoleColor.Green; foreach (string str in Enum.GetNames(typeof(VehType)))//Manual, Automatic, TwoWheelDrv, FrWheelDrv { Console.Write(str + ": "); } Console.ResetColor(); Console.WriteLine(); Console.Write("You've entered: "); var cusType = Console.ReadLine(); Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("Select Color: "); var vehcolor = Enum.GetNames(typeof(VehColor)); // for (var i = 0; i < vehcolor.Length; i++) { Console.Write($" {i + 1 }. {vehcolor[i]} "); } Console.WriteLine(); Console.ResetColor(); Console.Write("You've selected: "); var cColor = Convert.ToInt32(Console.ReadLine()); var cColors = (VehColor)Enum.Parse(typeof(VehColor), vehcolor[cColor - 1]); var Vcolor = new [] { "White", "Red", "Blue", "Black", "Gray" }; if (cColors == VehColor.Black) { var tColor = "Black"; vehInfo.CusColor(tColor); } Console.Write("Enter Customer's Budget: "); var cusbud = Convert.ToDecimal(Console.ReadLine()); //VehFactory.CustomerRecord(name, x, cusbud); var ntest = VehFactory.VehHistory(cate: x, color: cColors, name: name, make: cmakes, model: model); }