public void simpleButtonLuuPhuongAn_Click(object sender, EventArgs e) { var check = new BooleanAndDoiTuongClass { BoolVar = false }; var count = new IntClass { IntVar = opted }; var taoKeHoachMoi = new QuanLyPhuongAnForm(selected, count, treeView1, imageListChild, check); taoKeHoachMoi.ShowDialog(); if (check.BoolVar) { opted = count.IntVar; selected = check.DoiTuongs; pictureBoxMap.Controls.Clear(); for (var i = 0; i < opted; i++) { selected[i].Picture.Visible = true; selected[i].Picture.Location = DrawHelper.ScaleImage(new Point(selected[i].ThongTinChiTietDoiTuong.ToaDoX, selected[i].ThongTinChiTietDoiTuong.ToaDoY) , new Size(selected[i].ThongTinChiTietDoiTuong.ChieuRongAnh, selected[i].ThongTinChiTietDoiTuong.ChieuDaiAnh), pictureBoxMap); pictureBoxMap.AddControl(selected[i].Picture); MoveButton(selected[i].Picture); deletePic(selected[i].Picture); } } }
public QuanLyPhuongAnForm(List <DoiTuong> doiTuong, IntClass count, TreeView treeView, ImageList imageList, BooleanAndDoiTuongClass isChange) { this.isChange = isChange; this.isChange.DoiTuongs = doiTuong; this.Count = count; this.ImageList = imageList; this.TreeView = treeView; this.isChange = isChange; InitializeComponent(); LoadKeHoach(); LoadKeHoachDeTail(); InitComBoBoxFile(); InitComBoBoxBanDo(); }