Exemple #1
0
        public void Add(Guid id, string uri, string title)
        {
            var newuri = AvastarUri(uri);
            var item   = new TaskBarItemViewModel()
            {
                Id = id, Avastar = newuri, Title = title
            };

            TaskBarViewItems.Add(item);
            TaskBarListView.SelectedItem = item;
        }
Exemple #2
0
        public void Switch(Guid tab_id)
        {
            TaskBarItemViewModel switchitem = null;

            foreach (var item in TaskBarViewItems)
            {
                if (item.Id == tab_id && ((TaskBarItemViewModel)(TaskBarListView.SelectedItem)).Id != tab_id)
                {
                    switchitem = item;
                }
            }
            if (switchitem != null)
            {
                TaskBarListView.SelectedItem = switchitem;
            }
        }
Exemple #3
0
        public void Delete(Guid tab_id)
        {
            SwitchBeforeDeletion(tab_id);
            TaskBarItemViewModel deleteitem = null;

            foreach (var item in TaskBarViewItems)
            {
                if (item.Id == tab_id)
                {
                    deleteitem = item;
                }
            }
            if (deleteitem != null)
            {
                TaskBarViewItems.Remove(deleteitem);
            }
        }