public View() { Console.WriteLine ("Czy chcesz utworyć nowy projekt? Y/N"); string ans = Console.ReadLine (); if (ans == "y" || ans == "Y") { Console.WriteLine ("Podaj Nazwę(sciezke) pliku:"); string filePath = Console.ReadLine (); StreamWriter sw = new StreamWriter (filePath, false); sw.Close (); C = new Controller(filePath); Console.Write(">>:"); } else { string filePath; while(true) { Console.WriteLine("Podaj Sciezke do istniejącego pliku:"); filePath = Console.ReadLine(); if(File.Exists(filePath)) break; else if(filePath == "exit") throw new Exception("exit"); else Console.WriteLine("Nie Poprawna sciezka!!"); } C = new Controller(filePath); Console.Write(">>:"); } }
public CommandCD(Model mod, Controller con) : base("cd", "przechodzenie do kolejnego wezla: cd <nazwa>",1) { this.mod = mod; this.con = con; }
public CommandPRGS(Model mod, Controller conductor) : base("prgs", "wyswietlanie postępu", 0) { this.mod = mod; this.conductor = conductor; this.progressSum = 0; this.numberOfNodes = 0; }
public CommandADD(Model mod, Controller con) : base("add", "dodawanie nowego podwezla: add <nazwa>", 1) { this.mod = mod; this.con = con; }
public CommandLS(Controller conductor) : base("ls", "wyswietlanie podwezlow", 0) { this.conductor = conductor; }
public CommandHELP(Controller con) : base("help", "wyswietlanie wszystkich komend", 0) { this.con = con; }
public CommandDEL(Model mod, Controller con) : base("del", "usuwanie podwezla: del <nazwa>", 1) { this.mod = mod; this.con = con; }
public CommandCS(Model mod, Controller con) : base("cs", "zmiana stanu podwezla: cs <nazwa zmienianego> <uncompleted/completed>", 2) { this.mod = mod; this.con = con; }
public CommandCN(Model mod, Controller con) : base("cn", "zmiana nazwy podwezla: cn <nazwa zmienianego> <nazwa na ktora chcemy zmienic>", 2) { this.mod = mod; this.con = con; }