10 changed files with 65 additions and 70 deletions
@ -1,27 +0,0 @@ |
|||||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
|
||||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
||||||
|
|
||||||
#region Usings
|
|
||||||
|
|
||||||
using System; |
|
||||||
using System.Globalization; |
|
||||||
using System.Windows.Data; |
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
namespace ICSharpCode.Data.EDMDesigner.Core.UI.Converters |
|
||||||
{ |
|
||||||
public class NotBoolConverter : IValueConverter |
|
||||||
{ |
|
||||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
|
||||||
{ |
|
||||||
return !((bool)value); |
|
||||||
} |
|
||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
|
||||||
{ |
|
||||||
throw new NotImplementedException(); |
|
||||||
} |
|
||||||
|
|
||||||
} |
|
||||||
} |
|
@ -1,35 +0,0 @@ |
|||||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
|
||||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
||||||
|
|
||||||
#region Usings
|
|
||||||
|
|
||||||
using System; |
|
||||||
using System.Collections.Generic; |
|
||||||
using System.Linq; |
|
||||||
using System.Text; |
|
||||||
using System.Windows.Data; |
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
namespace ICSharpCode.Data.SQLServer.Converters |
|
||||||
{ |
|
||||||
public class OppositeBoolConverter : IValueConverter |
|
||||||
{ |
|
||||||
#region IValueConverter Members
|
|
||||||
|
|
||||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
|
||||||
{ |
|
||||||
if (value is bool && (bool)value) |
|
||||||
return false; |
|
||||||
else |
|
||||||
return true; |
|
||||||
} |
|
||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
|
||||||
{ |
|
||||||
return Binding.DoNothing; |
|
||||||
} |
|
||||||
|
|
||||||
#endregion
|
|
||||||
} |
|
||||||
} |
|
@ -0,0 +1,32 @@ |
|||||||
|
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||||
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||||
|
|
||||||
|
#region Usings
|
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Globalization; |
||||||
|
using System.Windows.Data; |
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
namespace ICSharpCode.Core.Presentation |
||||||
|
{ |
||||||
|
public class NotBoolConverter : IValueConverter |
||||||
|
{ |
||||||
|
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
||||||
|
{ |
||||||
|
if (value is bool && (bool)value) |
||||||
|
return false; |
||||||
|
else |
||||||
|
return true; |
||||||
|
} |
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
||||||
|
{ |
||||||
|
if (value is bool && (bool)value) |
||||||
|
return false; |
||||||
|
else |
||||||
|
return true; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue