/// <summary> /// Adds existingPreset /// </summary> /// <param name="preset"></param> public bool AddPreset(Preset preset) { if (preset != null && !PresetCollection.Contains(preset)) { PresetCollection.Add(preset); return(true); } return(false); }
/// <summary> /// Creates and adds a new existingPreset when equaled a new existingPreset doesn't /// exist in <see cref="Repository.PresetCollection"/> presetCollection. /// </summary> /// <returns><see cref="Boolean"/> if existingPreset added</returns> public bool CreateNewPreset() { bool res; var firstDefaultNamedPreset = FindFirstDefaultNamedPreset(); // if new Preset does not exist if (firstDefaultNamedPreset == null) { PresetCollection.Add(Preset.GetDefaultPreset()); res = true; } else { RiseCantCreateNewPreset(firstDefaultNamedPreset); res = false; } return(res); }