public ShadowPrefsForm2(ShadowForm1 f, ShadowPlugin shad) { InitializeComponent(); this.form1 = f; this.shadowPlug = shad; this.textBox3Brand.Text = shad.brand; this.textBox2Trigger.Text = shad.trigger; this.textBox1Indicator.Text = shad.indicator; this.Text = shad.brand; }
public ShadowPlugin(ProxyFrame frame) { fish = new Twofish(); fish.Mode = CipherMode.ECB; ms = new System.IO.MemoryStream(); formthread = new Thread(new ThreadStart(delegate() { form = new ShadowForm1(this); Application.Run(form); })); formthread.SetApartmentState(ApartmentState.STA); formthread.Start(); this.frame = frame; this.proxy = frame.proxy; 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.Incoming, new PacketDelegate(RecivedIM)); this.proxy.AddDelegate(PacketType.ImprovedInstantMessage, Direction.Outgoing, new PacketDelegate(SendingIM)); this.proxy.AddDelegate(PacketType.ChatFromSimulator, Direction.Incoming, new PacketDelegate(InChatFromServerHandler)); }