public void PushDataToDictionary(FilamentDictionary dictionary) { foreach (SettingsManager.Filament profile in profiles) { FilamentProfile.TypeColorKey typeColorKey; typeColorKey.type = FilamentConstants.StringToType(profile.Type); typeColorKey.color = FilamentConstants.StringToFilamentColors(profile.Color); FilamentProfile.CustomOptions customOptions; customOptions.temperature = profile.Temperature; dictionary.AddCustomTemperature(typeColorKey.type, typeColorKey.color, customOptions.temperature); } }
public void PullDataFromDictionary(FilamentDictionary dictionary) { profiles.Clear(); foreach (var customValue in dictionary.CustomValues) { profiles.Add(new SettingsManager.Filament() { Type = customValue.Key.type.ToString(), Color = customValue.Key.color.ToString(), Temperature = customValue.Value.temperature }); } }