Esempio n. 1
0
 private void OnAccauntDelete()
 {
     if (textBoxLogin.Text.Length > 0 && textBoxPass.Text.Length > 0 && textBoxName.Text.Length == 0 && comboBoxAge.SelectedItem == null && comboBoxSex.SelectedItem == null)
     {
         AccauntArgs accarg = new AccauntArgs(textBoxLogin.Text, textBoxPass.Text);
         ;
         onAccauntDelete?.Invoke(this, accarg);
         Close();
     }
     else
     {
         MessageBox.Show("Your data is not correct!");
     }
 }
Esempio n. 2
0
        private async void RegistrateUsersAccauntAsync(object sender, AccauntArgs e)
        {
            int i;

            if (e._sex._sex == sex.Male)
            {
                i = 0;
            }
            else
            {
                i = 1;
            }

            await _serviceManager.ServiceChatClient.RegistrateUsersAccauntAsync(e._login, e._password, e._name, e._age, i);
        }
Esempio n. 3
0
 private void OnAccauntRegistration()
 {
     if (textBoxLogin.Text.Length > 0 && textBoxPass.Text.Length > 0 && textBoxName.Text.Length > 0 && comboBoxAge.SelectedItem != null && comboBoxSex.SelectedItem != null)
     {
         AccauntArgs accarg = new AccauntArgs
         {
             _login    = textBoxLogin.Text,
             _password = textBoxPass.Text,
             _name     = textBoxName.Text,
             _age      = (Int32)comboBoxAge.SelectedItem,
             _sex      = (Sex)comboBoxSex.SelectedItem
         };
         onAccauntRegistration?.Invoke(this, accarg);
         Close();
     }
     else
     {
         MessageBox.Show("Your data is not correct!");
     }
 }
Esempio n. 4
0
 private void ShowAccauntArgs(object sender, AccauntArgs e)
 {
     MessageBox.Show(e._login + " ; " + e._password + " ; " + e._name + " ; " + e._age + " ; " + e._sex);
 }
Esempio n. 5
0
 private async void DeleteUsersAccauntAsync(object sender, AccauntArgs e)
 {
     await _serviceManager.ServiceChatClient.DeleteUsersAccauntAsync(e._login, e._password);
 }