示例#1
0
        private OwaHelpUrlData ReadAggregatedOwaHelpUrlData(UserConfigurationManager.IAggregationContext ctx, CultureInfo cultureInfo, OwaIdentity mailboxIdentity, UserAgent userAgent)
        {
            return(UserContextUtilities.ReadAggregatedType <OwaHelpUrlData>(ctx, "OWA.OwaHelpUrlData", delegate
            {
                HelpProvider.RenderingMode mode = HelpProvider.RenderingMode.Mouse;
                switch (userAgent.Layout)
                {
                case LayoutType.TouchNarrow:
                    mode = HelpProvider.RenderingMode.TNarrow;
                    break;

                case LayoutType.TouchWide:
                    mode = HelpProvider.RenderingMode.TWide;
                    break;

                case LayoutType.Mouse:
                    mode = HelpProvider.RenderingMode.Mouse;
                    break;
                }
                OrganizationProperties organizationProperties = null;
                if (mailboxIdentity != null)
                {
                    organizationProperties = mailboxIdentity.UserOrganizationProperties;
                }
                string helpUrl = HelpProvider.ConstructHelpRenderingUrl(cultureInfo.LCID, HelpProvider.OwaHelpExperience.Premium, string.Empty, mode, null, organizationProperties).ToString();
                return new OwaHelpUrlData
                {
                    HelpUrl = helpUrl
                };
            }));
        }
示例#2
0
        private static string ConstructOwaOptionsHelpUrl(string helpId)
        {
            OrganizationProperties organizationProperties = null;

            OrganizationPropertyCache.TryGetOrganizationProperties(RbacPrincipal.Current.RbacConfiguration.OrganizationId, out organizationProperties);
            return(HelpProvider.ConstructHelpRenderingUrl(Thread.CurrentThread.CurrentUICulture.LCID, HelpProvider.OwaHelpExperience.Options, helpId, HelpProvider.RenderingMode.Mouse, null, organizationProperties).ToString());
        }
示例#3
0
        private static string BuildEhcHref(string helpId, bool isEACHelpId)
        {
            string result;

            if (isEACHelpId)
            {
                RbacPrincipal rbacPrincipal = HttpContext.Current.User as RbacPrincipal;
                result = ((rbacPrincipal != null) ? HelpProvider.ConstructHelpRenderingUrl(helpId, rbacPrincipal.RbacConfiguration).ToString() : HelpProvider.ConstructHelpRenderingUrl(helpId).ToString());
            }
            else
            {
                result = HelpUtil.ConstructOwaOptionsHelpUrl(helpId);
            }
            return(result);
        }