Esempio n. 1
0
        public WatchFolderSettings GetWatchFolderSettings(string folderName)
        {
            WatchFoldersSettings watchFoldersSettings = GetWatchFoldersSettings();

            try
            {
                if (watchFoldersSettings.Contains(folderName))
                {
                    return(watchFoldersSettings[folderName]);
                }
                return(null);
            }
            catch
            {
                return(null);
            }
        }
Esempio n. 2
0
        public bool SetWatchFolderSettings(WatchFolderSettings watchFolderSettings, string folderName)
        {
            try
            {
                WatchFoldersSettings watchFoldersSettings = GetWatchFoldersSettings();

                if (watchFoldersSettings.Contains(folderName))
                {
                    watchFoldersSettings[folderName] = watchFolderSettings;
                }
                else
                {
                    watchFoldersSettings.Add(watchFolderSettings);
                }
                return(true);
            }
            catch
            {
                return(false);
            }
        }