2021-03-03 09:09:30 +08:00
|
|
|
|
using Microsoft.AnalysisServices;
|
|
|
|
|
using System;
|
2021-02-25 09:34:03 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Globalization;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
|
|
|
|
|
namespace Metadata_Translator
|
|
|
|
|
{
|
|
|
|
|
class TrueFalseVisibilityConverter : IValueConverter
|
|
|
|
|
{
|
|
|
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
{
|
2021-03-03 09:09:30 +08:00
|
|
|
|
if(value is bool notVisible)
|
|
|
|
|
{
|
|
|
|
|
return notVisible ? Visibility.Collapsed : Visibility.Visible;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return (value == null)? Visibility.Collapsed : Visibility.Visible;
|
2021-02-25 09:34:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class FalseTrueVisibilityConverter : IValueConverter
|
|
|
|
|
{
|
|
|
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
{
|
2021-03-03 09:09:30 +08:00
|
|
|
|
if (value is bool notVisible)
|
|
|
|
|
{
|
|
|
|
|
return notVisible ? Visibility.Visible : Visibility.Collapsed;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
return (value == null) ? Visibility.Visible : Visibility.Collapsed;
|
2021-02-25 09:34:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|