//hiện thông báo
        //private void ShowNotifyAutoHide(String text)
        //{
        //    UserControl_Notify note = new UserControl_Notify(text);
        //    elementHost1.Child = note;
        //    note.ShowNotifyAutoHide();
        //}
        
        //lấy danh sách lỗ khoan trên bản vẽ
        private void GetCirlcesFromAutocadFile()
        {
            int hBlockModel = Lcad.PropGetHandle(hDrw, Lcad.LC_PROP_DRW_BLOCK_MODEL);           
            int hEnt = Lcad.BlockGetFirstEnt(hBlockModel);           
            List<Circle> listCircles = new List<Circle>();
            while (hEnt != 0)
            {
                int entType = Lcad.PropGetInt(hEnt, Lcad.LC_PROP_ENT_TYPE);
                if (!Lcad.PropGetBool(hEnt, Lcad.LC_PROP_ENT_DELETED))   //kiểm tra xem ent bị xóa hay không
                {
                    if (entType == Lcad.LC_ENT_CIRCLE)
                    {
                        listCircles.Add(new Circle(hEnt));
                    }
                    //cách khác (dùng key, vì cái gì đấy mà ko lấy được LC_PROP_ENT_TYPE) - do thư viện....
                    else
                    {
                        int _key = Lcad.PropGetInt(hEnt, Lcad.LC_PROP_ENT_KEY);
                        if (_key == keyCircle)
                        {
                            listCircles.Add(new Circle(hEnt));
                        }

                    }
                }              
                hEnt = Lcad.BlockGetNextEnt(hBlockModel, hEnt);
            }
            mgCircles = new ManageCircle();
            mgCircles.AddListCircle(listCircles);
        }
 private void loadFile_FormMoBanVeDatabase(String idHoChieu)
 {
     this.hoChieuChinh = BS_HoChieu.HoChieu(idHoChieu);
     this.banVeChinh = BS_BanVe.BanVe(this.hoChieuChinh.MaBanVe);
     List<LoKhoan> danhSachLoKhoan = BS_LoKhoan.DanhSachLoKhoan(idHoChieu);
     List<Circle> danhSachCircle = new List<Circle>();
     mgCircles = new ManageCircle();
     //dựng bản vẽ mới          
     //this.banVeChinh.HienKhoangCach = false;
     this.Text = "Bản vẽ: [" + this.banVeChinh.TenBanVe + "]";
     Lcad.DrwLoad(hDrw, BS_Template.ChonTemplate(this.banVeChinh.Template).DuongDan, this.Handle, hWnd);
     layerLoMin = Lcad.DrwAddLayer(hDrw, "LoMin", "cyan", 0, Lcad.LC_LWEIGHT_DEFAULT);
     layerLuoiKichThuoc = Lcad.DrwAddLayer(hDrw, "LuoiKichThuoc", "foreground", 0, Lcad.LC_LWEIGHT_DEFAULT);
     int hBlockModel = Lcad.PropGetHandle(hDrw, Lcad.LC_PROP_DRW_BLOCK_MODEL);
     foreach (LoKhoan value in danhSachLoKhoan)
     {
         int hEntCircle = Lcad.BlockAddCircle(hBlockModel, value.ToaDoX, value.ToaDoY, value.BanKinh, false);
         Lcad.PropPutInt(hEntCircle, Lcad.LC_PROP_ENT_ID, int.Parse(value.MaLoKhoan));
         Lcad.PropPutInt(hEntCircle, Lcad.LC_PROP_ENT_KEY, keyCircle);
         Lcad.PropPutStr(hEntCircle, Lcad.LC_PROP_ENT_LAYER, "LoMin");
         danhSachCircle.Add(new Circle(hEntCircle));
     }
     mgCircles.AddListCircle(danhSachCircle);
     if (banVeChinh.HienKhoangCach)
     {
         Lcad.LayerClear(layerLuoiKichThuoc, hBlockModel);
         DungLuoiKichThuoc();
     }
     //vẽ lại hình
     Lcad.DrwRegenViews(hDrw, 0);
     Lcad.WndExeCommand(hWnd, Lcad.LC_CMD_ZOOM_EXT, 0);
     BS_LiteCAD.ShowNotifyAutoHide(elementHost1, this.banVeChinh.TenBanVe + " - đã mở");
     //mở form dựng lưới lỗ khoan
     if(mgCircles.GetListCircles().Count == 0)
     {
         FormXayDungLoKhoan fm = new FormXayDungLoKhoan();
         fm.MyGetData = new FormXayDungLoKhoan.GetData(loadFile_FormXayDungLoKhoan);
         fm.Show();
     }          
 }