private void button1_Click(object sender, EventArgs e) { name = textBox1.Text; password = textBox2.Text; Autorize aut = new Autorize(name, password); Form2 newForm2 = new Form2(aut); newForm2.Show(); }
public History(MessageGetHistoryObject dialog, Autorize account, long id) { InitializeComponent(); _account = account; idSendMessage = id; foreach (var s in dialog.Messages) { us = _account.Api.Users.Get(new long[] { long.Parse(s.FromId.ToString()) }).FirstOrDefault(); listBox1.Items.Add(s.Date + " " + us.FirstName); listBox1.Items.Add(s.Text); } }
public Form2(Autorize aut) { InitializeComponent(); account = aut; Post(); label1.Text = $"{account.Person.FirstName} {account.Person.LastName}"; pictureBox1.Image = SizePhoto(account.Adress); foreach (User friend in account.AllFriends) { listBox1.Items.Add(friend.FirstName + " " + friend.LastName); } listBox1.SelectedIndexChanged += listBox1_SelectedIndexChanged; }