protected bool Equals(SongFormatting other) { return(CopyrightPosition == other.CopyrightPosition && SourcePosition == other.SourcePosition && Equals(MainText, other.MainText) && Equals(TranslationText, other.TranslationText) && Equals(CopyrightText, other.CopyrightText) && Equals(SourceText, other.SourceText) && MainLineSpacing == other.MainLineSpacing && TranslationLineSpacing == other.TranslationLineSpacing && Equals(TextOrientation, other.TextOrientation) && TranslationPosition == other.TranslationPosition && TextOutlineEnabled == other.TextOutlineEnabled && TextShadowEnabled == other.TextShadowEnabled && Equals(TextBorders, other.TextBorders)); }
void ApplySongTemplateMaster(Song song, MasterOverrideOptions options) { SongFormatting master = Song.CreateFromTemplate().Formatting; var changed = song.Formatting; if (options.TextFormatting) { changed.MainText = master.MainText; changed.TranslationText = master.TranslationText; } if (options.TextPosition) { changed.HorizontalOrientation = master.HorizontalOrientation; changed.VerticalOrientation = master.VerticalOrientation; changed.TextLineSpacing = master.TextLineSpacing; changed.TranslationPosition = master.TranslationPosition; changed.TranslationLineSpacing = master.TranslationLineSpacing; } if (options.SourceFormatting) { changed.SourceText = master.SourceText; } if (options.SourcePosition) { changed.SourceDisplayPosition = master.SourceDisplayPosition; changed.SourceBorderRight = master.SourceBorderRight; changed.SourceBorderTop = master.SourceBorderTop; } if (options.CopyrightFormatting) { changed.CopyrightText = master.CopyrightText; } if (options.CopyrightPosition) { changed.CopyrightDisplayPosition = master.CopyrightDisplayPosition; changed.CopyrightBorderBottom = master.CopyrightBorderBottom; } if (options.OutlineShadow) { changed.IsOutlineEnabled = master.IsOutlineEnabled; changed.IsShadowEnabled = master.IsShadowEnabled; changed.OutlineColor = master.OutlineColor; changed.ShadowColor = master.ShadowColor; changed.ShadowDirection = master.ShadowDirection; } song.Formatting = changed; }
public SongSettingsWindow(SongFormatting formatting) { InitializeComponent(); this.formatting = formatting; this.DataContext = this; }
public void UpdateFormatting(SongFormatting formatting, bool hasTranslation, bool hasChords) { this.control.ExecuteJavascript("presentation.updateFormatting(" + JsonConvert.SerializeObject(formatting) + ", " + JsonConvert.SerializeObject(hasTranslation) + ", " + JsonConvert.SerializeObject(hasChords) + ")"); }