Exemplo n.º 1
0
        /// <summary>
        /// Update the list of buddies
        /// </summary>
        public void UpdateBuddyList()
        {
            buddyList.Items.Clear();

            var visible       = RuntimeSettings.Language.GetTag("iatag_ui_buddy_column_visible");
            var hidden        = RuntimeSettings.Language.GetTag("iatag_ui_buddy_column_hidden");
            var subscriptions = _buddySubscriptionDao.ListAll();

            foreach (var subscription in subscriptions)
            {
                var label = subscription.Id.ToString();
                var stash = subscription.Nickname;

                if (stash != null)
                {
                    label = $"[{label}] {stash}";
                }

                var numItems = _buddyItemDao.GetNumItems(subscription.Id);

                var lvi = new ListViewItem(label);
                lvi.SubItems.Add(numItems.ToString());
                lvi.SubItems.Add(subscription.IsHidden ? hidden : visible);
                lvi.Tag = subscription.Id;
                buddyList.Items.Add(lvi);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Update the list of buddies
        /// </summary>
        public void UpdateBuddyList()
        {
            buddyList.Items.Clear();

            var subscriptions = _buddySubscriptionDao.ListAll();

            foreach (var subscription in subscriptions)
            {
                var label = subscription.Id.ToString();
                var stash = subscription.Nickname;

                if (stash != null)
                {
                    label = $"[{label}] {stash}";
                }

                var numItems = _buddyItemDao.GetNumItems(subscription.Id);

                var lvi = new ListViewItem(label);
                lvi.SubItems.Add(numItems.ToString());
                lvi.Tag = subscription.Id;
                buddyList.Items.Add(lvi);
            }
        }