Exemplo n.º 1
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// ProcessStylesheets processes the Module and Container stylesheets and adds
        /// them to the Page.
        /// </summary>
        private void ProcessStylesheets(bool includeModuleCss)
        {
            ClientResourceManager.RegisterStyleSheet(Page, ContainerPath + "container.css", FileOrder.Css.ContainerCss);
            ClientResourceManager.RegisterStyleSheet(Page, ContainerSrc.Replace(".ascx", ".css"), FileOrder.Css.SpecificContainerCss);

            //process the base class module properties
            if (includeModuleCss)
            {
                string controlSrc = ModuleConfiguration.ModuleControl.ControlSrc;
                string folderName = ModuleConfiguration.DesktopModule.FolderName;

                string stylesheet = "";
                if (String.IsNullOrEmpty(folderName) == false)
                {
                    if (controlSrc.EndsWith(".mvc"))
                    {
                        stylesheet = Globals.ApplicationPath + "/DesktopModules/MVC/" + folderName.Replace("\\", "/") + "/module.css";
                    }
                    else
                    {
                        stylesheet = Globals.ApplicationPath + "/DesktopModules/" + folderName.Replace("\\", "/") + "/module.css";
                    }
                    ClientResourceManager.RegisterStyleSheet(Page, stylesheet, FileOrder.Css.ModuleCss);
                }
                var ix = controlSrc.LastIndexOf("/", StringComparison.Ordinal);
                if (ix >= 0)
                {
                    stylesheet = Globals.ApplicationPath + "/" + controlSrc.Substring(0, ix + 1) + "module.css";
                    ClientResourceManager.RegisterStyleSheet(Page, stylesheet, FileOrder.Css.ModuleCss);
                }
            }
        }
Exemplo n.º 2
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// ProcessStylesheets processes the Module and Container stylesheets and adds
        /// them to the Page.
        /// </summary>
        /// <history>
        ///     [cnurse]	12/05/2007	Created
        /// </history>
        /// -----------------------------------------------------------------------------

        private void ProcessStylesheets(bool includeModuleCss)
        {
            ClientResourceManager.RegisterStyleSheet(Page, ContainerPath + "container.css", FileOrder.Css.ContainerCss);
            ClientResourceManager.RegisterStyleSheet(Page, ContainerSrc.Replace(".ascx", ".css"), FileOrder.Css.SpecificContainerCss);

            //process the base class module properties
            if (includeModuleCss)
            {
                string controlSrc = ModuleConfiguration.ModuleControl.ControlSrc;
                string folderName = ModuleConfiguration.DesktopModule.FolderName;

                if (String.IsNullOrEmpty(folderName) == false)
                {
                    ClientResourceManager.RegisterStyleSheet(Page, Globals.ApplicationPath + "/DesktopModules/" + folderName.Replace("\\", "/") + "/module.css", FileOrder.Css.ModuleCss);
                }

                if (controlSrc.LastIndexOf("/") > 0)
                {
                    ClientResourceManager.RegisterStyleSheet(Page, Globals.ApplicationPath + "/" + controlSrc.Substring(0, controlSrc.LastIndexOf("/") + 1) + "module.css", FileOrder.Css.ModuleCss);
                }
            }
        }