public void Load(string name, ResourceDictionary dictionary) { T GetValue <T>(string key) { return((T)dictionary[key]); } StyleName = name; Dictionary = dictionary; MahAppsDictionary = StylesManager.GetStyle( "MahApps", GetValue <string>("LoadingMahAppsThemeName")); TitleBackgroundBrush = GetValue <SolidColorBrush>("Window.Main.TitleBackground"); NonActiveTitleBackgroundBrush = GetValue <SolidColorBrush>("Window.Main.NonActiveTitleBackground"); BackgroundBrush = GetValue <SolidColorBrush>("Window.Main.Background"); ForegroundImagePath = GetValue <string>("LoadingForegroundImagePath"); if (!string.IsNullOrWhiteSpace(ForegroundImagePath) && !ForegroundImagePath.Equals("None", StringComparison.InvariantCultureIgnoreCase)) { ForegroundImagePath = ForegroundImagePath.Replace('\\', '/'); ForegroundImageUri = new Uri($"pack://application:,,,/{ForegroundImagePath}"); } else { ForegroundImagePath = null; ForegroundImageUri = null; } BackgroundImagePath = GetValue <string>("LoadingBackgroundImagePath"); if (!string.IsNullOrWhiteSpace(BackgroundImagePath) && !BackgroundImagePath.Equals("None", StringComparison.InvariantCultureIgnoreCase)) { BackgroundImagePath = BackgroundImagePath.Replace('\\', '/'); BackgroundImageUri = new Uri($"pack://application:,,,/{BackgroundImagePath}"); } else { BackgroundImagePath = null; BackgroundImageUri = null; } LoadingIndicatorHorizontalAlignment = Enum.Parse <HorizontalAlignment>( GetValue <string>("LoadingIndicatorHorizontalAlignment"), true); LoadingIndicatorVerticalAlignment = Enum.Parse <VerticalAlignment>( GetValue <string>("LoadingIndicatorVerticalAlignment"), true); }
public bool Equals(DestinySeasonDefinition input) { if (input == null) { return(false); } return (( DisplayProperties == input.DisplayProperties || (DisplayProperties != null && DisplayProperties.Equals(input.DisplayProperties)) ) && ( BackgroundImagePath == input.BackgroundImagePath || (BackgroundImagePath != null && BackgroundImagePath.Equals(input.BackgroundImagePath)) ) && ( SeasonNumber == input.SeasonNumber || (SeasonNumber.Equals(input.SeasonNumber)) ) && ( StartDate == input.StartDate || (StartDate != null && StartDate.Equals(input.StartDate)) ) && ( EndDate == input.EndDate || (EndDate != null && EndDate.Equals(input.EndDate)) ) && ( SeasonPassHash == input.SeasonPassHash || (SeasonPassHash.Equals(input.SeasonPassHash)) ) && ( SeasonPassProgressionHash == input.SeasonPassProgressionHash || (SeasonPassProgressionHash.Equals(input.SeasonPassProgressionHash)) ) && ( ArtifactItemHash == input.ArtifactItemHash || (ArtifactItemHash.Equals(input.ArtifactItemHash)) ) && ( SealPresentationNodeHash == input.SealPresentationNodeHash || (SealPresentationNodeHash.Equals(input.SealPresentationNodeHash)) ) && ( SeasonalChallengesPresentationNodeHash == input.SeasonalChallengesPresentationNodeHash || (SeasonalChallengesPresentationNodeHash.Equals(input.SeasonalChallengesPresentationNodeHash)) ) && ( Preview == input.Preview || (Preview != null && Preview.Equals(input.Preview)) ) && ( Hash == input.Hash || (Hash.Equals(input.Hash)) ) && ( Index == input.Index || (Index.Equals(input.Index)) ) && ( Redacted == input.Redacted || (Redacted != null && Redacted.Equals(input.Redacted)) )); }