/// <summary>${iServer2_Theme_ThemeGraph_constructor_None_D}</summary> public ThemeGraph() { OffsetX = "0.0"; OffsetY = "0.0"; LeaderLineStyle = new ServerStyle(); ; AxesColor = new ServerColor(0, 0, 0); AxesTextStyle = new ServerTextStyle(); GraphTextStyle = new ServerTextStyle(); GraphTextFormat = GraphTextFormat.Value; MinGraphSize = 40.0; MaxGraphSize = 60.0; GraduatedMode = GraduatedMode.Constant; GraphType = GraphType.Pie; }
/// <summary>${iServer2_Theme_ThemeLableItem_constructor_None_D}</summary> public ThemeLabelItem() { Visible = true; Style = new ServerTextStyle(); }
/// <summary>${iServer2_ServerTextStyle_method_FromJson_D}</summary> /// <returns>${iServer2_ServerTextStyle_method_FromJson_return}</returns> /// <param name="jsonObject">${iServer2_ServerTextStyle_method_FromJson_param_jsonObject}</param> public static ServerTextStyle FromJson(JsonObject jsonObject) { if (jsonObject == null) { return null; } ServerTextStyle result = new ServerTextStyle(); if (jsonObject["align"] != null) { result.Align = (ServerTextAlignment)(int)jsonObject["align"]; } result.BgColor = ServerColor.FromJson((JsonObject)jsonObject["bgColor"]); result.Bold = (bool)jsonObject["bold"]; result.Color = ServerColor.FromJson((JsonObject)jsonObject["color"]); result.FixedSize = (bool)jsonObject["fixedSize"]; result.FixedTextSize = (int)jsonObject["fixedTextSize"]; result.FontHeight = (double)jsonObject["fontHeight"]; result.FontName = (string)jsonObject["fontName"]; result.FontWeight = (int)jsonObject["fontWeight"]; result.FontWidth = (double)jsonObject["fontWidth"]; result.Italic = (bool)jsonObject["italic"]; result.Outline = (bool)jsonObject["outline"]; result.Rotation = (double)jsonObject["rotation"]; result.Shadow = (bool)jsonObject["shadow"]; result.Stroke = (bool)jsonObject["stroke"]; result.Transparent = (bool)jsonObject["transparent"]; result.Underline = (bool)jsonObject["underline"]; return result; }
internal static string ToJson(ServerTextStyle serverTextStyle) { if (serverTextStyle == null) { return null; } string json = "{"; List<string> list = new List<string>(); list.Add(string.Format("\"align\":{0}", (int)serverTextStyle.Align)); if (ServerColor.ToJson(serverTextStyle.BgColor) != null) { list.Add(string.Format("\"bgColor\":{0}", ServerColor.ToJson(serverTextStyle.BgColor))); } else { list.Add(string.Format("\"bgColor\":null")); } list.Add(string.Format("\"bold\":{0}", serverTextStyle.Bold)); if (ServerColor.ToJson(serverTextStyle.Color) != null) { list.Add(string.Format("\"color\":{0}", ServerColor.ToJson(serverTextStyle.Color))); } else { list.Add(string.Format("\"color\":null")); } list.Add(string.Format("\"fixedSize\":{0}", serverTextStyle.FixedSize)); list.Add(string.Format("\"fixedTextSize\":{0}", serverTextStyle.FixedTextSize)); list.Add(string.Format("\"fontHeight\":{0}", serverTextStyle.FontHeight)); list.Add(string.Format("\"fontWeight\":{0}", serverTextStyle.FontWeight)); if (serverTextStyle.FontName != null) { list.Add(string.Format("\"fontName\":{0}", serverTextStyle.FontName)); } list.Add(string.Format("\"fontWidth\":{0}", serverTextStyle.FontWidth)); list.Add(string.Format("\"italic\":{0}", serverTextStyle.Italic)); list.Add(string.Format("\"outline\":{0}", serverTextStyle.Outline)); list.Add(string.Format("\"rotation\":{0}", serverTextStyle.Rotation)); list.Add(string.Format("\"shadow\":{0}", serverTextStyle.Shadow)); list.Add(string.Format("\"stroke\":{0}", serverTextStyle.Stroke)); list.Add(string.Format("\"transparent\":{0}", serverTextStyle.Transparent)); list.Add(string.Format("\"underline\":{0}", serverTextStyle.Underline)); json += string.Join(",", list.ToArray()); json += "}"; return json; }
/// <summary>${iServer2_Theme_ThemeLable_constructor_None_D}</summary> public Themelabel() { UniformStyle = new ServerTextStyle(); IsOverlapAvoided = true; MaxLabelLength = 256; }