Adding configuration GUI and sphinx documentation to repository.

This commit is contained in:
emb
2015-01-03 22:47:53 -06:00
parent 44745f0fd2
commit 9f6ddde34c
69 changed files with 5572 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
using System;
using System.Windows.Data;
namespace Configuration.Converter
{
public class CollectionExistsConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter,
System.Globalization.CultureInfo culture)
{
// if (targetType != typeof(bool))
// throw new InvalidOperationException("The target is not a bool");
return true;
// return !(bool)value;
}
public object ConvertBack(object value, Type targetType, object parameter,
System.Globalization.CultureInfo culture)
{
throw new NotSupportedException();
}
}
}

View File

@@ -0,0 +1,24 @@
using System;
using System.Windows.Data;
namespace Configuration.Converter
{
[ValueConversion(typeof(bool), typeof(bool))]
public class InverseBooleanConverter: IValueConverter
{
public object Convert(object value, Type targetType, object parameter,
System.Globalization.CultureInfo culture)
{
if (targetType != typeof(bool))
throw new InvalidOperationException("The target is not a bool");
return !(bool)value;
}
public object ConvertBack(object value, Type targetType, object parameter,
System.Globalization.CultureInfo culture)
{
throw new NotSupportedException();
}
}
}

View File

@@ -0,0 +1,25 @@
using System;
using System.Windows;
using System.Windows.Data;
namespace Configuration.Converter
{
public class InverseBooleanToVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter,
System.Globalization.CultureInfo culture)
{
if (targetType != typeof(Visibility))
throw new InvalidOperationException("The target is not a visibility type");
return (!(bool)value) ? Visibility.Visible : Visibility.Collapsed;
}
public object ConvertBack(object value, Type targetType, object parameter,
System.Globalization.CultureInfo culture)
{
throw new NotSupportedException();
}
}
}

View File

@@ -0,0 +1,25 @@
using System;
using System.Windows;
using System.Windows.Data;
namespace Configuration.Converter
{
public class NullToVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter,
System.Globalization.CultureInfo culture)
{
if (targetType != typeof(Visibility))
throw new InvalidOperationException("The target is not of type bool");
return ((object)value != null) ? Visibility.Visible : Visibility.Collapsed;
}
public object ConvertBack(object value, Type targetType, object parameter,
System.Globalization.CultureInfo culture)
{
throw new NotSupportedException();
}
}
}