示例#1
0
 protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
 {
     if (keyData == Keys.Enter)
     {
         if (!(this.ActiveControl is Button))
         {
             SendKeys.Send("{TAB}");
             return(true);
         }
     }
     if (keyData == Keys.Escape)
     {
         this.btnCancel.PerformClick();
         return(true);
     }
     if (keyData == Keys.F6 && this.form_mode == FORM_MODE.EDIT && this.current_focused_control == this.txtDealer)
     {
         DealerList wind = new DealerList(this.parent_window, this.txtDealer.Text);
         if (wind.ShowDialog() == DialogResult.OK)
         {
             this.txtDealer.Text         = wind.dealer.dealer;
             this.lblDealer_Compnam.Text = wind.dealer.compnam;
             SendKeys.Send("{TAB}");
         }
         return(true);
     }
     return(base.ProcessCmdKey(ref msg, keyData));
 }
        private void btnBrowseDealerTo_Click(object sender, EventArgs e)
        {
            this.txtTo.Focus();
            DealerList wind = new DealerList(new SnWindow(this.main_form), this.txtTo.Text);

            if (wind.ShowDialog() == DialogResult.OK)
            {
                this.txtTo.Text           = wind.dealer.dealer;
                this.txtTo.SelectionStart = this.txtTo.Text.Length;
            }
        }
示例#3
0
 private void btnBrowseDealer_Click(object sender, EventArgs e)
 {
     DealerList wind = new DealerList(this.parent_window, this.txtDealer.Text);
     if (wind.ShowDialog() == DialogResult.OK)
     {
         this.txtDealer.Text = wind.dealer.dealer;
         this.lblDealer_Compnam.Text = wind.dealer.compnam;
         SendKeys.Send("{TAB}");
     }
     else
     {
         this.txtDealer.Focus();
     }
 }
示例#4
0
        private void btnBrowseDealer_Click(object sender, EventArgs e)
        {
            DealerList wind = new DealerList(this.parent_window, this.txtDealer.Text);

            if (wind.ShowDialog() == DialogResult.OK)
            {
                this.txtDealer.Text         = wind.dealer.dealer;
                this.lblDealer_Compnam.Text = wind.dealer.compnam;
                SendKeys.Send("{TAB}");
            }
            else
            {
                this.txtDealer.Focus();
            }
        }
示例#5
0
 protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
 {
     if (keyData == Keys.Enter)
     {
         if (!(this.ActiveControl is Button))
         {
             SendKeys.Send("{TAB}");
             return true;
         }
     }
     if (keyData == Keys.Escape)
     {
         this.btnCancel.PerformClick();
         return true;
     }
     if (keyData == Keys.F6 && this.form_mode == FORM_MODE.EDIT && this.current_focused_control == this.txtDealer)
     {
         DealerList wind = new DealerList(this.parent_window, this.txtDealer.Text);
         if (wind.ShowDialog() == DialogResult.OK)
         {
             this.txtDealer.Text = wind.dealer.dealer;
             this.lblDealer_Compnam.Text = wind.dealer.compnam;
             SendKeys.Send("{TAB}");
         }
         return true;
     }
     return base.ProcessCmdKey(ref msg, keyData);
 }
 private void btnBrowseDealerTo_Click(object sender, EventArgs e)
 {
     this.txtTo.Focus();
     DealerList wind = new DealerList(new SnWindow(this.main_form), this.txtTo.Text);
     if (wind.ShowDialog() == DialogResult.OK)
     {
         this.txtTo.Text = wind.dealer.dealer;
         this.txtTo.SelectionStart = this.txtTo.Text.Length;
     }
 }
示例#7
0
 private void btnBrowseDealer_Click(object sender, EventArgs e)
 {
     DealerList wind = new DealerList(this, this.txtDealer.Texts);
     if (wind.ShowDialog() == DialogResult.OK)
     {
         this.txtDealer.Texts = wind.dealer.dealer;
         this.lblDealer_DealerCompnam.Text = wind.dealer.compnam;
     }
     this.txtDealer.textBox1.Focus();
 }