protected FileImporterVM(IFileSystem fileSystem, IUserDialogs dialogsService, ILocalizationService localizationService, IPlatformService platformService, ICryptographyService cryptographyService, IDirectoryInfo folder, string fileName, string description, string MD5) { FileSystem = fileSystem; DialogsService = dialogsService; LocalizationService = localizationService; PlatformService = platformService; CryptographyService = cryptographyService; targetFolder = folder; targetFileName = fileName; targetDescription = description; targetMD5 = MD5; ImportCommand = new RelayCommand(ImportHandler, () => !FileAvailable); CopyMD5ToClipboardCommand = new RelayCommand(() => PlatformService.CopyToClipboard(TargetMD5)); }
public FileImporterVM(IUserDialogs dialogsService, ILocalizationService localizationService, IPlatformService platformService, ICryptographyService cryptographyService, IFolder folder, string fileName, string description, string MD5) { DialogsService = dialogsService; LocalizationService = localizationService; PlatformService = platformService; CryptographyService = cryptographyService; targetFolder = folder; targetFileName = fileName; targetDescription = description; targetMD5 = MD5; ImportCommand = new RelayCommand(ImportHandler, () => !FileAvailable); CopyMD5ToClipboardCommand = new RelayCommand(() => PlatformService.CopyToClipboard(TargetMD5)); GetTargetFileAsync().ContinueWith(d => PlatformService.RunOnUIThreadAsync(() => FileAvailable = d.Result != null)); }