zoukankan      html  css  js  c++  java
  • C# winform程序中datagridview里按钮的单击事件

            private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
            {
                string buttonText = this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString();
                if (buttonText == "更新")
                {
                    string url = this.dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();
                    string aid = this.dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
                    string imageURL = "http://m119.mail.qq.com" + this.GetImageURL(url);
                    string newImage = this.CreateImage(imageURL, aid);
                    this.dataGridView1.Rows[e.RowIndex].Cells[7].Value = System.Drawing.Image.FromFile(newImage);
                }
                if (buttonText == "提交")
                {
                    string userInput = this.dataGridView1.Rows[e.RowIndex].Cells[9].Value.ToString();
                    if (userInput.Length != 4)
                    {
                        MessageBox.Show("貌似你输入不正确");
                        return;
                    }
                    string url = this.dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();
                    string aid = this.dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
                    Regex reg = new Regex("&re=(.+?)&");
                    string re = this.RegStr(reg,url);
                    Regex rego = new Regex("&sg=(.+?)$");
                    string sg = this.RegStr(rego, url);
    
    
    
    
                }
  • 相关阅读:
    css 自动调整不同 大小的图片变成一定大小
    myeclipse 修改html 报错
    js 中json的使用
    对比两个文件相似度 余弦算法
    andriod 解包
    http post/get 请求
    VXLAN 静态隧道实现同网段通信
    网络设备巡检命令
    IPv6
    Cisco ASA 调整terminal屏幕
  • 原文地址:https://www.cnblogs.com/maijin/p/2834529.html
Copyright © 2011-2022 走看看