Пример #1
0
		private static void ArchiveSyncResulst(IEnumerable<string> resultFiles)
		{
			var archiveDateTime = DateTime.Now;
			var archiveName = String.Format("{0}-{1}", archiveDateTime.ToString("MMddyy"), archiveDateTime.ToString("hhmmsstt"));
			var archiveFolder = new ArchiveDirectory(Configuration.RemoteResourceManager.Instance.ArchiveFolder.RelativePathParts.Merge(archiveName));
			AsyncHelper.RunSync(() => archiveFolder.Allocate(false));
			archiveFolder.AddFiles(resultFiles);
			AsyncHelper.RunSync(archiveFolder.Upload);
		}
		public async Task LoadRemote()
		{
			ArtworkFolder = new ArchiveDirectory(new object[]
			{
				FileStorageManager.IncomingFolderName,
				AppProfileManager.Instance.AppName,
				"shared_artwork",
				"Artwork"
			});
			if (!await ArtworkFolder.Exists(true))
			{
				ArtworkFolder = new ArchiveDirectory(new object[]
				{
					FileStorageManager.IncomingFolderName,
					AppProfileManager.Instance.AppNameSet,
					"Artwork"
				});
			}
			await ArtworkFolder.Download();

			ThemesFolder = new ArchiveDirectory(new[]
			{
				FileStorageManager.IncomingFolderName,
				FileStorageManager.CommonIncomingFolderName,
				"SellerPointThemes"
			});
			await ThemesFolder.Download();

			LauncherTemplatesFolder = new ArchiveDirectory(new[]
			{
				FileStorageManager.IncomingFolderName,
				FileStorageManager.CommonIncomingFolderName,
				"LauncherTemplates"
			});
			await LauncherTemplatesFolder.Download();

			DefaultSlideSettingsFile = new StorageFile(new[]
			{
				FileStorageManager.IncomingFolderName,
				FileStorageManager.CommonIncomingFolderName,
				"AppSettings",
				"DefaultSlideSettings.xml"
			});
			await DefaultSlideSettingsFile.Download();

			SlideSizeSettingsFile = new StorageFile(new[]
			{
				FileStorageManager.IncomingFolderName,
				FileStorageManager.CommonIncomingFolderName,
				"AppSettings",
				"SlideSizeSettings.xml"
			});
			await SlideSizeSettingsFile.Download();

			HelpFile = new StorageFile(new[]
			{
				FileStorageManager.IncomingFolderName,
				FileStorageManager.CommonIncomingFolderName,
				"HelpUrls",
				HelpManager.GetFileName()
			});
			await HelpFile.Download();

			HelpBrowserFile = new StorageFile(new[]
			{
				FileStorageManager.IncomingFolderName,
				FileStorageManager.CommonIncomingFolderName,
				"HelpUrls",
				"!Help_Browser.xml"
			});
			await HelpBrowserFile.Download();
		}