private void Groups_GroupNamesReply(object sender, GroupNamesEventArgs e)
        {
            lock (groupCacheLock)
            {
                foreach (var i in e.GroupNames)
                {
                    var name = "#" + MakeIrcName(i.Value);
                    GroupIdByIrcName[name]    = i.Key;
                    GroupIrcNameByUuid[i.Key] = name;
                }

                lock (groupRequests)
                {
                    foreach (var i in groupRequests)
                    {
                        string name;
                        if (GroupIrcNameByUuid.TryGetValue(i.Key, out name))
                        {
                            i.Value.SetResult(name);
                            groupRequests.Remove(i.Key);
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public override void Groups_OnGroupNames(object sender, GroupNamesEventArgs e)
 {
     foreach (KeyValuePair <UUID, string> kvp in e.GroupNames)
     {
         AddGroup2Key(kvp.Value, kvp.Key);
     }
     ///base.Groups_OnGroupNames(groupNames);
 }
Ejemplo n.º 3
0
        public void Groups_GroupNamesReply(object sender, GroupNamesEventArgs e)
        {
            AjaxLife.Debug("OnGroupNames", "OnGroupNames arrived.");
            Hashtable message = new Hashtable();

            message.Add("MessageType", "GroupNames");
            message.Add("Names", e.GroupNames);
            enqueue(message);
        }
 private void GroupNames(object sender, GroupNamesEventArgs e)
 {
     if (!IsExporting)
     {
         return;
     }
     foreach (KeyValuePair <UUID, string> name in e.GroupNames)
     {
         lock (fileWriterLock) File.WriteAllText(siminfoDir + "" + name.Key + ".group", name.Value);
     }
 }
Ejemplo n.º 5
0
        void Groups_GroupNamesReply(object sender, GroupNamesEventArgs e)
        {
            if (!e.GroupNames.ContainsKey(parcel.GroupID))
            {
                return;
            }

            client.Groups.GroupNamesReply -= new EventHandler <GroupNamesEventArgs>(Groups_GroupNamesReply);

            BeginInvoke(new MethodInvoker(delegate()
            {
                txtGroupOwner.Text  = e.GroupNames[parcel.GroupID];
                pictureBox3.Visible = true;
            }));
        }
Ejemplo n.º 6
0
        void Groups_GroupNamesReply(object sender, GroupNamesEventArgs e)
        {
            if (!e.GroupNames.ContainsKey(parcelGroupID))
            {
                return;
            }

            if (InvokeRequired)
            {
                if (IsHandleCreated || !instance.MonoRuntime)
                {
                    BeginInvoke(new MethodInvoker(() => Groups_GroupNamesReply(sender, e)));
                }
                return;
            }

            lblGroup.Text = e.GroupNames[parcelGroupID];
        }