Skip to content

Commit 54cca51

Browse files
MessageBox Improvements (#41)
- Reworked internals to be more developer friendly - Added i18n support - Markdown-esque link support - Don't Remind Again button
1 parent 6d7f7c7 commit 54cca51

11 files changed

Lines changed: 268 additions & 58 deletions

File tree

ShinRyuModManager-CE/Language/Views/MessageBoxWindow.Designer.cs

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<root>
4+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
5+
<xsd:element name="root" msdata:IsDataSet="true">
6+
7+
</xsd:element>
8+
</xsd:schema>
9+
<resheader name="resmimetype">
10+
<value>text/microsoft-resx</value>
11+
</resheader>
12+
<resheader name="version">
13+
<value>1.3</value>
14+
</resheader>
15+
<resheader name="reader">
16+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
17+
</resheader>
18+
<resheader name="writer">
19+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
20+
</resheader>
21+
<data name="Btn_Ok" xml:space="preserve">
22+
<value>OK</value>
23+
</data>
24+
<data name="Btn_Cancel" xml:space="preserve">
25+
<value>Cancel</value>
26+
</data>
27+
<data name="Btn_DontRemindAgain" xml:space="preserve">
28+
<value>Don't Remind Again</value>
29+
</data>
30+
</root>

ShinRyuModManager-CE/ShinRyuModManager-CE.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
1515

1616
<!-- Versioning -->
17-
<AssemblyVersion>1.4.10</AssemblyVersion>
17+
<AssemblyVersion>1.4.11</AssemblyVersion>
1818
<VersionPrefix>$(AssemblyVersion)</VersionPrefix>
1919
<AssemblyTitle>ShinRyuModManager-CE</AssemblyTitle>
2020
<Company>SRMM Studio</Company>
2121
<Product>ShinRyuModManager-CE</Product>
22-
<Copyright>2025 SRMM Studio</Copyright>
22+
<Copyright>2026 SRMM Studio</Copyright>
2323
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
2424
</PropertyGroup>
2525

@@ -31,7 +31,6 @@
3131
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
3232
<VersionSuffix>$(BuildSuffix)</VersionSuffix>
3333
<DebugType>embedded</DebugType>
34-
<!--<PublishTrimmed Condition="'$(SelfContained)' == 'true'">true</PublishTrimmed>-->
3534
</PropertyGroup>
3635

3736
<ItemGroup>

ShinRyuModManager-CE/UserInterface/Assets/changelog.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
> ### **%{color:gold} Version 1.4.10 %** ###
1+
> ### **%{color:gold} Version 1.4.11 %** ###
2+
* Various internal improvements to message boxes
3+
* Added message for Linux users, directing to the wiki
4+
5+
---
6+
7+
> ### **%{color:orange} Version 1.4.10 %** ###
28
* Fixed logic bug in check for Version.dll
39
* Massive improvements in memory usage for CPK repacking
410

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace ShinRyuModManager.UserInterface;
2+
3+
public enum MessageBoxResult {
4+
Ok,
5+
Cancel,
6+
DontRemind
7+
}

ShinRyuModManager-CE/UserInterface/UserControls/LibraryDisplayControl.axaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private async void InstallOrUpdate_OnClick(object sender, RoutedEventArgs e) {
9696
Log.Fatal(ex, "Failed to install library!");
9797

9898
var window = TopLevel.GetTopLevel(this) as Window;
99-
_ = await MessageBoxWindow.Show(window, "Fatal", "An error has occurred.\nPlease check\"srmm_errors.txt\" for more info.");
99+
await MessageBoxWindow.Show(window, "Fatal", "An error has occurred.\nPlease check\"srmm_errors.txt\" for more info.");
100100
}
101101
}
102102

ShinRyuModManager-CE/UserInterface/ViewModels/MessageBoxWindowViewModel.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
namespace ShinRyuModManager.UserInterface.ViewModels;
44

55
public partial class MessageBoxWindowViewModel : ViewModelBase {
6-
[ObservableProperty] private string _messageText;
7-
[ObservableProperty] private bool _isVisible;
6+
[ObservableProperty] private bool _showCancel;
7+
[ObservableProperty] private bool _showDontRemind;
88

9-
public MessageBoxWindowViewModel() { }
9+
public MessageBoxWindowViewModel() {
10+
ShowCancel = true;
11+
ShowDontRemind = true;
12+
}
1013

11-
public MessageBoxWindowViewModel(string messageText, bool isVisible) {
12-
MessageText = messageText;
13-
IsVisible = isVisible;
14+
public MessageBoxWindowViewModel(bool showCancel, bool dontRemindButton) {
15+
ShowCancel = showCancel;
16+
ShowDontRemind = dontRemindButton;
1417
}
1518
}

0 commit comments

Comments
 (0)