private void btnOK_Click(object sender, EventArgs e) { if (editing == false) { this.constantElement = new TElement_Constant(tbConstantName.Text, CVRT.getBytes(tbCharacterInput.Text)); } else { constantElement.elementName = tbConstantName.Text; constantElement.elementBytes = CVRT.getBytes(tbCharacterInput.Text); //this.constName = tbConstantName.Text; //this.characters = CVRT.GetBytes(tbCharacterInput.Text); } this.DialogResult = DialogResult.OK; }
public CharEntry(TElement_Constant te) //pass a character TElement to this to begin in edit mode { InitializeComponent(); editing = true; if (te != null) { constantElement = te; characters = te.elementBytes; constName = te.elementName; this.tbCharacterInput.Text = te.elementTextBytes; this.tbConstantName.Text = te.elementName; } else { MessageBox.Show("te incoming was null"); } }