/// <summary> /// 处理按钮 btnRotateAngle 的点击事件. /// </summary> private void btnRotateAngle_Click(object sender, EventArgs e) { float angle = 0; // 验证输入值. float.TryParse(tbRotateAngle.Text, out angle); if (angle > 0 && angle < 360) { // 旋转图像. imgManipulator.RotateImg(angle); // 重绘 pnlImage. imgManipulator.DrawControl(this.pnlImage, adjustment, pen); } }
/// <summary> /// Handle the click event of the button btnRotateAngle. /// </summary> private void btnRotateAngle_Click(object sender, EventArgs e) { float angle = 0; // Verify the input value. float.TryParse(tbRotateAngle.Text, out angle); if (angle > 0 && angle < 360) { // Rotate or flip the image. imgManipulator.RotateImg(angle); // Redraw the pnlImage. imgManipulator.DrawControl(this.pnlImage, adjustment, pen); } }