private void MainForm_Load(object sender, EventArgs e) { client = Client.Open(); client.IO.StartProxy(); proxy = client.IO.Proxy; hookProxy = new HookProxy(client); proxy.ReceivedSelfAppearIncomingPacket += new ProxyBase.IncomingPacketListener( delegate(IncomingPacket p) { Success(uxProxyStatus); return true; }); hookProxy.ReceivedSelfAppearIncomingPacket += new ProxyBase.IncomingPacketListener( delegate(IncomingPacket p) { Success(uxHookProxyStatus); return true; }); }
void InitializeProxy() { ProxyBase proxy; #if UseHookProxy client.Dll.InitializePipe(); proxy = new HookProxy(client); #else client.IO.StartProxy(); proxy = client.IO.Proxy; #endif proxy.ReceivedTextMessageIncomingPacket += new Proxy.IncomingPacketListener(Proxy_ReceivedTextMessageIncomingPacket); proxy.SplitPacketFromServer += SplitMessageFromServer; proxy.SplitPacketFromClient += SplitMessageFromClient; }