sharee.bike-App/SharedGui/ViewModel/Bar.cs
2024-04-09 12:53:23 +02:00

37 lines
587 B
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace SharedGui.ViewModel
{
public enum ChargingState
{
Loaded,
Empty
}
public class Bar
{
public Bar(ChargingState? state = null)
{
State = state;
}
/// <summary>
/// Gets a value indicating whether bar is charged or not. Null if state is unknown.
/// </summary>
public ChargingState? State { get; private set; } = null;
public string Text
{
get
{
if (State == null)
return string.Empty;
return State == ChargingState.Loaded ? " + " : " - ";
}
}
}
}