//============================================================================*
        // SetInitialFocus()
        //============================================================================*

        private void SetInitialFocus()
        {
            if (SourceComboBox.BackColor == Color.LightPink)
            {
                SourceComboBox.Focus();
            }
            else
            {
                if (BarrelLengthTextBox.BackColor == Color.LightPink)
                {
                    BarrelLengthTextBox.Focus();
                }
                else
                {
                    if (TwistTextBox.BackColor == Color.LightPink)
                    {
                        TwistTextBox.Focus();
                    }
                    else
                    {
                        if (MuzzleVelocityTextBox.BackColor == Color.LightPink)
                        {
                            MuzzleVelocityTextBox.Focus();
                        }
                        else
                        {
                            if (PressureTextBox.BackColor == Color.LightPink)
                            {
                                PressureTextBox.Focus();
                            }
                            else
                            {
                                if (BestGroupTextBox.BackColor == Color.LightPink)
                                {
                                    BestGroupTextBox.Focus();
                                }
                                else
                                {
                                    if (BestGroupRangeTextBox.BackColor == Color.LightPink)
                                    {
                                        BestGroupRangeTextBox.Focus();
                                    }
                                    else
                                    {
                                        TestDatePicker.Focus();
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Exemple #2
0
 private void DefaultComponentState()
 {
     SourceComboBox.SelectedIndex   = 0;
     TargetComboBox.SelectedIndex   = 1;
     CommandComboBox.SelectedIndex  = 1;
     ModifierComboBox.SelectedIndex = 0;
     PayloadTextbox.Clear();
     PayloadTextbox.Enabled = false;
     BrowseButton.Enabled   = false;
     UpdatePacketPreview();
     SourceComboBox.Focus();
 }