Exemple #1
0
 private void TableStatusUsers_Load(object sender, EventArgs e)
 {
     ServerMethods.CreateServer(IPAddress.Parse(loginS.IPAddress), loginS.Port);
     SetButtons();
     listViewUsers.Enabled   = false;
     listViewHistory.Enabled = false;
 }
Exemple #2
0
        private void btnConnect_Click(object sender, EventArgs e)
        {
            try
            {
                ServerMethods.CreateServer(IPAddress.Parse(loginS.IPAddress), loginS.Port);
            }
            catch (Exception)
            {
                MessageBox.Show("Server failed to connect");
            }
            SetButtons();
            listViewUsers.Enabled   = false;
            listViewHistory.Enabled = false;

            //לתקן
            //counting number of connected clients
            //int count = 0;
            //foreach (var client in )
            //{
            //    count++;
            //}
            //this.Text = count + " Connected Users";
        }