Exemple #1
0
        private void Add_User_Confirm_Click(object sender, RoutedEventArgs e)
        {
            // username is email
            string username = Add_User_Name.Text;

            if (GlobalVariables.isEmailInPeople(username))
            {
                if (!DisplayUsernamesData.NAMES_IN.Contains(username))
                {
                    Group_Members.Text = Group_Members.Text + $"{GlobalVariables.returnName(username)} ({username})" + Environment.NewLine;

                    Add_User_Name.Text = "";
                    DisplayUsernamesData.TOTAL_USERNAMES++;
                    DisplayUsernamesData.NAMES_IN.Add(username);
                }
                else
                {
                    MessageBox.Show("User is already added to group");
                }
            }
            else
            {
                MessageBox.Show("User is not in database!");
            }
        }
Exemple #2
0
        private void addSelfUser()
        {
            string username = GlobalVariables.currentPerson.Email;

            Group_Members.Text = Group_Members.Text + $"{GlobalVariables.returnName(username)} ({username})" + Environment.NewLine;

            Add_User_Name.Text = "";
            DisplayUsernamesData.TOTAL_USERNAMES++;
            DisplayUsernamesData.NAMES_IN.Add(username);
        }