FsFeatDefnUi provides UI-specific methods for the PartOfSpeech class.
상속: CmObjectUi
예제 #1
0
        /// <summary>
        /// Handle the context menu for inserting an FsFeatDefn.
        /// </summary>
        /// <param name="mediator"></param>
        /// <param name="classId"></param>
        /// <param name="hvoOwner"></param>
        /// <param name="flid"></param>
        /// <param name="insertionPosition"></param>
        /// <returns></returns>
        public new static FsFeatDefnUi CreateNewUiObject(Mediator mediator, int classId, int hvoOwner, int flid, int insertionPosition)
        {
            FsFeatDefnUi ffdUi     = null;
            string       className = "FsClosedFeature";

            if (classId == FsComplexFeatureTags.kClassId)
            {
                className = "FsComplexFeature";
            }
            using (MasterInflectionFeatureListDlg dlg = new MasterInflectionFeatureListDlg(className))
            {
                FdoCache cache = (FdoCache)mediator.PropertyTable.GetValue("cache");
                Debug.Assert(cache != null);
                dlg.SetDlginfo(cache.LanguageProject.MsFeatureSystemOA, mediator, true);
                switch (dlg.ShowDialog((Form)mediator.PropertyTable.GetValue("window")))
                {
                case DialogResult.OK:                         // Fall through.
                case DialogResult.Yes:
                    ffdUi = new FsFeatDefnUi(dlg.SelectedFeatDefn);
                    mediator.SendMessage("JumpToRecord", dlg.SelectedFeatDefn.Hvo);
                    break;
                }
            }
            return(ffdUi);
        }
예제 #2
0
		/// <summary>
		/// Handle the context menu for inserting an FsFeatDefn.
		/// </summary>
		/// <param name="mediator"></param>
		/// <param name="classId"></param>
		/// <param name="hvoOwner"></param>
		/// <param name="flid"></param>
		/// <param name="insertionPosition"></param>
		/// <returns></returns>
		public new static FsFeatDefnUi CreateNewUiObject(Mediator mediator, uint classId, int hvoOwner, int flid, int insertionPosition)
		{
			FsFeatDefnUi ffdUi = null;
			string className = "FsClosedFeature";
			if (classId == FDO.Cellar.FsComplexFeature.kClassId)
				className = "FsComplexFeature";
			using (MasterInflectionFeatureListDlg dlg = new MasterInflectionFeatureListDlg(className))
			{
				FdoCache cache = (FdoCache)mediator.PropertyTable.GetValue("cache");
				Debug.Assert(cache != null);
				dlg.SetDlginfo(cache.LangProject.MsFeatureSystemOA, mediator, true);
				switch (dlg.ShowDialog((Form)mediator.PropertyTable.GetValue("window")))
				{
					case DialogResult.OK: // Fall through.
					case DialogResult.Yes:
						ffdUi = new FsFeatDefnUi(dlg.SelectedFeatDefn);
						mediator.SendMessage("JumpToRecord", dlg.SelectedFeatDefn.Hvo);
						break;
				}
			}
			return ffdUi;
		}