Пример #1
0
 private void BatteryViewerLoad(object sender, EventArgs e)
 {
     _batteryApi = BatteryApi.GetInstance();
     _batteryApi.SetPowerTimeout(60);
     _isBatteryConditionUpdaterContinueWork = true;
     _batteryConditionUpdater = new Thread(UpdateBatteryConditIonProcedure);
     _batteryConditionUpdater.Start();
 }
Пример #2
0
 public static BatteryApi GetInstance()
 {
     if (Instance == null)
     {
         Instance = new BatteryApi();
     }
     return(Instance);
 }
Пример #3
0
 public static BatteryApi GetInstance()
 {
     return(_instance ?? (_instance = new BatteryApi()));
 }