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(); }
private void MouseDownProc_GetLastPoint(int hWnd, int Button, int Flags, int Xwin, int Ywin, double Xdrw, double Ydrw) { if (Button == Lcad.LC_LBUTTON) { xLastPoint = Xdrw; yLastPoint = Ydrw; //ham tinh toan KhoanhVungLoKhoan(); Lcad.OnEventMouseDown(_EventMouseDown_Default); } else { Lcad.OnEventMouseDown(_EventMouseDown_Default); } //tắt thông báo UserControl_Notify note = elementHost1.Child as UserControl_Notify; note.HideNotify(); }
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); } }