Esempio n. 1
0
 public MainForm(CreditCardPaymentForm creditCardPaymentFormData, MainPresentationModel mainPresentationModelData, OrderPresentationModel orderPresentationModelData, OrderModel orderModelData, Model modelData)
 {
     InitializeComponent();
     _creditCardPaymentForm  = creditCardPaymentFormData;
     _mainPresentationModel  = mainPresentationModelData;
     _orderPresentationModel = orderPresentationModelData;
     _orderModel             = orderModelData;
     _model = modelData;
     _orderSystemButton.Click     += ClickOrderSystemButton;
     _inventorySystemButton.Click += ClickInventorySystemButton;
     _exitButton.Click            += ClickExitButton;
     RefreshControls();
 }
Esempio n. 2
0
 public OrderForm(CreditCardPaymentForm creditCardPaymentFormData, OrderPresentationModel orderPresentationModelData, OrderModel orderModelData, Model modelData)
 {
     InitializeComponent(); // [Automatically generated by Windows Form Designer]
     _creditCardPaymentForm  = creditCardPaymentFormData;
     _orderPresentationModel = orderPresentationModelData;
     _orderModel             = orderModelData;
     _model    = modelData;
     _products = _model.Products;
     InitializeProductTabPageItemsContainers();
     // UI
     _creditCardPaymentForm.FormClosed  += CloseCreditCardPaymentForm;
     _cartDataGridView.CellPainting     += CartDataGridViewCellPainting;
     _cartDataGridView.CellContentClick += CartDataGridViewCellContentClick;
     _leftArrowButton.Click             += (sender, events) => GoToPreviousPage();
     _rightArrowButton.Click            += (sender, events) => GoToNextPage();
     _addButton.Click   += ClickAddButton;
     _orderButton.Click += ClickOrderButton;
     _productTabControl.SelectedIndexChanged += (sender, events) => SelectProductTabPage(_productTabControl.SelectedIndex);
     InitializeProductTabPages();
     // Initial UI States
     SelectProductTabPage(AppDefinition.MOTHER_BOARD_INDEX);
     RefreshControls();
 }