示例#1
0
 public MainWindow()
 {
     InitializeComponent();
     this.Loaded += (sender,e) => EventCollection();
     visiblePanel = PlayerPanel;
     api = API.GetInstance();
 }
示例#2
0
 /// <summary>
 /// 获取API对象,单例模式
 /// </summary>
 /// <returns>返回API实例</returns>
 public static API GetInstance()
 {
     if (api == null)
         api = new API();
     return api;
 }