/// <summary> /// Gets the hash code /// </summary> /// <returns>Returns HashCode</returns> public override int GetHashCode() { return(String.Format("{0}|{1}|{2}|{3}|{4}|", this.Controls.Aggregate(0, (acc, next) => acc += (next != null ? next.GetHashCode() : 0)), Order.GetHashCode(), Type.GetHashCode(), BackgroundEmphasis.GetHashCode(), VerticalSectionEmphasis.GetHashCode() ).GetHashCode()); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Returns HashCode</returns> public override int GetHashCode() { return(String.Format("{0}|{1}|{2}|{3}|{4}|", Layout.GetHashCode(), MenuStyle.GetHashCode(), BackgroundEmphasis.GetHashCode(), ShowSiteTitle.GetHashCode(), ShowSiteNavigation.GetHashCode() ).GetHashCode()); }
private int GetVerticalColumnBackgroundEmphasis() { BackgroundEmphasis emphasis = BackgroundEmphasis.None; if (this.pageLayoutMappingModel != null) { if (this.pageLayoutMappingModel.SectionEmphasis != null && this.pageLayoutMappingModel.SectionEmphasis.VerticalColumnEmphasisSpecified) { return(BackgroundEmphasisToInt(this.pageLayoutMappingModel.SectionEmphasis.VerticalColumnEmphasis)); } } return(BackgroundEmphasisToInt(emphasis)); }
private int BackgroundEmphasisToInt(BackgroundEmphasis emphasis) { switch (emphasis) { case BackgroundEmphasis.None: return(0); case BackgroundEmphasis.Neutral: return(1); case BackgroundEmphasis.Soft: return(2); case BackgroundEmphasis.Strong: return(3); } return(0); }
private int GetBackgroundEmphasis(int row) { BackgroundEmphasis emphasis = BackgroundEmphasis.None; if (this.pageLayoutMappingModel != null) { if (this.pageLayoutMappingModel.SectionEmphasis != null && this.pageLayoutMappingModel.SectionEmphasis.Section != null) { var section = this.pageLayoutMappingModel.SectionEmphasis.Section.Where(p => p.Row == row).FirstOrDefault(); if (section != null) { return(BackgroundEmphasisToInt(section.Emphasis)); } } } return(BackgroundEmphasisToInt(emphasis)); }