private void AddWatchFolder() { WatchFoldersSettings.Add(new WatchFolderSettingsViewModel(new Common.ObjectModel.Settings.WatchFolderSettings()) { Name = "<Enter Name>", FolderName = "<Enter Folder Name>" }); }
public void SetWatchFoldersSettings(WatchFoldersSettings watchFoldersSettings) { if (_client != null) { _client.SetWatchFoldersSettings(watchFoldersSettings); } }
private void RemoveWatchFolder() { _isRemoving = true; RemoveWatchFolderCommand.RaiseCanExecuteChanged(); WatchFoldersSettings watchFoldersSettings = _client.GetWatchFoldersSettings(); watchFoldersSettings.Remove(SelectedWatchFolderSettings.FolderName); //_client.SetWatchFoldersSettings(watchFoldersSettings); WatchFoldersSettings.Remove(SelectedWatchFolderSettings); _isRemoving = false; RemoveWatchFolderCommand.RaiseCanExecuteChanged(); }
public WatchFolderSettings GetWatchFolderSettings(string folderName) { WatchFoldersSettings watchFoldersSettings = GetWatchFoldersSettings(); try { if (watchFoldersSettings.Contains(folderName)) { return(watchFoldersSettings[folderName]); } return(null); } catch { return(null); } }
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); } }
public void StartWatchFolders() { _logHelper.WriteEntry("Starting WatchFolder ServiceViewModel", MessageType.Information); try { _watchFolderSettingsHelper = new WatchFolderSettingsHelper(_logHelper); WatchFoldersSettings watchFoldersSettings = _watchFolderSettingsHelper.Settings.WatchFoldersSettings; foreach (WatchFolderSettings watchFolderSettings in watchFoldersSettings) { StartWatchFolder(watchFolderSettings.FolderName); } _logHelper.WriteEntry("Started WatchFolder ServiceViewModel", MessageType.Information); } catch (Exception exception) { _logHelper.WriteEntry(exception.Message, MessageType.Error); } }
public bool SetWatchFoldersSettings(WatchFoldersSettings watchFoldersSettings) { _watchFolderSettingsHelper.Settings.WatchFoldersSettings = watchFoldersSettings; return(true); }
public bool SetWatchFoldersSettings(WatchFoldersSettings watchFoldersSettings) { return(Channel.SetWatchFoldersSettings(watchFoldersSettings)); }
public WatchFolderServiceConfigurationSection() { WatchFoldersSettings = new WatchFoldersSettings(); Port = 0; }