Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 什么样的用法;[MenuAction(“应用”、“全局菜单/MenuTools/MenuToolsMyTools/Tool1”、“应用”);?_C#_.net_Visual Studio_C# 3.0 - Fatal编程技术网

C# 什么样的用法;[MenuAction(“应用”、“全局菜单/MenuTools/MenuToolsMyTools/Tool1”、“应用”);?

C# 什么样的用法;[MenuAction(“应用”、“全局菜单/MenuTools/MenuToolsMyTools/Tool1”、“应用”);?,c#,.net,visual-studio,c#-3.0,C#,.net,Visual Studio,C# 3.0,菜单操作,按钮操作,。。。等我为什么需要这种类型的用法。我真的知道它是什么[按钮操作(“应用”,“全局工具栏/工具栏我的工具/工具1”,“应用”)]。你能给我一些提示或建议或网站链接。我真的不知道[我的班级]。是AOP吗 [MenuAction("apply", "global-menus/MenuTools/MenuToolsMyTools/Tool1", "Apply")] // Declares a toolbar button action with action ID "a

菜单操作,按钮操作,。。。等我为什么需要这种类型的用法。我真的知道它是什么[按钮操作(“应用”,“全局工具栏/工具栏我的工具/工具1”,“应用”)]。你能给我一些提示或建议或网站链接。我真的不知道[我的班级]。是AOP吗

 [MenuAction("apply", "global-menus/MenuTools/MenuToolsMyTools/Tool1", "Apply")]

    // Declares a toolbar button action with action ID "apply"
    // TODO: Change the action path hint to your desired toolbar path, or
    // remove this attribute if you do not want to create a toolbar button for this tool
    [ButtonAction("apply", "global-toolbars/ToolbarMyTools/Tool1", "Apply")]

    // Specifies tooltip text for the "apply" action
    // TODO: Replace tooltip text
    [Tooltip("apply", "Place tooltip text here")]

    // Specifies icon resources to use for the "apply" action
    // TODO: Replace the icon resource names with your desired icon resources
    [IconSet("apply", IconScheme.Colour, "Icons.Tool1Small.png", "Icons.Tool1Medium.png", "Icons.Tool1Large.png")]

    // Specifies that the enablement of the "apply" action in the user-interface
    // is controlled by observing a boolean property named "Enabled", listening to
    // an event named "EnabledChanged" for changes to this property
    [EnabledStateObserver("apply", "Enabled", "EnabledChanged")]

这些是属性-它们本身不做任何事情,但是您可以通过使用反射来接近它们


可能有某种框架类型的东西可以解析这些属性,并为您创建菜单和工具提示。

您能提供一些详细信息、示例或链接吗?以下是MSDN教程,它围绕一个示例进行了解释: