/// <summary> /// Gets a complete <see cref="Summary"/> object for the specified <see cref="LauncherCollection"/>. /// </summary> /// <param name="launcherCollection">The <see cref="LauncherCollection"/> to analyze.</param> public Summary GetCompleteSummary(LauncherCollection launcherCollection) { var numberOfVehicles = launcherCollection.Launchers.Count; var fairingSummary = FairingController.GetFairingSummary(launcherCollection.Launchers); var priceSummary = PriceController.GetPriceSummary(launcherCollection.Launchers); var capabilitySummary = CapabilityController.GetCapabilitySummary(launcherCollection.Launchers).ToList(); return(new Summary(numberOfVehicles, capabilitySummary, fairingSummary, priceSummary)); }
/// <summary> /// Adds the specified <see cref="LauncherCollection" /> to the family's launcher collection <see cref="List{T}" />. /// When added, the <see cref="LauncherCollection" /> will have its RootIdentifier set to the family's GlobalIdentifier. /// </summary> /// <param name="launcherCollection"> /// The <see cref="LauncherCollection" /> you wish to add to the family's launcher collection <see cref="List{T}" />. /// </param> /// <exception cref="ArgumentNullException">launcherCollection - The object specified cannot be <see langword="null"/>.</exception> public void Add(LauncherCollection launcherCollection) { if (launcherCollection == null) { throw new ArgumentNullException($"{nameof(launcherCollection)}", "The object specified cannot be null."); } launcherCollection.RootIdentifier = VehicleFamily.GlobalIdentifier; VehicleFamily.LauncherCollections.Add(launcherCollection); }
private bool RemoveLauncher() { //todo: change location string path = RetroFE.GetAbsolutePath() + "/Launchers/" + SelectedLauncher.Name + ".conf"; if (File.Exists(path)) { File.Delete(path); } LauncherCollection.Remove(SelectedLauncher); return(true); }
private void AddLauncher(object param) { LauncherVM l = new LauncherVM(); l.Name = param as String; NotifyPropertyChanged("LauncherCollection"); ConfFileSaver saver = new ConfFileSaver(); //todo change path if (!File.Exists(RetroFE.GetAbsolutePath() + "/Launchers/" + l.Name + ".conf")) { LauncherCollection.Add(l); saver.Save(RetroFE.GetAbsolutePath() + "/Launchers/" + l.Name + ".conf"); } }
/// <summary> /// Creates the <see cref="LauncherCollection"/> that's used in the test initializer. /// </summary> protected virtual void CreateCollection() { Collection = new LauncherCollection(CreateCollectionName()) { Notes = CreateCollectionNotes(), PreviewLocation = CreateCollectionPreviewLocation() }; // Add the launcher(s) to the collection and then create the summary. Collection.Launchers.Add(AngaraA5); Collection.Launchers.Add(AngaraA5BrizM); Collection.Launchers.Add(AngaraA5KVTK); Collection.Summary = CreateCollectionSummary(); }
protected virtual void CreateExtraLauncherCollection() { ExtraCollection = new LauncherCollection("A3") { PreviewLocation = @"C:/Nick/TestFolder/CollectionPictures/NothingHere.png", Notes = new List <Note>() { new Note() { Title = "Version Strength", Body = "Has many upper stages for all payload types to help tailor the vehicle to the mission's needs." } } }; // Add the launcher(s) to the collection and then create the summary. ExtraCollection.Launchers.Add(AngaraA3); ExtraCollection.Launchers.Add(AngaraA3BrizM); ExtraCollection.Launchers.Add(AngaraA3KVTK); var controller = new SummaryController(); Collection.Summary = controller.GetCompleteSummary(ExtraCollection); }
/// <summary> /// Removes the specified <see cref="LauncherCollection"/> from the family's launcher /// collection <see cref="List{T}"/> and changes its RootIdentifier to an empty <see cref="Guid"/>. /// </summary> /// <param name="launcherCollection">The <see cref="LauncherCollection"/> you wish to remove.</param> public void Remove(LauncherCollection launcherCollection) { launcherCollection.RootIdentifier = Guid.Empty; VehicleFamily.LauncherCollections.Remove(launcherCollection); }
/// <summary> /// Initializes a new instance of the <see cref="LauncherCollectionController"/> class. /// </summary> /// <param name="launcherCollection"> /// The <see cref="DataProviders.LauncherCollection"/> that this controller will work with. /// </param> public LauncherCollectionController(LauncherCollection launcherCollection) { LauncherCollection = launcherCollection; }