示例#1
0
        public void DrawDecoration()
        {
            foreach (var element in Visuals)
            {
                if (element is CryptoLineView)
                {
                    CryptoLineView result = element as CryptoLineView;

                    if (result.Line.Equals(this))
                    {
                        continue;
                    }

                    foreach (FromTo fromTo in PointList)
                    {
                        foreach (FromTo resultFromTo in result.Line.PointList)
                        {
                            if (LineUtil.FindIntersection(fromTo.From, fromTo.To, resultFromTo.From, resultFromTo.To, out intersectPoint))
                            {
                                fromTo.Intersection.Add(intersectPoint);
                                //resultFromTo.Intersection.Add(intersectPoint);
                            }
                        }
                    }
                }
            }
        }
示例#2
0
        private static void OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            CryptoLineView l = (CryptoLineView)d;

            if (l.IsSelectedChanged != null)
            {
                l.IsSelectedChanged.Invoke(l, null);
            }
        }