示例#1
0
        private void newFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SvDemo.Form2 form2 = new SvDemo.Form2(xmlFileString, "Add");
            form2.Text = "增加XML文档";
            DataSet   ds = new DataSet("procedures");
            DataTable dt = new DataTable("procedure");

            dt.Columns.Add(new DataColumn("id", typeof(string)));
            dt.Columns.Add(new DataColumn("name", typeof(string)));
            dt.Columns.Add(new DataColumn("button", typeof(string)));
            dt.Columns.Add(new DataColumn("video", typeof(string)));
            dt.Columns.Add(new DataColumn("leftupx", typeof(string)));
            dt.Columns.Add(new DataColumn("leftupy", typeof(string)));
            dt.Columns.Add(new DataColumn("rightbottomx", typeof(string)));
            dt.Columns.Add(new DataColumn("rightbottomy", typeof(string)));
            ds.Tables.Add(dt);

            form2.setDataView(dt.DefaultView);
            form2.ds      = ds;
            form2.Visible = true;
        }
示例#2
0
        private void newFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SvDemo.Form2 form2 = new SvDemo.Form2(xmlFileString,"Add");
            form2.Text = "增加XML文档";
            DataSet ds = new DataSet("procedures");
            DataTable dt = new DataTable("procedure");
            dt.Columns.Add(new DataColumn("id", typeof(string)));
            dt.Columns.Add(new DataColumn("name", typeof(string)));
            dt.Columns.Add(new DataColumn("button", typeof(string)));
            dt.Columns.Add(new DataColumn("video", typeof(string)));
            dt.Columns.Add(new DataColumn("leftupx", typeof(string)));
            dt.Columns.Add(new DataColumn("leftupy", typeof(string)));
            dt.Columns.Add(new DataColumn("rightbottomx", typeof(string)));
            dt.Columns.Add(new DataColumn("rightbottomy", typeof(string)));
            ds.Tables.Add(dt);

            form2.setDataView(dt.DefaultView);
            form2.ds = ds;
            form2.Visible = true;
        }