Headword theHeadword; // A reference to the headword in the main program. #endregion Fields #region Constructors public DefinitionForm(DictionaryForm dictionaryEditorForm, String strHeadword) { InitializeComponent(); theHeadword = dictionaryEditorForm.Headword; tb_Headword.Text = strHeadword; // Create a new Definition with the a new ID number; definition = new Definition(theHeadword.Definitions.Count + 1); // If the user selected a POS for the headword use it. if (dictionaryEditorForm.CB_PartOfSpeech.Text != "") cb_POS.SelectedIndex = dictionaryEditorForm.CB_PartOfSpeech.SelectedIndex; }
Headword theHeadword; // A reference to the headword in the main program. public DefinitionForm(DictionaryForm dictionaryEditorForm, String strHeadword) { InitializeComponent(); theHeadword = dictionaryEditorForm.Headword; tb_Headword.Text = strHeadword; // Create a new Definition with the a new ID number; definition = new Definition(theHeadword.Definitions.Count + 1); // If the user selected a POS for the headword use it. if (dictionaryEditorForm.CB_PartOfSpeech.Text != "") { cb_POS.SelectedIndex = dictionaryEditorForm.CB_PartOfSpeech.SelectedIndex; } }