Client events and Write method

Add method Write
Event ConnectDone
Add functions to WPF form to read and write