Esempio n. 1
0
 /// <summary>
 ///删除键按下
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CardKeyBoardBtnX_PreviewMouseDown(object sender, EventArgs e, CardKeyBoardButton cardKeyBoardButton)
 {
     if (tb != null)
     {
         tb.Text = "";
     }
 }
Esempio n. 2
0
        /// <summary>
        /// 数字禁用非禁用切换
        /// </summary>
        private void SetW1()
        {
            this.w1.Children.Clear();
            foreach (var item in cardKeyBoardLine1)
            {
                cardKeyBoardButton = new CardKeyBoardButton(item);

                if (boardType == "1")
                {
                    cardKeyBoardButton.Btn_Enabled = "False";
                }
                else
                {
                    cardKeyBoardButton.BtnPreviewKeyDown += new CardKeyBoardButton.EventHandler(this.CardKeyBoardBtnWord_PreviewMouseDown);
                }
                this.w1.Children.Add(cardKeyBoardButton);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 车牌数字字母键盘初始化
        /// </summary>
        private void CardKeyBoardAlphanumericInit()
        {
            foreach (var item in cardKeyBoardLine2)
            {
                cardKeyBoardButton = new CardKeyBoardButton(item);

                if (item == "I" || item == "O")
                {
                    cardKeyBoardButton.Btn_Enabled = "False";
                }
                else
                {
                    cardKeyBoardButton.BtnPreviewKeyDown += new CardKeyBoardButton.EventHandler(this.CardKeyBoardBtnWord_PreviewMouseDown);
                }
                this.w2.Children.Add(cardKeyBoardButton);
            }
            foreach (var item in cardKeyBoardLine3)
            {
                cardKeyBoardButton = new CardKeyBoardButton(item);
                cardKeyBoardButton.BtnPreviewKeyDown += new CardKeyBoardButton.EventHandler(this.CardKeyBoardBtnWord_PreviewMouseDown);

                this.w3.Children.Add(cardKeyBoardButton);
            }
            foreach (var item in cardKeyBoardLine4)//特殊按钮设置
            {
                if (item == "Del")
                {
                    cardKeyBoardButton = new CardKeyBoardButton(item);
                    cardKeyBoardButton.BtnPreviewKeyDown += new CardKeyBoardButton.EventHandler(this.CardKeyBoardBtnX_PreviewMouseDown);
                }
                else if (item == "收起")
                {
                    cardKeyBoardButton = new CardKeyBoardButton(item);
                    cardKeyBoardButton.BtnPreviewKeyDown += new CardKeyBoardButton.EventHandler(this.CardKeyBoardBtnPackUp_PreviewMouseDown);
                }
                else
                {
                    cardKeyBoardButton = new CardKeyBoardButton(item);
                    cardKeyBoardButton.BtnPreviewKeyDown += new CardKeyBoardButton.EventHandler(this.CardKeyBoardBtnWord_PreviewMouseDown);
                }
                this.w4.Children.Add(cardKeyBoardButton);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 车牌省键盘初始化
        /// </summary>
        private void CardKeyBoardProvinceInit()
        {
            foreach (var item in cardKeyBoardLine1)
            {
                cardKeyBoardButton = new CardKeyBoardButton(item);
                cardKeyBoardButton.BtnPreviewKeyDown += new CardKeyBoardButton.EventHandler(this.CardKeyBoardBtnWord_PreviewMouseDown);

                this.w1.Children.Add(cardKeyBoardButton);
            }
            foreach (var item in cardKeyBoardLine2)
            {
                cardKeyBoardButton = new CardKeyBoardButton(item);
                cardKeyBoardButton.BtnPreviewKeyDown += new CardKeyBoardButton.EventHandler(this.CardKeyBoardBtnWord_PreviewMouseDown);

                this.w2.Children.Add(cardKeyBoardButton);
            }
            foreach (var item in cardKeyBoardLine3)
            {
                cardKeyBoardButton = new CardKeyBoardButton(item);
                cardKeyBoardButton.BtnPreviewKeyDown += new CardKeyBoardButton.EventHandler(this.CardKeyBoardBtnWord_PreviewMouseDown);

                this.w3.Children.Add(cardKeyBoardButton);
            }
            foreach (var item in cardKeyBoardLine4)//特殊按钮设置
            {
                if (item == "Del")
                {
                    cardKeyBoardButton = new CardKeyBoardButton(item);
                    cardKeyBoardButton.BtnPreviewKeyDown += new CardKeyBoardButton.EventHandler(this.CardKeyBoardBtnX_PreviewMouseDown);
                }
                else if (item == "收起")
                {
                    cardKeyBoardButton = new CardKeyBoardButton(item);
                    cardKeyBoardButton.BtnPreviewKeyDown += new CardKeyBoardButton.EventHandler(this.CardKeyBoardBtnPackUp_PreviewMouseDown);
                }
                else
                {
                    cardKeyBoardButton = new CardKeyBoardButton(item);
                    cardKeyBoardButton.BtnPreviewKeyDown += new CardKeyBoardButton.EventHandler(this.CardKeyBoardBtnWord_PreviewMouseDown);
                }
                this.w4.Children.Add(cardKeyBoardButton);
            }
        }
Esempio n. 5
0
 /// <summary>
 ///收起键按下
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CardKeyBoardBtnPackUp_PreviewMouseDown(object sender, EventArgs e, CardKeyBoardButton cardKeyBoardButton)
 {
     BoardAlphanumeric.Visibility = Visibility.Collapsed;
 }
Esempio n. 6
0
 /// <summary>
 ///非功能键按下
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CardKeyBoardBtnWord_PreviewMouseDown(object sender, EventArgs e, CardKeyBoardButton cardKeyBoardButton)
 {
     if (tb != null)
     {
         tb.Text = cardKeyBoardButton.BtnValue;
     }
 }
Esempio n. 7
0
 /// <summary>
 ///收起键按下
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CardKeyBoardBtnPackUp_PreviewMouseDown(object sender, EventArgs e, CardKeyBoardButton cardKeyBoardButton)
 {
     this.BoardProvince.Visibility = Visibility.Collapsed;
 }