WIP
DirectOutput framework for virtual pinball cabinets WIP
Go to:
Overview 
FastImageList.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.IO;
7 
8 namespace DirectOutput.General.BitmapHandling
9 {
10  public class FastImageList : NamedItemList<FastImage>
11  {
12  public new FastImage this[string Name]
13  {
14  get
15  {
16  try
17  {
18  return base[Name];
19  }
20  catch
21  {
22  if (!DontAddIfMissing)
23  {
24  try
25  {
26  FastImage F = new FastImage(Name);
27  Add(F);
28  return F;
29  }
30  catch (Exception E)
31  {
32  throw new Exception("Could not add file {0} to the FastBitmapList.", E);
33  }
34  }
35  else
36  {
37  throw;
38  }
39  }
40  }
41  }
42 
43  private Boolean _DontAddIfMissing=false;
44 
45  public Boolean DontAddIfMissing
46  {
47  get { return _DontAddIfMissing; }
48  set { _DontAddIfMissing = value; }
49  }
50 
51 
52 
53 
54 
55 
56 
57  }
58 }
A list of uniquely named items which can be referenced by their name.
The namespace DirectOutput.General contains classes for general use.