Esempio n. 1
0
        private static Bitmap GetSymbol(string bitmapname)
        {
            Bitmap bitmap = null;
            try
            {
                var filename = string.Format(CultureInfo.InvariantCulture, "Earthwatchers.UI;component/Resources/Images/{0}", bitmapname);
                var resourceInfo = Application.GetResourceStream(new Uri(filename, UriKind.Relative));
                bitmap = new Bitmap { Data = resourceInfo.Stream };
            }
            catch
            {
                //TODO: error handling
            }

            return bitmap;
        }
Esempio n. 2
0
 public bool Equals(Bitmap bitmap)
 {
     if (!CompareMemoryStreams(data, bitmap.data)) return false;
     return true;
 }