public EdgeDetectorDialog() { InitializeComponent(); _EdgeDetectorCommand = new EdgeDetectorCommand(); //Set command default values _Threshold = 60; InitializeUI(); }
private void EdgeDetectorDialog_Load(object sender, EventArgs e) { EdgeDetectorCommand command = new EdgeDetectorCommand(); _initialThreshold = command.Threshold; _initialFilter = command.Filter; Threshold = _initialThreshold; Filter = _initialFilter; Tools.FillComboBoxWithEnum(_cbFilter, typeof(EdgeDetectorCommandType), Filter); _numThreshold.Maximum = _max; _numThreshold.Minimum = _min; DialogUtilities.SetNumericValue(_numThreshold, Threshold); }
private void EdgeDetectorDialog_Load(object sender, System.EventArgs e) { if (_firstTimer) { _firstTimer = false; EdgeDetectorCommand command = new EdgeDetectorCommand(); _initialThreshold = command.Threshold; _initialFilter = command.Filter; } Threshold = _initialThreshold; Filter = _initialFilter; Tools.FillComboBoxWithEnum(_cbFilter, typeof(EdgeDetectorCommandType), Filter); switch (_bitsPerPixel) { case 12: _numThreshold.Maximum = 4095; break; case 16: case 48: case 64: _numThreshold.Maximum = 65535; break; default: _numThreshold.Maximum = 255; break; } if (_image.Signed) { _numThreshold.Maximum /= 2; _numThreshold.Minimum = -_numThreshold.Maximum; } DialogUtilities.SetNumericValue(_numThreshold, Threshold); }