Пример #1
0
 public void AddShowClient(string _userNameTemp)
 {
     if (flp_client.InvokeRequired)
     {
         this.Invoke(new AddShowClient_Delgate(AddShowClient), _userNameTemp);
     }
     else
     {
         rezise(ref _userNameTemp);
         ShowClient show_client = new ShowClient(null, _userNameTemp); //tạo show client để đưa lên form server
         lstShowClient.Add(show_client);                               //thêm show client vào List để sau này dễ cập nhật khi có thay đổi trong 1 showclient nào đó
         flp_client.Controls.Add(show_client);                         //đưa lên form server
     }
 }
Пример #2
0
 public void AddShowClient(string _userNameTemp)
 {
     if (flp_client.InvokeRequired)
     {
         this.Invoke(new AddShowClient_Delgate(AddShowClient),_userNameTemp);
     }
     else
     {
         rezise(ref _userNameTemp);
             ShowClient show_client = new ShowClient(null,_userNameTemp);//tạo show client để đưa lên form server
             lstShowClient.Add(show_client);//thêm show client vào List để sau này dễ cập nhật khi có thay đổi trong 1 showclient nào đó
             flp_client.Controls.Add(show_client);//đưa lên form server
       }
 }
Пример #3
0
 public void Form1_Load(object sender, EventArgs e)
 {
     if (flp_client.InvokeRequired)
     {
         this.Invoke(new Form1Load_delegate(Form1_Load), sender, e);
     }
     else
     {
         DataTable dt = Khachhang_BUS.Loadds();//load tất cả danh sách đã có trong sql server
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             ShowClient show_client = new ShowClient(null, dt.Rows[i][0].ToString()); //tạo show client để đưa lên form server
             lstShowClient.Add(show_client);                                          //thêm show client vào List để sau này dễ cập nhật khi có thay đổi trong 1 showclient nào đó
             flp_client.Controls.Add(show_client);                                    //đưa lên form server
         }
     }
 }
Пример #4
0
 public void Form1_Load(object sender, EventArgs e)
 {
     if (flp_client.InvokeRequired)
     {
         this.Invoke(new Form1Load_delegate(Form1_Load), sender, e);
     }
     else
     {
         DataTable dt = Khachhang_BUS.Loadds();//load tất cả danh sách đã có trong sql server
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             ShowClient show_client = new ShowClient(null, dt.Rows[i][0].ToString());//tạo show client để đưa lên form server
             lstShowClient.Add(show_client);//thêm show client vào List để sau này dễ cập nhật khi có thay đổi trong 1 showclient nào đó
             flp_client.Controls.Add(show_client);//đưa lên form server
         }
     }
 }