Ejemplo n.º 1
0
 private MapWindow(MapDrawer drawer, bool background)
 {
     this.drawer = drawer;
     this.thread = new Thread(ThreadFunction);
     thread.SetApartmentState(ApartmentState.STA);
     thread.IsBackground = background;
     thread.Start();
 }
Ejemplo n.º 2
0
 public static MapWindow Instance(MapDrawer drawer = null, bool background = true)
 {
     if (instance == null)
     {
         if (drawer != null)
         {
             instance = new MapWindow(drawer, background);
         }
         else
         {
             instance = new MapWindow(new MapDrawer(), background);
         }
     }
     return instance;
 }