public InputValueWindow(object dataContext) { InitializeComponent(); DataContext = dataContext; OkCommand = new MyInputWindowCommand(Ok); CancelCommand = new MyInputWindowCommand(Cancel); OkButton.DataContext = this; CancelButton.DataContext = this; }
public CashRegisterView() { cashRegister = new CashRegister(); MenuChangeItemPriceCommand = new MenuCommand(this, new Action <int>(ChangeMenuItemPrice)); MenuItemDeleteCommand = new MenuCommand(this, RemoveMenuItem); MovePriceCommand = new MenuCommand(this, MoveEnteredPrice); CancelEnteringPriceCommand = new MenuCommand(this, CancelEnteringPrice); DoOrderCommand = new MenuCommand(this, AddCurrentItemToOrder); DeleteCurrentOrderItemCommand = new MenuCommand(this, DeleteCurrentOrderItem); ChangeOrderCommand = new MenuCommand(this, ChangeCurrentOrder); SaveAllCommand = new MyInputWindowCommand(SaveAll); CancelAllCommand = new MyInputWindowCommand(CancelAll); }