public RemoteExplorerWindow(Connector connector) { InitializeComponent(); mConnector = connector; mClient = new RemoteExplorerClient(connector); mClient.SetForm(this); mClient.setOnResponseReceivedHandler(OnOutputReceived); mClient.SetOnConnectionErrorHandler(OnConnectionError); mClient.BeginReceiveResponse(); }
private void OnConnectSucceed(object sender, ConnectSucceedArgs e) { LogEvent("连接成功!"); mClient = new RemoteExplorerClient(mConnector); mClient.SetForm(this); mClient.setOnResponseReceivedHandler(OnOutputReceived); mClient.SetOnConnectionErrorHandler(OnConnectionError); mClient.BeginReceiveResponse(true); PutContentReq req = new PutContentReq(); mClient.SendRequest(ProtocolTypes.TYPE_PUT_CONTENT, req); LogEvent("正在请求上传文件..."); }