Example #1
0
        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();
        }
Example #2
0
 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);
     }
 }