/// <summary> /// Return the available installs, both locally and remotely /// </summary> /// <returns></returns> private BindableCollection <InstallationDataModel> GetAvailableInstalls(StringCollection paths) { BindableCollection <InstallationDataModel> available = new BindableCollection <InstallationDataModel>(); try { available = new BindableCollection <InstallationDataModel>(PatchClient.CompleteCheck(paths.Cast <string>().ToArray())); if (SelectedInstall == null) { foreach (InstallationDataModel installation in available) { if (installation.VersionBranch == (VersionBranch)Settings.Default.LastSelectedBranch) { SelectedInstall = installation; break; } } if (SelectedInstall == null) { SelectedInstall = available [0]; } } } catch (Exception e) { DisplayErrorMessage(e.Message); } return(available); }
public static async void Test() { var t = PatchClient.InstalledVersions; var p = t[1]; p.InstallPath = @"H:\Skole\Bachelor-project\ConsoleForTesting\ConsoleForTesting\bin\Debug\ClientFiles\VersionTest1"; PatchClient.DownloadMissingFiles(p); t = PatchClient.InstalledVersions; }
public void DownloadSelectedVersion() { if (SelectedInstall.Status != InstallationStatus.IsInstalling) { IsDownloading = true; SelectedInstall = UpdateState(SelectedInstall, InstallationStatus.IsInstalling); DownloadProgressPercentage = 0.0f; Task.Run(() => PatchClient.DownloadMissingFiles(SelectedInstall)); } }