17

TextBox がありますが、ボタンが押されたときに関数を呼び出す方法を説明するソースが見つかりません。

public Simple()
{
    Text = "Server Command Line";
    Size = new Size(800, 400);

    CenterToScreen();

    Button button = new Button();
    TextBox txt = new TextBox ();

    txt.Location = new Point (20, Size.Height - 70);
    txt.Size = new Size (600, 30);
    txt.Parent = this;

    button.Text = "SEND";
    button.Size = new Size (50, 20);
    button.Location = new Point(620, Size.Height-70);
    button.Parent = this;
    button.Click += new EventHandler(Submit);
}

一部の情報源では、関数を使用するように指示されていますが、関数がどのように呼び出されるのかわかりません。

4

2 に答える 2