,
UGG Boots
???????? Activity????ArrowLine??
Activity?ArrowLine??????????????????,
Moncler Jackets????????--Canvas???
?Canvas?????????Activity?ArrowLine??
???????Activity?ArrowLine???????
????????????????
????????????????????
???????
 
Canvas???Activity??????????????
?ArrowLine??????????????????
?????ArrowLine????????????????????(foot)???? ??new ArrowLine????????foot???ArrowLine??????????????????
????????????????????????(cap)????? ArrowLine??????cap)?
???????????????????????
????????????????????????...?
???Activity??????????,
UGG Online?
???????Canvas????????MouseLeftButtonDown?MouseMove?MouseLeftButtonUp?
????MouseLeftButtonDown:
???????????
 
?????
            e.Handled = true;            isMove = true;            Point p = e.GetPosition(print);            if (_newLine != null && p == _newLine.StartPoint)            {                return;            }            FrameworkElement element = sender as FrameworkElement;            element.CaptureMouse();            double top = p.Y;            double left = p.X;            _newLine = new ArrowLine(p, p);            _newLine.Name = string.Format("ArrowLine_{0}", ++Index);            _newLine.LineGuid = Wrapper.GuidValue;            CreateArrowLine(_newLine);
???MouseMove:
???Canvas?????????????
 
?????
            if (isMove)            {                Point p = e.GetPosition(print);                if (p == _newLine.StartPoint)                {                    RemoveArrowLine(_newLine);                }                else                {                    _newLine.EndPoint = p;                }            }
???MouseLeftButtonUp?
???????????????
 
?????
 isMove = false;            Is_Activity = false;            //e.Handled = false;            FrameworkElement element = sender as FrameworkElement;            element.ReleaseMouseCapture();            if (_newLine == null)            {                return;            }            Point p = e.GetPosition(print);            if (p == _newLine.StartPoint)            {                RemoveArrowLine(_newLine);            }            else            {                //-->???????,
Vibram Fiver Finger Shoes????????????????????????,
Monster Online?                foreach (var v in DictControls)                {                    IActivity iact = v.Value as IActivity;                    if (null == iact)                    {                        continue;                    }                    //-->???????                    double top = Canvas.GetTop(v.Value);                    double left = Canvas.GetLeft(v.Value);                    //-->?????????Activity????                    if ((p.X >= left && p.X <= (left + v.Value.Width)) && (p.Y >= top && p.Y <= (top + v.Value.Height)))                    {                        //-->??????????????Activity?????                        if (!iact.IsConnection())                        {                            MessageBox.Show("????");                            RemoveArrowLine(_newLine);                            continue;                        }                        //-->????????????????????????                        if (null != _newLine.ArrowFootControl && _newLine.ArrowFootControl.Equals(v.Value))                        {                            continue;                        }                        IActivity arrowFoot = _newLine.ArrowFootControl as IActivity;                        if (arrowFoot != null && arrowFoot.CheckedArrowIsExists(iact))                        {                            MessageBox.Show("?????????");                            RemoveArrowLine(_newLine);                            continue;                        }                        string _point = string.Format("X_{0}_Y_{1}", _newLine.StartPoint.X, _newLine.StartPoint.Y);                        if (!iact.DictArrowFootPoint.ContainsKey(_newLine))                        {                            iact.DictArrowCapPoint.Add(_newLine, _newLine);                            _newLine.ArrowCapControl = v.Value;                        }                        break;                    }                }            }            _newLine = null;
Canvas?????????????
Related articles?
 
  
   
http://kenta.toyone.org/2012/02/post-362.html#comments