Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
        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;
        }