コード例 #1
0
 public static OrderPay Create()
 {
     if (op == null || op.IsDisposed)
     {
         op = new OrderPay();
     }
     return(op);
 }
コード例 #2
0
 public static OrderPay GreateOP()
 {
     if (orderPay == null || orderPay.IsDisposed)
     {
         orderPay = new OrderPay();
     }
     return(orderPay);
 }
コード例 #3
0
ファイル: FormFactory.cs プロジェクト: Susilen/Cater
 public static OrderPay CreateOrderPay()
 {
     if (_orderPay == null || _orderPay.IsDisposed)
     {
         _orderPay = new OrderPay();
     }
     return(_orderPay);
 }
コード例 #4
0
ファイル: FormMian.cs プロジェクト: jackcnn/WinformCater
        private void menuOrder_Click(object sender, EventArgs e)
        {
            if (listViewItem.Tag == null)
            {
                MessageBox.Show("请选择需要结账的餐桌");
                return;
            }
            if (listViewItem.ImageIndex == 0)
            {
                MessageBox.Show("此卓还未开单");
                return;
            }
            OrderPay op = OrderPay.Create();

            op.Tag = listViewItem.Tag;
            op.ChangePictureEvent += ChangeFree;
            op.Show();
            op.Focus();
        }
コード例 #5
0
ファイル: MainForm.cs プロジェクト: AlexHung123/Cater
 private void menuOrder_Click(object sender, EventArgs e)
 {
     //判断当前选中的餐桌是否为空闲,如果是空闲则不需要结账
     if (itemTable == null)
     {
         MessageBox.Show("请先选择需要结账的餐桌!再点击结账。");
         return;
     }
     if (itemTable.ImageIndex == 0)
     {
         MessageBox.Show("当前餐桌并没有开单,无需结账!");
     }
     else
     {
         OrderPay op = OrderPay.Create();
         op.Tag = itemTable.Tag;//itemtable里面记录的是餐桌的编号,传递给结账窗口
         op.SetTableFreeEvent += SetTableFree;
         op.Show();
         op.Focus();
     }
 }
コード例 #6
0
        private void menuOrder_Click(object sender, EventArgs e)
        {
            //如果没有餐桌选中,则提示
            if (itemTable == null)
            {
                MessageBox.Show("请选择要结账的餐桌!!!");
                return;
            }
            //判断当前选中的餐桌是否为空闲,如果是不则需要结账
            if (itemTable.ImageIndex == 0)
            {
                MessageBox.Show("当前餐桌并未开单,无需结账!!!");
                return;
            }
            OrderPay orderPay = FormFactory.GreateOP();

            orderPay.Tag = itemTable.Tag;
            orderPay.SetTableFreeEvent += SetTableFree;
            orderPay.Show();
            orderPay.Focus();
        }