public MainViewModel() { string exFilename = Logger.ExceptionLogFilename; _backupFolderPath = ServiceProvider.TempBackupDir; Task.Run(() => DeleteYesterdaysFiles(_backupFolderPath, DateTime.Now.AddDays(-1))); BackupCommand = new[] { IsProcessing, HasExceptionOccuredWhileBackingup }.CombineLatest(M => !M[0] && !M[1]).ToReactiveCommand().WithSubscribe(StartDatabaseBackup); SetBackupIntervalCommand = new[] { IsProcessing }.CombineLatest(M => !M[0]).ToReactiveCommand <string>().WithSubscribe(SetBackupInervals); RemoveConnectionStringCommand = new[] { IsProcessing }.CombineLatest(M => !M[0]).ToReactiveCommand <CString>().WithSubscribe(RemoveConnectionString); AddConnectionStringCommand = new[] { IsProcessing }.CombineLatest(M => !M[0]).ToReactiveCommand <string>().WithSubscribe(AddConnectionString); CleanUpLocalAndGDriveCommand = new[] { IsProcessing }.CombineLatest(M => !M[0]).ToReactiveCommand().WithSubscribe(() => Last5DeleteFilesTimer(false)); CStringsDBToBackup = CString.AddInit(true); _fileAppAttributes.Add("UpId", ""); Task.Run(() => LastUploadedFiles = FileToUpload.GetFileToUploadListFromSettings()); Task.Run(() => Last5DeleteFilesTimer(null)); }