示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(CommonLinkUtility.GetHelpLink()))
            {
                return;
            }

            Page.RegisterStyle("~/UserControls/Common/HelpCenter/css/help-center.less");

            string module;
            string mainLink;

            if (Page is Studio.Management)
            {
                module   = "configuration.aspx";
                mainLink = CommonLinkUtility.GetAdministration(ManagementType.HelpCenter);
            }
            else
            {
                var currentModule = GetProduct();
                if (currentModule == null || string.IsNullOrEmpty(currentModule.HelpURL))
                {
                    return;
                }

                module   = currentModule.ProductClassName + ".aspx";
                mainLink = VirtualPathUtility.ToAbsolute(currentModule.HelpURL);
            }

            const string index = "#help";

            HelpLink      = mainLink + index;
            HelpLinkBlock = mainLink + index + "=";

            HelpCenterItems = HelpCenterHelper.GetHelpCenter(module, HelpLinkBlock);

            if (IsSideBar)
            {
                var videoGuidesControl = (VideoGuidesControl)LoadControl(VideoGuidesControl.Location);
                if (HelpCenterItems == null)
                {
                    VideoGuides.Controls.Add(videoGuidesControl);
                }
                else
                {
                    videoGuidesControl.IsSubItem = true;
                    VideoGuidesSubItem.Controls.Add(videoGuidesControl);
                }
            }

            if (MediaViewersPlaceHolder != null)
            {
                MediaViewersPlaceHolder.Controls.Add(LoadControl(MediaPlayer.Location));
            }
        }
        protected void RenderVideoHandlers()
        {
            if (string.IsNullOrEmpty(CommonLinkUtility.GetHelpLink(false)))
            {
                DisableVideo = true;
                return;
            }

            VideoGuideItems = HelpCenterHelper.GetVideoGuides();

            if (VideoGuideItems.Count > 0)
            {
                AjaxPro.Utility.RegisterTypeForAjax(typeof(UserVideoSettings));
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(CommonLinkUtility.GetHelpLink(true)))
            {
                return;
            }

            Page.RegisterStyle("~/usercontrols/common/helpcenter/css/help-center.less");

            string module;
            string mainLink;

            if (Page is Studio.Management)
            {
                module   = "configuration.aspx";
                mainLink = CommonLinkUtility.GetAdministration(ManagementType.HelpCenter);
            }
            else
            {
                var currentModule = GetProduct();
                if (currentModule == null)
                {
                    return;
                }

                module = currentModule.ProductClassName + ".aspx";

                var link = currentModule.StartURL;
                mainLink = VirtualPathUtility.ToAbsolute(link + (link.LastIndexOf("/", StringComparison.Ordinal) == 0 ? "" : "/"));

                if (currentModule.ID != WebItemManager.DocumentsProductID &&
                    currentModule.ID != WebItemManager.MailProductID)
                {
                    mainLink += "help.aspx";
                }
            }
            const string index = "#help";

            HelpLink      = mainLink + index;
            HelpLinkBlock = mainLink + index + "=";

            HelpCenterItems = HelpCenterHelper.GetHelpCenter(module, HelpLinkBlock);
        }
        protected void RenderVideoHandlers()
        {
            var settings = AdditionalWhiteLabelSettings.Instance;

            if (!settings.VideoGuidesEnabled || String.IsNullOrEmpty(settings.VideoGuidesUrl))
            {
                DisableVideo = true;
                return;
            }

            AllVideoLink = CommonLinkUtility.GetRegionalUrl(settings.VideoGuidesUrl, CultureInfo.CurrentCulture.TwoLetterISOLanguageName);

            VideoGuideItems = HelpCenterHelper.GetVideoGuides();

            if (VideoGuideItems.Count > 0)
            {
                AjaxPro.Utility.RegisterTypeForAjax(typeof(UserVideoSettings));
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(CommonLinkUtility.GetHelpLink()))
            {
                return;
            }

            Page.RegisterStyle("~/usercontrols/common/helpcenter/css/help-center.less");

            string module;
            string mainLink;

            if (Page is Studio.Management)
            {
                module   = "configuration.aspx";
                mainLink = CommonLinkUtility.GetAdministration(ManagementType.HelpCenter);
            }
            else
            {
                var currentModule = GetProduct();
                if (currentModule == null || currentModule.HelpURL == null)
                {
                    return;
                }

                module   = currentModule.ProductClassName + ".aspx";
                mainLink = VirtualPathUtility.ToAbsolute(currentModule.HelpURL);
            }

            const string index = "#help";

            HelpLink      = mainLink + index;
            HelpLinkBlock = mainLink + index + "=";

            HelpCenterItems = HelpCenterHelper.GetHelpCenter(module, HelpLinkBlock);
        }