diff --git a/Bloxstrap/Resources/Strings.Designer.cs b/Bloxstrap/Resources/Strings.Designer.cs index fcd4ff2..e84f7f9 100644 --- a/Bloxstrap/Resources/Strings.Designer.cs +++ b/Bloxstrap/Resources/Strings.Designer.cs @@ -973,15 +973,6 @@ namespace Bloxstrap.Resources { } } - /// - /// Looks up a localized string similar to Custom dialog has already been initialised. - /// - public static string CustomTheme_DialogAlreadyInitialised { - get { - return ResourceManager.GetString("CustomTheme.DialogAlreadyInitialised", resourceCulture); - } - } - /// /// Looks up a localized string similar to Save changes to {0}?. /// @@ -1045,129 +1036,147 @@ namespace Bloxstrap.Resources { } } + /// + /// Looks up a localized string similar to Custom dialog has already been initialised. + /// + public static string CustomTheme_Errors_DialogAlreadyInitialised { + get { + return ResourceManager.GetString("CustomTheme.Errors.DialogAlreadyInitialised", resourceCulture); + } + } + /// /// Looks up a localized string similar to {0}.{1} uses blacklisted scheme {2}. /// - public static string CustomTheme_ElementAttributeBlacklistedUriScheme { + public static string CustomTheme_Errors_ElementAttributeBlacklistedUriScheme { get { - return ResourceManager.GetString("CustomTheme.ElementAttributeBlacklistedUriScheme", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.ElementAttributeBlacklistedUriScheme", resourceCulture); } } /// /// Looks up a localized string similar to {0} has invalid {1}: {2}. /// - public static string CustomTheme_ElementAttributeConversionError { + public static string CustomTheme_Errors_ElementAttributeConversionError { get { - return ResourceManager.GetString("CustomTheme.ElementAttributeConversionError", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.ElementAttributeConversionError", resourceCulture); } } /// /// Looks up a localized string similar to {0} {1} is not a valid {2}. /// - public static string CustomTheme_ElementAttributeInvalidType { + public static string CustomTheme_Errors_ElementAttributeInvalidType { get { - return ResourceManager.GetString("CustomTheme.ElementAttributeInvalidType", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.ElementAttributeInvalidType", resourceCulture); } } /// /// Looks up a localized string similar to Element {0} is missing the {1} attribute. /// - public static string CustomTheme_ElementAttributeMissing { + public static string CustomTheme_Errors_ElementAttributeMissing { get { - return ResourceManager.GetString("CustomTheme.ElementAttributeMissing", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.ElementAttributeMissing", resourceCulture); } } /// /// Looks up a localized string similar to {0}.{1} is missing it's child. /// - public static string CustomTheme_ElementAttributeMissingChild { + public static string CustomTheme_Errors_ElementAttributeMissingChild { get { - return ResourceManager.GetString("CustomTheme.ElementAttributeMissingChild", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.ElementAttributeMissingChild", resourceCulture); } } /// /// Looks up a localized string similar to {0}.{1} can only have one child. /// - public static string CustomTheme_ElementAttributeMultipleChildren { + public static string CustomTheme_Errors_ElementAttributeMultipleChildren { get { - return ResourceManager.GetString("CustomTheme.ElementAttributeMultipleChildren", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.ElementAttributeMultipleChildren", resourceCulture); } } /// /// Looks up a localized string similar to {0} can only have one {1} defined. /// - public static string CustomTheme_ElementAttributeMultipleDefinitions { + public static string CustomTheme_Errors_ElementAttributeMultipleDefinitions { get { - return ResourceManager.GetString("CustomTheme.ElementAttributeMultipleDefinitions", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.ElementAttributeMultipleDefinitions", resourceCulture); } } /// /// Looks up a localized string similar to {0} {1} must be larger than {2}. /// - public static string CustomTheme_ElementAttributeMustBeLargerThanMin { + public static string CustomTheme_Errors_ElementAttributeMustBeLargerThanMin { get { - return ResourceManager.GetString("CustomTheme.ElementAttributeMustBeLargerThanMin", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.ElementAttributeMustBeLargerThanMin", resourceCulture); } } /// /// Looks up a localized string similar to {0} {1} must be smaller than {2}. /// - public static string CustomTheme_ElementAttributeMustBeSmallerThanMax { + public static string CustomTheme_Errors_ElementAttributeMustBeSmallerThanMax { get { - return ResourceManager.GetString("CustomTheme.ElementAttributeMustBeSmallerThanMax", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.ElementAttributeMustBeSmallerThanMax", resourceCulture); } } /// /// Looks up a localized string similar to {0}.{1} could not be parsed into a {2}. /// - public static string CustomTheme_ElementAttributeParseError { + public static string CustomTheme_Errors_ElementAttributeParseError { get { - return ResourceManager.GetString("CustomTheme.ElementAttributeParseError", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.ElementAttributeParseError", resourceCulture); } } /// /// Looks up a localized string similar to {0}.{1} {2} is null. /// - public static string CustomTheme_ElementAttributeParseErrorNull { + public static string CustomTheme_Errors_ElementAttributeParseErrorNull { get { - return ResourceManager.GetString("CustomTheme.ElementAttributeParseErrorNull", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.ElementAttributeParseErrorNull", resourceCulture); } } /// /// Looks up a localized string similar to {0} cannot have a child of {1}. /// - public static string CustomTheme_ElementInvalidChild { + public static string CustomTheme_Errors_ElementInvalidChild { get { - return ResourceManager.GetString("CustomTheme.ElementInvalidChild", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.ElementInvalidChild", resourceCulture); } } /// /// Looks up a localized string similar to {0} can only have one child. /// - public static string CustomTheme_ElementMultipleChildren { + public static string CustomTheme_Errors_ElementMultipleChildren { get { - return ResourceManager.GetString("CustomTheme.ElementMultipleChildren", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.ElementMultipleChildren", resourceCulture); } } /// /// Looks up a localized string similar to {0} failed to create {1}: {2}. /// - public static string CustomTheme_ElementTypeCreationFailed { + public static string CustomTheme_Errors_ElementTypeCreationFailed { get { - return ResourceManager.GetString("CustomTheme.ElementTypeCreationFailed", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.ElementTypeCreationFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Theme XML root is not {0}. + /// + public static string CustomTheme_Errors_InvalidRoot { + get { + return ResourceManager.GetString("CustomTheme.Errors.InvalidRoot", resourceCulture); } } @@ -1190,84 +1199,75 @@ namespace Bloxstrap.Resources { } } - /// - /// Looks up a localized string similar to Theme XML root is not {0}. - /// - public static string CustomTheme_InvalidRoot { - get { - return ResourceManager.GetString("CustomTheme.InvalidRoot", resourceCulture); - } - } - /// /// Looks up a localized string similar to Custom bootstrappers can only have a maximum of {0} elements, got {1}.. /// - public static string CustomTheme_TooManyElements { + public static string CustomTheme_Errors_TooManyElements { get { - return ResourceManager.GetString("CustomTheme.TooManyElements", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.TooManyElements", resourceCulture); } } /// /// Looks up a localized string similar to Unknown element {0}. /// - public static string CustomTheme_UnknownElement { + public static string CustomTheme_Errors_UnknownElement { get { - return ResourceManager.GetString("CustomTheme.UnknownElement", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.UnknownElement", resourceCulture); } } /// /// Looks up a localized string similar to {0} Unknown {1} {2}. /// - public static string CustomTheme_UnknownEnumValue { + public static string CustomTheme_Errors_UnknownEnumValue { get { - return ResourceManager.GetString("CustomTheme.UnknownEnumValue", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.UnknownEnumValue", resourceCulture); } } /// /// Looks up a localized string similar to {0} version is not a number. /// - public static string CustomTheme_VersionNotNumber { + public static string CustomTheme_Errors_VersionNotNumber { get { - return ResourceManager.GetString("CustomTheme.VersionNotNumber", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.VersionNotNumber", resourceCulture); } } /// /// Looks up a localized string similar to {0} version {1} is not recognised. /// - public static string CustomTheme_VersionNotRecognised { + public static string CustomTheme_Errors_VersionNotRecognised { get { - return ResourceManager.GetString("CustomTheme.VersionNotRecognised", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.VersionNotRecognised", resourceCulture); } } /// /// Looks up a localized string similar to {0} version is not set. /// - public static string CustomTheme_VersionNotSet { + public static string CustomTheme_Errors_VersionNotSet { get { - return ResourceManager.GetString("CustomTheme.VersionNotSet", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.VersionNotSet", resourceCulture); } } /// /// Looks up a localized string similar to {0} version {1} is no longer supported. /// - public static string CustomTheme_VersionNotSupported { + public static string CustomTheme_Errors_VersionNotSupported { get { - return ResourceManager.GetString("CustomTheme.VersionNotSupported", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.VersionNotSupported", resourceCulture); } } /// /// Looks up a localized string similar to Failed to parse the theme file: {0}. /// - public static string CustomTheme_XMLParseFailed { + public static string CustomTheme_Errors_XMLParseFailed { get { - return ResourceManager.GetString("CustomTheme.XMLParseFailed", resourceCulture); + return ResourceManager.GetString("CustomTheme.Errors.XMLParseFailed", resourceCulture); } } diff --git a/Bloxstrap/Resources/Strings.resx b/Bloxstrap/Resources/Strings.resx index 61738c4..8ac1611 100644 --- a/Bloxstrap/Resources/Strings.resx +++ b/Bloxstrap/Resources/Strings.resx @@ -1294,76 +1294,76 @@ Please close any applications that may be using Roblox's files, and relaunch. Simple - + Theme XML root is not {0} - + Custom dialog has already been initialised - + Custom bootstrappers can only have a maximum of {0} elements, got {1}. - + {0} version is not set - + {0} version is not a number - + {0} version {1} is no longer supported - + {0} version {1} is not recognised - + {0} cannot have a child of {1} - + Unknown element {0} - + Failed to parse the theme file: {0} - + {0} has invalid {1}: {2} - + Element {0} is missing the {1} attribute - + {0} {1} is not a valid {2} - + {0} {1} must be larger than {2} - + {0} {1} must be smaller than {2} - + {0} Unknown {1} {2} - + {0} can only have one {1} defined - + {0}.{1} can only have one child - + {0} can only have one child - + {0}.{1} is missing it's child - + {0}.{1} could not be parsed into a {2} - + {0}.{1} {2} is null - + {0}.{1} uses blacklisted scheme {2} - + {0} failed to create {1}: {2} diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Converters.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Converters.cs index d329540..3490e4a 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Converters.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Converters.cs @@ -38,7 +38,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper } catch (Exception ex) { - throw new CustomThemeException(ex, "CustomTheme.ElementAttributeConversionError", xmlElement.Name, attributeName, ex.Message); + throw new CustomThemeException(ex, "CustomTheme.Errors.ElementAttributeConversionError", xmlElement.Name, attributeName, ex.Message); } } @@ -83,7 +83,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper } catch (Exception ex) { - throw new CustomThemeException(ex, "CustomTheme.ElementAttributeConversionError", element.Name, attributeName, ex.Message); + throw new CustomThemeException(ex, "CustomTheme.Errors.ElementAttributeConversionError", element.Name, attributeName, ex.Message); } } } diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs index 02877a3..e5f0c29 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Creator.cs @@ -59,11 +59,11 @@ namespace Bloxstrap.UI.Elements.Bootstrapper private static T HandleXml(CustomDialog dialog, XElement xmlElement) where T : class { if (!_elementHandlerMap.ContainsKey(xmlElement.Name.ToString())) - throw new CustomThemeException("CustomTheme.UnknownElement", xmlElement.Name); + throw new CustomThemeException("CustomTheme.Errors.UnknownElement", xmlElement.Name); var element = _elementHandlerMap[xmlElement.Name.ToString()](dialog, xmlElement); if (element is not T) - throw new CustomThemeException("CustomTheme.ElementInvalidChild", xmlElement.Parent!.Name, xmlElement.Name); + throw new CustomThemeException("CustomTheme.Errors.ElementInvalidChild", xmlElement.Parent!.Name, xmlElement.Name); return (T)element; } @@ -81,34 +81,34 @@ namespace Bloxstrap.UI.Elements.Bootstrapper private static void AssertThemeVersion(string? versionStr) { if (string.IsNullOrEmpty(versionStr)) - throw new CustomThemeException("CustomTheme.VersionNotSet", "BloxstrapCustomBootstrapper"); + throw new CustomThemeException("CustomTheme.Errors.VersionNotSet", "BloxstrapCustomBootstrapper"); if (!uint.TryParse(versionStr, out uint version)) - throw new CustomThemeException("CustomTheme.VersionNotNumber", "BloxstrapCustomBootstrapper"); + throw new CustomThemeException("CustomTheme.Errors.VersionNotNumber", "BloxstrapCustomBootstrapper"); switch (version) { case Version: break; case 0: // Themes made between Oct 19, 2024 to Mar 11, 2025 (on the feature/custom-bootstrappers branch) - throw new CustomThemeException("CustomTheme.VersionNotSupported", "BloxstrapCustomBootstrapper", version); + throw new CustomThemeException("CustomTheme.Errors.VersionNotSupported", "BloxstrapCustomBootstrapper", version); default: - throw new CustomThemeException("CustomTheme.VersionNotRecognised", "BloxstrapCustomBootstrapper", version); + throw new CustomThemeException("CustomTheme.Errors.VersionNotRecognised", "BloxstrapCustomBootstrapper", version); } } private void HandleXmlBase(XElement xml) { if (_initialised) - throw new CustomThemeException("CustomTheme.DialogAlreadyInitialised"); + throw new CustomThemeException("CustomTheme.Errors.DialogAlreadyInitialised"); if (xml.Name != "BloxstrapCustomBootstrapper") - throw new CustomThemeException("CustomTheme.InvalidRoot", "BloxstrapCustomBootstrapper"); + throw new CustomThemeException("CustomTheme.Errors.InvalidRoot", "BloxstrapCustomBootstrapper"); AssertThemeVersion(xml.Attribute("Version")?.Value); if (xml.Descendants().Count() > MaxElements) - throw new CustomThemeException("CustomTheme.TooManyElements", MaxElements, xml.Descendants().Count()); + throw new CustomThemeException("CustomTheme.Errors.TooManyElements", MaxElements, xml.Descendants().Count()); _initialised = true; @@ -134,7 +134,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper } catch (Exception ex) { - throw new CustomThemeException(ex, "CustomTheme.XMLParseFailed", ex.Message); + throw new CustomThemeException(ex, "CustomTheme.Errors.XMLParseFailed", ex.Message); } HandleXmlBase(xml); diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs index 5b01fc7..68a61d0 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Elements.cs @@ -150,7 +150,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper } catch (Exception ex) { - throw new CustomThemeException(ex, "CustomTheme.ElementTypeCreationFailed", "Image", "BitmapImage", ex.Message); + throw new CustomThemeException(ex, "CustomTheme.Errors.ElementTypeCreationFailed", "Image", "BitmapImage", ex.Message); } imageBrush.ImageSource = bitmapImage; @@ -217,7 +217,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper var first = brushElement.FirstNode as XElement; if (first == null) - throw new CustomThemeException("CustomTheme.ElementAttributeMissingChild", xmlElement.Name, name); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeMissingChild", xmlElement.Name, name); var brush = HandleXml(dialog, first); uiElement.SetValue(dependencyProperty, brush); @@ -620,7 +620,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper } catch (Exception ex) { - throw new CustomThemeException(ex, "CustomTheme.ElementTypeCreationFailed", "Image", "BitmapImage", ex.Message); + throw new CustomThemeException(ex, "CustomTheme.Errors.ElementTypeCreationFailed", "Image", "BitmapImage", ex.Message); } image.Source = bitmapImage; @@ -693,7 +693,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper if (element.Name == "Grid.RowDefinitions") { if (rowsSet) - throw new CustomThemeException("CustomTheme.ElementAttributeMultipleDefinitions", "Grid", "RowDefinitions"); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeMultipleDefinitions", "Grid", "RowDefinitions"); rowsSet = true; HandleXmlElement_Grid_RowDefinitions(grid, dialog, element); @@ -701,7 +701,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper else if (element.Name == "Grid.ColumnDefinitions") { if (columnsSet) - throw new CustomThemeException("CustomTheme.ElementAttributeMultipleDefinitions", "Grid", "ColumnDefinitions"); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeMultipleDefinitions", "Grid", "ColumnDefinitions"); columnsSet = true; HandleXmlElement_Grid_ColumnDefinitions(grid, dialog, element); @@ -760,7 +760,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper if (children.Any()) { if (children.Count() > 1) - throw new CustomThemeException("CustomTheme.ElementMultipleChildren", "Border"); + throw new CustomThemeException("CustomTheme.Errors.ElementMultipleChildren", "Border"); border.Child = HandleXml(dialog, children.First()); } diff --git a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Utilities.cs b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Utilities.cs index ce93d92..0deafb3 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Utilities.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/CustomDialog.Utilities.cs @@ -26,7 +26,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper if (defaultValue != null) return defaultValue; - throw new CustomThemeException("CustomTheme.ElementAttributeMissing", element.Name, attributeName); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeMissing", element.Name, attributeName); } return attribute.Value.ToString(); @@ -41,12 +41,12 @@ namespace Bloxstrap.UI.Elements.Bootstrapper if (defaultValue != null) return (T)defaultValue; - throw new CustomThemeException("CustomTheme.ElementAttributeMissing", element.Name, attributeName); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeMissing", element.Name, attributeName); } T? parsed = ConvertValue(attribute.Value); if (parsed == null) - throw new CustomThemeException("CustomTheme.ElementAttributeInvalidType", element.Name, attributeName, typeof(T).Name); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeInvalidType", element.Name, attributeName, typeof(T).Name); return (T)parsed; } @@ -63,7 +63,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper T? parsed = ConvertValue(attribute.Value); if (parsed == null) - throw new CustomThemeException("CustomTheme.ElementAttributeInvalidType", element.Name, attributeName, typeof(T).Name); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeInvalidType", element.Name, attributeName, typeof(T).Name); return (T)parsed; } @@ -71,17 +71,17 @@ namespace Bloxstrap.UI.Elements.Bootstrapper private static void ValidateXmlElement(string elementName, string attributeName, int value, int? min = null, int? max = null) { if (min != null && value < min) - throw new CustomThemeException("CustomTheme.ElementAttributeMustBeLargerThanMin", elementName, attributeName, min); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeMustBeLargerThanMin", elementName, attributeName, min); if (max != null && value > max) - throw new CustomThemeException("CustomTheme.ElementAttributeMustBeSmallerThanMax", elementName, attributeName, max); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeMustBeSmallerThanMax", elementName, attributeName, max); } private static void ValidateXmlElement(string elementName, string attributeName, double value, double? min = null, double? max = null) { if (min != null && value < min) - throw new CustomThemeException("CustomTheme.ElementAttributeMustBeLargerThanMin", elementName, attributeName, min); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeMustBeLargerThanMin", elementName, attributeName, min); if (max != null && value > max) - throw new CustomThemeException("CustomTheme.ElementAttributeMustBeSmallerThanMax", elementName, attributeName, max); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeMustBeSmallerThanMax", elementName, attributeName, max); } // You can't do numeric only generics in .NET 6. The feature is exclusive to .NET 7+. @@ -136,7 +136,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper return FontWeights.UltraBlack; default: - throw new CustomThemeException("CustomTheme.UnknownEnumValue", element.Name, "FontWeight", value); + throw new CustomThemeException("CustomTheme.Errors.UnknownEnumValue", element.Name, "FontWeight", value); } } @@ -158,7 +158,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper return FontStyles.Oblique; default: - throw new CustomThemeException("CustomTheme.UnknownEnumValue", element.Name, "FontStyle", value); + throw new CustomThemeException("CustomTheme.Errors.UnknownEnumValue", element.Name, "FontStyle", value); } } @@ -183,7 +183,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper return TextDecorations.Underline; default: - throw new CustomThemeException("CustomTheme.UnknownEnumValue", element.Name, "TextDecorations", value); + throw new CustomThemeException("CustomTheme.Errors.UnknownEnumValue", element.Name, "TextDecorations", value); } } @@ -219,13 +219,13 @@ namespace Bloxstrap.UI.Elements.Bootstrapper path = GetFullPath(dialog, path)!; if (!Uri.TryCreate(path, UriKind.RelativeOrAbsolute, out Uri? result)) - throw new CustomThemeException("CustomTheme.ElementAttributeParseError", xmlElement.Name, name, "Uri"); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeParseError", xmlElement.Name, name, "Uri"); if (result == null) - throw new CustomThemeException("CustomTheme.ElementAttributeParseErrorNull", xmlElement.Name, name, "Uri"); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeParseErrorNull", xmlElement.Name, name, "Uri"); if (result.Scheme != "file") - throw new CustomThemeException("CustomTheme.ElementAttributeBlacklistedUriScheme", xmlElement.Name, name, result.Scheme); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeBlacklistedUriScheme", xmlElement.Name, name, result.Scheme); return new GetImageSourceDataResult { Uri = result }; } @@ -235,7 +235,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper var contentAttr = xmlElement.Attribute("Content"); var contentElement = xmlElement.Element($"{xmlElement.Name}.Content"); if (contentAttr != null && contentElement != null) - throw new CustomThemeException("CustomTheme.ElementAttributeMultipleDefinitions", xmlElement.Name, "Content"); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeMultipleDefinitions", xmlElement.Name, "Content"); if (contentAttr != null) return GetTranslatedText(contentAttr.Value); @@ -245,11 +245,11 @@ namespace Bloxstrap.UI.Elements.Bootstrapper var children = contentElement.Elements(); if (children.Count() > 1) - throw new CustomThemeException("CustomTheme.ElementAttributeMultipleChildren", xmlElement.Name, "Content"); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeMultipleChildren", xmlElement.Name, "Content"); var first = contentElement.FirstNode as XElement; if (first == null) - throw new CustomThemeException("CustomTheme.ElementAttributeMissingChild", xmlElement.Name, "Content"); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeMissingChild", xmlElement.Name, "Content"); var uiElement = HandleXml(dialog, first); return uiElement; @@ -263,7 +263,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper var children = effectElement.Elements(); if (children.Count() > 1) - throw new CustomThemeException("CustomTheme.ElementAttributeMultipleChildren", xmlElement.Name, "Effect"); + throw new CustomThemeException("CustomTheme.Errors.ElementAttributeMultipleChildren", xmlElement.Name, "Effect"); var child = children.FirstOrDefault(); if (child == null)