public LoadSpinner(int left, int top, IConsoleProberties probs, int delay = 100) { this.left = left; this.top = top; this.delay = delay; this.probs = probs; thread = new Thread(Spin); }
public DepartmentView(ServiceProvider serv, IConsoleProberties probs) : base(serv, probs) { var con = serv.GetService <IDepartmentController>(); Header = "Department"; SetMenu(new List <IAsyncMenuItem> { new StandartMenuItem("Create Department", async() => { DrawHeader(); con.Create(); AwaitInput(); }), new StandartMenuItem("Update Department name", async() => { DrawHeader(); con.UpdateName(); AwaitInput(); }), new StandartMenuItem("Update Department MgrSSN", async() => { DrawHeader(); con.UpdateMgr(); AwaitInput(); }), new StandartMenuItem("Delete Department", async() => { DrawHeader(); con.Delete(); AwaitInput(); }), new StandartMenuItem("Get Department", async() => { DrawHeader(); con.Read(); AwaitInput(); }), new StandartMenuItem("Get All Department", async() => { DrawHeader(); con.ReadALL(); AwaitInput(); }) }); }
private static void ApplyConsoleProbs(IConsoleProberties probs) { Console.SetWindowSize(probs.ConsoleWidth, probs.ConsoleHeight); Console.BackgroundColor = probs.ConsoleBackColor; Console.ForegroundColor = probs.ConsoleFrontColor; }
public AbstractConsolePage(ServiceProvider servicePro, IConsoleProberties probs) { _servicePro = servicePro; _page = _minPage; _probs = probs; }