public void RefreshList() { //clears the listview lstTasks.Items.Clear(); //sends command for getting tasks. serverSocket.SendData(string.Empty, Helpers.CommandHandler.Commands.TASK_LIST, clientSocket); }
private void ServerSocket_onConnectionChanged(bool connected, Socket socket) { //clear the clients (were gonna update it) lstClients.Invoke(new Action(() => lstClients.Items.Clear())); //loop through all the clients foreach (Socket clientSocket in serverSocket.connections) { //send data "info" so we can refresh client listview with info serverSocket.SendData(string.Empty, Helpers.CommandHandler.Commands.GET_INFO, clientSocket); } //set the amount of connections label text labelConnections.Invoke(new Action(() => labelConnections.Text = $"Connections: {serverSocket.connections.Count}")); }
private void btnTakePic_Click(object sender, EventArgs e) { //sending "screencap" so we can recieve a screenshot back. serverSocket.SendData(string.Empty, Helpers.CommandHandler.Commands.SCREEN_CAPTURE, clientSocket); }