Exemplo n.º 1
0
        static string FormatItemInfo(SystemMenuItemInfo info)
        {
            return($@"Id: {info.Id}
Text: {info.Text}
Type: {info.Type}
Checked: {info.Checked}
Enabled: {info.Enabled}
Shortcut: {TypeDescriptor.GetConverter(typeof(Keys)).ConvertToString((Keys)info.Shortcut)}
ParentMenuHandle: {info.ParentMenuHandle}
SubMenuHandle: {info.SubMenuHandle}");
        }
Exemplo n.º 2
0
 void WriteItemInfo(SystemMenuItemInfo info)
 {
     WriteMessage(info == null ? "项不存在!" : FormatItemInfo(info));
 }