// using System; // using System.Collections.Generic; // public class MainViewModel // { // public event Action OnAlarm; // public event Action OnBFIValueUpdated; // public float CurrentBFI { get; private set; } // public float CurrentBloodFlow { get; private set; } // public float CurrentBatteryLevel { get; private set; } // private IDataService _dataService; // public void Initialize() // { // _dataService = ServiceLocator.Get(); // if (_dataService != null) // { // _dataService.OnBFIValueUpdated += OnBFIUpdated; // _dataService.OnBloodFlowValueUpdated += OnBloodFlowUpdated; // _dataService.OnBatteryLevelUpdated += OnBatteryUpdated; // } // } // private void OnBFIUpdated(float value) // { // CurrentBFI = value; // OnBFIValueUpdated?.Invoke(value); // } // private void OnBloodFlowUpdated(float value) // { // CurrentBloodFlow = value; // } // private void OnBatteryUpdated(float value) // { // CurrentBatteryLevel = value; // } // public void SetDataCollection(bool isCollecting) // { // if (_dataService != null) // { // if (isCollecting) // { // _dataService.StartDataCollection(); // } // else // { // _dataService.StopDataCollection(); // } // } // } // }