mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-22 23:26:31 +01:00
37 lines
596 B
C#
37 lines
596 B
C#
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 ? " + " : " - ";
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|