ui, and controller, ecc, ecc
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace HashCalculator.GUI.Converters
|
||||
{
|
||||
[SuppressMessage("Microsoft.Performance", "CA1812")]
|
||||
[ValueConversion(typeof(bool), typeof(bool))]
|
||||
internal class BooleanInvertConverter : IValueConverter
|
||||
{
|
||||
|
||||
20
Converters/IsZeroToBooleanConverter.cs
Normal file
20
Converters/IsZeroToBooleanConverter.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace HashCalculator.GUI.Converters
|
||||
{
|
||||
[ValueConversion(typeof(int), typeof(bool))]
|
||||
public class IsZeroToBooleanConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return (int)value == 0 ? false : true;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
22
Converters/MultiValueEqualityConverter.cs
Normal file
22
Converters/MultiValueEqualityConverter.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace HashCalculator.GUI.Converters
|
||||
{
|
||||
[SuppressMessage("Microsoft.Performance", "CA1812")]
|
||||
internal class MultiValueEqualityConverter : IMultiValueConverter
|
||||
{
|
||||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return values.All(x => Equals(x, values.First()));
|
||||
}
|
||||
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace HashCalculator.GUI.Converters
|
||||
{
|
||||
[SuppressMessage("Microsoft.Performance", "CA1812")]
|
||||
[ValueConversion(typeof(InputEntry), typeof(bool))]
|
||||
internal class ValidInputEntryTypeToBooleanConverter : IValueConverter
|
||||
{
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace HashCalculator.GUI.Converters
|
||||
{
|
||||
[SuppressMessage("Microsoft.Performance", "CA1812")]
|
||||
internal class ValueConverterAggregate : List<IValueConverter>, IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
|
||||
Reference in New Issue
Block a user