Exemplo n.º 1
0
 public Tab(DataService Service, SetTab SetTab)
 {
     TopButtons = new List <Button>();
     TopButtons.Add(new Button(ConsoleKey.UpArrow, MoveCursorTop));
     TopButtons.Add(new Button(ConsoleKey.DownArrow, MoveCursorDown));
     Updated        = false;
     SetTabDelegate = SetTab;
     this.Service   = Service;
 }
Exemplo n.º 2
0
        public EditProvideGoodsTab(DataService Service, SetTab SetTab, DataEditTab PrevTab, List <TabListElement> content, Guid ObjectId)
            : base(Service, SetTab)
        {
            this.PrevTab  = PrevTab;
            this.ObjectId = ObjectId;

            TopButtons.Add(new Button("Back", ConsoleKey.F1, new Button.ButtonCallback(Close)));
            TopButtons.Add(new Button(ConsoleKey.Backspace, new Button.ButtonCallback(Close)));

            TopButtons.Add(new Button("Check", ConsoleKey.F2, new Button.ButtonCallback(CheckElement)));
            TopButtons.Add(new Button(ConsoleKey.Enter, new Button.ButtonCallback(CheckElement)));

            Elements = content;
        }
Exemplo n.º 3
0
        public UIMain()
        {
            SetTabDelegate = SetTab;
            Service        = new DataService();

            TopButtons = new List <Button>();
            TopButtons.Add(new Button("Good", ConsoleKey.F1, new Button.ButtonCallback(OpenGoodsTub), true));
            TopButtons.Add(new Button("Category", ConsoleKey.F2, new Button.ButtonCallback(OpenCategoryTab), true));
            TopButtons.Add(new Button("Provider", ConsoleKey.F3, new Button.ButtonCallback(OpenProvidersTab), true));

            SetTabDelegate = SetTab;
            SetTab(null);

            Console.CursorVisible = false;
        }
Exemplo n.º 4
0
        public DataTab(DataService Service, SetTab SetTab, Type type)
            : base(Service, SetTab)
        {
            ObjectsType = type;

            Button.ButtonCallback OpenCallBack = new Button.ButtonCallback(OpenItemFromActiveElement);
            TopButtons.Add(new Button(ConsoleKey.Enter, OpenCallBack));
            TopButtons.Add(new Button(ConsoleKey.LeftArrow, TopPanelMoveLeft));
            TopButtons.Add(new Button(ConsoleKey.RightArrow, TopPanelMoveRight));
            TopButtons.Add(new Button("Open", ConsoleKey.F5, OpenCallBack));
            TopButtons.Add(new Button("Remove", ConsoleKey.F6, new Button.ButtonCallback(RemoveItem)));

            TopPanelInitialize();
            UpdateElements();
            SetTopPanelCursor(0);
        }
Exemplo n.º 5
0
        public DataEditTab(DataService Service, SetTab SetTab, DataTab DataTab, Guid ObjectGuid, Type ObjectsType)
            : base(Service, SetTab)
        {
            this.ObjectsType = ObjectsType;
            object obj = Service.GetItem(ObjectsType, ObjectGuid);

            SetTabDelegate = SetTab;
            this.DataTab   = DataTab;
            PrevTab        = DataTab;
            EditObjectGuid = ObjectGuid;

            TopButtons.Add(new Button("Back", ConsoleKey.F1, new Button.ButtonCallback(Close)));
            TopButtons.Add(new Button(ConsoleKey.Backspace, new Button.ButtonCallback(Close)));

            TopButtons.Add(new Button("Edit", ConsoleKey.F2, new Button.ButtonCallback(EditObjectField)));
            TopButtons.Add(new Button(ConsoleKey.Enter, new Button.ButtonCallback(EditObjectField)));
        }
Exemplo n.º 6
0
 public ProvidersTab(DataService Service, SetTab SetTab)
     : base(Service, SetTab, typeof(GoodsProvider))
 {
     TopButtons.Add(new Button("Add", ConsoleKey.F7, new Button.ButtonCallback(AddItem)));
     TopButtons.Add(new Button("Search", ConsoleKey.F8, new Button.ButtonCallback(Search)));
 }
Exemplo n.º 7
0
 public CategoryTab(DataService Service, SetTab SetTab)
     : base(Service, SetTab, typeof(GoodCategory))
 {
     TopButtons.Add(new Button("Add", ConsoleKey.F7, new Button.ButtonCallback(AddItem)));
 }