public ChiTietVi(string id, UserControlWallets father) { InitializeComponent(); // IDUser = id; root = father; IdWallet = father.Id; }
/* Add các ví lên flowLayoutPanel */ void addItem() { flowLayoutPanel.Controls.Clear(); listItem = new UserControlWallets[listWallets.Count]; for (int i = 0; i < listItem.Length; i++) { listItem[i] = new UserControlWallets(IDUser, this); listItem[i].Id = listWallets[i].Id; listItem[i].Img = listWallets[i].getImage(); listItem[i].NameWallet = listWallets[i].getName(); listItem[i].MoneyWallet = listWallets[i].Money; listItem[i].Type = listWallets[i].Type; if (flowLayoutPanel.Controls.Count < 0) { flowLayoutPanel.Controls.Clear(); } else { flowLayoutPanel.Controls.Add(listItem[i]); } } }