public ScreenCapture(Socket clientSocket) { InitializeComponent(); //this sets the client socket so we can manage it. this.clientSocket = clientSocket; //this initializes the server socket class. serverSocket = new Helpers.ServerSocket(); //on connection changed event handler serverSocket.onConnectionChanged += ServerSocket_onConnectionChanged; //on data recieved event handler serverSocket.onDataReceived += ServerSocket_onDataReceived; }
public MainForm() { InitializeComponent(); //initailizes the server socket class serverSocket = new Helpers.ServerSocket(); //onlisten event serverSocket.onListening += ServerSocket_onListening; //onconnectionchanged event serverSocket.onConnectionChanged += ServerSocket_onConnectionChanged; //ondatareceived event serverSocket.onDataReceived += ServerSocket_onDataReceived; //event is called when a mouse button is pressed lstClients.MouseDown += LstClients_MouseDown; }
public TaskManager(Socket clientSocket) { InitializeComponent(); //this sets the variable to the socket entered by user when initializing the form. this.clientSocket = clientSocket; //this sets the server socket variable serverSocket = new Helpers.ServerSocket(); //connection changed event serverSocket.onConnectionChanged += ServerSocket_onConnectionChanged; //data received event serverSocket.onDataReceived += ServerSocket_onDataReceived; //on load event this.Load += TaskManager_Load; }