Satisfy my OCD

This commit is contained in:
pizzaboxer 2024-09-01 09:52:43 +01:00
parent 6d8d482449
commit 049d59a995
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
10 changed files with 20 additions and 20 deletions

View File

@ -4,9 +4,9 @@
{ {
public static string ToTranslatedString(this ServerType value) => value switch public static string ToTranslatedString(this ServerType value) => value switch
{ {
ServerType.Public => Resources.Strings.Enums_ServerType_Public, ServerType.Public => Strings.Enums_ServerType_Public,
ServerType.Private => Resources.Strings.Enums_ServerType_Private, ServerType.Private => Strings.Enums_ServerType_Private,
ServerType.Reserved => Resources.Strings.Enums_ServerType_Reserved, ServerType.Reserved => Strings.Enums_ServerType_Reserved,
_ => "?" _ => "?"
}; };
} }

View File

@ -32,11 +32,11 @@ namespace Bloxstrap.UI.Converters
return attribute.StaticName; return attribute.StaticName;
if (attribute.FromTranslation is not null) if (attribute.FromTranslation is not null)
return Resources.Strings.ResourceManager.GetStringSafe(attribute.FromTranslation); return Strings.ResourceManager.GetStringSafe(attribute.FromTranslation);
} }
} }
return Resources.Strings.ResourceManager.GetStringSafe(String.Format( return Strings.ResourceManager.GetStringSafe(String.Format(
"{0}.{1}", "{0}.{1}",
typeName.Substring(typeName.IndexOf('.', StringComparison.Ordinal) + 1), typeName.Substring(typeName.IndexOf('.', StringComparison.Ordinal) + 1),
stringVal stringVal

View File

@ -43,7 +43,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
{ {
InitializeComponent(); InitializeComponent();
this.buttonCancel.Text = Resources.Strings.Common_Cancel; this.buttonCancel.Text = Strings.Common_Cancel;
ScaleWindow(); ScaleWindow();
SetupDialog(); SetupDialog();

View File

@ -43,7 +43,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
InitializeComponent(); InitializeComponent();
this.IconBox.BackgroundImage = App.Settings.Prop.BootstrapperIcon.GetIcon().ToBitmap(); this.IconBox.BackgroundImage = App.Settings.Prop.BootstrapperIcon.GetIcon().ToBitmap();
this.buttonCancel.Text = Resources.Strings.Common_Cancel; this.buttonCancel.Text = Strings.Common_Cancel;
ScaleWindow(); ScaleWindow();
SetupDialog(); SetupDialog();

View File

@ -52,8 +52,8 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
this.BackColor = Color.FromArgb(25, 27, 29); this.BackColor = Color.FromArgb(25, 27, 29);
} }
this.labelMessage.Text = Resources.Strings.Bootstrapper_StylePreview_TextCancel; this.labelMessage.Text = Strings.Bootstrapper_StylePreview_TextCancel;
this.buttonCancel.Text = Resources.Strings.Common_Cancel; this.buttonCancel.Text = Strings.Common_Cancel;
this.IconBox.BackgroundImage = App.Settings.Prop.BootstrapperIcon.GetIcon().GetSized(128, 128).ToBitmap(); this.IconBox.BackgroundImage = App.Settings.Prop.BootstrapperIcon.GetIcon().GetSized(128, 128).ToBitmap();
SetupDialog(); SetupDialog();

View File

@ -121,13 +121,13 @@ namespace Bloxstrap.UI.Elements.Dialogs
switch (result) switch (result)
{ {
case MessageBoxResult.OK: case MessageBoxResult.OK:
return Bloxstrap.Resources.Strings.Common_OK; return Strings.Common_OK;
case MessageBoxResult.Cancel: case MessageBoxResult.Cancel:
return Bloxstrap.Resources.Strings.Common_Cancel; return Strings.Common_Cancel;
case MessageBoxResult.Yes: case MessageBoxResult.Yes:
return Bloxstrap.Resources.Strings.Common_Yes; return Strings.Common_Yes;
case MessageBoxResult.No: case MessageBoxResult.No:
return Bloxstrap.Resources.Strings.Common_No; return Strings.Common_No;
default: default:
Debug.Assert(false); Debug.Assert(false);
return result.ToString(); return result.ToString();

View File

@ -5,7 +5,7 @@
{ {
// formatting is done here instead of in xaml, it's just a bit easier // formatting is done here instead of in xaml, it's just a bit easier
public string MainText => String.Format( public string MainText => String.Format(
Resources.Strings.Installer_Welcome_MainText, Strings.Installer_Welcome_MainText,
"[github.com/pizzaboxer/bloxstrap](https://github.com/pizzaboxer/bloxstrap)", "[github.com/pizzaboxer/bloxstrap](https://github.com/pizzaboxer/bloxstrap)",
"[bloxstraplabs.com](https://bloxstraplabs.com)" "[bloxstraplabs.com](https://bloxstraplabs.com)"
); );

View File

@ -23,9 +23,9 @@ namespace Bloxstrap.UI.ViewModels.Settings
IBootstrapperDialog dialog = App.Settings.Prop.BootstrapperStyle.GetNew(); IBootstrapperDialog dialog = App.Settings.Prop.BootstrapperStyle.GetNew();
if (App.Settings.Prop.BootstrapperStyle == BootstrapperStyle.ByfronDialog) if (App.Settings.Prop.BootstrapperStyle == BootstrapperStyle.ByfronDialog)
dialog.Message = Resources.Strings.Bootstrapper_StylePreview_ImageCancel; dialog.Message = Strings.Bootstrapper_StylePreview_ImageCancel;
else else
dialog.Message = Resources.Strings.Bootstrapper_StylePreview_TextCancel; dialog.Message = Strings.Bootstrapper_StylePreview_TextCancel;
dialog.CancelEnabled = true; dialog.CancelEnabled = true;
dialog.ShowBootstrapper(); dialog.ShowBootstrapper();
@ -35,7 +35,7 @@ namespace Bloxstrap.UI.ViewModels.Settings
{ {
var dialog = new OpenFileDialog var dialog = new OpenFileDialog
{ {
Filter = $"{Resources.Strings.Menu_IconFiles}|*.ico" Filter = $"{Strings.Menu_IconFiles}|*.ico"
}; };
if (dialog.ShowDialog() != true) if (dialog.ShowDialog() != true)

View File

@ -31,13 +31,13 @@ namespace Bloxstrap.UI.ViewModels.Settings
{ {
for (int i = 10; i > 0; i--) for (int i = 10; i > 0; i--)
{ {
ContinueButtonText = $"({i}) {Resources.Strings.Menu_FastFlagEditor_Warning_Continue}"; ContinueButtonText = $"({i}) {Strings.Menu_FastFlagEditor_Warning_Continue}";
OnPropertyChanged(nameof(ContinueButtonText)); OnPropertyChanged(nameof(ContinueButtonText));
await Task.Delay(1000); await Task.Delay(1000);
} }
ContinueButtonText = Resources.Strings.Menu_FastFlagEditor_Warning_Continue; ContinueButtonText = Strings.Menu_FastFlagEditor_Warning_Continue;
OnPropertyChanged(nameof(ContinueButtonText)); OnPropertyChanged(nameof(ContinueButtonText));
CanContinue = true; CanContinue = true;

View File

@ -19,7 +19,7 @@ namespace Bloxstrap.UI.ViewModels.Settings
{ {
CustomIntegrations.Add(new CustomIntegration() CustomIntegrations.Add(new CustomIntegration()
{ {
Name = Resources.Strings.Menu_Integrations_Custom_NewIntegration Name = Strings.Menu_Integrations_Custom_NewIntegration
}); });
SelectedCustomIntegrationIndex = CustomIntegrations.Count - 1; SelectedCustomIntegrationIndex = CustomIntegrations.Count - 1;