sharee.bike-App/ShareeSharedGuiLib/ViewModel/Bar.cs

38 lines
761 B
C#
Raw Normal View History

2022-08-30 15:42:25 +02:00
using System;
using System.Collections.Generic;
using System.Text;
namespace ShareeSharedGuiLib.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 ? " + " : " - ";
}
}
}
}