using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Data; using System.Windows.Media; using Venus_Core; namespace Venus_MainPages.Converters { internal class LLStateConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { LLState currentState = (LLState)Enum.Parse(typeof(LLState), value.ToString()); switch (currentState) { case LLState.Init: return new SolidColorBrush(Colors.Yellow); case LLState.Idle: return new SolidColorBrush(Colors.WhiteSmoke); case LLState.Error: return new SolidColorBrush(Colors.Red); default: return new SolidColorBrush(Colors.Lime); } } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return null; } } }