init
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Enums
|
||||
{
|
||||
[Flags]
|
||||
public enum SupportedExportFormatBitFlags
|
||||
{
|
||||
none = 0x0, //1<<0
|
||||
csvunfiltered = 0x1, //1<<0
|
||||
diademadc = 0x2, //1 <<1
|
||||
isounfiltered = 0x4, // 1<<2
|
||||
somatunfiltered = 0x8, //1 << 3
|
||||
tdmsadc = 0x10, //1 << 4
|
||||
toyotaunfiltered = 0x20, //1<<5
|
||||
tsvunfiltered = 0x40,
|
||||
csvfiltered = 0x80,
|
||||
//diademfiltered = 0x100, //unused & available
|
||||
isofiltered = 0x200,
|
||||
somatfiltered = 0x400,
|
||||
tdasadc = 0x800,
|
||||
toyotafiltered = 0x1000,
|
||||
tsvfiltered = 0x2000,
|
||||
rdfadc = 0x4000,
|
||||
ChryslerDDAS = 0x8000,
|
||||
HDFUnfiltered = 0x10000,
|
||||
HDFFiltered = 0x20000,
|
||||
HDFMV = 0x40000,
|
||||
HDFADC = 0x80000,
|
||||
xlsxfiltered = 0x100000,
|
||||
xlsxunfiltered = 0x200000,
|
||||
CSVADC = 0x400000,
|
||||
CSVMV = 0x800000,
|
||||
//DataPRO 3.3, Chapter 10 export
|
||||
Ch10FilteredEU = 0x1000000,
|
||||
Ch10UnfilteredEU = 0x2000000,
|
||||
FIATASC = 0x4000000,
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace DTS.Common.Converters
|
||||
{
|
||||
[ValueConversion(typeof(List<string>), typeof(string))]
|
||||
public class ListToStringConverter : IValueConverter
|
||||
{
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (targetType != typeof(string))
|
||||
throw new InvalidOperationException("The target must be a String");
|
||||
|
||||
return String.Join(", ", ((List<string>)value)?.ToArray() ?? throw new InvalidOperationException());
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace DTS.Common.Converters
|
||||
{
|
||||
public class BooleanOrToVisibilityMultiConverter : IMultiValueConverter
|
||||
{
|
||||
public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
var useFalseAsVisible = parameter != null && parameter.ToString().ToUpper().Contains("FALSE");
|
||||
var hideNotCollapse = parameter != null && parameter.ToString().ToUpper().Contains("HIDE");
|
||||
|
||||
bool value = !Array.TrueForAll(values, val => val is bool) ? false : Array.Exists(values, val => (bool)val);
|
||||
if (useFalseAsVisible)
|
||||
{
|
||||
if (!value)
|
||||
return Visibility.Visible;
|
||||
return hideNotCollapse ? Visibility.Hidden : Visibility.Collapsed;
|
||||
}
|
||||
if (!value)
|
||||
return hideNotCollapse ? Visibility.Hidden : Visibility.Collapsed;
|
||||
return Visibility.Visible;
|
||||
}
|
||||
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user