Ejemplo n.º 1
0
 private void SetDefault()
 {
     ORP.Add(new JObject(
                 new JProperty("name", "Zlín"),
                 new JProperty("url", "https://www.windguru.cz/343224")
                 ));
 }
Ejemplo n.º 2
0
 public static JArray GetCoodsByRegionName(string name)
 {
     if (ORPcoods == null)
     {
         return(null);
     }
     return(GetCoodsByColor(ORP.FirstOrDefault(x => x.Value == name).Key));
 }
Ejemplo n.º 3
0
 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);
 }