protected override void HandleChooser() { // grammar/phonemes/phonological features/[...] (click chooser button) using (PhonologicalFeatureChooserDlg dlg = new PhonologicalFeatureChooserDlg()) { IFsFeatStruc originalFs = null; Slice parentSlice = Slice; int parentSliceClass = parentSlice.Object.ClassID; int owningFlid = (parentSlice as PhonologicalFeatureListDlgLauncherSlice).Flid; switch (parentSliceClass) { case PhPhonemeTags.kClassId: IPhPhoneme phoneme = parentSlice.Object as IPhPhoneme; if (phoneme.FeaturesOA != null) { originalFs = phoneme.FeaturesOA; } break; case PhNCFeaturesTags.kClassId: IPhNCFeatures features = parentSlice.Object as IPhNCFeatures; if (features.FeaturesOA != null) { originalFs = features.FeaturesOA; } break; } if (originalFs == null) { dlg.SetDlgInfo(m_cache, m_mediator, parentSlice.Object, owningFlid); } else { dlg.SetDlgInfo(m_cache, m_mediator, originalFs); } DialogResult result = dlg.ShowDialog(parentSlice.FindForm()); if (result == DialogResult.OK) { if (dlg.FS != null) { m_obj = dlg.FS; m_PhonologicalFeatureListDlgLauncherView.UpdateFS(dlg.FS); } } else if (result != DialogResult.Cancel) { dlg.HandleJump(); } } }
protected override void HandleChooser() { // grammar/phonemes/phonological features/[...] (click chooser button) using (PhonologicalFeatureChooserDlg dlg = new PhonologicalFeatureChooserDlg()) { IFsFeatStruc originalFs = null; Slice parentSlice = Slice; int parentSliceClass = parentSlice.Object.ClassID; int owningFlid = (parentSlice as PhonologicalFeatureListDlgLauncherSlice).Flid; switch (parentSliceClass) { case PhPhonemeTags.kClassId: IPhPhoneme phoneme = parentSlice.Object as IPhPhoneme; if (phoneme.FeaturesOA != null) originalFs = phoneme.FeaturesOA; break; case PhNCFeaturesTags.kClassId: IPhNCFeatures features = parentSlice.Object as IPhNCFeatures; if (features.FeaturesOA != null) originalFs = features.FeaturesOA; break; } if (originalFs == null) dlg.SetDlgInfo(m_cache, m_mediator, parentSlice.Object, owningFlid); else dlg.SetDlgInfo(m_cache, m_mediator, originalFs); DialogResult result = dlg.ShowDialog(parentSlice.FindForm()); if (result == DialogResult.OK) { if (dlg.FS != null) { m_obj = dlg.FS; m_PhonologicalFeatureListDlgLauncherView.UpdateFS(dlg.FS); } } else if (result != DialogResult.Cancel) { dlg.HandleJump(); } } }