private void SetCoordinateSystemDependentObjects(CSLineID id)
        {
            // Scales
            _listOfScales = new SelectableListNodeList
            {
                new SelectableListNode("Z-Scale", 0, false)
            };

            // Axes
            // collect the AxisStyleIdentifier from the actual layer and also all possible AxisStyleIdentifier
            _axisControl = new Dictionary <CSLineID, AxisStyleControllerConditionalGlue>();
            _listOfAxes  = new SelectableListNodeList();
            foreach (CSLineID ids in _doc.CoordinateSystem.GetJoinedAxisStyleIdentifier(_doc.AxisStyles.AxisStyleIDs, new CSLineID[] { id }))
            {
                CSAxisInformation info = _doc.CoordinateSystem.GetAxisStyleInformation(ids);
                var axisInfo           = new AxisStyleControllerConditionalGlue(info, _doc.AxisStyles);
                _axisControl.Add(info.Identifier, axisInfo);
                _listOfAxes.Add(new SelectableListNode(info.NameOfAxisStyle, info.Identifier, false));
            }

            // Planes
            _listOfPlanes   = new SelectableListNodeList();
            _currentPlaneID = CSPlaneID.Front;
            _listOfPlanes.Add(new SelectableListNode("Front", _currentPlaneID, true));
        }
Esempio n. 2
0
        private void SetCoordinateSystemDependentObjects(CSLineID id)
        {
            // Scales
            _axisScaleController = new ScaleWithTicksController[_doc.Scales.Count];
            _listOfScales        = new SelectableListNodeList();
            if (_doc.Scales.Count > 0)
            {
                _listOfScales.Add(new SelectableListNode("X-Scale", 0, false));
            }
            if (_doc.Scales.Count > 1)
            {
                _listOfScales.Add(new SelectableListNode("Y-Scale", 1, false));
            }
            if (_doc.Scales.Count > 2)
            {
                _listOfScales.Add(new SelectableListNode("Z-Scale", 2, false));
            }

            // collect the AxisStyleIdentifier from the actual layer and also all possible AxisStyleIdentifier
            _axisControl = new Dictionary <CSLineID, AxisStyleControllerConditionalGlue>();
            _listOfAxes  = new SelectableListNodeList();
            foreach (CSLineID ids in _doc.CoordinateSystem.GetJoinedAxisStyleIdentifier(_doc.AxisStyles.AxisStyleIDs, new CSLineID[] { id }))
            {
                CSAxisInformation info = _doc.CoordinateSystem.GetAxisStyleInformation(ids);

                var axisInfo = new AxisStyleControllerConditionalGlue(info, _doc.AxisStyles);
                _axisControl.Add(info.Identifier, axisInfo);
                _listOfAxes.Add(new SelectableListNode(info.NameOfAxisStyle, info.Identifier, false));
            }

            // Planes
            _listOfPlanes   = new SelectableListNodeList();
            _currentPlaneID = CSPlaneID.Back3D;
            _listOfPlanes.Add(new SelectableListNode("Left", CSPlaneID.Left3D, true));
            _listOfPlanes.Add(new SelectableListNode("Front", CSPlaneID.Front3D, true));
            _listOfPlanes.Add(new SelectableListNode("Right", CSPlaneID.Right3D, true));
            _listOfPlanes.Add(new SelectableListNode("Back", CSPlaneID.Back3D, true));
            _listOfPlanes.Add(new SelectableListNode("Top", CSPlaneID.Top3D, true));
            _listOfPlanes.Add(new SelectableListNode("Bottom", CSPlaneID.Bottom3D, true));

            _GridStyleController = new Dictionary <CSPlaneID, IMVCANController>();
        }