SIL.FieldWorks.Common.Framework.DetailControls.StTextSlice.OnDisplayAddToLexicon C# (CSharp) Method

OnDisplayAddToLexicon() public method

public OnDisplayAddToLexicon ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool
		public bool OnDisplayAddToLexicon(object commandObject,
			ref UIItemDisplayProperties display)
		{
			display.Visible = true;
			display.Enabled = false;
			// Enable the command if the selection exists, we actually have a word, and it's in
			// the default vernacular writing system.
			int ichMin;
			int ichLim;
			int hvo;
			int tag;
			int ws;
			ITsString tss;
			GetWordLimitsOfSelection(out ichMin, out ichLim, out hvo, out tag, out ws, out tss);
			if (ws == 0)
				ws = GetWsFromString(tss, ichMin, ichLim);
			if (ichLim > ichMin && ws == m_cache.DefaultVernWs)
				display.Enabled = true;
			return true;
		}