private void TableStatusUsers_Load(object sender, EventArgs e) { ServerMethods.CreateServer(IPAddress.Parse(loginS.IPAddress), loginS.Port); SetButtons(); listViewUsers.Enabled = false; listViewHistory.Enabled = false; }
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"; }