private void HandleCompilePackageListStatusComplete(Action action) { IsWorking.SetValue(false); Operation.SetValue(null); PackageListStatus.SetValue((PackageListStatus)action.Payload); }
private void HandlePackageInstallationStarted(Action action) { var args = (InstallPackageArgs)action.Payload; IsWorking.SetValue(true); Operation.SetValue("Installing " + args.PackageName + "..."); }
private void HandlePackageInstallationComplete(Action action) { var args = (InstallPackageArgs)action.Payload; var installedPackages = InstalledPackages.Value; installedPackages.Packages.Add(new InstalledPackage(args.PackageName, args.Version, args.GitUrl)); InstalledPackages.SetValue(installedPackages); IsWorking.SetValue(false); Operation.SetValue(null); WritePackagesJson(); }
private void HandleRemovePackageComplete(Action action) { var package = (AvailablePackage)action.Payload; IsWorking.SetValue(false); Operation.SetValue(null); var installedPackages = InstalledPackages.Value; installedPackages.Packages.RemoveAll(p => p.Name == package.Name); InstalledPackages.SetValue(installedPackages); WritePackagesJson(); }
private void HandleSwitchPackageVersionComplete(Action action) { var args = (SwitchPackageArgs)action.Payload; var installedPackages = InstalledPackages.Value; var package = installedPackages.Packages.FirstOrDefault(p => p.Name == args.Package.Name); package.Version = args.Version; InstalledPackages.SetValue(installedPackages); WritePackagesJson(); IsWorking.SetValue(false); Operation.SetValue(null); }
private void HandleCompilePackageListStatusStarted(Action action) { PackageListStatus.SetValue(null); IsWorking.SetValue(true); Operation.SetValue("Compiling status of each package"); }
private void HandleSwitchPackageVersionStarted(Action action) { IsWorking.SetValue(true); Operation.SetValue("Switching package version"); }
private void HandleRemovePackageStarted(Action action) { IsWorking.SetValue(true); Operation.SetValue("Removing " + ((AvailablePackage)action.Payload).Name + "..."); }