Exemple #1
0
        private void AuthButtonClick(object sender, EventArgs e)
        {
            IApiProvider          apiProvider = ApiProvider.MakeInstance(GlobalConfig.Host);
            IApiResponse <IModel> response    = null;

            try
            {
                response = apiProvider.Connect(
                    loginTextBox.Text, passwordTextBox.Text);
            }
#pragma warning disable CS0168
            catch (Exception ex)
#pragma warning restore CS0168
            {
                MessageBox.Show("Ошибка подключения");
                return;
            }

            MainForm main = new MainForm();
            main.Show();

            this.Hide();
        }