/// <summary> /// Returns IMG html tag with path to icon. /// </summary> public static string KindexImageIcon(KIndexLabelValues label, string style, bool showNone = false, string title = "") { if (string.IsNullOrEmpty(title)) { return($"<img title='K–Index {label.ToString()} - Index korupčního rizika' src='{KIndexLabelIconUrl(label, showNone: showNone)}' class='kindex' style='{style}'>"); } return($"<img title='{title}' src='{KIndexLabelIconUrl(label, showNone: showNone)}' class='kindex' style='{style}'>"); }
public static string KIndexLabelIconUrl(KIndexLabelValues value, bool local = true, bool showNone = false) { string url = ""; if (local == false) { url = "https://www.hlidacstatu.cz"; } bool hranate = Devmasters.Config.GetWebConfigValue("KIdxIconStyle") == "hranate"; switch (value) { case KIndexLabelValues.None: if (showNone) { return(url + $"/Content/kindex/{(hranate ? "hranate" : "kulate")}/icon-.svg"); } else { return(url + "/Content/Img/1x1.png "); } default: return(url + $"/Content/kindex/{(hranate ? "hranate" : "kulate")}/icon{value.ToString()}.svg"); } }