Board logo

标题: 在datagridview中点击单元格弹出窗体进行选择 返回给原窗体(2) [打印本页]

作者: look_w    时间: 2019-4-18 16:40     标题: 在datagridview中点击单元格弹出窗体进行选择 返回给原窗体(2)

Form3.cs

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
     
    namespace Import_Advtisement
    {
        public delegate void setStatusDelegate_request(string iteration);
        public partial class Form3 : Form
        {
            public string rowstr = "1";
            public string colstr = "1";
            public Form3(int row,int col)
            {
                InitializeComponent();
     
                rowstr = row.ToString();
                colstr = col.ToString();
                this.skinEngine1 = new Sunisoft.IrisSkin.SkinEngine(((System.ComponentModel.Component)(this)));
     
                this.skinEngine1.SkinFile = Application.StartupPath + "//DiamondBlue.ssk";
                Sunisoft.IrisSkin.SkinEngine se = null;
                se = new Sunisoft.IrisSkin.SkinEngine();
                se.SkinAllForm = true;
            }
            public static setStatusDelegate_request setStatusDelegate_request;
            private void button1_Click(object sender, EventArgs e)
            {
                string a = "";
                foreach (Control o in this.Controls)
                {
                    if (o is CheckBox)
                    {
                        if (((CheckBox)o).Checked == true)
                        {
                            a += o.Text.ToString()+",";
                        }
                    }
                }
                a = a.Remove(a.LastIndexOf(","), 1);
     
              a=  a + "|" + rowstr + "|" + colstr;
                if (setStatusDelegate_request != null)
                {
                    setStatusDelegate_request(a);
                }
     
                this.Close();
            }
     
            private void button2_Click(object sender, EventArgs e)
            {
                this.Close();
            }
        }
    }




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0