Exemplo n.º 1
0
 void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e)
 {
     if (null == GroupsCache)
         GroupsCache = e.Groups;
     else
         lock (GroupsCache) { GroupsCache = e.Groups; }
     GroupsEvent.Set();
 }
Exemplo n.º 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);
            }
        }
Exemplo n.º 3
0
 void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e)
 {
     this.groups = e.Groups;
 }
Exemplo n.º 4
0
 void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e)
 {
     BeginInvoke(new MethodInvoker(UpdateDisplay));
 }
Exemplo n.º 5
0
 /// <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);
 }
Exemplo n.º 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();
            }));
        }
Exemplo n.º 7
0
        void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e)
        {
            Groups = e.Groups;

            Invoke(new MethodInvoker(UpdateGroups));
        }
Exemplo n.º 8
0
 void Groups_CurrentGroups(object sender, CurrentGroupsEventArgs e)
 {
     BeginInvoke(new MethodInvoker(RefreshControlsAvailability));
 }
Exemplo n.º 9
0
 private void Self_Current_Groups(object sender, CurrentGroupsEventArgs e)
 {
     groups = e.Groups;
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
                   }
                }
              }
            });
        }
Exemplo n.º 12
0
    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);
                    }
                }
            });
    }
Exemplo n.º 13
0
 public virtual void Groups_OnCurrentGroups(object sender, CurrentGroupsEventArgs e) { OnEvent("On-Current-Groups", paramNamesOnCurrentGroups, paramTypesOnCurrentGroups, e); }