예제 #1
0
 public static string GetLogoDocsEditor(bool general)
 {
     if (WhiteLabelEnabled)
     {
         var tenantWhiteLabelSettings = TenantWhiteLabelSettings.Load();
         return(tenantWhiteLabelSettings.GetAbsoluteLogoPath(WhiteLabelLogoTypeEnum.DocsEditor, general));
     }
     return(TenantWhiteLabelSettings.GetAbsoluteDefaultLogoPath(WhiteLabelLogoTypeEnum.DocsEditor, general));
 }
예제 #2
0
 public static string GetLogoDocsEditor(bool general)
 {
     if (WhiteLabelEnabled)
     {
         var _tenantWhiteLabelSettings = SettingsManager.Instance.LoadSettings <TenantWhiteLabelSettings>(TenantProvider.CurrentTenantID);
         return(_tenantWhiteLabelSettings.GetAbsoluteLogoPath(WhiteLabelLogoTypeEnum.DocsEditor, general));
     }
     return(TenantWhiteLabelSettings.GetAbsoluteDefaultLogoPath(WhiteLabelLogoTypeEnum.DocsEditor, general));
 }
예제 #3
0
 public static string GetLogoText()
 {
     if (WhiteLabelEnabled)
     {
         var tenantWhiteLabelSettings = TenantWhiteLabelSettings.Load();
         return(tenantWhiteLabelSettings.LogoText ?? TenantWhiteLabelSettings.DefaultLogoText);
     }
     return(TenantWhiteLabelSettings.DefaultLogoText);
 }
예제 #4
0
        public static string GetTopLogo(bool general)//LogoLightSmall
        {
            if (WhiteLabelEnabled)
            {
                var tenantWhiteLabelSettings = TenantWhiteLabelSettings.Load();

                return(tenantWhiteLabelSettings.GetAbsoluteLogoPath(WhiteLabelLogoTypeEnum.LightSmall, general));
            }
            return(TenantWhiteLabelSettings.GetAbsoluteDefaultLogoPath(WhiteLabelLogoTypeEnum.LightSmall, general));
        }
예제 #5
0
        public static string GetTopLogo(bool general)//LogoLightSmall
        {
            if (WhiteLabelEnabled)
            {
                var _tenantWhiteLabelSettings = SettingsManager.Instance.LoadSettings <TenantWhiteLabelSettings>(TenantProvider.CurrentTenantID);

                return(_tenantWhiteLabelSettings.GetAbsoluteLogoPath(WhiteLabelLogoTypeEnum.LightSmall, general));
            }
            return(TenantWhiteLabelSettings.GetAbsoluteDefaultLogoPath(WhiteLabelLogoTypeEnum.LightSmall, general));
        }
예제 #6
0
        public static string GetLogoDark(bool general)
        {
            if (WhiteLabelEnabled)
            {
                var tenantWhiteLabelSettings = TenantWhiteLabelSettings.Load();
                return(tenantWhiteLabelSettings.GetAbsoluteLogoPath(WhiteLabelLogoTypeEnum.Dark, general));
            }

            /*** simple scheme ***/
            var tenantInfoSettings = TenantInfoSettings.Load();

            return(tenantInfoSettings.GetAbsoluteCompanyLogoPath());
            /***/
        }
예제 #7
0
        /// <summary>
        /// Get logo stream or null in case of default logo
        /// </summary>
        public static Stream GetWhitelabelMailLogo()
        {
            if (WhiteLabelEnabled)
            {
                var tenantWhiteLabelSettings = TenantWhiteLabelSettings.Load();
                return(tenantWhiteLabelSettings.GetWhitelabelLogoData(WhiteLabelLogoTypeEnum.Dark, true));
            }

            /*** simple scheme ***/
            var tenantInfoSettings = TenantInfoSettings.Load();

            return(tenantInfoSettings.GetStorageLogoData());
            /***/
        }
예제 #8
0
        public static string GetFavicon(bool general, bool timeParam)
        {
            string faviconPath;

            if (WhiteLabelEnabled)
            {
                var tenantWhiteLabelSettings = TenantWhiteLabelSettings.Load();
                faviconPath = tenantWhiteLabelSettings.GetAbsoluteLogoPath(WhiteLabelLogoTypeEnum.Favicon, general);
                if (timeParam)
                {
                    var now = DateTime.Now;
                    faviconPath = String.Format("{0}?t={1}", faviconPath, now.Ticks);
                }
            }
            else
            {
                faviconPath = TenantWhiteLabelSettings.GetAbsoluteDefaultLogoPath(WhiteLabelLogoTypeEnum.Favicon, general);
            }

            return(faviconPath);
        }
예제 #9
0
        public static string GetFavicon(bool general, bool timeParam)
        {
            var faviconPath = "";

            if (WhiteLabelEnabled)
            {
                var _tenantWhiteLabelSettings = SettingsManager.Instance.LoadSettings <TenantWhiteLabelSettings>(TenantProvider.CurrentTenantID);
                faviconPath = _tenantWhiteLabelSettings.GetAbsoluteLogoPath(WhiteLabelLogoTypeEnum.Favicon, general);
                if (timeParam)
                {
                    var now = DateTime.Now;
                    faviconPath = String.Format("{0}?t={1}", faviconPath, now.Ticks);
                }
            }
            else
            {
                faviconPath = TenantWhiteLabelSettings.GetAbsoluteDefaultLogoPath(WhiteLabelLogoTypeEnum.Favicon, general);
            }

            return(faviconPath);
        }
예제 #10
0
        public static string GetLogoDark(bool general)
        {
            if (WhiteLabelEnabled)
            {
                var _tenantWhiteLabelSettings = SettingsManager.Instance.LoadSettings <TenantWhiteLabelSettings>(TenantProvider.CurrentTenantID);

                var fromSettingsDarkLogoPath = _tenantWhiteLabelSettings.GetAbsoluteLogoPath(WhiteLabelLogoTypeEnum.Dark, general);
                var defaultDarkLogoPath      = TenantWhiteLabelSettings.GetAbsoluteDefaultLogoPath(WhiteLabelLogoTypeEnum.Dark, general);

                if (!String.Equals(fromSettingsDarkLogoPath, defaultDarkLogoPath, StringComparison.OrdinalIgnoreCase))
                {
                    return(fromSettingsDarkLogoPath);
                }
            }

            /*** simple scheme ***/
            var _tenantInfoSettings = SettingsManager.Instance.LoadSettings <TenantInfoSettings>(TenantProvider.CurrentTenantID);

            return(_tenantInfoSettings.GetAbsoluteCompanyLogoPath());
            /***/
        }