示例#1
0
        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;
        }
示例#2
0
        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;
        }