e3530e5342
Introduces new models, services, and view models for process monitoring, power plan association, application settings, and enhanced logging. Updates main application files and views to support new features. Adds developer and architecture documentation.
33 lines
836 B
C#
33 lines
836 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows.Data;
|
|
|
|
namespace ThreadPilot.Converters
|
|
{
|
|
/// <summary>
|
|
/// Converter to invert boolean values
|
|
/// </summary>
|
|
public class InverseBooleanConverter : IValueConverter
|
|
{
|
|
public static readonly InverseBooleanConverter Instance = new();
|
|
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (value is bool boolValue)
|
|
{
|
|
return !boolValue;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (value is bool boolValue)
|
|
{
|
|
return !boolValue;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|