4 changed files with 56 additions and 46 deletions
@ -1,41 +1,39 @@
@@ -1,41 +1,39 @@
|
||||
/* |
||||
* Created by SharpDevelop. |
||||
* User: Peter Forstmeier |
||||
* Date: 14.11.2011 |
||||
* Time: 19:48 |
||||
* |
||||
* To change this template use Tools | Options | Coding | Edit Standard Headers. |
||||
*/ |
||||
using System; |
||||
using System.Collections; |
||||
using System.ComponentModel; |
||||
using System.IO; |
||||
using System.Linq; |
||||
using System.Windows; |
||||
using System.Windows.Controls; |
||||
using System.Windows.Forms; |
||||
// 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)
|
||||
|
||||
using ICSharpCode.Core; |
||||
using System; |
||||
using System.Globalization; |
||||
using System.Windows.Data; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Gui.OptionPanels |
||||
{ |
||||
public class StorageLocationConverter:System.Windows.Data.IMultiValueConverter |
||||
public class StorageLocationConverter : IMultiValueConverter |
||||
{ |
||||
|
||||
public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
||||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) |
||||
{ |
||||
// Console.WriteLine ("Convert");
|
||||
// foreach (var element in values) {
|
||||
// Console.WriteLine(element.ToString());
|
||||
// }
|
||||
return values[0]; |
||||
} |
||||
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture) |
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) |
||||
{ |
||||
var s = Array.ConvertAll<Type, Object>(targetTypes, t => value); |
||||
return s; |
||||
} |
||||
} |
||||
|
||||
public class StartActionToBooleanConverter : IValueConverter |
||||
{ |
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
||||
{ |
||||
return (StartAction)value == (StartAction)parameter; |
||||
} |
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
||||
{ |
||||
if ((bool)value) |
||||
return parameter; |
||||
throw new NotSupportedException("this conversion is not supported!"); |
||||
} |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue