示例#1
0
文件: MapWindow.cs 项目: ipo/AGBA
 private MapWindow(MapDrawer drawer, bool background)
 {
     this.drawer = drawer;
     this.thread = new Thread(ThreadFunction);
     thread.SetApartmentState(ApartmentState.STA);
     thread.IsBackground = background;
     thread.Start();
 }
示例#2
0
文件: MapWindow.cs 项目: ipo/AGBA
 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;
 }