private void BatteryViewerLoad(object sender, EventArgs e) { _batteryApi = BatteryApi.GetInstance(); _batteryApi.SetPowerTimeout(60); _isBatteryConditionUpdaterContinueWork = true; _batteryConditionUpdater = new Thread(UpdateBatteryConditIonProcedure); _batteryConditionUpdater.Start(); }
public static BatteryApi GetInstance() { if (Instance == null) { Instance = new BatteryApi(); } return(Instance); }
public static BatteryApi GetInstance() { return(_instance ?? (_instance = new BatteryApi())); }