コード例 #1
0
        public string GetPageCode(string CurrentPage)
        {
            string cssSRipt = Make_Special.MakeCssScript(cssScript);
            string TempStr  = CurrentPage;

            if (TempStr.IndexOf("<body>") != -1)
            {
                int test = TempStr.IndexOf("<body>");
                if (this.Thiscontrol.Text.IndexOf('*') == -1)
                {
                    string BeforeBody    = TempStr.Substring(0, (TempStr.IndexOf("<body>") - 1));
                    string AfterBodyCode = "<div class=" + this.Thiscontrol.Name + "><p class=" + this.Thiscontrol.Name + ">" + this.Thiscontrol.Text + "</p></div>" + "<body>";

                    string HtmlAfterCode = TempStr.Substring((TempStr.IndexOf("<body>") + 7));

                    TempStr = cssSRipt + BeforeBody + AfterBodyCode + HtmlAfterCode;
                }
            }
            return(TempStr);
        }
コード例 #2
0
        public string GetPageCode(string CurrentPage)
        {
            string Javascript = "";
            string cssSRipt   = Make_Special.MakeCssScript(cssScript);
            string TempStr    = CurrentPage;

            if (TempStr.IndexOf("function ReloadPage()") == -1)
            {
                if ((string)(this.Thiscontrol.Tag) == "")
                {
                    Javascript = ""; //Make_Special.MakeJavaScript("ReloadPage", (object[])(new Enum[] { CommonJs.location_href }), new string[] { this.Thiscontrol.Text.Split('*')[1] + "?" + this.Thiscontrol.Name });
                }
                else
                {
                    Javascript = Make_Special.MakeJavaScript("ReloadPage" + this.Thiscontrol.Name, (object[])(new Enum[] { CommonJs.location_href }), new string[] { this.Thiscontrol.Tag + "?" + this.Thiscontrol.Name });
                }
            }

            if (TempStr.IndexOf("<body>") != -1)
            {
                int test = TempStr.IndexOf("<body>");
                if ((string)(this.Thiscontrol.Tag) != "")
                {
                    string BeforeBody    = TempStr.Substring(0, (TempStr.IndexOf("<body>") - 1));
                    string AfterBodyCode = "<div class=" + this.Thiscontrol.Name + "><input class=" + this.Thiscontrol.Name + " type=button value=" + this.Thiscontrol.Text + " onClick=\"ReloadPage" + this.Thiscontrol.Name + "();\" /></div>" + "<body>";

                    string HtmlAfterCode = TempStr.Substring((TempStr.IndexOf("<body>") + 7));

                    TempStr = cssSRipt + Javascript + BeforeBody + AfterBodyCode + HtmlAfterCode;
                }
                else
                {
                    string BeforeBody    = TempStr.Substring(0, TempStr.IndexOf("<body>") - 1);
                    string AfterBodyCode = "<div class=" + this.Thiscontrol.Name + "><input class=" + this.Thiscontrol.Name + " type=button value=" + this.Thiscontrol.Text + " onClick=\"index.html?" + this.Thiscontrol.Name + "=Clicked\" /></div>" + "<body>";
                    string HtmlAfterCode = TempStr.Substring(TempStr.IndexOf("<body>") + 7);
                    TempStr = cssSRipt + Javascript + BeforeBody + AfterBodyCode + HtmlAfterCode;
                }
            }
            return(TempStr);
        }