예제 #1
0
        private void txtPinyin_TextChanged(object sender, System.EventArgs e)
        {
            try
            {
                if (this.txtPinyin.Text.Equals(""))
                {
                    return;
                }
                //dish.functions.CommValidate cv = new dish.functions.CommValidate();
                //string sql = "";
                string currentSearchType = "";

                DataTable dt = null;
                if (!Information.IsNumeric(this.txtPinyin.Text))
                {
                    if (!this.txtPinyin.Text.Equals(""))
                    {
                        //dt = new MenuManage().GetMenuInfoBySearchCondition(this.txtPinyin.Text);
                    }
                }
                else
                {
                    currentSearchType = "pinyin";
                    //dt = new MenuManage().GetMenuInfoBySearchCondition(this.txtPinyin.Text, true);
                }

                if (dt != null)
                {
                    this.BindDishCard(dt);
                }

                if (!this.dishCards[0].DishName.Equals("") && this.dishCards[1].DishName.Equals(""))
                {
                    this.DishCards_Click(this.dishCards[0].lblDishName, null);
                    if (this.frmPinyinAndCode == null)
                    {
                        this.frmPinyinAndCode = new frmPinyinAndCode();
                    }
                    this.frmPinyinAndCode.txtControl.Text = "";
                    this.txtPinyin.Text = string.Empty;
                    this.txtPinyin.Focus();
                }
            }
            catch (Exception ex)
            {
                MessageBox2.Show(ex.ToString());

                LoggerManager.GetILog().Error(ex.StackTrace);
            }
        }
예제 #2
0
        private void rbtnHand_Click(object sender, EventArgs e)
        {
            this.pnlHandWritten.Visible = !this.pnlHandWritten.Visible;

            if (frmPinyinAndCode == null)
            {
                frmPinyinAndCode = new frmPinyinAndCode(this);
            }

            if (this.frmPinyinAndCode.Visible)
            {
                this.frmPinyinAndCode.Visible = false;
            }
            if (this.pnlHandWritten.Visible)
            {
                this.txtHandWrite.Focus();
            }
        }
예제 #3
0
        //private void timer2_Tick(object sender, EventArgs e)
        //{
        //    this.BindData();

        //    Action<object, EventArgs> action = new Action<object, EventArgs>(Restore);
        //    action.Invoke(null, null);
        //}

        private void rbtnPyCode_Click(object sender, EventArgs e)
        {
            if (!visiual)
            {
                if (frmPinyinAndCode == null)
                {
                    frmPinyinAndCode = new frmPinyinAndCode(this);
                }
                frmPinyinAndCode.txtControl.Text = "";
                frmPinyinAndCode.targetTextBox   = this.txtPinyin;
                frmPinyinAndCode.Left            = 350;

                frmPinyinAndCode.Top = 508;

                frmPinyinAndCode.Focus();
                frmPinyinAndCode.Show();
                visiual = true;
            }
            else
            {
                visiual = false;
                frmPinyinAndCode.Hide();
            }
        }