Exemple #1
0
        private async void поворотToolStripMenuItem_Click(object sender, EventArgs e)
        {
            InputForm input = new InputForm("Введите угол в градусах");

            if (input.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    double angle = double.Parse(input.Data);
                    angle             = angle * Math.PI / 180;
                    pictureBox2.Image = await transformer.Round(angle);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
Exemple #2
0
 private async void растяжениеToolStripMenuItem_Click(object sender, EventArgs e)
 {
     InputForm input = new InputForm("Растяжение по X");
     {
         if (input.ShowDialog() == DialogResult.OK)
         {
             try
             {
                 double x_mult = double.Parse(input.Data);
                 input = new InputForm("Растяжение по Y");
                 if (input.ShowDialog() == DialogResult.OK)
                 {
                     double y_mult = double.Parse(input.Data);
                     pictureBox2.Image = await transformer.Stretch(x_mult, y_mult);
                 }
             }
             catch (Exception ex)
             {
                 MessageBox.Show(ex.Message);
             }
         }
     }
 }