//default constructor
 public MainPresentationModel(ItemInfo itemInfo, TypeInfo typeInfo, ItemOrder itemOrder)
 {
     this._itemInfo  = itemInfo;
     this._itemOrder = itemOrder;
     this._typeInfo  = typeInfo;
     this.InitialItemDictionary();
     this.InitialPageData();
     this.InitialCurrentPage();
 }
예제 #2
0
 //default constructor
 public MainWindow(ItemInfo itemInfo, TypeInfo typeInfo, ItemOrder itemOrder)
 {
     InitializeComponent();
     this._itemInfo      = itemInfo;
     this._itemOrder     = itemOrder;
     this._typeInfo      = typeInfo;
     this._viewModel     = new MainPresentationModel(_itemInfo, _typeInfo, _itemOrder);
     this._paymentDialog = new PaymentDialog();
     this.InitialItemTab();
     this.InitialAllItemButton();
     this.HandleTabIndexChanged(null, null);
     _itemInfo._stockChangeEvent    += this.UpdateStockEvent;
     _itemInfo._itemCreateEvent     += this.HandleItemUpdateEvent;
     _itemInfo._itemDataUpdateEvent += this.HandleItemUpdateEvent;
     _typeInfo._typesUpdateEvent    += this.HandleTypeUpdateEvent;
 }
예제 #3
0
 //initial all base class
 private void InitialAllClass()
 {
     _typeInfo  = new TypeInfo();
     _itemInfo  = new ItemInfo(_typeInfo);
     _itemOrder = new ItemOrder(_itemInfo);
 }