Esempio n. 1
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;
        }
Esempio n. 2
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);
        }
Esempio n. 3
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)));
        }
Esempio n. 4
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)));
 }
Esempio n. 5
0
 public CategoryTab(DataService Service, SetTab SetTab)
     : base(Service, SetTab, typeof(GoodCategory))
 {
     TopButtons.Add(new Button("Add", ConsoleKey.F7, new Button.ButtonCallback(AddItem)));
 }