using System;
using System.Collections .Generic ;
using System.ComponentModel ;
using System.Data ;
using System.Drawing ;
using System.Linq ;
using System.Text ;
using System.Windows .Forms ;
namespace test06
{
public partial class Form1 : Form
{
public Form1( )
{
InitializeComponent( ) ;
}
private void button1_Click( object sender, EventArgs e)
{
Bitmap bitmap_out = new Bitmap( 6376 , 10805 , System.Drawing .Imaging .PixelFormat .Format32bppArgb ) ;
Bitmap bitmap_out2 = new Bitmap( 6376 , 10805 , System.Drawing .Imaging .PixelFormat .Format32bppArgb ) ; //※2
Graphics graphics = Graphics.FromImage ( bitmap_out) ;
for ( int i = 0 ; i < bitmap_out.Width ; i += 50 )
{
graphics.DrawLine ( Pens.Black , i, 0 , i, bitmap_out.Height ) ;
}
for ( int i = 0 ; i < bitmap_out.Height ; i += 50 )
{
graphics.DrawLine ( Pens.Black , 0 , i, bitmap_out.Width , i) ;
}
graphics.Dispose ( ) ;
if ( this.pictureBox1 .Image != null )
{
this.pictureBox1 .Image .Dispose ( ) ;
}
this.pictureBox1 .Image = null ;
//this.pictureBox1.Image = new Bitmap(bitmap_out);
//bitmap_out.Dispose();
this.pictureBox1 .Image = bitmap_out;
}
}
}
dXNpbmcgU3lzdGVtOwoKdXNpbmcgU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWM7Cgp1c2luZyBTeXN0ZW0uQ29tcG9uZW50TW9kZWw7Cgp1c2luZyBTeXN0ZW0uRGF0YTsKCnVzaW5nIFN5c3RlbS5EcmF3aW5nOwoKdXNpbmcgU3lzdGVtLkxpbnE7Cgp1c2luZyBTeXN0ZW0uVGV4dDsKCnVzaW5nIFN5c3RlbS5XaW5kb3dzLkZvcm1zOwoKCgpuYW1lc3BhY2UgdGVzdDA2Cgp7CgogICAgcHVibGljIHBhcnRpYWwgY2xhc3MgRm9ybTEgOiBGb3JtCgogICAgewoKICAgICAgICBwdWJsaWMgRm9ybTEoKQoKICAgICAgICB7CgogICAgICAgICAgICBJbml0aWFsaXplQ29tcG9uZW50KCk7CgogIC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Y3R1cmVCb3gxLkltYWdlLkRpc3Bvc2UoKTsKCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIHRoaXMucGljdHVyZUJveDEuSW1hZ2UgPSBudWxsOwoKICAgICAgICAgICAgLy90aGlzLnBpY3R1cmVCb3gxLkltYWdlID0gbmV3IEJpdG1hcChiaXRtYXBfb3V0KTsKCiAgICAgICAgICAgIC8vYml0bWFwX291dC5EaXNwb3NlKCk7CgogICAgICAgICAgICB0aGlzLnBpY3R1cmVCb3gxLkltYWdlID0gYml0bWFwX291dDsKCiAgICAgICAgfQoKICAgIH0KCn0KCg==
compilation info
prog.cs(7,14): error CS0234: The type or namespace name `Data' does not exist in the namespace `System'. Are you missing an assembly reference?
prog.cs(9,14): error CS0234: The type or namespace name `Drawing' does not exist in the namespace `System'. Are you missing an assembly reference?
prog.cs(15,14): error CS0234: The type or namespace name `Windows' does not exist in the namespace `System'. Are you missing an assembly reference?
Compilation failed: 3 error(s), 0 warnings
stdout