StatesIconManager()
{
{
var bitmap = new BitmapImage();
bitmap.BeginInit();
bitmap.StreamSource = new FileStream(Path.Combine(_serviceManager.Paths["Icons"], @"States\Red.png"), FileMode.Open, FileAccess.Read, FileShare.Read);
bitmap.EndInit();
if (bitmap.CanFreeze) bitmap.Freeze();
this.Red = bitmap;
}
{
var bitmap = new BitmapImage();
bitmap.BeginInit();
bitmap.StreamSource = new FileStream(Path.Combine(_serviceManager.Paths["Icons"], @"States\Yello.png"), FileMode.Open, FileAccess.Read, FileShare.Read);
bitmap.EndInit();
if (bitmap.CanFreeze) bitmap.Freeze();
this.Yello = bitmap;
}
{
var bitmap = new BitmapImage();
bitmap.BeginInit();
bitmap.StreamSource = new FileStream(Path.Combine(_serviceManager.Paths["Icons"], @"States\Green.png"), FileMode.Open, FileAccess.Read, FileShare.Read);
bitmap.EndInit();
if (bitmap.CanFreeze) bitmap.Freeze();
this.Green = bitmap;
}
}