コード例 #1
0
 /// <summary>
 /// Constructor for form, is passed the database and 2 delegates as fields
 /// </summary>
 /// <param name="model">the transaction database model passed to this form</param>
 /// <param name="mt">the delegate to add a transaction to the model</param>
 /// <param name="ai">the delegate to add an item to a transaction</param>
 public CashierUI(TransactionDatabase model, MakeTransaction mt, AddItem ai)
 {
     InitializeComponent();
     database       = model;
     AddItem        = ai;
     AddTransaction = mt;
 }
コード例 #2
0
 private void MakeTransactionToolStripMenuItemClick(object sender, EventArgs e)
 {
     MakeTransaction?.Invoke(sender, e);
     RefreshNeeded?.Invoke(sender, e);
 }
コード例 #3
0
 private void MakeTransactionButtonClick(object sender, EventArgs e)
 {
     MakeTransaction?.Invoke(sender, e);
     RefreshNeeded?.Invoke(sender, e);
 }
コード例 #4
0
 public ConsoleUI(TransactionDatabase transactionModel, MakeTransaction mt, AddItem ai)
 {
     TDB            = transactionModel;
     AddItem        = ai;
     AddTransaction = mt;
 }