Ejemplo n.º 1
0
        private void BaseControl_ActionLayoutActivated(object sender, VectorDraw.Professional.vdPrimaries.vdLayout deactivated, VectorDraw.Professional.vdPrimaries.vdLayout activated)
        {
            VectorDraw.Professional.vdCollections.vdSelection gripset = vdScrollableControl1.BaseControl.ActiveDocument.Selections.FindName("VDGRIPSET_" + activated.Handle.ToStringValue());
            if (gripset != null)
            {
                foreach (VectorDraw.Professional.vdPrimaries.vdFigure var in gripset)
                {
                    var.ShowGrips = false;
                }
            }
            FillPropertyGrid(vdScrollableControl1.BaseControl.ActiveDocument);

            vdScrollableControl1.BaseControl.ReFresh();
        }
Ejemplo n.º 2
0
        protected override void OnActivated(EventArgs e)
        {
            base.OnActivated(e);
            MainForm parent = this.MdiParent as MainForm;

            if (parent == null)
            {
                return;
            }
            parent.commandLine.SelectDocument(this.vdScrollableControl1.BaseControl.ActiveDocument);
            VectorDraw.Professional.vdCollections.vdSelection gripset = vdScrollableControl1.BaseControl.ActiveDocument.Selections.FindName("VDGRIPSET_" + vdScrollableControl1.BaseControl.ActiveDocument.ActiveLayOut.Handle.ToStringValue());
            if (gripset != null && gripset.Count > 0)
            {
                FillPropertyGrid(gripset);
            }
            else
            {
                FillPropertyGrid(this.vdScrollableControl1.BaseControl.ActiveDocument);
            }
        }
Ejemplo n.º 3
0
        private void VDraw_GripSelectionModified(object sender, VectorDraw.Professional.vdPrimaries.vdLayout layout,
                                                 VectorDraw.Professional.vdCollections.vdSelection gripSelection)
        {
            if (gripSelection != null)
            {
                if (vDraw.ActiveDocument.PerspectiveMod == vdRender.VdConstPerspectiveMod.PerspectOFF)
                {
                    var hilightted = (from vdFigure vdf in vDraw.ActiveDocument.ActiveLayOut.Entities
                                      where vdf.HighLight
                                      select vdf).ToList();

                    hilightted.ForEach(vdf => vdf.HighLight = false);
                    foreach (vdFigure vdf in gripSelection)
                    {
                        vdf.HighLight = true;
                    }

                    vDraw.ActiveDocument.Redraw(false);
                }


                if (gripSelection.Count > 0)
                {
                    var pt = gripSelection.Last;
                    if (pt == null)
                    {
                        return;
                    }

                    var nameProp = pt.XProperties.FindName("#PointName");
                    if (nameProp != null)
                    {
                        ShowPointInGrid(nameProp.PropValue.ToString());
                    }
                }
            }
        }
Ejemplo n.º 4
0
 private void BaseControl_GripSelectionModified(object sender, VectorDraw.Professional.vdPrimaries.vdLayout layout, VectorDraw.Professional.vdCollections.vdSelection gripSelection)
 {
     if (gripSelection.Count == 0)
     {
         FillPropertyGrid(vdScrollableControl1.BaseControl.ActiveDocument);
     }
     else
     {
         FillPropertyGrid(gripSelection);
     }
 }