Esempio n. 1
0
        /// -----------------------------------------------------------------------------------
        /// <summary>
        /// Return the list of possible seeds
        /// </summary>
        /// -----------------------------------------------------------------------------------
        public override IEnumerable <Seed> GetSeeds()
        {
            List <Seed> seeds = new List <Seed>();

            // Get a list of the stores on the local machine
            Dictionary <string, string> storeIdsAndNames = OutlookDirectoryInfo.GetStoreIdsAndNames();

            if (storeIdsAndNames == null)
            {
                seeds.Add(new Seed {
                    Id = null, Name = "[Outlook Unavailable]", TreeHandler = this
                });
            }
            else
            {
                foreach (string key in storeIdsAndNames.Keys)
                {
                    seeds.Add(new Seed {
                        Id = key, Name = "Outlook Store: " + storeIdsAndNames[key], TreeHandler = this
                    });
                }
            }

            return(seeds);
        }
Esempio n. 2
0
        public IDirectoryInfo[] GetDirectories()
        {
            List <OutlookDirectoryInfo> outputDirectories = new List <OutlookDirectoryInfo>();

            foreach (Outlook.Folder subFolder in folder.Folders)
            {
                try
                {
                    OutlookDirectoryInfo newDir = new OutlookDirectoryInfo();
                    newDir.folder   = subFolder;
                    newDir.Name     = subFolder.Name;
                    newDir.FullName = subFolder.FullFolderPath;

                    outputDirectories.Add(newDir);
                }
                catch (Exception e)
                {
                    Debug.WriteLine(e.ToString());

#if DEBUG
                    Debugger.Break();
#endif
                }
            }
            return(outputDirectories.ToArray());
        }
Esempio n. 3
0
 /// -----------------------------------------------------------------------------------
 /// <summary>
 /// The seed is the data item that points to the top of the tree.  Make sure
 /// this is a valid directory.
 /// </summary>
 /// -----------------------------------------------------------------------------------
 public override void ValidateSeed(Seed seed)
 {
     OutlookDirectoryInfo info = new OutlookDirectoryInfo(seed.Id);
 }
Esempio n. 4
0
 /// -----------------------------------------------------------------------------------
 /// <summary>
 /// Constructor (create outlook objects)
 /// </summary>
 /// -----------------------------------------------------------------------------------
 public OutlookTreeHandler(PluginSettingsHandler settingsHandler) : base(settingsHandler, OutlookDirectoryInfo.ITEMSIZE)
 {
     OutlookDirectoryInfo.Init();
 }