开发者

what knid of usage " [MenuAction("apply", "global-menus/MenuTools/MenuToolsMyTools/Tool1", "Apply")]"?

MenuAction,ButtonAction,... etc why i need this type usage. i really what it is [ButtonAction("apply", "global-toolbars/ToolbarMyTools/Tool1", "Apply"开发者_如何学Python)]. Can you give me some tips or advise or site link. i don't really know [Myclass]. is it 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")]


These are Attributes - they don't do anything by themselves, but you can approach them by using Reflection.

There probably is some framework-type of thing that parses these attributes and creates the menus and tooltips for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜