public override void OK() { // Workaround of OM-13897, calling an OutlookSession in the shutdown // state causes unpredictable results. if (Core.State == CoreState.Running) { _treeView.SaveCheckedState(); MAPIIDs IDs = OutlookSession.GetInboxIDs(); if (IDs != null) { IResource folder = Folder.Find(IDs.EntryID); if (folder != null && !Folder.IsIgnored(folder)) { Core.UIManager.CreateShortcutToResource(folder); } } SettingSaver.Save(Controls); Settings.LoadSettings(); } }
public override void UndeleteResource(IResource res) { Guard.NullArgument(res, "res"); IResourceList attachments = res.GetLinksOfType(null, PROP.Attachment); foreach (IResource attachment in attachments.ValidResources) { attachment.SetProp(Core.Props.IsDeleted, false); } IResource folder = null; MAPIIDs IDs = OutlookSession.GetInboxIDs(); if (IDs != null) { folder = Folder.Find(IDs.EntryID); } if (folder != null) { MoveMessageToFolderAction action = new MoveMessageToFolderAction(false); action.DoMove(folder, res.ToResourceList()); } }