private void SetDefault() { ORP.Add(new JObject( new JProperty("name", "Zlín"), new JProperty("url", "https://www.windguru.cz/343224") )); }
public static JArray GetCoodsByRegionName(string name) { if (ORPcoods == null) { return(null); } return(GetCoodsByColor(ORP.FirstOrDefault(x => x.Value == name).Key)); }
public static string GetRegionNameByCoods(System.Windows.Point point) { try { if (Resources.BitmapMapMaskORP == null) { return(string.Empty); } string colorName = "#" + Resources.BitmapMapMaskORP.GetPixel((int)point.X, (int)point.Y).Name.Substring(2, 6); if (ORP.ContainsKey(colorName)) { return(ORP[colorName]); } return(string.Empty); } catch (Exception e) { Utils.Log.Error(e); } return(string.Empty); }