Exemple #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 = "";
     }
 }
Exemple #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);
            }
        }
Exemple #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);
            }
        }
Exemple #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);
            }
        }
Exemple #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;
 }
Exemple #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;
     }
 }
Exemple #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;
 }