Esempio n. 1
0
        public void SetAttachmentDirection()
        {
            IPlotArea layer = Main.DocumentPath.GetRootNodeImplementing(_doc, typeof(IPlotArea)) as IPlotArea;

            List <ListNode> names = new List <ListNode>();

            int idx = -1;

            if (layer != null)
            {
                int count = -1;
                foreach (CSPlaneID id in layer.CoordinateSystem.GetJoinedPlaneIdentifier(layer.AxisStyleIDs, new CSPlaneID[] { _doc.AttachedAxis }))
                {
                    count++;
                    if (id == _doc.AttachedAxis)
                    {
                        idx = count;
                    }

                    CSPlaneInformation info = layer.CoordinateSystem.GetPlaneInformation(id);
                    names.Add(new ListNode(info.Name, id));
                }
            }

            _view.AttachedAxis_Initialize(names, Math.Max(idx, 0));
        }
Esempio n. 2
0
        public CSPlaneInformation GetPlaneInformation(CSPlaneID planeID)
        {
            CSLineID          lineID   = (CSLineID)planeID;
            CSAxisInformation lineInfo = GetAxisStyleInformation(lineID);

            CSPlaneInformation result = new CSPlaneInformation(planeID);

            result.Name = lineInfo.NameOfAxisStyle;
            return(result);
        }
        public void InitializeDropLineChoices()
        {
            var layer = AbsoluteDocumentPath.GetRootNodeImplementing(_doc, typeof(XYZPlotLayer)) as XYZPlotLayer;

            _dropLineChoices = new SelectableListNodeList();
            foreach (CSPlaneID id in layer.CoordinateSystem.GetJoinedPlaneIdentifier(layer.AxisStyles.AxisStyleIDs, _doc.DropTargets))
            {
                bool sel = _doc.DropTargets.Contains(id);
                CSPlaneInformation info = layer.CoordinateSystem.GetPlaneInformation(id);
                _dropLineChoices.Add(new SelectableListNode(info.Name, id, sel));
            }
        }
        public void InitializeFillDirectionChoices()
        {
            _areaFillDirectionChoices = new SelectableListNodeList();
            var layer = AbsoluteDocumentPath.GetRootNodeImplementing(_doc, typeof(IPlotArea)) as IPlotArea;

            if (layer != null)
            {
                foreach (CSPlaneID id in layer.CoordinateSystem.GetJoinedPlaneIdentifier(layer.AxisStyleIDs, new CSPlaneID[] { _doc.FillDirection }))
                {
                    CSPlaneInformation info = layer.CoordinateSystem.GetPlaneInformation(id);
                    _areaFillDirectionChoices.Add(new SelectableListNode(info.Name, id, id == _doc.FillDirection));
                }
            }
        }
        public void SetDropLineConditions()
        {
            XYPlotLayer layer = Main.DocumentPath.GetRootNodeImplementing(_doc, typeof(XYPlotLayer)) as XYPlotLayer;

            List <SelectableListNode> names = new List <SelectableListNode>();

            foreach (CSPlaneID id in layer.CoordinateSystem.GetJoinedPlaneIdentifier(layer.AxisStyles.AxisStyleIDs, _tempDoc.DropLine))
            {
                bool sel = _tempDoc.DropLine.Contains(id);
                CSPlaneInformation info = layer.CoordinateSystem.GetPlaneInformation(id);
                names.Add(new SelectableListNode(info.Name, id, sel));
            }

            _view.InitializeDropLineConditions(names);
        }
Esempio n. 6
0
        private IList <CSPlaneInformation> GetPlaneStyleInformations()
        {
            var axisStyleInformations = new List <CSPlaneInformation>();

            for (int axisnumber = 0; axisnumber <= 2; ++axisnumber)
            {
                for (int firstother = 0; firstother <= 1; ++firstother)
                {
                    var    planeId = new CSPlaneID(axisnumber, firstother);
                    string name    = GetNameOfPlane(planeId);

                    var item = new CSPlaneInformation(planeId)
                    {
                        Name = name
                    };

                    axisStyleInformations.Add(item);
                }
            }

            return(axisStyleInformations.AsReadOnly());
        }
    public CSPlaneInformation GetPlaneInformation(CSPlaneID planeID)
    {
      CSLineID lineID = (CSLineID)planeID;
      CSAxisInformation lineInfo = GetAxisStyleInformation(lineID);

      CSPlaneInformation result = new CSPlaneInformation(planeID);
      result.Name = lineInfo.NameOfAxisStyle;
      return result;
    }