protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _scaleController = new DensityScaleController(newScale => _doc.Scale = (NumericalScale)newScale)
                {
                    UseDocumentCopy = UseDocument.Directly
                };
                _scaleController.InitializeDocument(_doc.Scale);

                _colorProviderController = new ColorProviderController(newColorProvider => _doc.ColorProvider = newColorProvider)
                {
                    UseDocumentCopy = UseDocument.Directly
                };
                _colorProviderController.InitializeDocument(_doc.ColorProvider);
            }

            if (null != _view)
            {
                _scaleController.ViewObject         = _view.ScaleView;
                _colorProviderController.ViewObject = _view.ColorProviderView;
                InitializeDataColumnText();
            }
        }
예제 #2
0
        protected override void Initialize(bool initData)
        {
            base.Initialize(initData);

            if (initData)
            {
                _scaleController = new DensityScaleController(newScale => _doc.Scale = (NumericalScale)newScale);
                _scaleController.InitializeDocument(_doc.Scale);
            }

            if (null != _view)
            {
                _scaleController.ViewObject = _view.ScaleView;
                InitializeDataColumnText();
                _view.SymbolSizeAt0     = _doc.SymbolSizeAt0;
                _view.SymbolSizeAt1     = _doc.SymbolSizeAt1;
                _view.SymbolSizeBelow   = _doc.SymbolSizeBelow;
                _view.SymbolSizeAbove   = _doc.SymbolSizeAbove;
                _view.SymbolSizeInvalid = _doc.SymbolSizeInvalid;
                _view.NumberOfSteps     = _doc.NumberOfSteps;
            }
        }
        public override IEnumerable <ControllerAndSetNullMethod> GetSubControllers()
        {
            yield return(new ControllerAndSetNullMethod(_scaleController, () => _scaleController = null));

            yield return(new ControllerAndSetNullMethod(_colorProviderController, () => _colorProviderController = null));
        }