mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
code_style: remove unused converters
This commit is contained in:
parent
853d5ce20e
commit
33e4404222
1 changed files with 1 additions and 28 deletions
|
@ -1,9 +1,5 @@
|
||||||
using System;
|
using Avalonia;
|
||||||
using System.Globalization;
|
|
||||||
|
|
||||||
using Avalonia;
|
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Data;
|
|
||||||
using Avalonia.Data.Converters;
|
using Avalonia.Data.Converters;
|
||||||
using Avalonia.Media;
|
using Avalonia.Media;
|
||||||
|
|
||||||
|
@ -43,28 +39,5 @@ namespace SourceGit.Converters
|
||||||
else
|
else
|
||||||
return Models.Bookmarks.Brushes[bookmark];
|
return Models.Bookmarks.Brushes[bookmark];
|
||||||
});
|
});
|
||||||
|
|
||||||
public class ToColorHexStringConverter : IValueConverter
|
|
||||||
{
|
|
||||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
||||||
{
|
|
||||||
return Color.FromUInt32((uint)value).ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var color = Color.Parse(value as string);
|
|
||||||
return color.ToUInt32();
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
return BindingOperations.DoNothing;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static readonly ToColorHexStringConverter ToColorHexString = new ToColorHexStringConverter();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue