示例#1
0
        private void _btnOk_Click(object sender, System.EventArgs e)
        {
            Threshold = (int)_numThreshold.Value;
            Dimension = (int)_numDimension.Value;

            Filter = (AntiAliasingCommandType)Constants.GetValueFromName(
                typeof(AntiAliasingCommandType),
                (string)_cbFilter.SelectedItem,
                _initialFilter);

            _initialThreshold = Threshold;
            _initialDimension = Dimension;
            _initialFilter    = Filter;
        }
示例#2
0
        private void AntiAliasDialog_Load(object sender, System.EventArgs e)
        {
            if (_firstTimer)
            {
                _firstTimer = false;
                AntiAliasingCommand command = new AntiAliasingCommand();
                _initialThreshold = command.Threshold;
                _initialDimension = (int)Math.Max(_numDimension.Minimum, Math.Min(_numDimension.Maximum, command.Dimension));
                _initialFilter    = command.Filter;
            }


            Threshold = _initialThreshold;
            Dimension = _initialDimension;
            Filter    = _initialFilter;

            Tools.FillComboBoxWithEnum(_cbFilter, typeof(AntiAliasingCommandType), Filter);

            _numThreshold.Value = Threshold;
            _numDimension.Value = Dimension;
        }