public static int TranslateStyle(StyleAttributeNames styleName, string styleString, IErrorContext errorContext, bool isChartStyle) { switch (styleName) { case StyleAttributeNames.BorderStyle: case StyleAttributeNames.BorderStyleTop: case StyleAttributeNames.BorderStyleLeft: case StyleAttributeNames.BorderStyleRight: case StyleAttributeNames.BorderStyleBottom: return((int)StyleTranslator.TranslateBorderStyle(styleString, errorContext)); case StyleAttributeNames.BackgroundGradientType: return((int)StyleTranslator.TranslateBackgroundGradientType(styleString, errorContext)); case StyleAttributeNames.BackgroundImageRepeat: return((int)StyleTranslator.TranslateBackgroundRepeat(styleString, errorContext, isChartStyle)); case StyleAttributeNames.FontStyle: return((int)StyleTranslator.TranslateFontStyle(styleString, errorContext)); case StyleAttributeNames.FontWeight: return((int)StyleTranslator.TranslateFontWeight(styleString, errorContext)); case StyleAttributeNames.TextDecoration: return((int)StyleTranslator.TranslateTextDecoration(styleString, errorContext)); case StyleAttributeNames.TextAlign: return((int)StyleTranslator.TranslateTextAlign(styleString, errorContext)); case StyleAttributeNames.VerticalAlign: return((int)StyleTranslator.TranslateVerticalAlign(styleString, errorContext)); case StyleAttributeNames.Direction: return((int)StyleTranslator.TranslateDirection(styleString, errorContext)); case StyleAttributeNames.WritingMode: return((int)StyleTranslator.TranslateWritingMode(styleString, errorContext)); case StyleAttributeNames.UnicodeBiDi: return((int)StyleTranslator.TranslateUnicodeBiDi(styleString, errorContext)); case StyleAttributeNames.Calendar: return((int)StyleTranslator.TranslateCalendar(styleString, errorContext)); case StyleAttributeNames.TextEffect: return((int)StyleTranslator.TranslateTextEffect(styleString, errorContext, isChartStyle)); case StyleAttributeNames.BackgroundHatchType: return((int)StyleTranslator.TranslateBackgroundHatchType(styleString, errorContext, isChartStyle)); case StyleAttributeNames.Position: return((int)StyleTranslator.TranslatePosition(styleString, errorContext, isChartStyle)); default: throw new NotImplementedException("cannot translate style: " + styleName.ToString()); } }
private void CreateAndValidateCalendar(int languageState, CultureInfo formattingCulture) { AspNetCore.ReportingServices.ReportIntermediateFormat.AttributeInfo attributeInfo = null; Calendars calendars = Calendars.Default; bool flag = false; if (this.m_styleClass.GetAttributeInfo("Calendar", out attributeInfo)) { if (attributeInfo.IsExpression) { flag = true; calendars = (Calendars)this.m_styleClass.EvaluateStyle(this.m_objectType, this.m_objectName, attributeInfo, AspNetCore.ReportingServices.ReportIntermediateFormat.Style.StyleId.Calendar, this.m_context); this.m_sharedFormatSettings = false; } else { calendars = StyleTranslator.TranslateCalendar(attributeInfo.Value, this.m_context.ReportRuntime); switch (languageState) { case 1: flag = true; break; default: if (this.m_calendarValidated) { break; } this.m_calendarValidated = true; this.m_formattingCalendar = ProcessingValidator.CreateCalendar(calendars); return; case 0: break; } } } if (!flag && this.m_calendarValidated) { return; } if (calendars != 0 && ProcessingValidator.ValidateCalendar(formattingCulture, calendars, this.m_objectType, this.m_objectName, "Calendar", this.m_context.ErrorContext)) { this.m_formattingCalendar = ProcessingValidator.CreateCalendar(calendars); } if (!flag) { this.m_calendarValidated = true; } }