Refactor GQL code. Auto load and save active shops. Auto start monitors.
This commit is contained in:
@@ -79,9 +79,9 @@ namespace BodyshopUploader.ViewModels
|
||||
if (_startFolderMonitorsCommand == null)
|
||||
{
|
||||
_startFolderMonitorsCommand = new RelayCommand(
|
||||
p => MonitoringPaths.Count > 0,
|
||||
p => MonitoringPaths.Count > 0 && ActiveShop != null,
|
||||
p => StartAllFolderMonitors()
|
||||
);
|
||||
) ;
|
||||
}
|
||||
return _startFolderMonitorsCommand;
|
||||
}
|
||||
@@ -102,5 +102,24 @@ namespace BodyshopUploader.ViewModels
|
||||
return _stopFolderMonitorsCommand;
|
||||
}
|
||||
}
|
||||
|
||||
private ICommand _quitCommand;
|
||||
public ICommand QuitCommand
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_quitCommand == null)
|
||||
{
|
||||
_quitCommand = new RelayCommand(
|
||||
p => true,
|
||||
p =>
|
||||
{
|
||||
Properties.Settings.Default.Save(); App.Current.Shutdown(0);
|
||||
});
|
||||
}
|
||||
return _quitCommand;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user