using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace workshop2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void pictureBox1_Click(object sender, EventArgs e) { } private void openFileButton_Click(object sender, EventArgs e) { openFileDialog1.ShowDialog(); pictureBox1.Load(openFileDialog1.FileName); } private void quitButton_Click(object sender, EventArgs e) { Application.Exit(); } private void rotateLeft_Click(object sender, EventArgs e) { Bitmap image = new Bitmap(pictureBox1.Image); image.RotateFlip(RotateFlipType.Rotate270FlipNone); pictureBox1.Image = image; pictureBox1.Refresh(); } private void rotateRight_Click(object sender, EventArgs e) { Bitmap image = new Bitmap(pictureBox1.Image); image.RotateFlip(RotateFlipType.Rotate90FlipNone); pictureBox1.Image = image; pictureBox1.Refresh(); } } }