private void panel1_MouseDown1(object sender, MouseEventArgs e)
{
this.tmpX = e.X;
this.tmpY = e.Y;
this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown2);
}
private void panel1_MouseDown2(object sender, MouseEventArgs e)
{
System.Drawing.Graphics g = this.panel1.CreateGraphics();
System.Drawing.Pen newPen = new System.Drawing.Pen(Color.Red, 10);
g.DrawLine(newPen,new Point(this.tmpX, this.tmpY), new Point( e.X, e.Y));
this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDown1);
}
cHJpdmF0ZSB2b2lkIHBhbmVsMV9Nb3VzZURvd24xKG9iamVjdCBzZW5kZXIsIE1vdXNlRXZlbnRBcmdzIGUpCiAgICAgICAgewogICAgICAgICAgICB0aGlzLnRtcFggPSBlLlg7CiAgICAgICAgICAgIHRoaXMudG1wWSA9IGUuWTsKICAgICAgICAgICAgdGhpcy5wYW5lbDEuTW91c2VEb3duICs9IG5ldyBTeXN0ZW0uV2luZG93cy5Gb3Jtcy5Nb3VzZUV2ZW50SGFuZGxlcih0aGlzLnBhbmVsMV9Nb3VzZURvd24yKTsKCiAgICAgICAgfQpwcml2YXRlIHZvaWQgcGFuZWwxX01vdXNlRG93bjIob2JqZWN0IHNlbmRlciwgTW91c2VFdmVudEFyZ3MgZSkKICAgICAgICB7CiAgICAgICAgICAgIFN5c3RlbS5EcmF3aW5nLkdyYXBoaWNzIGcgPSB0aGlzLnBhbmVsMS5DcmVhdGVHcmFwaGljcygpOwogICAgICAgICAgICBTeXN0ZW0uRHJhd2luZy5QZW4gbmV3UGVuID0gbmV3IFN5c3RlbS5EcmF3aW5nLlBlbihDb2xvci5SZWQsIDEwKTsKICAgICAgICAgICAgZy5EcmF3TGluZShuZXdQZW4sbmV3IFBvaW50KHRoaXMudG1wWCwgdGhpcy50bXBZKSwgbmV3IFBvaW50KCBlLlgsIGUuWSkpOwogICAgICAgICAgICB0aGlzLnBhbmVsMS5Nb3VzZURvd24gKz0gbmV3IFN5c3RlbS5XaW5kb3dzLkZvcm1zLk1vdXNlRXZlbnRIYW5kbGVyKHRoaXMucGFuZWwxX01vdXNlRG93bjEpOwogICAgICAgIH0=
prog.cs(1,8): error CS1525: Unexpected symbol `void', expecting `class', `delegate', `enum', `interface', `partial', or `struct'
Compilation failed: 1 error(s), 0 warnings