Exemplo n.º 1
0
 /// <summary>Raises the GroupNoticesListReply event</summary>
 /// <param name="e">An GroupNoticesListReplyEventArgs object containing the
 /// data returned from the simulator</param>
 protected virtual void OnGroupNoticesListReply(GroupNoticesListReplyEventArgs e)
 {
     EventHandler<GroupNoticesListReplyEventArgs> handler = m_GroupNoticesListReply;
     if (handler != null)
         handler(this, e);
 }
Exemplo n.º 2
0
        void Groups_GroupNoticesListReply(object sender, GroupNoticesListReplyEventArgs e)
        {
            if (e.GroupID != this.groupkey)
            return;

            e.Notices.ForEach(delegate (GroupNoticesListEntry notice){
                this.recieved_notices.Add(notice.NoticeID);
                Gtk.Application.Invoke(delegate{
                    this.notice_list.AppendValues(notice.FromName, notice.Subject, notice.NoticeID,notice);
                    Console.Write("Notice list entry: From: "+notice.FromName+"\nSubject: "+notice.Subject + "\n");
                });
            });
        }
Exemplo n.º 3
0
        void Groups_GroupNoticesListReply(object sender, GroupNoticesListReplyEventArgs e)
        {
            if (e.GroupID != group.ID) return;

            if (InvokeRequired)
            {
                BeginInvoke(new MethodInvoker(() => Groups_GroupNoticesListReply(sender, e)));
                return;
            }

            lvwNoticeArchive.BeginUpdate();

            foreach (GroupNoticesListEntry notice in e.Notices)
            {
                ListViewItem item = new ListViewItem();
                item.SubItems.Add(notice.Subject);
                item.SubItems.Add(notice.FromName);
                string noticeDate = string.Empty;
                if (notice.Timestamp != 0)
                {
                    noticeDate = Utils.UnixTimeToDateTime(notice.Timestamp).ToShortDateString();
                }
                item.SubItems.Add(noticeDate);

                if (notice.HasAttachment)
                {
                    item.ImageIndex = InventoryConsole.GetItemImageIndex(notice.AssetType.ToString().ToLower());
                }

                item.Tag = notice;

                lvwNoticeArchive.Items.Add(item);
            }
            lvwNoticeArchive.EndUpdate();
        }
Exemplo n.º 4
0
 public virtual void Groups_OnGroupNoticesList(object sender, GroupNoticesListReplyEventArgs e) { OnEvent("On-Group-Notices-List", paramNamesOnGroupNoticesList, paramTypesOnGroupNoticesList, e); }