//SocketHelper.OnReceiveDataDelegate original; public WatchForm(SocketHelper sh, SocketState cs) { this.sh = sh; this.cs = cs; //this.original = sh.OnReceiveDataCallback; InitializeComponent(); }
public void Begin() { Settings = EOF.GetSettings(); CommandHandlers = InitializeCommandHandlers(); ch = new SocketHelper(Settings) { OnConnectCallback = OnConnect }; ch.OnReceiveCommandCallback.Add(OnReceiveCommand); }
public FileBrowser(SocketState cs, SocketHelper sh) { this.cs = cs; this.sh = sh; sh.OnReceiveCommandCallback.Add(OnReceiveCommand); upLabel = new Label() { Text = "..", ForeColor = Color.DarkRed, Tag = false, }; upLabel.Click += upLabel_Click; InitializeComponent(); }
private void StopListening() { if (sh != null) { sh.Stop(); sh = null; //this.UpdateToolstrip(); System.Threading.Thread.Sleep(250); } }
private void Listen() { this.StopListening(); sh = new SocketHelper(8008) { //OnReceiveDataCallback = OnReceiveData, OnConnectCallback = OnClientConnected, OnDisconnectCallback = OnClientDisconnected }; sh.OnReceiveCommandCallback.Add(OnReceiveCommand); //this.UpdateToolstrip(); }