Example #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (TrackToUpdate != 1)
     {
         if (this.comboBox1.Text.Length > 0)
         {
             DynamicDisplayBuilder.UpdateSPD(TrackToUpdate, this.comboBox1.Text);
         }
         FormMain MainFrame = Application.OpenForms[0] as FormMain;
         MainFrame.UpdateDIsplay();
         this.Close();
     }
 }
Example #2
0
        private void comboBox1_KeyPress(object sender, KeyPressEventArgs e)
        {
            string allowedCharacterSet = "0123456789\b";           //Allowed character set

            if (allowedCharacterSet.Contains(e.KeyChar.ToString()))
            {
            }
            else if (e.KeyChar.ToString() == "\r")
            {
                e.Handled = true;

                if (TrackToUpdate != 1)
                {
                    if (this.comboBox1.Text.Length > 0)
                    {
                        DynamicDisplayBuilder.UpdateSPD(TrackToUpdate, this.comboBox1.Text);
                    }
                    FormMain MainFrame = Application.OpenForms[0] as FormMain;
                    MainFrame.UpdateDIsplay();
                    this.Close();
                }
            }
        }