コード例 #1
0
        /// <summary>
        /// SetHelpVisibility Adds the Help actions to the Action Menu
        /// </summary>
        /// <remarks>
        /// </remarks>
        private void SetHelpVisibility()
        {
            //Add Help Menu Action
            ModuleAction helpAction = new ModuleAction(GetNextActionID());

            helpAction.Title           = Localization.GetString(ModuleActionType.ModuleHelp, Localization.GlobalResourceFile);
            helpAction.CommandName     = ModuleActionType.ModuleHelp;
            helpAction.CommandArgument = "";
            helpAction.Icon            = "help.gif";
            helpAction.Url             = Globals.NavigateURL(TabId, "Help", "ctlid=" + ModuleConfiguration.ModuleControlId, "moduleid=" + ModuleId);
            helpAction.Secure          = SecurityAccessLevel.Edit;
            helpAction.Visible         = true;
            helpAction.NewWindow       = false;
            helpAction.UseActionEvent  = true;
            _actions.Add(helpAction);

            //Add OnLine Help Action
            string helpUrl = Globals.GetOnLineHelp(ModuleConfiguration.HelpUrl, ModuleConfiguration);

            if (!Null.IsNull(helpUrl))
            {
                //Add OnLine Help menu action
                helpAction                 = new ModuleAction(GetNextActionID());
                helpAction.Title           = Localization.GetString(ModuleActionType.OnlineHelp, Localization.GlobalResourceFile);
                helpAction.CommandName     = ModuleActionType.OnlineHelp;
                helpAction.CommandArgument = "";
                helpAction.Icon            = "help.gif";
                helpAction.Url             = Globals.FormatHelpUrl(helpUrl, PortalSettings, ModuleConfiguration.FriendlyName);
                helpAction.Secure          = SecurityAccessLevel.Edit;
                helpAction.UseActionEvent  = true;
                helpAction.Visible         = true;
                helpAction.NewWindow       = true;
                _actions.Add(helpAction);
            }
        }
コード例 #2
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// AddHelpActions Adds the Help actions to the Action Menu
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <history>
        ///     [cnurse]	05/12/2005	Documented
        ///     [cnurse]    01/19/2006  Moved from ActionBase
        ///     [cnurse]    12/24/2007  Renamed (from SetHelpVisibility)
        /// </history>
        /// -----------------------------------------------------------------------------
        private void AddHelpActions()
        {
            var helpAction = new ModuleAction(GetNextActionID())
            {
                Title           = Localization.GetString(ModuleActionType.ModuleHelp, Localization.GlobalResourceFile),
                CommandName     = ModuleActionType.ModuleHelp,
                CommandArgument = "",
                Icon            = "action_help.gif",
                Url             = NavigateUrl(TabId, "Help", false, "ctlid=" + Configuration.ModuleControlId, "moduleid=" + ModuleId),
                Secure          = SecurityAccessLevel.Edit,
                Visible         = true,
                NewWindow       = false,
                UseActionEvent  = true
            };

            //Add Help Menu Action
            _moduleGenericActions.Actions.Add(helpAction);

            //Add OnLine Help Action
            string helpURL = Globals.GetOnLineHelp(Configuration.ModuleControl.HelpURL, Configuration);

            if (!string.IsNullOrEmpty(helpURL))
            {
                //Add OnLine Help menu action
                helpAction = new ModuleAction(GetNextActionID())
                {
                    Title           = Localization.GetString(ModuleActionType.OnlineHelp, Localization.GlobalResourceFile),
                    CommandName     = ModuleActionType.OnlineHelp,
                    CommandArgument = "",
                    Icon            = "action_help.gif",
                    Secure          = SecurityAccessLevel.Edit,
                    UseActionEvent  = true,
                    Visible         = true,
                    NewWindow       = true
                };
                var version = Configuration.DesktopModule.Version;
                helpAction.Url = Globals.FormatHelpUrl(helpURL, PortalSettings, Configuration.DesktopModule.FriendlyName, version);
                _moduleGenericActions.Actions.Add(helpAction);
            }
        }