public RelayConsole(RadegastInstance instance) : base(instance) { InitializeComponent(); Disposed += new EventHandler(RelayConsole_Disposed); textPrinter = new RichTextBoxPrinter(rtbChatText); irc = new IrcClient(); irc.SendDelay = 200; irc.AutoReconnect = true; irc.CtcpVersion = Properties.Resources.RadegastTitle; irc.Encoding = Encoding.UTF8; TC.OnTabAdded += new TabsConsole.TabCallback(TC_OnTabAdded); TC.OnTabRemoved += new TabsConsole.TabCallback(TC_OnTabRemoved); irc.OnError += new ErrorEventHandler(irc_OnError); irc.OnRawMessage += new IrcEventHandler(irc_OnRawMessage); irc.OnChannelMessage += new IrcEventHandler(irc_OnChannelMessage); irc.OnConnected += new EventHandler(irc_OnConnected); irc.OnDisconnected += new EventHandler(irc_OnDisconnected); client.Self.IM += new EventHandler<InstantMessageEventArgs>(Self_IM); RefreshGroups(); }
public CogbotTabWindow(RadegastInstance instance, CogbotRadegastPlugin man) { InitializeComponent(); this.instance = instance; Disposed += new EventHandler(ChatConsole_Disposed); if (!instance.advancedDebugging) { // tbtnAnim.Visible = false; // tbtnTextures.Visible = false; ctxAnim.Visible = false; ctxTextures.Visible = false; } ctxAnim.Visible = true; ctxTextures.Visible = true; writeLock = new TaskQueueHandler(man.TheBot, "FormWriter", TimeSpan.Zero, false); // Callbacks netcom.ClientLoginStatus += new EventHandler<LoginProgressEventArgs>(netcom_ClientLoginStatus); //netcom.ClientLoggedOut += new EventHandler(netcom_ClientLoggedOut); // netcom.ChatReceived += new EventHandler<ChatEventArgs>(netcom_ChatReceived); //netcom.InstantMessageReceived += new EventHandler<InstantMessageEventArgs>(netcom_InstantMessageReceived); //this.instance.Config.ConfigApplied += new EventHandler<ConfigAppliedEventArgs>(Config_ConfigApplied); // client.Grid.OnCoarseLocationUpdate += new GridManager.CoarseLocationUpdateCallback(Grid_OnCoarseLocationUpdate); //client.Avatars.OnAvatarProperties += new AvatarManager.AvatarPropertiesCallback(Avatars_OnAvatarProperties); // movement = new SleekMovement(client); printer = new RichTextBoxPrinter(rtbChat); chatManager = man; //chatManager.PrintStartupMessage(); this.instance.MainForm.Load += new EventHandler(MainForm_Load); this.VisibleChanged += Form_VisibleChanged; simObjectSorterClass = new SimObjectSorterClass(); lvwObjects.ListViewItemSorter = simObjectSorterClass; //Alice = new AIMLbot.Bot(); //Alice.isAcceptingUserInput = false; //try { // Alice.loadSettings(); // AIMLbot.Utils.AIMLLoader loader = new AIMLbot.Utils.AIMLLoader(Alice); // Alice.isAcceptingUserInput = false; // loader.loadAIML(Alice.PathToAIML); // Alice.isAcceptingUserInput = true; //} catch (Exception ex) { // System.Console.WriteLine("Failed loading ALICE: " + ex.Message); //} //instance.Client.Self.Movement.UseOnlyThreads.Add(Thread.CurrentThread); // ApplyConfig(this.instance.Config.CurrentConfig); //ClientManager.SingleInstance.Clients[] //BotClien.OnlyOneCurrentBotClient this.cbxInput.Enabled = true; }