static class Program {
/// <summary>
/// アプリケーションのメイン エントリ ポイントです。
/// </summary>
[ STAThread]
static void Main( ) {
//Application.EnableVisualStyles();
//Application.SetCompatibleTextRenderingDefault(false);
//Application.Run(new Form1());
Form form = new Form1( ) ;
form.Text = "艦隊これくしょん" ;
Application.Run ( form) ;
}
}
class Form1 : Form {
public Form1( ) {
Bitmap bitmap = new Bitmap( @"C:\Desktop\プログラミング\sanpuru.jpg" ) ;
this.BackgroundImage = bitmap;
this.BackgroundImageLayout = ImageLayout.Zoom ;
this.FormClosing += new FormClosingEventHandler( Form1_FormClosing) ;
}
void Form1_FormClosing( object sender, FormClosingEventArgs e) {
DialogResult result = MessageBox.Show ( "終了しますか?" , "確認" , MessageBoxButtons.YesNo , MessageBoxIcon.Question ) ;
if ( result == System.Windows .Forms .DialogResult .No ) {
e.Cancel = true ;
}
}
}
CXN0YXRpYyBjbGFzcyBQcm9ncmFtIHsKCQkvLy8gPHN1bW1hcnk+CgkJLy8vIOOCouODl+ODquOCseODvOOCt+ODp+ODs+OBruODoeOCpOODsyDjgqjjg7Pjg4jjg6og44Od44Kk44Oz44OI44Gn44GZ44CCCgkJLy8vIDwvc3VtbWFyeT4KCQlbU1RBVGhyZWFkXQoJCXN0YXRpYyB2b2lkIE1haW4oKSB7CgkJCS8vQXBwbGljYXRpb24uRW5hYmxlVmlzdWFsU3R5bGVzKCk7CgkJCS8vQXBwbGljYXRpb24uU2V0Q29tcGF0aWJsZVRleHRSZW5kZXJpbmdEZWZhdWx0KGZhbHNlKTsKCQkJLy9BcHBsaWNhdGlvbi5SdW4obmV3IEZvcm0xKCkpOwoKCQkJRm9ybSBmb3JtID0gbmV3IEZvcm0xKCk7CgoJCQlmb3JtLlRleHQgPSAi6Imm6ZqK44GT44KM44GP44GX44KH44KTIjsKCQkJQXBwbGljYXRpb24uUnVuKGZvcm0pOwoJCX0KCX0KCgljbGFzcyBGb3JtMSA6IEZvcm0gewoKCQlwdWJsaWMgRm9ybTEoKSB7CgkJCUJpdG1hcCBiaXRtYXAgPSBuZXcgQml0bWFwKEAiQzpcRGVza3RvcFzjg5fjg63jgrDjg6njg5/jg7PjgrBcc2FucHVydS5qcGciKTsKCgkJCXRoaXMuQmFja2dyb3VuZEltYWdlID0gYml0bWFwOwoJCQl0aGlzLkJhY2tncm91bmRJbWFnZUxheW91dCA9IEltYWdlTGF5b3V0Llpvb207CgkJCXRoaXMuRm9ybUNsb3NpbmcgKz0gbmV3IEZvcm1DbG9zaW5nRXZlbnRIYW5kbGVyKEZvcm0xX0Zvcm1DbG9zaW5nKTsKCQl9CgoJCXZvaWQgRm9ybTFfRm9ybUNsb3Npbmcob2JqZWN0IHNlbmRlciwgRm9ybUNsb3NpbmdFdmVudEFyZ3MgZSkgewoKCQkJRGlhbG9nUmVzdWx0IHJlc3VsdCA9IE1lc3NhZ2VCb3guU2hvdygi57WC5LqG44GX44G+44GZ44GL77yfIiwgIueiuuiqjSIsIE1lc3NhZ2VCb3hCdXR0b25zLlllc05vLCBNZXNzYWdlQm94SWNvbi5RdWVzdGlvbik7CgkJCWlmIChyZXN1bHQgPT0gU3lzdGVtLldpbmRvd3MuRm9ybXMuRGlhbG9nUmVzdWx0Lk5vKSB7CgkJCQllLkNhbmNlbCA9IHRydWU7CgkJCX0KCQkKCQl9CgoJfQo=
compilation info
prog.cs(18,23): error CS0246: The type or namespace name `Form' could not be found. Are you missing a using directive or an assembly reference?
prog.cs(28,55): error CS0246: The type or namespace name `FormClosingEventArgs' could not be found. Are you missing a using directive or an assembly reference?
Compilation failed: 2 error(s), 0 warnings
stdout