From 7da8b58c0890e24c36fa2bcc6e03480b1df5c7b7 Mon Sep 17 00:00:00 2001 From: Yuubari Date: Fri, 6 Nov 2015 18:16:50 +0300 Subject: [PATCH] SlotItemCatalog: proficiency icons --- .../Controls/AircraftProficiencyIcon.cs | 25 +++ .../KanColleViewer.Controls.csproj | 8 + .../Generic.AircraftProficiencyIcon.xaml | 147 ++++++++++++++++++ .../Themes/Generic.xaml | 1 + .../Views/Catalogs/SlotItemCatalogWindow.xaml | 49 ++++-- 5 files changed, 221 insertions(+), 9 deletions(-) create mode 100644 source/Grabacr07.KanColleViewer.Controls/Controls/AircraftProficiencyIcon.cs create mode 100644 source/Grabacr07.KanColleViewer.Controls/Themes/Generic.AircraftProficiencyIcon.xaml diff --git a/source/Grabacr07.KanColleViewer.Controls/Controls/AircraftProficiencyIcon.cs b/source/Grabacr07.KanColleViewer.Controls/Controls/AircraftProficiencyIcon.cs new file mode 100644 index 000000000..47e6bde5a --- /dev/null +++ b/source/Grabacr07.KanColleViewer.Controls/Controls/AircraftProficiencyIcon.cs @@ -0,0 +1,25 @@ +using System.Windows; +using System.Windows.Controls; +using Grabacr07.KanColleWrapper.Models; + +namespace Grabacr07.KanColleViewer.Controls +{ + public class AircraftProficiencyIcon : Control + { + static AircraftProficiencyIcon() + { + DefaultStyleKeyProperty.OverrideMetadata( + typeof(AircraftProficiencyIcon), + new FrameworkPropertyMetadata(typeof(AircraftProficiencyIcon))); + } + + public int Level + { + get { return (int)this.GetValue(LevelProperty); } + set { this.SetValue(LevelProperty, value); } + } + + public static readonly DependencyProperty LevelProperty = + DependencyProperty.Register(nameof(Level), typeof(int), typeof(AircraftProficiencyIcon), new UIPropertyMetadata(0)); + } +} \ No newline at end of file diff --git a/source/Grabacr07.KanColleViewer.Controls/KanColleViewer.Controls.csproj b/source/Grabacr07.KanColleViewer.Controls/KanColleViewer.Controls.csproj index 852565118..1a972d3ec 100644 --- a/source/Grabacr07.KanColleViewer.Controls/KanColleViewer.Controls.csproj +++ b/source/Grabacr07.KanColleViewer.Controls/KanColleViewer.Controls.csproj @@ -38,6 +38,8 @@ + + @@ -120,6 +122,11 @@ Designer Generic.xaml + + Designer + MSBuild:Compile + Generic.xaml + MSBuild:Compile Designer @@ -127,6 +134,7 @@ + Code diff --git a/source/Grabacr07.KanColleViewer.Controls/Themes/Generic.AircraftProficiencyIcon.xaml b/source/Grabacr07.KanColleViewer.Controls/Themes/Generic.AircraftProficiencyIcon.xaml new file mode 100644 index 000000000..b45844c54 --- /dev/null +++ b/source/Grabacr07.KanColleViewer.Controls/Themes/Generic.AircraftProficiencyIcon.xaml @@ -0,0 +1,147 @@ + + + + + + \ No newline at end of file diff --git a/source/Grabacr07.KanColleViewer.Controls/Themes/Generic.xaml b/source/Grabacr07.KanColleViewer.Controls/Themes/Generic.xaml index cced975a1..ce56a7bd8 100644 --- a/source/Grabacr07.KanColleViewer.Controls/Themes/Generic.xaml +++ b/source/Grabacr07.KanColleViewer.Controls/Themes/Generic.xaml @@ -9,6 +9,7 @@ + diff --git a/source/Grabacr07.KanColleViewer/Views/Catalogs/SlotItemCatalogWindow.xaml b/source/Grabacr07.KanColleViewer/Views/Catalogs/SlotItemCatalogWindow.xaml index a53b8c145..69952dad3 100644 --- a/source/Grabacr07.KanColleViewer/Views/Catalogs/SlotItemCatalogWindow.xaml +++ b/source/Grabacr07.KanColleViewer/Views/Catalogs/SlotItemCatalogWindow.xaml @@ -71,7 +71,7 @@ - @@ -131,7 +131,7 @@ - + @@ -151,7 +151,7 @@ - + @@ -168,12 +168,12 @@ - + - + - + @@ -228,7 +228,7 @@ - - + --> + + + + + + + + + + -