Exemplo n.º 1
0
 public Bitmap this[string filename]
 {
     get
     {
         if (!bitmaps.ContainsKey(filename))
         {
             bitmaps.Add(filename, new Bitmap(ContentResolver.GetEmbeddedResourceStream(filename)));
         }
         return(bitmaps[filename]);
     }
 }
Exemplo n.º 2
0
 private void ReadMapFile(string filePath)
 {
     using (StreamReader stream = new StreamReader(ContentResolver.GetEmbeddedResourceStream(filePath)))
     {
         while (!stream.EndOfStream)
         {
             Area area = new Area(stream);
             this.WorldMap.Add(area.Name, area);
         }
     }
 }
Exemplo n.º 3
0
        static Statistics()
        {
            var path = @"Content\TextArt\statistics.txt";

            StatisticsPath = Path.Combine(Path.GetTempPath(), Path.GetFileName(path));
            if (!File.Exists(StatisticsPath))
            {
                using (var stream = File.OpenWrite(StatisticsPath))
                {
                    ContentResolver.GetEmbeddedResourceStream(path).CopyTo(stream);
                }
            }
        }