private void TextBox_Press(object sender, KeyPressEventArgs e) { TextBox box = sender as TextBox; if (e.KeyChar == 13) { if (!string.IsNullOrEmpty(box.Text)) { EditorTag tag = box.Tag as EditorTag; Options[tag.KEY] = box.Text; } } }
// private void TextBox_Press(object sender, KeyPressEventArgs e) { TextBox box = sender as TextBox; if (e.KeyChar == 13) { if (!string.IsNullOrEmpty(box.Text)) { if (SelectedItemIndex != -1) { TestItem item = TestItems[SelectedItemIndex] as TestItem; EditorTag tag = box.Tag as EditorTag; item.Options[tag.KEY] = box.Text; } } } }