public LeetPlugin(PubComb plug) { plugin = plug; //formthread = new Thread(new ThreadStart(delegate() //{ form = new leetForm1(this); // Application.Run(form); //})); //formthread.SetApartmentState(ApartmentState.STA); //formthread.Start(); this.frame = plug.frame; this.proxy = plug.proxy; this.brand = "ls"; this.proxy.AddDelegate(PacketType.ScriptDialogReply, Direction.Outgoing, new PacketDelegate(OutDialogFromViewer)); this.proxy.AddDelegate(PacketType.ChatFromViewer, Direction.Outgoing, new PacketDelegate(OutChatFromViewerHandler)); this.proxy.AddDelegate(PacketType.ImprovedInstantMessage, Direction.Outgoing, new PacketDelegate(SendingIM)); }