I'm having some problems with the coding I found online. Currently I'm doing the cropping application on an image by using C#. I encounter many errors when debugging. Here's my codes,
private void cropToolStripMe nuItem_Click(ob ject sender, EventArgs e) //start typing code after double clicking on windows form1
public partial class CropForm : Form
{
public CropForm()
{
InitializeCompo nent();
btnOK.DialogRes ult = DialogResult.OK ;
btnCancel.Dialo gResult = DialogResult.Ca ncel;
}
public int CropXPosition
{
get
{
if (string.IsNullO rEmpty(txtX.Tex t))
txtX.Text = "0";
return Convert.ToInt32 (txtX.Text);
}
set { txtX.Text = value.ToString( ); }
}
public int CropYPosition
{
get
{
if (string.IsNullO rEmpty(txtY.Tex t))
txtY.Text = "0";
return Convert.ToInt32 (txtY.Text);
}
set { txtY.Text = value.ToString( ); }
}
public int CropWidth
{
get
{
if (string.IsNullO rEmpty(txtWidth .Text))
txtWidth.Text = "0";
return Convert.ToInt32 (txtWidth.Text) ;
}
set { txtWidth.Text = value.ToString( ); }
}
public int CropHeight
{
get
{
if (string.IsNullO rEmpty(txtHeigh t.Text))
txtHeight.Text = "0";
return Convert.ToInt32 (txtHeight.Text );
}
set { txtHeight.Text = value.ToString( ); }
}
}
}
Please help and do correct me. Thank you.
private void cropToolStripMe nuItem_Click(ob ject sender, EventArgs e) //start typing code after double clicking on windows form1
public partial class CropForm : Form
{
public CropForm()
{
InitializeCompo nent();
btnOK.DialogRes ult = DialogResult.OK ;
btnCancel.Dialo gResult = DialogResult.Ca ncel;
}
public int CropXPosition
{
get
{
if (string.IsNullO rEmpty(txtX.Tex t))
txtX.Text = "0";
return Convert.ToInt32 (txtX.Text);
}
set { txtX.Text = value.ToString( ); }
}
public int CropYPosition
{
get
{
if (string.IsNullO rEmpty(txtY.Tex t))
txtY.Text = "0";
return Convert.ToInt32 (txtY.Text);
}
set { txtY.Text = value.ToString( ); }
}
public int CropWidth
{
get
{
if (string.IsNullO rEmpty(txtWidth .Text))
txtWidth.Text = "0";
return Convert.ToInt32 (txtWidth.Text) ;
}
set { txtWidth.Text = value.ToString( ); }
}
public int CropHeight
{
get
{
if (string.IsNullO rEmpty(txtHeigh t.Text))
txtHeight.Text = "0";
return Convert.ToInt32 (txtHeight.Text );
}
set { txtHeight.Text = value.ToString( ); }
}
}
}
Please help and do correct me. Thank you.
Comment