private void SetupRadegastGUI(RadegastInstance inst) { DLRConsole.AllocConsole(); SetLoginButton("SetupCogbotGUI", false); DLRConsole.SafelyRun(() => { chatConsole = new CogbotTabWindow(inst, this) { Dock = DockStyle.Fill, Visible = false }; tab = inst.TabConsole.AddTab("cogbot", "Cogbot", chatConsole); tab.AllowClose = false; tab.AllowDetach = true; }); DLRConsole.SafelyRun(() => { _simObjectsConsole = new SimObjectsConsole(inst, this) { Dock = DockStyle.Fill, // Visible = false }; tab = inst.TabConsole.AddTab("simobjects", "SimObjects", _simObjectsConsole); tab.AllowClose = false; tab.AllowDetach = true; }); DLRConsole.SafelyRun(() => { RadegastTab tab1 = RadegastInstance.TabConsole.GetTab("chat"); tab1.AllowDetach = true; ChatConsole rchatConsole = (ChatConsole)tab1.Control; rchatConsole.cbxInput.Enabled = true; rchatConsole.btnSay.Enabled = true; // rchatConsole.btnShout.Enabled = true; //RadegastTab tab3 = RadegastInstance.TabConsole.GetTab("search"); //tab3.Control = new METAbolt.SearchConsole(inst); DLRConsole.SafelyRun(() => { var sc = new METAbolt.SearchConsole(inst) { Dock = DockStyle.Fill, // Visible = false }; tab = inst.TabConsole.AddTab("cogbotsearch", "CogbotSearch", sc); tab.AllowClose = false; tab.AllowDetach = true; }); }); if (TheBot.IsLoggedInAndReady) { RadegastInstance.Netcom.GetType().GetMethod("Network_LoginProgress", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public) .Invoke(RadegastInstance.Netcom, new object[] { this, new LoginProgressEventArgs(LoginStatus.Success, "Cogbot already logged in", "") }); } }
private void SetupRadegastGUI(RadegastInstance inst) { DLRConsole.AllocConsole(); SetLoginButton("SetupCogbotGUI", false); DLRConsole.SafelyRun(() => { chatConsole = new CogbotTabWindow(inst, this) { Dock = DockStyle.Fill, Visible = false }; tab = inst.TabConsole.AddTab("cogbot", "Cogbot", chatConsole); tab.AllowClose = false; tab.AllowDetach = true; }); DLRConsole.SafelyRun(() => { _simObjectsConsole = new SimObjectsConsole(inst, this) { Dock = DockStyle.Fill, // Visible = false }; tab = inst.TabConsole.AddTab("simobjects", "SimObjects", _simObjectsConsole); tab.AllowClose = false; tab.AllowDetach = true; }); DLRConsole.SafelyRun(() => { RadegastTab tab1 = RadegastInstance.TabConsole.GetTab("chat"); tab1.AllowDetach = true; ChatConsole rchatConsole = (ChatConsole)tab1.Control; rchatConsole.cbxInput.Enabled = true; rchatConsole.btnSay.Enabled = true; // rchatConsole.btnShout.Enabled = true; //RadegastTab tab3 = RadegastInstance.TabConsole.GetTab("search"); //tab3.Control = new METAbolt.SearchConsole(inst); DLRConsole.SafelyRun(() => { var sc = new METAbolt.SearchConsole(inst) { Dock = DockStyle.Fill, // Visible = false }; tab = inst.TabConsole.AddTab("cogbotsearch", "CogbotSearch", sc); tab.AllowClose = false; tab.AllowDetach = true; }); }); if (TheBot.IsLoggedInAndReady) { RadegastInstance.Netcom.GetType().GetMethod("Network_LoginProgress", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public) .Invoke(RadegastInstance.Netcom, new object[] {this, new LoginProgressEventArgs(LoginStatus.Success, "Cogbot already logged in", "")}); } }