Exemplo n.º 1
0
        public ClientForm()
        {
            AddressForm addressForm = new AddressForm();

            if (addressForm.ShowDialog() != DialogResult.OK)
            {
                Close();
            }

            clientBase = new ERDClientBase(addressForm.address);
            if ((new Login(clientBase).ShowDialog()) != DialogResult.OK)
            {
                Close();
            }

            clientBase.UpdateUsers();
            InitializeComponent();


            listBox1.Items.Clear();
            for (int i = 0; i < clientBase.users.Length; i++)
            {
                listBox1.Items.Add(clientBase.users[i].ToString());
            }

            listBox1.MouseDoubleClick += ListBox1_MouseDoubleClick;

            timer1.Start();
        }
Exemplo n.º 2
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     clientBase.UpdateUsers();
     listBox1.Items.Clear();
     for (int i = 0; i < clientBase.users.Length; i++)
     {
         listBox1.Items.Add(clientBase.users[i].ToString());
     }
 }