Esempio n. 1
0
    protected void cmdTestSlice_Click(object sender, EventArgs e)
    {
        string result = string.Empty;
        Tracer tracer = new Tracer();

        JQuery jQuery1 = new JQuery("'li'");
        JQuery jQuery2 = new JQuery("'li'");

        result += "测试方法 JQuery.Slice(string)<br />";

        tracer.Execute(jQuery1, null, "Slice", FunctionType.Method, new Type[] { typeof(string) }, null, null, null,
                       new object[][] {
            new object[] { "2" }
        },
                       false
                       );

        result += "jQuery1.Code = " + jQuery1.AddClass("'big'").Code + "<br />";

        result += "测试方法 JQuery.Slice(string, string)<br />";

        tracer.Execute(jQuery2, null, "Slice", FunctionType.Method, new Type[] { typeof(string), typeof(string) }, null, null, null,
                       new object[][] {
            new object[] { "2", "4" }
        },
                       false
                       );

        result += "jQuery2.Code = " + jQuery2.AddClass("'happy'").Code + "<br />";

        this.lblResult.Text = result;

        jQuery1.Build(this, option: ScriptBuildOption.Startup);
        jQuery2.Build(this, option: ScriptBuildOption.Startup);
    }
Esempio n. 2
0
    protected void cmdTestNot_Click(object sender, EventArgs e)
    {
        string result = string.Empty;
        Tracer tracer = new Tracer();

        JQuery jQuery = new JQuery("'li'");

        result += "测试方法 JQuery.Not(string)<br />";

        tracer.Execute(jQuery, null, "Not", FunctionType.Method, new Type[] { typeof(string) }, null, null, null,
                       new object[][] {
            new object[] { "':eq(0)'" }
        },
                       false
                       );

        result += "jQuery.Code = " + jQuery.AddClass("'big'").Code + "<br />";

        this.lblResult.Text = result;

        jQuery.Build(this, option: ScriptBuildOption.Startup);
    }