Skip to content

Commit

Permalink
add categorie icons in settings dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
t0815 committed Sep 12, 2024
1 parent a266cba commit 1db9bf9
Show file tree
Hide file tree
Showing 12 changed files with 447 additions and 368 deletions.
2 changes: 1 addition & 1 deletion MyCBZ/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
<applicationSettings>
<Win_CBZ.Win_CBZSettings>
<setting name="InstalledVersion" serializeAs="String">
<value>0.20.160b</value>
<value>0.20.161b</value>
</setting>
<setting name="RenamerPlaceholders" serializeAs="Xml">
<value>
Expand Down
215 changes: 107 additions & 108 deletions MyCBZ/Forms/MainForm.resx

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions MyCBZ/Forms/SettingsDialog.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions MyCBZ/Forms/SettingsDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ internal partial class SettingsDialog : Form

private int nextOccurence = 0;

private List<string> errorCategories = new List<string>();

public SettingsDialog()
{
InitializeComponent();
Expand Down Expand Up @@ -399,6 +401,8 @@ private void SettingsDialog_FormClosing(object sender, FormClosingEventArgs e)
{
if (DialogResult == DialogResult.OK)
{
errorCategories.Clear();

Program.ProjectModel.MetaData.CustomDefaultProperties = new List<String>(CustomDefaultKeys.Lines.ToArray<String>());
try
{
Expand Down Expand Up @@ -540,6 +544,25 @@ private void SettingsDialog_FormClosing(object sender, FormClosingEventArgs e)
row = parts[1];
}

string errorSection = "";

if (controlName == "CustomDefaultKeys" ||
controlName == "ValidTags" ||
controlName == "ComboBoxFileName")
{
errorSection = "metadata";
} else if (controlName == "CustomFieldsDataGrid")
{
errorSection = "application";
}

if (errorSection.Length > 0)
{
errorCategories.Add(errorSection);

SettingsSectionList.Refresh();
}

SettingsValidationErrorProvider.SetError(this.Controls.Find(controlName, true)[0], mv.Message);

if (row != null && row.Length > 0)
Expand Down Expand Up @@ -1554,6 +1577,11 @@ private void SettingsSectionList_DrawItem(object sender, DrawItemEventArgs e)
{
e.Graphics.DrawImage(CategoryImages.Images[name.ToLower().Replace(' ','_')], e.Bounds.X + 1, e.Bounds.Y + 3);
}

if (errorCategories.IndexOf(name.ToLower()) > -1)
{
e.Graphics.DrawImage(ErrorImages.Images["error"], e.Bounds.Right - 20, e.Bounds.Y + 8);
}
}
}
}
544 changes: 293 additions & 251 deletions MyCBZ/Forms/SettingsDialog.resx

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions MyCBZ/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.20.160")]
[assembly: AssemblyFileVersion("0.20.160")]
[assembly: AssemblyVersion("0.20.161")]
[assembly: AssemblyFileVersion("0.20.161")]
[assembly: NeutralResourcesLanguage("en")]
Binary file added MyCBZ/Resources/error_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MyCBZ/Resources/error_small_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion MyCBZ/Win_CBZSettings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion MyCBZ/Win_CBZSettings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Value Profile="(Default)">%APPDATA%\WIN_CBZ\Temp\</Value>
</Setting>
<Setting Name="InstalledVersion" Type="System.String" Scope="Application">
<Value Profile="(Default)">0.20.160b</Value>
<Value Profile="(Default)">0.20.161b</Value>
</Setting>
<Setting Name="RenamerPlaceholders" Type="System.Collections.Specialized.StringCollection" Scope="Application">
<Value Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Microsoft Visual Studio [Community] 2022 (64-Bit)

## Latest Release

v0.20.160b released!
v0.20.161b released!


>[!IMPORTANT]
Expand Down
6 changes: 3 additions & 3 deletions Win_CBZ-Setup/Win_CBZ-Setup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Win_CBZ"
"ProductCode" = "8:{30DAC6EE-B206-4A2F-8476-5B4BC89E5551}"
"PackageCode" = "8:{7D1B443B-8D07-428A-A28A-4E7641BEA1D1}"
"ProductCode" = "8:{D85B9962-A617-404E-A23C-F0484AA49F92}"
"PackageCode" = "8:{AF11C6D1-ADF3-42B3-BF93-58F73C57189D}"
"UpgradeCode" = "8:{66FAEF81-1CAE-4971-9E0F-796310EFEA5E}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:0.20.160"
"ProductVersion" = "8:0.20.161"
"Manufacturer" = "8:Trash_s0Ft"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down

0 comments on commit 1db9bf9

Please sign in to comment.