示例#1
0
 public MTKTestBDADialog(MTKTestBDA BDAProgrammer) : this()
 {
     InitOnGoing = true;
     BDAProg     = BDAProgrammer;
     BDATextBox.SetTextFromByteArray(BDAProg.BDAddress);
     UseProgrammerCheckBox.Checked = BDAProg.UseProgrammer;
     AutoIncrementCheckBox.Checked = BDAProg.AutoIncrementBDA;
     ProgrammerInfoLabel.Text      = BDAProg.BDAProgrammer.GetDisplayText();
     InitOnGoing = false;
 }
示例#2
0
        private void OKButton_Click(object sender, EventArgs e)
        {
            string temp = "0";

            for (int i = BDATextBox.GetTextWithoutDelimiters().Length; i < 12; i++)
            {
                if (i > BDATextBox.GetTextWithoutDelimiters().Length)
                {
                    temp += "0";
                }
            }
            if (temp.Length > 1)
            {
                BDATextBox.Text = temp + BDATextBox.Text;
            }

            BDAProg.BDAddress        = BDATextBox.ToByteArray();
            BDAProg.UseProgrammer    = UseProgrammerCheckBox.Checked;
            BDAProg.AutoIncrementBDA = AutoIncrementCheckBox.Checked;
            this.DialogResult        = DialogResult.OK;
            this.Close();
        }