SidebarLibrary.Menus.DrawCommand.InternalConstruct C# (CSharp) Method

InternalConstruct() public method

public InternalConstruct ( MenuCommand command, Rectangle drawRect, int row, int col ) : void
command MenuCommand
drawRect System.Drawing.Rectangle
row int
col int
return void
		public void InternalConstruct(MenuCommand command, Rectangle drawRect, int row, int col)
		{
			_row = row;
			_col = col;
			_enabled = command.Enabled;
			_expansion = false;
			_vertSeparator = false;
			_drawRect = drawRect;
			_command = command;

			_chevron = false;

			// Is this MenuCommand a separator?
			_separator = (_command.Text == "-");

			// Does this MenuCommand contain a submenu?
			_subMenu = (_command.MenuCommands.Count > 0);

			// Find position of first mnemonic character
			int position = command.Text.IndexOf('&');

			// Did we find a mnemonic indicator?
			if (position != -1)
			{
				// Must be a character after the indicator
				if (position < (command.Text.Length - 1))
				{
					// Remember the character
					_mnemonic = char.ToUpper(command.Text[position + 1]);
				}
			}
		}