Esempio n. 1
0
 private void ChangeSelect(object sender, CollectionChangedEventArgs e)
 {
     if ((this.mouseAreaControl.SVGDocument.CurrentElement != this.graph) && !this.mousedown)
     {
         this.graph = null;
     }
 }
Esempio n. 2
0
        public virtual void ChangeSelect(object sender, CollectionChangedEventArgs e)
        {
            SvgElement element1 = this.svgDocument.CurrentElement;
            if (this.propertyGrid!=null)
            {
                if (this.SVGDocument.SelectCollection.Count >0)
                {
                    if (this.svgDocument.CurrentElement is ItopVector.Core.Figure.SVG)
                    {
                        this.propertyGrid.SelectedObject=null;
                    }
                    else
                    {
                        object[] list1 = new object[this.svgDocument.SelectCollection.Count];
                        for(int i=0 ;i<this.svgDocument.SelectCollection.Count;i++)
                        {

                            SvgElement element2=(SvgElement)this.svgDocument.SelectCollection[i];
                            ItopVector.Property.PropertyBase propertybase=null;
                            switch(element2.LocalName)
                            {
                                case"line":
                                case "connectline":
                                    propertybase=new ItopVector.Property.PropertyLineMarker(element2);
                                    break;

                                case "polyline":
                                    propertybase = new ItopVector.Property.PropertyPolyline(element2);
                                    break;
                                case "text":
                                    propertybase=new ItopVector.Property.PropertyText(element2);
                                    break;

                                case "image":
                                    propertybase=new ItopVector.Property.PropertyImage(element2);
                                    break;

                                case "rect":
                                    propertybase = new ItopVector.Property.PropertyRoundRect(element2);
                                    break;
                                case "use":
                                case "g":
                                    propertybase = new ItopVector.Property.PropertyUse(element2);
                                    break;
                                case "polygon":
                                case "ellipse":
                                case "circle":
                                case "path":
                                    propertybase = new ItopVector.Property.PropertyFill(element2);
                                    break;
                                default:
                                    propertybase=new ItopVector.Property.PropertyImage(element2);
                                    break;
                            }
                            list1[i]=propertybase;

                        }
                        this.propertyGrid.SelectedObjects=list1;

                    }

                }
                else if (this.svgDocument.SelectCollection.Count == 0 )
                {
                    if(this.propertyGrid.SelectedObject!=null )
                    {
                        this.propertyGrid.SelectedObject=null;
                    }
                }

            }
        }
Esempio n. 3
0
 private void ChangeSelect(object sender, CollectionChangedEventArgs e)
 {
 }
Esempio n. 4
0
 private void ChangeSelect(object sender, CollectionChangedEventArgs e)
 {
     this.selectChanged = true;
     base.Invalidate();
 }
Esempio n. 5
0
        private void ChangeSelect(object sender, CollectionChangedEventArgs e)
        {
            if(this.SVGDocument == null)return;
            SvgElement element1 = this.SVGDocument.CurrentElement;
            if (this.mouseAreaControl.SubOperation != null)
            {
                if (element1 is IPath)
                {
                    this.mouseAreaControl.SubOperation.CurrentGraph = (IPath) element1;
                }
                else
                {
                    this.mouseAreaControl.SubOperation.CurrentGraph = null;
                }
            }
            else if (this.mouseAreaControl.editingOperation is BezierOperation)
            {
                this.mouseAreaControl.BezierOperation.CurrentGraph = null;

            }
            else if (this.mouseAreaControl.editingOperation is PolyOperation)
            {
                this.mouseAreaControl.polyOperation.CurrentGraph = null;
            }
            else if (this.mouseAreaControl.editingOperation is Line)
            {
                this.mouseAreaControl.lineOperation.CurrentGraph = null;
            }
            //this.ChangeSelectEx(sender,e);
        }