Пример #1
0
 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);
 }
Пример #2
0
        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();
                })
            });
        }
Пример #3
0
 private static void ApplyConsoleProbs(IConsoleProberties probs)
 {
     Console.SetWindowSize(probs.ConsoleWidth, probs.ConsoleHeight);
     Console.BackgroundColor = probs.ConsoleBackColor;
     Console.ForegroundColor = probs.ConsoleFrontColor;
 }
Пример #4
0
 public AbstractConsolePage(ServiceProvider servicePro, IConsoleProberties probs)
 {
     _servicePro = servicePro;
     _page       = _minPage;
     _probs      = probs;
 }