Did a lot of work just unit testing left

This commit is contained in:
2019-10-25 02:30:49 -06:00
parent 8d6ba5df72
commit 6901925c69
15 changed files with 508 additions and 74 deletions

33
Shapes/ImageManager.cs Normal file
View File

@@ -0,0 +1,33 @@
using System.Collections;
using System.Drawing;
using System.IO;
namespace Shapes
{
public static class ImageManager
{
private static Hashtable _images;
static ImageManager()
{
_images = new Hashtable();
}
internal static Bitmap GetImage(Stream stream)
{
if (_images.ContainsKey(stream))
{
return (Bitmap) _images[stream];
}
else
{
Bitmap bitmap = new Bitmap(stream);
_images.Add(stream, bitmap);
return bitmap;
}
}
}
}