示例#1
0
文件: HumanForm.cs 项目: heigm/xxjyyx
 /// <summary>
 ///单例模式
 /// </summary>
 /// <returns></returns>
 public static HumanForm CreateInstrance()
 {
     if (frm == null || frm.IsDisposed)
     {
         frm = new HumanForm();
     }
     return(frm);
 }
示例#2
0
文件: HumanList.cs 项目: heigm/xxjyyx
        private void dataGridView1_SelectionChanged(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0 || currentHumanList == null)
            {
                //ShowHumanList(currentHumanList);
                return;
            }
            if (dataGridView1.SelectedRows[0].Cells[9].Value == null)
            {
                dataGridView1.ClearSelection();
                return;
            }
            int       index     = (int)(dataGridView1.SelectedRows[0].Cells[9].Value);
            HumanForm humanForm = HumanForm.CreateInstrance();

            humanForm.ShowHumanInfo(currentHumanList.Find(obj => obj.Index == index));
            humanForm.Show();
        }