From af68a4f0dd0af4521e8cf9c8a159a0998a83f609 Mon Sep 17 00:00:00 2001 From: pizzaboxer Date: Sun, 19 Nov 2023 21:33:35 +0000 Subject: [PATCH 01/53] Update bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 247eb15..83edc72 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -7,9 +7,9 @@ body: value: | ### **Preliminary instructions** - Before opening an issue, please [check the Wiki first](https://github.com/pizzaboxer/bloxstrap/wiki/) to see if your problem has been addressed there. - - **[Read this if Roblox is crashing or not launching](https://github.com/pizzaboxer/bloxstrap/wiki/Roblox-crashes-or-does-not-launch).** Only open an issue for it if this does not address your problem. + - If your problem is with Roblox itself (i.e. it crashes or doesn't launch), [check to see if it happens without Bloxstrap](https://github.com/pizzaboxer/bloxstrap/wiki/Roblox-crashes-or-does-not-launch). + - Please only open an issue if your problem happens only with Bloxstrap, as anything else is out of my control. - If you are getting a Bloxstrap Exception error, please attach a copy of the provided log file. There is a button on the dialog that locates it for you. - - If your problem is with Roblox itself, [check to see if it happens without Bloxstrap](https://github.com/pizzaboxer/bloxstrap/wiki/Roblox-crashes-or-does-not-launch). Please only open an issue if your problem only happens with Bloxstrap, as anything else is out of my control. - If more clarification on the issue is needed, and you don't respond after a month, then your issue will be closed as stale. - type: checkboxes id: terms From 0875f3adac1c4d11241d5c7e5207eef5e52b4b54 Mon Sep 17 00:00:00 2001 From: 1011025m <37438176+1011025m@users.noreply.github.com> Date: Sun, 3 Dec 2023 01:22:35 +0800 Subject: [PATCH 02/53] Fix some hardcoded strings --- Bloxstrap/Resources/Strings.Designer.cs | 24 ++++++++++++++++++- Bloxstrap/Resources/Strings.resx | 8 +++++++ Bloxstrap/UI/Elements/Menu/MainWindow.xaml | 2 +- .../UI/ViewModels/Menu/AppearanceViewModel.cs | 4 ++-- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/Bloxstrap/Resources/Strings.Designer.cs b/Bloxstrap/Resources/Strings.Designer.cs index b5fe355..a5499f5 100644 --- a/Bloxstrap/Resources/Strings.Designer.cs +++ b/Bloxstrap/Resources/Strings.Designer.cs @@ -278,7 +278,29 @@ namespace Bloxstrap.Resources { return ResourceManager.GetString("Bootstrapper.WMFNotFound", resourceCulture); } } - + + /// + /// Looks up a localized string similar to Style preview - Click the X button at the top right to close. + /// + public static string Bootstrapper_StylePreview_ImageCancel + { + get + { + return ResourceManager.GetString("Bootstrapper.StylePreview.ImageCancel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Style preview - Click Cancel to close. + /// + public static string Bootstrapper_StylePreview_TextCancel + { + get + { + return ResourceManager.GetString("Bootstrapper.StylePreview.TextCancel", resourceCulture); + } + } + /// /// Looks up a localized string similar to Browse. /// diff --git a/Bloxstrap/Resources/Strings.resx b/Bloxstrap/Resources/Strings.resx index 18b03f3..313453b 100644 --- a/Bloxstrap/Resources/Strings.resx +++ b/Bloxstrap/Resources/Strings.resx @@ -192,6 +192,14 @@ Your ReShade configuration files will still be saved, and you can locate them by Roblox requires the use of Windows Media Foundation components. You appear to be missing them, likely because you are using an N edition of Windows. Please install them first, and then launch Roblox. + + Style preview - Click the X button at the top right to close + Text for style previews that use an X button. Currently only applies to Byfron + + + Style preview - Click Cancel to close + Text for style previews that use text button that says "Cancel" + Browse diff --git a/Bloxstrap/UI/Elements/Menu/MainWindow.xaml b/Bloxstrap/UI/Elements/Menu/MainWindow.xaml index edd7a10..ad73178 100644 --- a/Bloxstrap/UI/Elements/Menu/MainWindow.xaml +++ b/Bloxstrap/UI/Elements/Menu/MainWindow.xaml @@ -79,7 +79,7 @@ - + diff --git a/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs b/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs index 3f160e4..8df58df 100644 --- a/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Menu/AppearanceViewModel.cs @@ -23,9 +23,9 @@ namespace Bloxstrap.UI.ViewModels.Menu IBootstrapperDialog dialog = App.Settings.Prop.BootstrapperStyle.GetNew(); if (App.Settings.Prop.BootstrapperStyle == BootstrapperStyle.ByfronDialog) - dialog.Message = "Style preview - Click the X button at the top right to close"; + dialog.Message = Resources.Strings.Bootstrapper_StylePreview_ImageCancel; else - dialog.Message = "Style preview - Click Cancel to close"; + dialog.Message = Resources.Strings.Bootstrapper_StylePreview_TextCancel; dialog.CancelEnabled = true; dialog.ShowBootstrapper(); From ca5525f2ef8bfc4f5b989137cb22ab19b2135e2e Mon Sep 17 00:00:00 2001 From: 1011025m <37438176+1011025m@users.noreply.github.com> Date: Sun, 3 Dec 2023 01:44:20 +0800 Subject: [PATCH 03/53] Reorder and fix the forgotten eh, might as well... --- Bloxstrap/Resources/Strings.Designer.cs | 44 +++++++++++-------------- Bloxstrap/Resources/Strings.resx | 18 +++++----- 2 files changed, 29 insertions(+), 33 deletions(-) diff --git a/Bloxstrap/Resources/Strings.Designer.cs b/Bloxstrap/Resources/Strings.Designer.cs index a5499f5..d1ad1f1 100644 --- a/Bloxstrap/Resources/Strings.Designer.cs +++ b/Bloxstrap/Resources/Strings.Designer.cs @@ -243,6 +243,24 @@ namespace Bloxstrap.Resources { } } + /// + /// Looks up a localized string similar to Style preview - Click the X button at the top right to close. + /// + public static string Bootstrapper_StylePreview_ImageCancel { + get { + return ResourceManager.GetString("Bootstrapper.StylePreview.ImageCancel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Style preview - Click Cancel to close. + /// + public static string Bootstrapper_StylePreview_TextCancel { + get { + return ResourceManager.GetString("Bootstrapper.StylePreview.TextCancel", resourceCulture); + } + } + /// /// Looks up a localized string similar to Bloxstrap has successfully installed. /// @@ -278,29 +296,7 @@ namespace Bloxstrap.Resources { return ResourceManager.GetString("Bootstrapper.WMFNotFound", resourceCulture); } } - - /// - /// Looks up a localized string similar to Style preview - Click the X button at the top right to close. - /// - public static string Bootstrapper_StylePreview_ImageCancel - { - get - { - return ResourceManager.GetString("Bootstrapper.StylePreview.ImageCancel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Style preview - Click Cancel to close. - /// - public static string Bootstrapper_StylePreview_TextCancel - { - get - { - return ResourceManager.GetString("Bootstrapper.StylePreview.TextCancel", resourceCulture); - } - } - + /// /// Looks up a localized string similar to Browse. /// @@ -1448,7 +1444,7 @@ namespace Bloxstrap.Resources { } /// - /// Looks up a localized string similar to Bloxstrap is currently running, likely as a background Roblox process. Please note that not all your changes will immediately apply until you close all currently open Roblox instances.". + /// Looks up a localized string similar to Bloxstrap is currently running, likely as a background Roblox process. Please note that not all your changes will immediately apply until you close all currently open Roblox instances.. /// public static string Menu_AlreadyRunning { get { diff --git a/Bloxstrap/Resources/Strings.resx b/Bloxstrap/Resources/Strings.resx index 313453b..a8f5b58 100644 --- a/Bloxstrap/Resources/Strings.resx +++ b/Bloxstrap/Resources/Strings.resx @@ -180,6 +180,14 @@ Your ReShade configuration files will still be saved, and you can locate them by Waiting for other instances... + + Style preview - Click the X button at the top right to close + Text for style previews that use an X button. Currently only applies to Byfron + + + Style preview - Click Cancel to close + Text for style previews that use text button that says "Cancel" + Bloxstrap has successfully installed @@ -192,14 +200,6 @@ Your ReShade configuration files will still be saved, and you can locate them by Roblox requires the use of Windows Media Foundation components. You appear to be missing them, likely because you are using an N edition of Windows. Please install them first, and then launch Roblox. - - Style preview - Click the X button at the top right to close - Text for style previews that use an X button. Currently only applies to Byfron - - - Style preview - Click Cancel to close - Text for style previews that use text button that says "Cancel" - Browse @@ -585,7 +585,7 @@ Would you like to upgrade your currently installed version? All files - Bloxstrap is currently running, likely as a background Roblox process. Please note that not all your changes will immediately apply until you close all currently open Roblox instances." + Bloxstrap is currently running, likely as a background Roblox process. Please note that not all your changes will immediately apply until you close all currently open Roblox instances. You can make it look different, retro, or even just like Roblox. From b6cd72a762b505364284499d3797affbff215767 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 17:03:14 +0000 Subject: [PATCH 04/53] Bump actions/setup-dotnet from 3 to 4 Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 3 to 4. - [Release notes](https://github.com/actions/setup-dotnet/releases) - [Commits](https://github.com/actions/setup-dotnet/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-dotnet dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a504126..6eeab03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: with: submodules: true - - uses: actions/setup-dotnet@v3 + - uses: actions/setup-dotnet@v4 with: dotnet-version: '6.0.x' From 3fe4fce6621e939157b03ce70a52b12c8f1dae85 Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Fri, 8 Dec 2023 22:25:56 +0000 Subject: [PATCH 05/53] move byfron status code inside of byfron dialog also made it only delete the '...' if its at the end of the string --- Bloxstrap/Bootstrapper.cs | 4 ---- Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml.cs | 6 +++++- .../ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index bd93f9e..47bc267 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -99,10 +99,6 @@ namespace Bloxstrap message = message.Replace("{product}", productName); - // yea idk - if (App.Settings.Prop.BootstrapperStyle == BootstrapperStyle.ByfronDialog) - message = message.Replace("...", ""); - if (Dialog is not null) Dialog.Message = message; } diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml.cs b/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml.cs index 4d709ec..54e57ca 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml.cs +++ b/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml.cs @@ -26,7 +26,11 @@ namespace Bloxstrap.UI.Elements.Bootstrapper get => _viewModel.Message; set { - _viewModel.Message = value; + string message = value; + if (message.EndsWith("...")) + message = message[..^3]; + + _viewModel.Message = message; _viewModel.OnPropertyChanged(nameof(_viewModel.Message)); } } diff --git a/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs b/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs index 2a5c523..2e91e64 100644 --- a/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs @@ -14,7 +14,7 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper public string Title => App.Settings.Prop.BootstrapperTitle; public ImageSource Icon { get; set; } = App.Settings.Prop.BootstrapperIcon.GetIcon().GetImageSource(); - public string Message { get; set; } = "Please wait..."; + public string Message { get; set; } = "Please wait"; public bool ProgressIndeterminate { get; set; } = true; public int ProgressMaximum { get; set; } = 0; public int ProgressValue { get; set; } = 0; From 12efad35c68f8144f25ae160985abfb6b3890932 Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Fri, 8 Dec 2023 22:27:00 +0000 Subject: [PATCH 06/53] whoops --- .../UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs b/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs index 2e91e64..2a5c523 100644 --- a/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs +++ b/Bloxstrap/UI/ViewModels/Bootstrapper/BootstrapperDialogViewModel.cs @@ -14,7 +14,7 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper public string Title => App.Settings.Prop.BootstrapperTitle; public ImageSource Icon { get; set; } = App.Settings.Prop.BootstrapperIcon.GetIcon().GetImageSource(); - public string Message { get; set; } = "Please wait"; + public string Message { get; set; } = "Please wait..."; public bool ProgressIndeterminate { get; set; } = true; public int ProgressMaximum { get; set; } = 0; public int ProgressValue { get; set; } = 0; From c3a2f12719b38889748ec6e5eca7e13c87ce3918 Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Mon, 11 Dec 2023 21:27:57 +0000 Subject: [PATCH 07/53] fix entry name not being set to the new one --- Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml.cs b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml.cs index cd9ac29..0b49641 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml.cs +++ b/Bloxstrap/UI/Elements/Menu/Pages/FastFlagEditorPage.xaml.cs @@ -134,6 +134,8 @@ namespace Bloxstrap.UI.Elements.Menu.Pages if (!newName.Contains(_searchFilter)) ClearSearch(); + entry.Name = newName; + break; case "Value": From bdbcfbde58041025faf3f2f251be6ecd6f052a7f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:17:58 +0000 Subject: [PATCH 08/53] Bump Markdig from 0.33.0 to 0.34.0 Bumps [Markdig](https://github.com/xoofx/markdig) from 0.33.0 to 0.34.0. - [Release notes](https://github.com/xoofx/markdig/releases) - [Changelog](https://github.com/xoofx/markdig/blob/master/changelog.md) - [Commits](https://github.com/xoofx/markdig/compare/0.33.0...0.34.0) --- updated-dependencies: - dependency-name: Markdig dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Bloxstrap/Bloxstrap.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bloxstrap/Bloxstrap.csproj b/Bloxstrap/Bloxstrap.csproj index e551a10..f3772bb 100644 --- a/Bloxstrap/Bloxstrap.csproj +++ b/Bloxstrap/Bloxstrap.csproj @@ -40,7 +40,7 @@ - + all From be360364e5a7fabb134f23702bb034dd8faf99a0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:34:15 +0000 Subject: [PATCH 09/53] Bump actions/upload-artifact from 3 to 4 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6eeab03..c200b7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: run: dotnet publish -p:PublishSingleFile=true -p:CommitHash=${{ github.sha }} -p:CommitRef=${{ github.ref_type }}/${{ github.ref_name }} -r win-x64 -c ${{ matrix.configuration }} --self-contained false .\Bloxstrap\Bloxstrap.csproj - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Bloxstrap (${{ matrix.configuration }}) path: | From 21704e61d22be0a3b1fe3e374c9ee22a0897b282 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:34:19 +0000 Subject: [PATCH 10/53] Bump actions/download-artifact from 3 to 4 Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6eeab03..f43b214 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: steps: - name: Download x64 release artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: Bloxstrap (Release) path: x64 From 2a97c51c9813154462d045bcbb294da11cd29019 Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Sat, 20 Jan 2024 13:57:01 +0000 Subject: [PATCH 11/53] Revert "Update wpfui" This reverts commit 6e504859ed87b8c566c39269d8aa54d2e628fd38. --- wpfui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpfui b/wpfui index 55d5ca0..2a50f38 160000 --- a/wpfui +++ b/wpfui @@ -1 +1 @@ -Subproject commit 55d5ca08f9a1d7623f9a7e386e1f4ac9f2d024a7 +Subproject commit 2a50f387e6c3b0a9160f3ce42bc95fbb7185e87d From 8d0aa5249cdc31d78e6f740ba838bc6d624a6d6c Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Mon, 29 Jan 2024 20:10:43 +0000 Subject: [PATCH 12/53] more robust markdowntextblock --- .../UI/Elements/Controls/MarkdownTextBlock.cs | 109 ++++++++++++++---- 1 file changed, 89 insertions(+), 20 deletions(-) diff --git a/Bloxstrap/UI/Elements/Controls/MarkdownTextBlock.cs b/Bloxstrap/UI/Elements/Controls/MarkdownTextBlock.cs index 6e1e0d7..bd97b8f 100644 --- a/Bloxstrap/UI/Elements/Controls/MarkdownTextBlock.cs +++ b/Bloxstrap/UI/Elements/Controls/MarkdownTextBlock.cs @@ -6,6 +6,7 @@ using System.Windows; using Markdig.Syntax; using Markdig.Syntax.Inlines; using Markdig; +using System.Windows.Media; namespace Bloxstrap.UI.Elements.Controls { @@ -19,15 +20,97 @@ namespace Bloxstrap.UI.Elements.Controls { public static readonly DependencyProperty MarkdownTextProperty = DependencyProperty.Register(nameof(MarkdownText), typeof(string), typeof(MarkdownTextBlock), - new FrameworkPropertyMetadata(string.Empty,FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnTextMarkdownChanged)); + new FrameworkPropertyMetadata(string.Empty, FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender, OnTextMarkdownChanged)); [Localizability(LocalizationCategory.Text)] public string MarkdownText { - get => Inlines.ToString() ?? ""; + get => (string)GetValue(MarkdownTextProperty); set => SetValue(MarkdownTextProperty, value); } + /// Span, skip + private static (Span, int) GetInlineUntilEndTagDetected(Markdig.Syntax.Inlines.Inline? inline, string tagName) + { + string endTag = $"<{tagName}/>"; // TODO: better way of doing this + + var span = new Span(); + + int skip = 0; + var current = inline; + while (current is Markdig.Syntax.Inlines.Inline currentInline) + { + skip++; + + if (currentInline is HtmlInline html) + { + if (html.Tag == endTag) + return (span, skip); + } + + (var childInline, int childSkip) = GetWpfInlineFromMarkdownInline(currentInline); + if (childInline != null) + span.Inlines.Add(childInline); + + skip += childSkip; + + current = currentInline.NextSibling; + } + + throw new Exception("End tag not detected"); + } + + /// Inline, skip + private static (System.Windows.Documents.Inline?, int) GetWpfInlineFromMarkdownInline(Markdig.Syntax.Inlines.Inline? inline) + { + if (inline is LiteralInline literalInline) + { + return (new Run(literalInline.ToString()), 0); + } + else if (inline is LinkInline linkInline) + { + string? url = linkInline.Url; + var textInline = linkInline.FirstChild; + + if (string.IsNullOrEmpty(url)) + { + return GetWpfInlineFromMarkdownInline(textInline); + } + + (var childInline, int skip) = GetWpfInlineFromMarkdownInline(textInline); + + return (new Hyperlink(childInline) + { + Command = GlobalViewModel.OpenWebpageCommand, + CommandParameter = url + }, skip); + } + else if (inline is HtmlInline htmlInline) + { + string? tag = htmlInline.Tag; // TODO: parse tag + var nextInline = htmlInline.NextSibling; + + if (tag == "") + { + (var span, int skip) = GetInlineUntilEndTagDetected(nextInline, "highlight"); + span.Background = new SolidColorBrush(Color.FromArgb(50,255,255,255)); + return (span, skip); + } + } + + return (null, 0); + } + + /// Skip + private int AddMarkdownInline(Markdig.Syntax.Inlines.Inline? inline) + { + (var wpfInline, int skip) = GetWpfInlineFromMarkdownInline(inline); + if (wpfInline != null) + Inlines.Add(wpfInline); + + return skip; + } + private static void OnTextMarkdownChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs) { if (dependencyObject is not MarkdownTextBlock markdownTextBlock) @@ -43,26 +126,12 @@ namespace Bloxstrap.UI.Elements.Controls if (document.FirstOrDefault() is not ParagraphBlock paragraphBlock || paragraphBlock.Inline == null) return; - foreach (var inline in paragraphBlock.Inline) + for (int i = 0; i < paragraphBlock.Inline.Count(); i++) { - if (inline is LiteralInline literalInline) - { - markdownTextBlock.Inlines.Add(new Run(literalInline.ToString())); - } - else if (inline is LinkInline linkInline) - { - string? url = linkInline.Url; - string? text = linkInline.FirstChild?.ToString(); + var inline = paragraphBlock.Inline.ElementAt(i); - if (string.IsNullOrEmpty(url) || string.IsNullOrEmpty(text)) - continue; - - markdownTextBlock.Inlines.Add(new Hyperlink(new Run(text)) - { - Command = GlobalViewModel.OpenWebpageCommand, - CommandParameter = url - }); - } + int skip = markdownTextBlock.AddMarkdownInline(inline); + i += skip; } } } From 9a93824f53d6a226d221fe05639c929bb1d2881d Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Mon, 29 Jan 2024 20:11:48 +0000 Subject: [PATCH 13/53] bump version --- Bloxstrap/Bloxstrap.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bloxstrap/Bloxstrap.csproj b/Bloxstrap/Bloxstrap.csproj index f3772bb..f16bbca 100644 --- a/Bloxstrap/Bloxstrap.csproj +++ b/Bloxstrap/Bloxstrap.csproj @@ -7,8 +7,8 @@ true True Bloxstrap.ico - 2.5.3 - 2.5.3.0 + 2.6.0 + 2.6.0.0 app.manifest From dd70d729f10dd1527c6e28b9d747c740c0ca6a3e Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Mon, 29 Jan 2024 20:13:42 +0000 Subject: [PATCH 14/53] oops --- Bloxstrap/UI/Elements/Controls/MarkdownTextBlock.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bloxstrap/UI/Elements/Controls/MarkdownTextBlock.cs b/Bloxstrap/UI/Elements/Controls/MarkdownTextBlock.cs index bd97b8f..c99b236 100644 --- a/Bloxstrap/UI/Elements/Controls/MarkdownTextBlock.cs +++ b/Bloxstrap/UI/Elements/Controls/MarkdownTextBlock.cs @@ -32,7 +32,7 @@ namespace Bloxstrap.UI.Elements.Controls /// Span, skip private static (Span, int) GetInlineUntilEndTagDetected(Markdig.Syntax.Inlines.Inline? inline, string tagName) { - string endTag = $"<{tagName}/>"; // TODO: better way of doing this + string endTag = $""; // TODO: better way of doing this var span = new Span(); From 4cac449b70b102bb5d53b4e78fa498a77a319756 Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Thu, 1 Feb 2024 17:04:44 +0000 Subject: [PATCH 15/53] replace imagebrushes with normal images --- Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml | 6 +----- Bloxstrap/UI/Elements/Menu/Pages/AboutPage.xaml | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml b/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml index 0d8c074..46d1ca7 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml +++ b/Bloxstrap/UI/Elements/Bootstrapper/FluentDialog.xaml @@ -30,11 +30,7 @@ - - - - - + diff --git a/Bloxstrap/UI/Elements/Menu/Pages/AboutPage.xaml b/Bloxstrap/UI/Elements/Menu/Pages/AboutPage.xaml index cd30886..af1d6c9 100644 --- a/Bloxstrap/UI/Elements/Menu/Pages/AboutPage.xaml +++ b/Bloxstrap/UI/Elements/Menu/Pages/AboutPage.xaml @@ -18,11 +18,7 @@ - - - - - + From 811b37aab35c80c4c07fc393a01bd46aae5fd17b Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Thu, 1 Feb 2024 20:55:35 +0000 Subject: [PATCH 16/53] kill roblox processes during uninstall --- Bloxstrap/Bootstrapper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index bd93f9e..27037bf 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -703,13 +703,13 @@ namespace Bloxstrap { foreach (Process process in Process.GetProcessesByName(App.RobloxPlayerAppName)) { - process.CloseMainWindow(); + process.Kill(); process.Close(); } foreach (Process process in Process.GetProcessesByName(App.RobloxStudioAppName)) { - process.CloseMainWindow(); + process.Kill(); process.Close(); } } From daec96b5eff944167cc03463e7987c819ad7366d Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Thu, 1 Feb 2024 20:56:05 +0000 Subject: [PATCH 17/53] also kill process in menu --- Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml.cs b/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml.cs index a2df016..842bc57 100644 --- a/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml.cs +++ b/Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml.cs @@ -136,7 +136,7 @@ namespace Bloxstrap.UI.Elements.ContextMenu return; using Process process = Process.GetProcessById((int)_processId!); - process.CloseMainWindow(); + process.Kill(); process.Close(); } } From 30c7b779fdfcf0803317d9e7f4da9a543a59f43d Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Thu, 1 Feb 2024 21:31:57 +0000 Subject: [PATCH 18/53] delete old x86 publish file --- .../PublishProfiles/Publish-x86.pubxml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 Bloxstrap/Properties/PublishProfiles/Publish-x86.pubxml diff --git a/Bloxstrap/Properties/PublishProfiles/Publish-x86.pubxml b/Bloxstrap/Properties/PublishProfiles/Publish-x86.pubxml deleted file mode 100644 index e6a7125..0000000 --- a/Bloxstrap/Properties/PublishProfiles/Publish-x86.pubxml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Release - Any CPU - bin\Release\net6.0-windows\publish\win-x86\ - FileSystem - <_TargetId>Folder - net6.0-windows - win-x86 - false - true - false - - \ No newline at end of file From 29fdc49399379fed28593ada8220dc53c303bd46 Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Thu, 1 Feb 2024 21:57:43 +0000 Subject: [PATCH 19/53] use high quality rendering for remaining images --- Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml | 2 +- Bloxstrap/UI/Elements/ContextMenu/MenuContainer.xaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml b/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml index 1a0b6c8..bd965f7 100644 --- a/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml +++ b/Bloxstrap/UI/Elements/Bootstrapper/ByfronDialog.xaml @@ -14,7 +14,7 @@ Closing="Window_Closing"> - +