private void AddFriend()
 {
     if (username.Text.Length > 0)
     {
         if (ContainsVaildChars(username.Text))
         {
             var status = NetworkClasses.AddFriend(username.Text);
             switch (status)
             {
                 case "Done":
                     username.Text = "";
                     Hide();
                     break;
                 case "Nonexistant":
                     MessageBox.Show("Username doesn't exist", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     break;
                 case "Preexisting":
                     MessageBox.Show("Already Friends with " + username.Text, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     break;
             }
         }
         else
         {
             MessageBox.Show("Username can only contian letters and numbers", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     else
     {
         MessageBox.Show("Please enter a username", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }