public int CreateNewObject(string[] currentObject) { int cont = 0; BCObject newObject = new BCObject(); newObject.Props = new List <string>(); foreach (string prop in currentObject) { if (cont == 0) { newObject.Value = prop; } else if (cont == 1) { newObject.Description = prop; } else { if (prop != "") { newObject.Props.Add(prop); } } cont++; } this.BcObjects.Add(newObject); return(1); }
public string ShowProcess(BCObject obj, string prop) { string response = "s"; Console.WriteLine("Se asume que quieres ver " + obj.Value); if (this.AprovedProps.Count() > 0) { Console.WriteLine("Porque aceptaste sugerencias como : "); foreach (string aprovedProp in this.AprovedProps) { Console.WriteLine(" - " + aprovedProp); } } if (this.RefusedProps.Count() > 0) { Console.WriteLine("Y rechazaste : "); foreach (string refusedProp in this.RefusedProps) { Console.WriteLine(" - " + refusedProp); } } Console.WriteLine("\nEs " + prop + "?"); Console.WriteLine("Ingresa 's' si tu respuesta es si o 'n' para no."); response = Console.ReadLine().ToLower(); return(response); }