//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(); }
//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; }
//initial all base class private void InitialAllClass() { _typeInfo = new TypeInfo(); _itemInfo = new ItemInfo(_typeInfo); _itemOrder = new ItemOrder(_itemInfo); }