SIL.FieldWorks.XWorks.FwXWindow.OnDisplayInsertLinkToFile C# (CSharp) Method

OnDisplayInsertLinkToFile() public method

Enable the InsertLinkToFile command
public OnDisplayInsertLinkToFile ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool
		public virtual bool OnDisplayInsertLinkToFile(object commandObject,
			ref UIItemDisplayProperties display)
		{
			CheckDisposed();

			bool fAllow = Mediator.PropertyTable.GetBoolProperty("AllowInsertLinkToFile", true);

			if (fAllow)
			{
				display.Enabled = EditingHelper is RootSiteEditingHelper &&
					((RootSiteEditingHelper)EditingHelper).CanInsertLinkToFile();
				display.Visible = true;
			}
			else
			{
				display.Enabled = false;
				display.Visible = false;
			}

			return true;
		}
FwXWindow