using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace GWSocketClient
{

    public delegate void OnInputResult(string topmost);


    public partial class InputDialog : Form
    {

        public event OnInputResult InputResult;

        public InputDialog()
        {
            InitializeComponent();
        }

     

        private void textBoxInput_TextChanged(object sender, EventArgs e)
        {
            labelLen.Text = (textBoxInput.TextLength / 2.0) + "";
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            InputResult(textBoxInput.Text.Trim());
            this.Close();
        }
    }
}
