示例#1
0
        private void btnCheckOut_Click(object sender, EventArgs e)
        {
            if (_prevPressedButton != null)
            {
                _prevPressedButton.BackColor = _prevPressedButton.DisplayColor;
            }
            CrystalButton btn = sender as CrystalButton;

            if (btn == null)
            {
                return;
            }
            btn.BackColor      = ConstantValuePool.PressedColor;
            _operateType       = ButtonOperateType.CHECKOUT;
            _prevPressedButton = btn;
        }
示例#2
0
        private void btnTurnTable_Click(object sender, EventArgs e)
        {
            _deskName1St          = string.Empty;
            _orderId1St           = Guid.Empty;
            _firstDeskSingleOrder = false;
            if (_prevPressedButton != null)
            {
                _prevPressedButton.BackColor = _prevPressedButton.DisplayColor;
            }
            CrystalButton btn = sender as CrystalButton;

            if (btn == null)
            {
                return;
            }
            btn.BackColor      = ConstantValuePool.PressedColor;
            _operateType       = ButtonOperateType.CHANGE_DESK;
            _prevPressedButton = btn;
        }
示例#3
0
        private void FormDesk_Load(object sender, EventArgs e)
        {
            InitializeRegionDeskButton();
            const int space  = 5;
            const int width  = 75;
            const int height = 28;
            int       px     = this.pnlDesk.Width - 3 * (width + space);
            int       py     = this.pnlDesk.Height - height - space;

            this.btnFreeColor.Width    = width;
            this.btnFreeColor.Height   = height;
            this.btnFreeColor.Location = new Point(px, py);
            px += width + space;
            this.btnTakeColor.Width    = width;
            this.btnTakeColor.Height   = height;
            this.btnTakeColor.Location = new Point(px, py);
            px += width + space;
            this.btnLookColor.Width    = width;
            this.btnLookColor.Height   = height;
            this.btnLookColor.Location = new Point(px, py);

            this.pnlSysTools.Width = this.scrollingText1.Width = this.pnlToolBar.Width;
            int toolsBarNum = 6;

            if (ConstantValuePool.BizSettingConfig.SaleType == ShopSaleType.DineInAndTakeout)
            {
                toolsBarNum++;
            }
            else
            {
                btnTakeOut.Visible = false;
            }
            int btnWidth  = this.pnlSysTools.Width / toolsBarNum;
            int btnHeight = this.pnlSysTools.Height;

            px = 0;
            py = 0;
            btnManager.Size     = new System.Drawing.Size(btnWidth, btnHeight);
            btnManager.Location = new Point(px, py);
            px                   += btnWidth;
            btnOrder.Size         = new System.Drawing.Size(btnWidth, btnHeight);
            btnOrder.Location     = new Point(px, py);
            px                   += btnWidth;
            btnClear.Size         = new System.Drawing.Size(btnWidth, btnHeight);
            btnClear.Location     = new Point(px, py);
            px                   += btnWidth;
            btnTurnTable.Size     = new System.Drawing.Size(btnWidth, btnHeight);
            btnTurnTable.Location = new Point(px, py);
            px                   += btnWidth;
            btnCheckOut.Size      = new System.Drawing.Size(btnWidth, btnHeight);
            btnCheckOut.Location  = new Point(px, py);
            if (ConstantValuePool.BizSettingConfig.SaleType == ShopSaleType.DineInAndTakeout)
            {
                px += btnWidth;
                btnTakeOut.Size     = new System.Drawing.Size(btnWidth, btnHeight);
                btnTakeOut.Location = new Point(px, py);
            }
            px                       += btnWidth;
            btnExit.Size              = new System.Drawing.Size(this.pnlSysTools.Width - px, btnHeight);
            btnExit.Location          = new Point(px, py);
            btnOrder.DisplayColor     = btnOrder.BackColor;
            btnClear.DisplayColor     = btnClear.BackColor;
            btnTurnTable.DisplayColor = btnTurnTable.BackColor;
            btnCheckOut.DisplayColor  = btnCheckOut.BackColor;

            if (RightsItemCode.FindRights(RightsItemCode.TAKEORDER))
            {
                if (_haveDailyClose)
                {
                    btnOrder.BackColor = ConstantValuePool.PressedColor;
                    _operateType       = ButtonOperateType.ORDER;
                    _prevPressedButton = btnOrder;
                }
                else
                {
                    btnOrder.Enabled   = false;
                    btnOrder.BackColor = ConstantValuePool.DisabledColor;
                    _operateType       = ButtonOperateType.NONE;
                }
            }
            else
            {
                btnOrder.Enabled   = false;
                btnOrder.BackColor = ConstantValuePool.DisabledColor;
                _operateType       = ButtonOperateType.NONE;
            }
            if (!RightsItemCode.FindRights(RightsItemCode.CLEARDESK))
            {
                btnClear.Enabled   = false;
                btnClear.BackColor = ConstantValuePool.DisabledColor;
            }
            if (!RightsItemCode.FindRights(RightsItemCode.TURNTABLE))
            {
                btnTurnTable.Enabled   = false;
                btnTurnTable.BackColor = ConstantValuePool.DisabledColor;
            }
            if (!RightsItemCode.FindRights(RightsItemCode.CHECKOUT))
            {
                btnCheckOut.Enabled   = false;
                btnCheckOut.BackColor = ConstantValuePool.DisabledColor;
            }
            string strNotice = string.Empty;

            foreach (Notice item in ConstantValuePool.NoticeList)
            {
                strNotice += item.NoticeContent + "\t\t\t";
            }
            if (!string.IsNullOrEmpty(strNotice))
            {
                scrollingText1.ScrollText = strNotice;
            }

            Thread backWork = new Thread(new ThreadStart(DoWork));

            backWork.IsBackground = true;
            backWork.Start();
        }
示例#4
0
 private void btnCheckOut_Click(object sender, EventArgs e)
 {
     if (_prevPressedButton != null)
     {
         _prevPressedButton.BackColor = _prevPressedButton.DisplayColor;
     }
     CrystalButton btn = sender as CrystalButton;
     if (btn == null) return;
     btn.BackColor = ConstantValuePool.PressedColor;
     _operateType = ButtonOperateType.CHECKOUT;
     _prevPressedButton = btn;
 }
示例#5
0
 private void btnTurnTable_Click(object sender, EventArgs e)
 {
     _deskName1St = string.Empty;
     _orderId1St = Guid.Empty;
     _firstDeskSingleOrder = false;
     if (_prevPressedButton != null)
     {
         _prevPressedButton.BackColor = _prevPressedButton.DisplayColor;
     }
     CrystalButton btn = sender as CrystalButton;
     if (btn == null) return;
     btn.BackColor = ConstantValuePool.PressedColor;
     _operateType = ButtonOperateType.CHANGE_DESK;
     _prevPressedButton = btn;
 }
示例#6
0
        private void FormDesk_Load(object sender, EventArgs e)
        {
            InitializeRegionDeskButton();
            const int space = 5;
            const int width = 75;
            const int height = 28;
            int px = this.pnlDesk.Width - 3 * (width + space);
            int py = this.pnlDesk.Height - height - space;
            this.btnFreeColor.Width = width;
            this.btnFreeColor.Height = height;
            this.btnFreeColor.Location = new Point(px, py);
            px += width + space;
            this.btnTakeColor.Width = width;
            this.btnTakeColor.Height = height;
            this.btnTakeColor.Location = new Point(px, py);
            px += width + space;
            this.btnLookColor.Width = width;
            this.btnLookColor.Height = height;
            this.btnLookColor.Location = new Point(px, py);

            this.pnlSysTools.Width = this.scrollingText1.Width = this.pnlToolBar.Width;
            int toolsBarNum = 6;
            if (ConstantValuePool.BizSettingConfig.SaleType == ShopSaleType.DineInAndTakeout)
            {
                toolsBarNum++;
            }
            else
            {
                btnTakeOut.Visible = false;
            }
            int btnWidth = this.pnlSysTools.Width / toolsBarNum;
            int btnHeight = this.pnlSysTools.Height;
            px = 0;
            py = 0;
            btnManager.Size = new System.Drawing.Size(btnWidth, btnHeight);
            btnManager.Location = new Point(px, py);
            px += btnWidth;
            btnOrder.Size = new System.Drawing.Size(btnWidth, btnHeight);
            btnOrder.Location = new Point(px, py);
            px += btnWidth;
            btnClear.Size = new System.Drawing.Size(btnWidth, btnHeight);
            btnClear.Location = new Point(px, py);
            px += btnWidth;
            btnTurnTable.Size = new System.Drawing.Size(btnWidth, btnHeight);
            btnTurnTable.Location = new Point(px, py);
            px += btnWidth;
            btnCheckOut.Size = new System.Drawing.Size(btnWidth, btnHeight);
            btnCheckOut.Location = new Point(px, py);
            if (ConstantValuePool.BizSettingConfig.SaleType == ShopSaleType.DineInAndTakeout)
            {
                px += btnWidth;
                btnTakeOut.Size = new System.Drawing.Size(btnWidth, btnHeight);
                btnTakeOut.Location = new Point(px, py);
            }
            px += btnWidth;
            btnExit.Size = new System.Drawing.Size(this.pnlSysTools.Width - px, btnHeight);
            btnExit.Location = new Point(px, py);
            btnOrder.DisplayColor = btnOrder.BackColor;
            btnClear.DisplayColor = btnClear.BackColor;
            btnTurnTable.DisplayColor = btnTurnTable.BackColor;
            btnCheckOut.DisplayColor = btnCheckOut.BackColor;

            if (RightsItemCode.FindRights(RightsItemCode.TAKEORDER))
            {
                if (_haveDailyClose)
                {
                    btnOrder.BackColor = ConstantValuePool.PressedColor;
                    _operateType = ButtonOperateType.ORDER;
                    _prevPressedButton = btnOrder;
                }
                else
                {
                    btnOrder.Enabled = false;
                    btnOrder.BackColor = ConstantValuePool.DisabledColor;
                    _operateType = ButtonOperateType.NONE;
                }
            }
            else
            {
                btnOrder.Enabled = false;
                btnOrder.BackColor = ConstantValuePool.DisabledColor;
                _operateType = ButtonOperateType.NONE;
            }
            if (!RightsItemCode.FindRights(RightsItemCode.CLEARDESK))
            {
                btnClear.Enabled = false;
                btnClear.BackColor = ConstantValuePool.DisabledColor;
            }
            if (!RightsItemCode.FindRights(RightsItemCode.TURNTABLE))
            {
                btnTurnTable.Enabled = false;
                btnTurnTable.BackColor = ConstantValuePool.DisabledColor;
            }
            if (!RightsItemCode.FindRights(RightsItemCode.CHECKOUT))
            {
                btnCheckOut.Enabled = false;
                btnCheckOut.BackColor = ConstantValuePool.DisabledColor;
            }
            string strNotice = string.Empty;
            foreach (Notice item in ConstantValuePool.NoticeList)
            {
                strNotice += item.NoticeContent + "\t\t\t";
            }
            if (!string.IsNullOrEmpty(strNotice))
            {
                scrollingText1.ScrollText = strNotice;
            }

            Thread backWork = new Thread(new ThreadStart(DoWork));
            backWork.IsBackground = true;
            backWork.Start();
        }