private void InitializeOptions()
        {
            // no options
            if (ToolOptions == null)
            {
                return;
            }

            // if buffer exists in options, retrieve it
            if (ToolOptions.ContainsKey(BufferOptionName))
            {
                _buffer = (double)ToolOptions[BufferOptionName];
            }
            else
            {
                // otherwise assign the default value and add to the ToolOptions dictionary
                _buffer = DefaultBuffer;
                ToolOptions.Add(BufferOptionName, _buffer);
                // ensure options are notified that changes have been made
                NotifyPropertyChanged(BufferOptionName);
            }

            // if bufferratio exists in options, retrieve it
            if (ToolOptions.ContainsKey(BufferOptionNameRatio))
            {
                _bufferRatio = (double)ToolOptions[BufferOptionNameRatio];
            }
            else
            {
                // otherwise assign the default value and add to the ToolOptions dictionary
                _bufferRatio = DefaultBufferRatio;
                ToolOptions.Add(BufferOptionNameRatio, _bufferRatio);
                // ensure options are notified that changes have been made
                NotifyPropertyChanged(BufferOptionNameRatio);
            }
        }
        private void InitializeOptions()
        {
            // no options
            if (ToolOptions == null)
            {
                return;
            }

            // if buffer exists in options, retrieve it
            if (ToolOptions.ContainsKey(CircleOptionName))
            {
                _circle = (double)ToolOptions[CircleOptionName];
            }
            else
            {
                // otherwise assign the default value and add to the ToolOptions dictionary
                _circle = DefaultCircleOptionName;
                ToolOptions.Add(CircleOptionName, _circle);
                // ensure options are notified that changes have been made
                NotifyPropertyChanged(CircleOptionName);
            }

            // if bufferratio exists in options, retrieve it
            if (ToolOptions.ContainsKey(CircleOptionNameNumberOfPoints))
            {
                _circlePoints = (double)ToolOptions[CircleOptionNameNumberOfPoints];
            }
            else
            {
                // otherwise assign the default value and add to the ToolOptions dictionary
                _circlePoints = DefaultCircleOptionNameNumberOfPoints;
                ToolOptions.Add(CircleOptionNameNumberOfPoints, _circlePoints);
                // ensure options are notified that changes have been made
                NotifyPropertyChanged(CircleOptionNameNumberOfPoints);
            }
        }
Exemple #3
0
        private void InitializeOptions()
        {
            // no options
            if (ToolOptions == null)
            {
                return;
            }

            // if buffer exists in options, retrieve it
            if (ToolOptions.ContainsKey(RadiusOptionName))
            {
                _radius = (double)ToolOptions[RadiusOptionName];
            }
            else
            {
                // otherwise assign the default value and add to the ToolOptions dictionary
                _radius = DefaultRadius;
                ToolOptions.Add(RadiusOptionName, _radius);
                // ensure options are notified that changes have been made
                NotifyPropertyChanged(RadiusOptionName);
            }
        }