using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace WinPostalCode
{
///
/// Form1 の概要の説明です。
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
///
/// 必要なデザイナ変数です。
///
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Windows フォーム デザイナ サポートに必要です。
//
InitializeComponent();
//
// TODO: InitializeComponent 呼び出しの後に、コンストラクタ コードを追加してください。
//
}
///
/// 使用されているリソースに後処理を実行します。
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows フォーム デザイナで生成されたコード
///
/// デザイナ サポートに必要なメソッドです。このメソッドの内容を
/// コード エディタで変更しないでください。
///
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(84, 19);
this.textBox1.Name = "textBox1";
this.textBox1.TabIndex = 0;
this.textBox1.Text = "1000000";
//
// button1
//
this.button1.Location = new System.Drawing.Point(196, 19);
this.button1.Name = "button1";
this.button1.TabIndex = 1;
this.button1.Text = "検索";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label1
//
this.label1.Location = new System.Drawing.Point(19, 55);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(240, 32);
this.label1.TabIndex = 2;
this.label1.Text = "住所";
//
// label2
//
this.label2.Location = new System.Drawing.Point(21, 25);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(54, 18);
this.label2.TabIndex = 3;
this.label2.Text = "郵便番号";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 12);
this.ClientSize = new System.Drawing.Size(292, 93);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1);
this.Name = "Form1";
this.Text = "郵便番号から検索";
this.ResumeLayout(false);
}
#endregion
///
/// アプリケーションのメイン エントリ ポイントです。
///
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
WinPostalCode.localhost.Service1 srv = new WinPostalCode.localhost.Service1();
label1.Text = srv.Address(int.Parse(textBox1.Text));
}
}
}