Exemple #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            client = new ServiceChatClient(new System.ServiceModel.InstanceContext(this));
            string answer = client.Authorization(Login.Text, HashPassword.ComputeSha256Hash(Password.Password));

            if (answer.Equals("CANCEL"))
            {
                MessageBox.Show("отсутствует подключение");
            }
            if (answer.Equals("INCORRECT"))
            {
                MessageBox.Show("неправильный логин или пароль");
            }
            if (answer.Equals("AUTHORIZATION"))
            {
                Messager messager = new Messager(Login.Text);
                messager.Show();
                Close();
            }
        }