private void buttonHdlcEncode_Click(object sender, EventArgs e) { string gap; if (checkBoxGap.Checked) { gap = " "; } else { gap = ""; } byte[] data; data = getInputBytes(); if (data == null) { return; } byte[] hdlc = Assist.HdlcEncode(data); textBoxInput.Text = Assist.ToHexString(hdlc, gap); currentCode = CODE_HEX; radioButtonHex.Checked = true; }