public static AppDataContract GetAppDC(this StoreApp model) { return(new AppDataContract() { AppCategory = model.AppCategory?.GetAppCategoryDC(), Description = model.Description, DeveloperId = model.DeveloperId, DeveloperName = model.DeveloperName, Icon128X128 = model.Icon128x128Bytes, Icon256X256 = model.Icon256x256Bytes, Id = model.Id, Guid = model.Guid, Name = model.Name, Price = model.Price, LatestVersion = model?.LatestVersion.GetAppVersionDC() }); }
private void setDisplayValuesApp() { if (Windows.Count > 0 && Windows[0] is ApplicationWindow window) { if (window.IsUWP) { _storeApp = StoreAppHelper.AppList.GetAppByAumid(window.AppUserModelID); Title = _storeApp.DisplayName; Icon = window.Icon; } else { Title = window.WinFileDescription; Task.Factory.StartNew(() => { Icon = IconImageConverter.GetImageFromAssociatedIcon(window.WinFileName, IconHelper.ParseSize(Settings.Instance.TaskbarIconSize) == IconSize.Small ? IconSize.Small : IconSize.Large); }, CancellationToken.None, TaskCreationOptions.None, IconHelper.IconScheduler); } } }
public IActionResult App(long id) { StoreApp app = _logicService.SteamLogic.GetStoreAppDetails(id); return(View(app)); }
public object Handle(Dictionary <string, string> urlParams, string body, ref ISession session) { var request = JsonConvert.DeserializeObject <NewSessionRequestAsDict>(body); foreach (var kvp in request.DesiredCapabilities) { logger.Info("{0} = {1} ({2})", kvp.Key, kvp.Value, kvp.Value.GetType()); } var caps = JsonConvert.DeserializeObject <NewSessionRequest>(body).DesiredCapabilities; IApplication app; switch (caps.Platform) { case Platform.Windows: app = new DesktopApp(this.context, caps, this.uacHandler, this.utils); break; case Platform.WindowsModern: app = new StoreApp(this.context, caps, this.utils); break; case Platform.WindowsPhone: throw new FailedCommandException("Windows Phone is not supported yet.", 33); default: throw new FailedCommandException("The platform name '{0}' is invalid.", 33); } // TODO validate capabilibites, add logs for identifying which decision path is chosen. if (app.IsInstalled()) { if (caps.App != null) { logger.Info( "App '{0}' is already installed, and the installation package is also provided.", app.DriverAppID); if (app.Installer.IsBuildChanged()) { logger.Info("Build changed. Strategy: {0}, Reset: {1}", caps.ChangeBuildStrategy, caps.ResetStrategy); app.Terminate(); if (caps.ChangeBuildStrategy == ChangeBuildStrategy.Reinstall) { // reset strategy is irrelevant here app.Uninstall(); app.Installer.Install(); app.BackupInitialStates(true); } else if (caps.ChangeBuildStrategy == ChangeBuildStrategy.Upgrade) { // full-reset strategy is irrelevant here if (caps.ResetStrategy != ResetStrategy.No) { app.RestoreInitialStates(); app.Installer.Install(); app.BackupInitialStates(true); } } } else { logger.Info("Build not changed. Reset: {0}", caps.ResetStrategy); if (caps.ResetStrategy == ResetStrategy.Fast) { app.Terminate(); app.RestoreInitialStates(); } else if (caps.ResetStrategy == ResetStrategy.Full) { app.Terminate(); app.Uninstall(); app.Installer.Install(); app.BackupInitialStates(true); } } } else { logger.Info( "App '{0}' is already installed, but the installation package is not provided. Reset: {1}", app.DriverAppID, caps.ResetStrategy); // full-reset is irrelevant here if (caps.ResetStrategy == ResetStrategy.Fast) { app.Terminate(); if (!app.BackupInitialStates(false)) { app.RestoreInitialStates(); } } } } else { if (caps.App != null) { logger.Info( "App '{0}' is not installed yet, but the installation package is provided.", app.DriverAppID); app.Installer.Install(); app.BackupInitialStates(true); } else { logger.Info( "App '{0}' is not installed yet, and the installation package is not provided. Reset: {1}", app.DriverAppID, caps.ResetStrategy); if (caps.Platform == Platform.Windows) { // full-reset is irrelevant here if (caps.ResetStrategy == ResetStrategy.Fast) { app.Terminate(); app.RestoreInitialStates(); } } else { var msg = "'app' capability is mandatory if the target platform is not 'Windows' " + "(default) and the app under test '{0}' is not installed beforehand."; throw new WinAppDriverException(string.Format(msg, app.DriverAppID)); } } } app.Activate(); session = this.sessionManager.CreateSession(app, caps); // TODO turn off IME, release all modifier keys return(caps); }
private async Task AppSelectedExecute(StoreApp storeApp) { await _navigationService.Navigate <AppDetailViewModel, StoreApp>(storeApp); }
public static string CanonicalUrl(this StoreApp storeApp) { return($"https://amalgamatelabs.com/StoreApp/Details/{storeApp.StoreAppId}"); }