void UpdateIndicator( BatteryVM BVM ) { if (BVM.isPresent) { double percentage = (BVM.Batterie.RemainingCapacity / BVM.Batterie.BatteryCapacity) * 100; UpdateIndicatorColor(percentage); UpdateIndicatorSize(percentage); UpdateIndicatorText(percentage.ToString()); //if (BVM.isCharging) //{ // ElectricPlugText.FontSize = 50; // ElectricPlugText.Text = "🔌"; //} } else { ShowEmptyBattery(); ElectricPlugText.FontSize = 15; Random r = new Random(); ElectricPlugText.Text = OopsText[r.Next(0 , OopsText.Length - 1)]; } }
public MainPage() { InitializeComponent(); B_VM = new BatteryVM(); DataContext = B_VM; }