using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace ProximaAnalizer.Views; /// /// Interaction logic for DBInfoAlarm.xaml /// public partial class DBInfoAlarm : UserControl { public DBInfoAlarm() { InitializeComponent(); } } public class MFCUnitConverter : IValueConverter { public object? Convert(object? value, Type targetType, object parameter, CultureInfo culture) { if (value is not float unit) return value; return unit switch { 0f => "SCCM", 1f => "SLM", _ => value }; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } public class LeakCheckNameConvert : IValueConverter { public object? Convert(object? value, Type targetType, object parameter, CultureInfo culture) { if (value is not string s) return value; return s.Replace("LeakCheck", string.Empty); } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } }