Exemple #1
0
        private void ClientForm_Load(object sender, EventArgs e)
        {
            LoginForm loginForm = new LoginForm();

            loginForm.ShowDialog();
            if (loginForm.DialogResult == DialogResult.OK)
            {
                string user  = loginForm.UserName;
                Model  model = new Model(user);
                model.AddListener(this);
                controller = new Controller(model);
                this.Text += " - " + user;
                controller.OnConnectButton();
            }
            else
            {
                Close();
            }
        }