private void TryLoadAppFromStorageData(XmlData appInfoData) { AppInfo app = AppInfoExtensions.CreateAppInfo(GetAppPackageFilePath(appInfoData), GetAppPlatform(appInfoData), GetAppGuid(appInfoData), GetAppBuildData(appInfoData)); app.SolutionFilePath = GetAppSolutionFilePath(appInfoData); availableApps.Add(app); }
private void OnAppBuildResultRecieved(AppBuildResult receivedBuildResult) { AppInfo appInfo = AppInfoExtensions.CreateAppInfo( Path.Combine(AppListViewModel.AppStorageDirectory, receivedBuildResult.PackageFileName), receivedBuildResult.Platform, receivedBuildResult.PackageGuid, DateTime.Now); appInfo.SolutionFilePath = codeSolutionPathOfBuildingApp; AllowBuildingAppsAgain(); TriggerBuiltAppRecieved(appInfo, receivedBuildResult.PackageFileData); }
private void LaunchApp(AppInfo appInfo, Device device) { try { TryLaunchApp(appInfo, device); } catch (Device.StartApplicationFailedOnDevice ex) { AppInfoExtensions.LogStartingAppFailed(appInfo, ex.DeviceName); } }
private static void LaunchApp(AppInfo selectedApp, Action enableLaunchButtonAgain) { try { TryLaunchApp(selectedApp); } catch (Device.StartApplicationFailedOnDevice ex) { AppInfoExtensions.LogStartingAppFailed(selectedApp, ex.DeviceName); } catch (Exception ex) { Logger.Error(ex); } enableLaunchButtonAgain(); }
private static void TryLaunchApp(AppInfo selectedApp) { if (!selectedApp.IsDeviceAvailable) { AppInfoExtensions.HandleNoDeviceAvailableInView(selectedApp); return; } Device primaryDevice = selectedApp.AvailableDevices[0]; if (!primaryDevice.IsAppInstalled(selectedApp)) { Logger.Info(selectedApp + " wasn't installed on the device '" + primaryDevice + "' will install it now."); primaryDevice.Install(selectedApp); } selectedApp.LaunchAppOnPrimaryDevice(); }
public void InstallAndLaunchNewBuiltApp(AppInfo appInfo) { if (!appInfo.IsDeviceAvailable) { AppInfoExtensions.HandleNoDeviceAvailableInView(appInfo); UpdateBuildProgressBar("Launching App aborted", 100); ViewModel.OpenLocalBuiltAppsDirectory(); return; } Device primaryDevice = appInfo.AvailableDevices[0]; if (primaryDevice.IsAppInstalled(appInfo)) { UpdateBuildProgressBar(appInfo.Name + " was already installed, uninstalling it.", 90); primaryDevice.Uninstall(appInfo); } UpdateBuildProgressBar("Installing " + appInfo.Name + " on " + primaryDevice.Name, 95); primaryDevice.Install(appInfo); LaunchApp(appInfo, primaryDevice); }