private void barButtonItem_KhoanhVungLoKhoan_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { _EventMouseDown_GetPoint = new F_MOUSEDOWN(MouseDownProc_GetFirstPoint); Lcad.OnEventMouseDown(_EventMouseDown_GetPoint); //hiển thị thông báo UserControl_Notify note = new UserControl_Notify("Chọn điểm đầu"); elementHost1.Child = note; note.ShowNotify(); }
public FormMain() { InitializeComponent(); Lcad.PropPutStr(0, Lcad.LC_PROP_G_REGCODE, "1234"); // 1234 là mã số khi mua LiteCad đã đăng ký //Lcad.PropPutStr(0, Lcad.LC_PROP_G_DIRDATA, @"..\..\LiteCAD\Data"); //Lcad.PropPutStr(0, Lcad.LC_PROP_G_DIRPLUG, @"..\..\LiteCAD\Data\Plugins"); //Lcad.PropPutStr(0, Lcad.LC_PROP_G_DIRCFG, @"..\..\LiteCAD"); Lcad.PropPutBool(0, Lcad.LC_PROP_G_DLGRECENT, true); Lcad.PropPutBool(0, Lcad.LC_PROP_G_ADDRECENT, true); //gán các sự kiện mouse click với các hàm _EventMouseDbclick_LoMin = new F_MOUSEDBLCLK(MouseDblClkProc_LoMin); _EventMouseDbclick_XayDungLuoiLoMin = new F_MOUSEDBLCLK(MouseDblClkProc_XayDungLuoiLoMin); _EventMouseDown_Default = new F_MOUSEDOWN(MouseDownProc_Default); Lcad.OnEventMouseDblClk(_EventMouseDbclick_LoMin); Lcad.Initialize(); //UI this.BackColor = Properties.Settings.Default.FormBackgroundColor; }
private void MouseDownProc_GetFirstPoint(int hWnd, int Button, int Flags, int Xwin, int Ywin, double Xdrw, double Ydrw) { if (Button == Lcad.LC_LBUTTON) { xFirstPoint = Xdrw; yFirstPoint = Ydrw; _EventMouseDown_GetPoint = new F_MOUSEDOWN(MouseDownProc_GetLastPoint); Lcad.OnEventMouseDown(_EventMouseDown_GetPoint); //hiển thị thông báo UserControl_Notify note = new UserControl_Notify("Chọn điểm cuối"); elementHost1.Child = note; note.ShowNotify(); } else { //tắt thông báo UserControl_Notify note = elementHost1.Child as UserControl_Notify; note.HideNotify(); Lcad.OnEventMouseDown(_EventMouseDown_Default); } }
private void MouseDownProc_GetFirstPoint(int hWnd, int Button, int Flags, int Xwin, int Ywin, double Xdrw, double Ydrw) { if(Button == Lcad.LC_LBUTTON) { xFirstPoint = Xdrw; yFirstPoint = Ydrw; _EventMouseDown_GetPoint = new F_MOUSEDOWN(MouseDownProc_GetLastPoint); Lcad.OnEventMouseDown(_EventMouseDown_GetPoint); //hiển thị thông báo UserControl_Notify note = new UserControl_Notify("Chọn điểm cuối"); elementHost1.Child = note; note.ShowNotify(); } else { //tắt thông báo UserControl_Notify note = elementHost1.Child as UserControl_Notify; note.HideNotify(); Lcad.OnEventMouseDown(_EventMouseDown_Default); } }
public static extern void OnEventMouseDown(F_MOUSEDOWN pFunc);