Exemplo n.º 1
0
        private void turnAnyDegree(KeyPressEventArgs e)
        {
            int x = 0;

            if (e.KeyChar != (char)13)
            {
                return;
            }
            else
            {
                if (Functions.IsNumeric(textBox1.Text.Trim()))
                {
                    x = int.Parse(textBox1.Text.Trim());
                    Control[] editors = frmScan.Controls.Find("axImgEdit1", true);
                    if (editors.Length > 0)
                    {
                        AxImgeditLibCtl.AxImgEdit obj = (AxImgeditLibCtl.AxImgEdit)editors[0];
                        obj.RotateRight(x);
                    }
                    this.DialogResult = DialogResult.OK;
                }
                else
                {
                    return;
                }
            }
        }
Exemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (Functions.IsNumeric(textBox1.Text.Trim()))
     {
         int       x       = int.Parse(textBox1.Text.Trim());
         Control[] editors = frmScan.Controls.Find("axImgEdit1", true);
         if (editors.Length > 0)
         {
             AxImgeditLibCtl.AxImgEdit obj = (AxImgeditLibCtl.AxImgEdit)editors[0];
             obj.RotateRight(x);
             this.DialogResult = DialogResult.OK;
         }
     }
     else
     {
         return;
     }
 }