Example #1
0
        public string ProcessFile(string FileName, UI.Skins.SkinParser ParseOption)
        {
            string   strMessage  = SkinController.FormatMessage(FILE_BEGIN, Path.GetFileName(FileName), 0, false);
            SkinFile objSkinFile = new SkinFile(this.SkinRoot, FileName, this.SkinAttributes);

            switch (objSkinFile.FileExtension)
            {
            case ".htm":
            case ".html":
                string contents = objSkinFile.Contents;
                strMessage          += this.ObjectFactory.Parse(ref contents);
                strMessage          += this.PathFactory.Parse(ref contents, this.PathFactory.HTMLList, objSkinFile.SkinRootPath, ParseOption);
                strMessage          += this.ControlFactory.Parse(ref contents, objSkinFile.Attributes);
                objSkinFile.Contents = contents;
                ArrayList Registrations = new ArrayList();
                Registrations.AddRange(this.ControlFactory.Registrations);
                Registrations.AddRange(this.ObjectFactory.Registrations);
                strMessage += objSkinFile.PrependASCXDirectives(Registrations);
                break;
            }
            objSkinFile.Write();
            strMessage += objSkinFile.Messages;
            strMessage += SkinController.FormatMessage(FILE_END, Path.GetFileName(FileName), 1, false);
            return(strMessage);
        }
Example #2
0
        public string ProcessSkin(string SkinSource, XmlDocument SkinAttributes, UI.Skins.SkinParser ParseOption)
        {
            SkinFile objSkinFile = new SkinFile(SkinSource, SkinAttributes);
            string   contents    = objSkinFile.Contents;

            this.Message += this.ControlFactory.Parse(ref contents, objSkinFile.Attributes);
            this.Message += objSkinFile.PrependASCXDirectives(this.ControlFactory.Registrations);
            return(contents);
        }
Example #3
0
        public string ProcessSkin(string SkinSource, XmlDocument SkinAttributes, SkinParser ParseOption)
        {
            // create a skin file object to aid in processing
            SkinFile objSkinFile = new SkinFile(SkinSource, SkinAttributes);

            string skinFileContents = objSkinFile.Contents;

            // process control tokens and convert html to ascx format
            this.Message += this.ControlFactory.Parse(ref skinFileContents, objSkinFile.Attributes);
            this.Message += objSkinFile.PrependASCXDirectives(this.ControlFactory.Registrations);

            return(objSkinFile.Contents);
        }
Example #4
0
        public string ProcessList(ArrayList FileList, SkinParser ParseOption)
        {
            string FileName;

            // process each file in the list
            foreach (string tempLoopVar_FileName in FileList)
            {
                FileName = tempLoopVar_FileName;

                this.Message += SkinController.FormatMessage(FILE_BEGIN, Path.GetFileName(FileName), 0, false);

                // create a skin file object to aid in processing
                //TODO: Uncomment this:
                SkinFile objSkinFile = new SkinFile(this.SkinRoot, FileName, this.SkinAttributes);

                // choose processing based on type of file
                if (objSkinFile.FileExtension == ".htm")
                {
                    string    skinFileContents = objSkinFile.Contents;
                    ArrayList pathList         = this.PathFactory.HTMLList;
                    // replace paths, process control tokens and convert html to ascx format
                    this.Message += this.PathFactory.Parse(ref skinFileContents, ref pathList, objSkinFile.SkinRootPath, ParseOption);
                    this.Message += this.ControlFactory.Parse(ref skinFileContents, objSkinFile.Attributes);
                    this.Message += objSkinFile.PrependASCXDirectives(this.ControlFactory.Registrations);
                }
                else if (objSkinFile.FileExtension == ".html")
                {
                    string    skinFileContents = objSkinFile.Contents;
                    ArrayList pathList         = this.PathFactory.HTMLList;
                    // replace paths, process control tokens and convert html to ascx format
                    this.Message += this.PathFactory.Parse(ref skinFileContents, ref pathList, objSkinFile.SkinRootPath, ParseOption);
                    this.Message += this.ControlFactory.Parse(ref skinFileContents, objSkinFile.Attributes);
                    this.Message += objSkinFile.PrependASCXDirectives(this.ControlFactory.Registrations);
                }

                objSkinFile.Write();
                this.Message += objSkinFile.Messages;

                this.Message += SkinController.FormatMessage(FILE_END, Path.GetFileName(FileName), 1, false);
            }

            this.Message += SkinController.FormatMessage(FILES_END, this.SkinRoot + " :: " + this.SkinName, 0, false);

            return(this.Message);
        }
 public string ProcessSkin(string SkinSource, XmlDocument SkinAttributes, UI.Skins.SkinParser ParseOption)
 {
     SkinFile objSkinFile = new SkinFile(SkinSource, SkinAttributes);
     string contents = objSkinFile.Contents;
     this.Message += this.ControlFactory.Parse(ref contents, objSkinFile.Attributes);
     this.Message += objSkinFile.PrependASCXDirectives(this.ControlFactory.Registrations);
     return contents;
 }
 public string ProcessFile(string FileName, UI.Skins.SkinParser ParseOption)
 {
     string strMessage = SkinController.FormatMessage(FILE_BEGIN, Path.GetFileName(FileName), 0, false);
     SkinFile objSkinFile = new SkinFile(this.SkinRoot, FileName, this.SkinAttributes);
     switch (objSkinFile.FileExtension)
     {
         case ".htm":
         case ".html":
             string contents = objSkinFile.Contents;
             strMessage += this.ObjectFactory.Parse(ref contents);
             strMessage += this.PathFactory.Parse(ref contents, this.PathFactory.HTMLList, objSkinFile.SkinRootPath, ParseOption);
             strMessage += this.ControlFactory.Parse(ref contents, objSkinFile.Attributes);
             objSkinFile.Contents = contents;
             ArrayList Registrations = new ArrayList();
             Registrations.AddRange(this.ControlFactory.Registrations);
             Registrations.AddRange(this.ObjectFactory.Registrations);
             strMessage += objSkinFile.PrependASCXDirectives(Registrations);
             break;
     }
     objSkinFile.Write();
     strMessage += objSkinFile.Messages;
     strMessage += SkinController.FormatMessage(FILE_END, Path.GetFileName(FileName), 1, false);
     return strMessage;
 }
        public string ProcessSkin( string SkinSource, XmlDocument SkinAttributes, SkinParser ParseOption )
        {
            // create a skin file object to aid in processing
            SkinFile objSkinFile = new SkinFile( SkinSource, SkinAttributes );

            string skinFileContents = objSkinFile.Contents;
            // process control tokens and convert html to ascx format
            this.Message += this.ControlFactory.Parse( ref skinFileContents, objSkinFile.Attributes );
            this.Message += objSkinFile.PrependASCXDirectives( this.ControlFactory.Registrations );

            return objSkinFile.Contents;
        }
        public string ProcessList( ArrayList FileList, SkinParser ParseOption )
        {
            string FileName;

            // process each file in the list
            foreach( string tempLoopVar_FileName in FileList )
            {
                FileName = tempLoopVar_FileName;

                this.Message += SkinController.FormatMessage( FILE_BEGIN, Path.GetFileName( FileName ), 0, false );

                // create a skin file object to aid in processing
                //TODO: Uncomment this:
                SkinFile objSkinFile = new SkinFile( this.SkinRoot, FileName, this.SkinAttributes );

                // choose processing based on type of file
                if( objSkinFile.FileExtension == ".htm" )
                {
                    string skinFileContents = objSkinFile.Contents;
                    ArrayList pathList = this.PathFactory.HTMLList;
                    // replace paths, process control tokens and convert html to ascx format
                    this.Message += this.PathFactory.Parse( ref skinFileContents, ref pathList, objSkinFile.SkinRootPath, ParseOption );
                    this.Message += this.ControlFactory.Parse( ref skinFileContents, objSkinFile.Attributes );
                    this.Message += objSkinFile.PrependASCXDirectives( this.ControlFactory.Registrations );
                }
                else if( objSkinFile.FileExtension == ".html" )
                {
                    string skinFileContents = objSkinFile.Contents;
                    ArrayList pathList = this.PathFactory.HTMLList;
                    // replace paths, process control tokens and convert html to ascx format
                    this.Message += this.PathFactory.Parse( ref skinFileContents, ref pathList, objSkinFile.SkinRootPath, ParseOption );
                    this.Message += this.ControlFactory.Parse( ref skinFileContents, objSkinFile.Attributes );
                    this.Message += objSkinFile.PrependASCXDirectives( this.ControlFactory.Registrations );
                }

                objSkinFile.Write();
                this.Message += objSkinFile.Messages;

                this.Message += SkinController.FormatMessage( FILE_END, Path.GetFileName( FileName ), 1, false );
            }

            this.Message += SkinController.FormatMessage( FILES_END, this.SkinRoot + " :: " + this.SkinName, 0, false );

            return this.Message;
        }