private void _btnOk_Click(object sender, System.EventArgs e) { // Set the new values for the selected RotateCommandFlags flags and apply to the loaded image. Angle = (int)_numAngle.Value * 100; Flags = RotateCommandFlags.None; if (_cbResize.Checked) { Flags |= RotateCommandFlags.Resize; } if (_rbButtonResample.Checked) { Flags |= RotateCommandFlags.Resample; } if (_rbButtonBicubic.Checked) { Flags |= RotateCommandFlags.Bicubic; } _initialAngle = Angle; _initialFlags = Flags; _initialFillColor = FillColor; }
private void _btnOk_Click(object sender, System.EventArgs e) { Angle = (int)_numAngle.Value * 100; Flags = RotateCommandFlags.None; if (_cbResize.Checked) { Flags |= RotateCommandFlags.Resize; } if (_rbButtonResample.Checked) { Flags |= RotateCommandFlags.Resample; } if (_rbButtonBicubic.Checked) { Flags |= RotateCommandFlags.Bicubic; } _initialAngle = Angle; _initialFlags = Flags; _initialFillColor = FillColor; }
private void RotateDialog_Load(object sender, EventArgs e) { RotateCommand cmd = new RotateCommand(); _initialAngle = cmd.Angle; _initialFlags = cmd.Flags; _initialFillColorLevel = 0; Angle = _initialAngle / 100; Flags = _initialFlags; FillColorLevel = _initialFillColorLevel; _pnlRevColor.BackColor = FillColor = Converters.ToGdiPlusColor(cmd.FillColor); _numAngle.Value = Angle; _cbResize.Checked = (Flags & RotateCommandFlags.Resize) == RotateCommandFlags.Resize; _numFillColorLevel.Value = FillColorLevel; if ((Flags & RotateCommandFlags.Resample) == RotateCommandFlags.Resample) { _rbButtonResample.Checked = true; } else if ((Flags & RotateCommandFlags.Bicubic) == RotateCommandFlags.Bicubic) { _rbButtonBicubic.Checked = true; } else { _rbButtonNormal.Checked = true; } if (_isGray) { _pnlLevel.Visible = true; _pnlColor.Visible = false; } else { _pnlLevel.Visible = false; _pnlColor.Visible = true; } }
private void RotateDialog_Load(object sender, System.EventArgs e) { Angle = _initialAngle / 100; Flags = _initialFlags; FillColor = _initialFillColor; _numAngle.Value = Angle; _cbResize.Checked = (Flags & RotateCommandFlags.Resize) == RotateCommandFlags.Resize; if ((Flags & RotateCommandFlags.Resample) == RotateCommandFlags.Resample) { _rbButtonResample.Checked = true; } else if ((Flags & RotateCommandFlags.Bicubic) == RotateCommandFlags.Bicubic) { _rbButtonBicubic.Checked = true; } else { _rbButtonNormal.Checked = true; } }