示例#1
0
        /// <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);
            }
        }
示例#2
0
文件: MainForm.cs 项目: thexur/1code
        /// <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);
            }
        }