Created monitoring object and refactored code accordingly.

This commit is contained in:
Patrick Fic
2020-01-17 14:19:49 -08:00
parent 3357a8a564
commit b7218b6771
16 changed files with 217 additions and 76 deletions

View File

@@ -63,8 +63,8 @@ namespace BodyshopUploader.ViewModels
if (_removeMonitoringPathCommand == null)
{
_removeMonitoringPathCommand = new RelayCommand(
p => FolderMonitors.Count == 0,
p => RemoveFolderMonitoringPath(p as string)
p => true,
p => RemoveFolderMonitoringPath(p as Models.Monitor)
);
}
return _removeMonitoringPathCommand;
@@ -95,7 +95,7 @@ namespace BodyshopUploader.ViewModels
if (_stopFolderMonitorsCommand == null)
{
_stopFolderMonitorsCommand = new RelayCommand(
p => FolderMonitors.Count > 0,
p => MonitoringPaths.Count > 0,
p => StopAllFolderMonitors()
);
}