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; } /// /// Gets a value indicating whether bar is charged or not. Null if state is unknown. /// public ChargingState? State { get; private set; } = null; public string Text { get { if (State == null) return string.Empty; return State == ChargingState.Loaded ? " + " : " - "; } } } }