public ConferenceIMTabWindow(METAboltInstance instance, UUID session, string sessionName) { InitializeComponent(); Disposed += new EventHandler(IMTabWindow_Disposed); this.instance = instance; this.client = instance.Client; this.SessionName = sessionName; netcom = this.instance.Netcom; this.session = session; textManager = new IMTextManager(this.instance, new RichTextBoxPrinter(rtbIMText), IMTextManagerType.Conference, this.session, sessionName); // Callbacks netcom.ClientLoginStatus += new EventHandler <LoginProgressEventArgs>(netcom_ClientLoginStatus); netcom.ClientDisconnected += new EventHandler <DisconnectedEventArgs>(netcom_ClientDisconnected); instance.GlobalSettings.OnSettingChanged += new Settings.SettingChangedCallback(GlobalSettings_OnSettingChanged); if (!client.Self.GroupChatSessions.ContainsKey(session)) { client.Self.ChatterBoxAcceptInvite(session); } UpdateFontSize(); }
public frmProfile(METAboltInstance instance, string fullName, UUID agentID) : base(instance) { InitializeComponent(); Disposed += new EventHandler(frmProfile_Disposed); AutoSavePosition = true; this.instance = instance; netcom = this.instance.Netcom; client = this.instance.Client; this.fullName = fullName; this.agentID = agentID; this.Text = fullName + " (profile) - " + Properties.Resources.ProgramName; txtUUID.Text = agentID.ToString(); if (client.Friends.FriendList.ContainsKey(agentID)) { btnFriend.Enabled = false; } if (instance.InventoryClipboard != null) { btnGive.Enabled = true; } if (agentID == client.Self.AgentID) { myProfile = true; rtbAbout.ReadOnly = false; rtbAboutFL.ReadOnly = false; txtWebURL.ReadOnly = false; pickTitle.ReadOnly = false; pickDetail.ReadOnly = false; btnRequestTeleport.Visible = false; btnDeletePick.Visible = true; btnNewPick.Visible = true; } // Callbacks client.Avatars.AvatarPropertiesReply += new EventHandler <AvatarPropertiesReplyEventArgs>(Avatars_AvatarPropertiesReply); client.Avatars.AvatarPicksReply += new EventHandler <AvatarPicksReplyEventArgs>(Avatars_AvatarPicksReply); client.Avatars.PickInfoReply += new EventHandler <PickInfoReplyEventArgs>(Avatars_PickInfoReply); client.Parcels.ParcelInfoReply += new EventHandler <ParcelInfoReplyEventArgs>(Parcels_ParcelInfoReply); client.Avatars.AvatarGroupsReply += new EventHandler <AvatarGroupsReplyEventArgs>(Avatars_AvatarGroupsReply); client.Self.MuteListUpdated += new EventHandler <EventArgs>(Self_MuteListUpdated); netcom.ClientDisconnected += new EventHandler <DisconnectedEventArgs>(netcom_ClientDisconnected); instance.InventoryClipboardUpdated += new EventHandler <EventArgs>(instance_InventoryClipboardUpdated); InitializeProfile(); }
public FindPeopleConsole(METAboltInstance instance, UUID queryID) { InitializeComponent(); Disposed += new EventHandler(FindPeopleConsole_Disposed); findPeopleResults = new Dictionary <string, UUID>(); this.queryID = queryID; this.instance = instance; netcom = this.instance.Netcom; client = this.instance.Client; // Callbacks client.Directory.DirPeopleReply += new EventHandler <DirPeopleReplyEventArgs>(Directory_DirPeopleReply); }
public METAboltInstance(GridClient client0) { // incase something else calls GlobalInstance while we are loading globalInstance = this; if (!System.Diagnostics.Debugger.IsAttached) { Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); Application.ThreadException += HandleThreadException; } client = client0; // Initialize current time zone, and mark when we started GetWorldTimeZone(); StartupTimeUTC = DateTime.UtcNow; // Are we running mono? monoRuntime = Type.GetType("Mono.Runtime") != null; Keyboard = new Keyboard(); Application.AddMessageFilter(Keyboard); netcom = new METAboltNetcom(this); state = new StateManager(this); mediaManager = new MediaManager(this); commandsManager = new CommandsManager(this); ContextActionManager = new ContextActionsManager(this); RegisterContextActions(); movement = new METAboltMovement(this); InitializeLoggingAndConfig(); InitializeClient(client); rlv = new RLVManager(this); gridManager = new GridManager(); gridManager.LoadGrids(); names = new NameManager(this); COF = new CurrentOutfitFolder(this); mainForm = new frmMain(this); mainForm.InitializeControls(); mainForm.Load += new EventHandler(mainForm_Load); pluginManager = new PluginManager(this); pluginManager.ScanAndLoadPlugins(); }
public void CleanUp() { MarkEndExecution(); if (COF != null) { COF.Dispose(); COF = null; } if (names != null) { names.Dispose(); names = null; } if (gridManager != null) { gridManager.Dispose(); gridManager = null; } if (rlv != null) { rlv.Dispose(); rlv = null; } if (client != null) { UnregisterClientEvents(client); } if (pluginManager != null) { pluginManager.Dispose(); pluginManager = null; } if (movement != null) { movement.Dispose(); movement = null; } if (commandsManager != null) { commandsManager.Dispose(); commandsManager = null; } if (ContextActionManager != null) { ContextActionManager.Dispose(); ContextActionManager = null; } if (mediaManager != null) { mediaManager.Dispose(); mediaManager = null; } if (state != null) { state.Dispose(); state = null; } if (netcom != null) { netcom.Dispose(); netcom = null; } if (mainForm != null) { mainForm.Load -= new EventHandler(mainForm_Load); } Logger.Log("METAboltInstance finished cleaning up.", Helpers.LogLevel.Debug); }