void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e)
 {
     if (null == GroupsCache)
         GroupsCache = e.Groups;
     else
         lock (GroupsCache) { GroupsCache = e.Groups; }
     GroupsEvent.Set();
 }
Example #2
0
        private void Groups_OnCurrentGroups(object sender, CurrentGroupsEventArgs e)
        {
            try
            {
                //this.instance.State.Groups = e.Groups;

                foreach (KeyValuePair<UUID, Group> g in e.Groups)
                {
                    lock (instance.State.Groups)
                    {
                        if (!instance.State.Groups.ContainsKey(g.Key))
                        {
                            instance.State.Groups.Add(g.Key, g.Value);
                        }
                    }
                }

                BeginInvoke(new MethodInvoker(GetGroupsName));
            }
            catch (Exception ex)
            {
                //string exp = ex.Message;
                reporter.Show(ex);
            }
        }
Example #3
0
 void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e)
 {
     this.groups = e.Groups;
 }
Example #4
0
 void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e)
 {
     BeginInvoke(new MethodInvoker(UpdateDisplay));
 }
 /// <summary>Raises the CurrentGroups event</summary>
 /// <param name="e">A CurrentGroupsEventArgs object containing the
 /// data sent from the simulator</param>
 protected virtual void OnCurrentGroups(CurrentGroupsEventArgs e)
 {
     EventHandler<CurrentGroupsEventArgs> handler = m_CurrentGroups;
     if (handler != null)
         handler(this, e);
 }
Example #6
0
        private void Groups_OnCurrentGroups(object sender, CurrentGroupsEventArgs e)
        {
            if (this.InvokeRequired)
            {
                this.BeginInvoke(new MethodInvoker(delegate()
                {
                    Groups_OnCurrentGroups(sender, e);
                }));

                return;
            }

            foreach (KeyValuePair<UUID, Group> g in e.Groups)
            {
                if (!instance.State.Groups.ContainsKey(g.Key))
                {
                    instance.State.Groups.Add(g.Key, g.Value);
                }
            }

            foreach (Group group in this.instance.State.Groups.Values)
            {
                if (!instance.State.GroupStore.ContainsKey(group.ID))
                {
                    this.instance.State.GroupStore.Add(group.ID, group.Name);
                }
            }

            this.BeginInvoke(new MethodInvoker(delegate()
            {
                UpdateGroups();
            }));
        }
Example #7
0
        void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e)
        {
            Groups = e.Groups;

            Invoke(new MethodInvoker(UpdateGroups));
        }
 void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e)
 {
     BeginInvoke(new MethodInvoker(RefreshControlsAvailability));
 }
 private void Self_Current_Groups(object sender, CurrentGroupsEventArgs e)
 {
     groups = e.Groups;
 }
Example #10
0
 public void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e)
 {
     Hashtable message = new Hashtable();
     message.Add("MessageType", "CurrentGroups");
     message.Add("Groups", e.Groups);
     enqueue(message);
 }
Example #11
0
        void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e)
        {
            Gtk.Application.Invoke(delegate {
                lock(this.groups_recieved)
                {
                foreach(KeyValuePair <UUID,Group> group in e.Groups)
                {
                    if(!this.groups_recieved.ContainsKey(group.Key))
                    {
                        bool active = false;
                        if(MainClass.client.Self.ActiveGroup==group.Value.ID)
                        {
                            active = true;
                        }
                        Gtk.TreeIter iter=store.AppendValues(group.Value.Name, group.Value,active);
                        if(active)
                            active_group_iter=iter;

                        this.groups_recieved.Add(group.Key,group.Value);
                   }
                }
              }
            });
        }
    void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e)
    {
        Gtk.Application.Invoke(delegate {

                foreach(KeyValuePair <UUID,Group> group in e.Groups)
                {
                    if(!this.current_groups.Contains(group.Value))
                    {
                        this.current_groups.Add(group.Value);
                    }
                }
            });
    }
Example #13
0
 public virtual void Groups_OnCurrentGroups(object sender, CurrentGroupsEventArgs e) { OnEvent("On-Current-Groups", paramNamesOnCurrentGroups, paramTypesOnCurrentGroups, e); }