Пример #1
0
        public screen(string userData)
        {
            InitializeComponent();
            this.userData = userData;
            myUsername    = Parse(userData, "Username");
            friendP       = new friendPanel(myUsername, this);
            panel1.Controls.Add(friendP);

            for (int contactNumber = 5; contactNumber > 0; contactNumber--)
            {
                string newcontact = Parse(userData, "Friend" + contactNumber);
                if (newcontact != "")
                {
                    contactUsernames.Add(newcontact);
                }
            }

            friendP.setList(contactUsernames);

            foreach (string contactUser in contactUsernames)
            {
                chats.Add(new chatbox2(myUsername, contactUser, this));
                string contactData = getDataFromUser(contactUser);
                contactss.Add(new contact("  " + Parse(contactData, "FirstName") + " " + Parse(contactData, "LastName"), contactUser, chats[chats.Count - 1], this));
                friendP.add(contactss[contactss.Count - 1]);
            }
            friendP.NoFriends();
        }
Пример #2
0
 public FriendRequest(string myUsername, string from, friendPanel parent)
 {
     InitializeComponent();
     this.myUsername        = myUsername;
     this.from              = from;
     bunifuFlatButton1.Text = this.from;
     this.parent            = parent;
 }