Ejemplo n.º 1
0
        public GroupInvite(RadegastInstance instance, Group group, Dictionary<UUID, GroupRole> roles)
            : base(instance)
        {
            InitializeComponent();
            Disposed += new EventHandler(GroupInvite_Disposed);
            AutoSavePosition = true;

            this.instance = instance;
            this.roles = roles;
            this.group = group;
            this.netcom = instance.Netcom;

            picker = new AvatarPicker(instance) { Dock = DockStyle.Fill };
            Controls.Add(picker);
            picker.SelectionChaged += new EventHandler(picker_SelectionChaged);
            picker.BringToFront();

            netcom.ClientDisconnected += new EventHandler<DisconnectedEventArgs>(Netcom_ClientDisconnected);

            cmbRoles.Items.Add(roles[UUID.Zero]);
            cmbRoles.SelectedIndex = 0;

            foreach (KeyValuePair<UUID, GroupRole> role in roles)
                if (role.Key != UUID.Zero)
                    cmbRoles.Items.Add(role.Value);
        }
Ejemplo n.º 2
0
        public ConferenceIMTabWindow(RadegastInstance 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);
            }

            Radegast.GUI.GuiHelpers.ApplyGuiFixes(this);
        }
Ejemplo n.º 3
0
        public GroupInvite(RadegastInstance instance, Group group, Dictionary <UUID, GroupRole> roles)
            : base(instance)
        {
            InitializeComponent();
            Disposed        += new EventHandler(GroupInvite_Disposed);
            AutoSavePosition = true;

            this.instance = instance;
            this.roles    = roles;
            this.group    = group;
            netcom        = instance.Netcom;

            picker = new AvatarPicker(instance)
            {
                Dock = DockStyle.Fill
            };
            Controls.Add(picker);
            picker.SelectionChaged += new EventHandler(picker_SelectionChaged);
            picker.BringToFront();

            netcom.ClientDisconnected += new EventHandler <DisconnectedEventArgs>(Netcom_ClientDisconnected);

            cmbRoles.Items.Add(roles[UUID.Zero]);
            cmbRoles.SelectedIndex = 0;

            foreach (KeyValuePair <UUID, GroupRole> role in roles)
            {
                if (role.Key != UUID.Zero)
                {
                    cmbRoles.Items.Add(role.Value);
                }
            }

            GUI.GuiHelpers.ApplyGuiFixes(this);
        }
Ejemplo n.º 4
0
 void GroupInvite_Disposed(object sender, EventArgs e)
 {
     netcom.ClientDisconnected -= new EventHandler <DisconnectedEventArgs>(Netcom_ClientDisconnected);
     netcom   = null;
     instance = null;
     picker.Dispose();
     Logger.DebugLog("Group picker disposed");
 }
Ejemplo n.º 5
0
        public frmProfile(RadegastInstance 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;
                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();
        }
Ejemplo n.º 6
0
        public FindPeopleConsole(RadegastInstance 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);
        }
Ejemplo n.º 7
0
        public frmTeleport(RadegastInstance instance)
        {
            InitializeComponent();
            Disposed += new EventHandler(frmTeleport_Disposed);

            this.instance = instance;
            netcom = this.instance.Netcom;
            client = this.instance.Client;

            // Callbacks
            netcom.ClientDisconnected += new EventHandler<DisconnectedEventArgs>(netcom_ClientDisconnected);
            client.Grid.GridRegion += new EventHandler<GridRegionEventArgs>(Grid_GridRegion);
            client.Self.TeleportProgress += new EventHandler<TeleportEventArgs>(Self_TeleportProgress);

            SetDefaultValues();
        }
Ejemplo n.º 8
0
        public MuteResidentForm(RadegastInstance instance)
            : base(instance)
        {
            InitializeComponent();
            Disposed += new EventHandler(MuteResidentForm_Disposed);
            AutoSavePosition = true;

            this.instance = instance;
            this.netcom = instance.Netcom;

            picker = new AvatarPicker(instance) { Dock = DockStyle.Fill };
            Controls.Add(picker);
            picker.SelectionChaged += new EventHandler(picker_SelectionChaged);
            picker.BringToFront();

            netcom.ClientDisconnected += new EventHandler<DisconnectedEventArgs>(Netcom_ClientDisconnected);
        }
Ejemplo n.º 9
0
        public BanGroupMember(RadegastInstance instance, Group group, GroupDetails parent)
            : base(instance)
        {
            InitializeComponent();
            Disposed += new EventHandler(GroupInvite_Disposed);
            AutoSavePosition = true;

            this.instance = instance;
            this.group = group;
            this.netcom = instance.Netcom;
            this.parent = parent;

            picker = new AvatarPicker(instance) { Dock = DockStyle.Fill };
            Controls.Add(picker);
            picker.SelectionChaged += new EventHandler(picker_SelectionChaged);
            picker.BringToFront();

            netcom.ClientDisconnected += new EventHandler<DisconnectedEventArgs>(Netcom_ClientDisconnected);
        }
Ejemplo n.º 10
0
        public MuteResidentForm(RadegastInstance instance)
            : base(instance)
        {
            InitializeComponent();
            Disposed        += new EventHandler(MuteResidentForm_Disposed);
            AutoSavePosition = true;

            this.instance = instance;
            this.netcom   = instance.Netcom;

            picker = new AvatarPicker(instance)
            {
                Dock = DockStyle.Fill
            };
            Controls.Add(picker);
            picker.SelectionChaged += new EventHandler(picker_SelectionChaged);
            picker.BringToFront();

            netcom.ClientDisconnected += new EventHandler <DisconnectedEventArgs>(Netcom_ClientDisconnected);
        }
Ejemplo n.º 11
0
        public BanGroupMember(RadegastInstance instance, Group group, GroupDetails parent)
            : base(instance)
        {
            InitializeComponent();
            Disposed        += new EventHandler(GroupInvite_Disposed);
            AutoSavePosition = true;

            this.instance = instance;
            this.group    = group;
            this.netcom   = instance.Netcom;
            this.parent   = parent;

            picker = new AvatarPicker(instance)
            {
                Dock = DockStyle.Fill
            };
            Controls.Add(picker);
            picker.SelectionChaged += new EventHandler(picker_SelectionChaged);
            picker.BringToFront();

            netcom.ClientDisconnected += new EventHandler <DisconnectedEventArgs>(Netcom_ClientDisconnected);
        }
Ejemplo n.º 12
0
        public void CleanUp()
        {
            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("RadegastInstance finished cleaning up.", Helpers.LogLevel.Debug);
        }
Ejemplo n.º 13
0
        public RadegastInstance(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;

            netcom = new RadegastNetcom(this);
            state = new StateManager(this);
            mediaManager = new MediaManager(this);
            commandsManager = new CommandsManager(this);
            ContextActionManager = new ContextActionsManager(this);
            movement = new RadegastMovement(this);

            InitializeLoggingAndConfig();
            InitializeClient(client);

            rlv = new RLVManager(this);
            gridManager = new GridManager(this);
            gridManager.LoadGrids();

            names = new NameManager(this);

            mainForm = new frmMain(this);
            mainForm.InitializeControls();

            mainForm.Load += new EventHandler(mainForm_Load);
            pluginManager = new PluginManager(this);
            pluginManager.ScanAndLoadPlugins();
        }
Ejemplo n.º 14
0
 void GroupInvite_Disposed(object sender, EventArgs e)
 {
     netcom.ClientDisconnected -= new EventHandler<DisconnectedEventArgs>(Netcom_ClientDisconnected);
     netcom = null;
     instance = null;
     picker.Dispose();
     Logger.DebugLog("Group picker disposed");
 }