static void Main(string[] args) { ConsoleGrapher.init(100, 20, new string[0]); PseudoViewModel model = new PseudoViewModel(); model.EnableActions(); }
public void EnableActions() { bool work = true; var popUp = new PopUpMultipleChoise("Select a possible option: ", TextOutputs.printmenu2()); while (work) { //TextOutputs.printmenu(); //int res = Convert.ToInt32(Console.ReadLine()); int res = popUp.pop(); try { if (res >= 0 && res <= 6) { switchfunc(res); } else { throw new IndexOutOfRangeException("not in the range"); } } catch (Exception e) { ConsoleGrapher.clear(); var errorPopUp = new PopUpInfo(e.Message); errorPopUp.pop(); } } }