public UserInputHandler(NetCopy instance) { this.CreateHandle(new CreateParams()); netCopy = instance; Subscribe(); nextClipboardViewer = (IntPtr)SetClipboardViewer((int)this.Handle); }
private void TryConnect() { string ipAddressString = textBoxIP.Text; IPAddress ipAddress = IPAddress.Parse(ipAddressString); netCopy = new NetCopy(ipAddress, this); windowHandler = new UserInputHandler(netCopy); FormClosing += FormClosingHandler; }
public void ResetForm() { textBoxIP.Text = ""; textBoxIP.Enabled = true; buttonConnect.Text = "Connect"; //buttonConnect.Enabled = true; FormClosingHandler(this, new FormClosingEventArgs(CloseReason.None, false)); netCopy = null; windowHandler = null; FormClosing -= FormClosingHandler; serverStatus = ServerStatus.DISCONNECTED; }