From 5c0c84a068441373b90c7c567a320959c0a547cd Mon Sep 17 00:00:00 2001 From: Chris Kaczor Date: Thu, 13 Apr 2023 20:05:55 -0400 Subject: [PATCH] Rework much of options UI --- Application/FeedCenter.csproj | 5 +- Application/Options/AboutOptionsPanel.xaml | 25 +++--- Application/Options/AboutOptionsPanel.xaml.cs | 16 +--- Application/Options/CategoryWindow.xaml | 25 ++++-- Application/Options/DisplayOptionsPanel.xaml | 69 +++++---------- .../Options/DisplayOptionsPanel.xaml.cs | 37 ++------- Application/Options/FeedWindow.xaml | 10 +++ Application/Options/FeedsOptionsPanel.xaml | 16 +--- Application/Options/GeneralOptionsPanel.xaml | 65 +++++---------- .../Options/GeneralOptionsPanel.xaml.cs | 83 ++----------------- Application/Options/MarginSetter.cs | 73 ++++++++++++++++ Application/Options/OptionsWindow.xaml | 55 ++++++++---- Application/Options/Spacing.cs | 55 ++++++++++++ Application/Options/UpdateOptionsPanel.xaml | 16 ++-- .../Options/UpdateOptionsPanel.xaml.cs | 26 +++--- Application/Options/UserAgentItem.cs | 53 ++++++------ Application/Properties/Resources.Designer.cs | 12 +-- Application/Properties/Resources.resx | 12 +-- 18 files changed, 322 insertions(+), 331 deletions(-) create mode 100644 Application/Options/MarginSetter.cs create mode 100644 Application/Options/Spacing.cs diff --git a/Application/FeedCenter.csproj b/Application/FeedCenter.csproj index 98e4097..5214a5f 100644 --- a/Application/FeedCenter.csproj +++ b/Application/FeedCenter.csproj @@ -126,7 +126,7 @@ - + @@ -139,10 +139,11 @@ + NU1701 - + NU1701 diff --git a/Application/Options/AboutOptionsPanel.xaml b/Application/Options/AboutOptionsPanel.xaml index 269c270..5c19da3 100644 --- a/Application/Options/AboutOptionsPanel.xaml +++ b/Application/Options/AboutOptionsPanel.xaml @@ -4,21 +4,18 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:options="clr-namespace:FeedCenter.Options" + xmlns:properties="clr-namespace:FeedCenter.Properties" + xmlns:applicationUpdate="clr-namespace:ChrisKaczor.ApplicationUpdate;assembly=ChrisKaczor.ApplicationUpdate" mc:Ignorable="d" - d:DesignHeight="300" + d:DesignHeight="150" d:DesignWidth="300"> - - - + + + + + - + \ No newline at end of file diff --git a/Application/Options/AboutOptionsPanel.xaml.cs b/Application/Options/AboutOptionsPanel.xaml.cs index 4d27702..3f46b03 100644 --- a/Application/Options/AboutOptionsPanel.xaml.cs +++ b/Application/Options/AboutOptionsPanel.xaml.cs @@ -1,6 +1,4 @@ -using System.Reflection; -using System.Windows; -using ChrisKaczor.ApplicationUpdate; +using System.Windows; namespace FeedCenter.Options; @@ -12,16 +10,4 @@ public partial class AboutOptionsPanel } public override string CategoryName => Properties.Resources.optionCategoryAbout; - - public override void LoadPanel() - { - base.LoadPanel(); - - ApplicationNameLabel.Text = Properties.Resources.ApplicationDisplayName; - - var version = UpdateCheck.LocalVersion.ToString(); - VersionLabel.Text = string.Format(Properties.Resources.Version, version); - - CompanyLabel.Text = ((AssemblyCompanyAttribute) Assembly.GetEntryAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false)[0]).Company; - } } \ No newline at end of file diff --git a/Application/Options/CategoryWindow.xaml b/Application/Options/CategoryWindow.xaml index 5500ef5..150973e 100644 --- a/Application/Options/CategoryWindow.xaml +++ b/Application/Options/CategoryWindow.xaml @@ -7,6 +7,7 @@ mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:controls="clr-namespace:ChrisKaczor.Wpf.Windows;assembly=ChrisKaczor.Wpf.Windows.ControlBox" + xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" d:DataContext="{d:DesignInstance Type=feedCenter:Category}" Title="CategoryWindow" Width="300" @@ -17,7 +18,17 @@ FocusManager.FocusedElement="{Binding ElementName=NameTextBox}" controls:ControlBox.HasMinimizeButton="False" controls:ControlBox.HasMaximizeButton="False"> - + + + + + + + + + + + @@ -25,15 +36,13 @@ - - @@ -44,7 +53,6 @@ Margin="0,5,0,0" HorizontalAlignment="Right">