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

OnDisplayShowCharMap() public method

This method enables the Character Map command if the exe exists in the system dir.
public OnDisplayShowCharMap ( object commandObject, XCore.UIItemDisplayProperties &display ) : bool
commandObject object
display XCore.UIItemDisplayProperties
return bool
		public virtual bool OnDisplayShowCharMap(object commandObject,
			ref UIItemDisplayProperties display)
		{
			CheckDisposed();

			if (MiscUtils.IsUnix)
			{
				// Always enable menu command on Linux. If it's not installed we display an error
				// message when the user tries to launch it. See FWNX-567 for more info.
				display.Enabled = true;
				return true;
			}

			// If we can find the CharMap program, then enable the menu command
			string sysStr = Environment.GetFolderPath(Environment.SpecialFolder.System);
			string charmapPath = sysStr + "\\charmap.exe";
			display.Enabled = System.IO.File.Exists(charmapPath);
			return true;
		}
FwXWindow