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.
31 lines
837 B
C#
31 lines
837 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows;
|
|
using System.Windows.Data;
|
|
|
|
namespace ThreadPilot
|
|
{
|
|
public class BoolToVisibilityConverter : IValueConverter
|
|
{
|
|
public static readonly BoolToVisibilityConverter Instance = new();
|
|
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (value is bool boolValue && boolValue)
|
|
{
|
|
return Visibility.Visible;
|
|
}
|
|
return Visibility.Collapsed;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (value is Visibility visibility)
|
|
{
|
|
return visibility == Visibility.Visible;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|