Exemplo n.º 1
0
        public void OutUrlList()
        {
            DataGridView dgv = Form1.f.GetUrlDataGridViewData();
            int          row = dgv.Rows.Count - 1;

            for (int i = 0; i < row; i++)
            {
                var temp = new Models.UrlDataView
                {
                    name  = dgv.Rows[i].Cells[0].Value.ToString(),
                    value = dgv.Rows[i].Cells[1].Value.ToString(),
                    desc  = dgv.Rows[i].Cells[2].Value.ToString(),
                    type  = dgv.Rows[i].Cells[3].Value.ToString(),
                };
                UrlList.Add(temp);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 界面启动加载
 /// </summary>
 public void OutUrlList()
 {
     try
     {
         DataGridView dgv = Form1.f.GetUrlDataGridViewData();
         if (dgv == null)
         {
             MessageBox.Show("获取数据列表失败!或重新启动软件!"); return;
         }
         int row = dgv.Rows.Count - 1;
         for (int i = 0; i < row; i++)
         {
             var temp = new Models.UrlDataView
             {
                 name  = dgv.Rows[i].Cells[0].Value.ToString(),
                 value = dgv.Rows[i].Cells[1].Value.ToString(),
                 desc  = dgv.Rows[i].Cells[2].Value.ToString(),
                 type  = dgv.Rows[i].Cells[3].Value.ToString(),
             };
             UrlList.Add(temp);
         }
     }
     catch (Exception ex) { pLogs.logs(ex.ToString()); }
 }