コード例 #1
0
        private void cmdStartPurchase_Click(object sender, EventArgs e)
        {
            if (_purchaseTransactionControl != null)
            {
                _purchaseTransactionControl.Show();
                return;
            }

            _purchaseTransactionControl = Program.NinjectKernel.Get <PurchaseTransactionControl>();
            _purchaseTransactionControl.TransactionCanceled  += PurchaseTransactionControl_TransactionCanceled;
            _purchaseTransactionControl.TransactionCompleted += PurchaseTransactionControl_TransactionCompleted;
            pnlUserControl.Controls.Add(_purchaseTransactionControl);
        }
コード例 #2
0
 private void PurchaseTransactionControl_TransactionCanceled(object sender, EventArgs e)
 {
     pnlUserControl.Controls.Remove(_purchaseTransactionControl);
     UnwirePurchaseTransactionControl();
     _purchaseTransactionControl = null;
 }