コード例 #1
0
        private void addMailboxViewModelTab()
        {
            MailboxWrapper selected = (MailboxWrapper)UserMailboxesView.CurrentItem;
            //Check if the selected mailbox is already open, and if it is make it the selected tab.
            MailboxViewModel dup = MailboxViewModels.SingleOrDefault(x => x.Mailbox.DistinguishedName == selected.DistinguishedName);

            if (dup == null)
            {
                MailboxViewModel newTab = new MailboxViewModel(selected);
                newTab.IsSelected = true;
                MailboxViewModels.Add(newTab);
            }
            else
            {
                dup.IsSelected = true;
            }
        }
コード例 #2
0
 public void RemoveMailboxViewModelTab(MailboxViewModel tabToRemove)
 {
     MailboxViewModels.Remove(tabToRemove);
 }