Skip to content

Commit dcb338e

Browse files
committed
Change winetricks dialog to textbox dialog
1 parent 148a27b commit dcb338e

7 files changed

+751
-8
lines changed

AngelLoader/Forms/Dialogs.cs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,40 @@ can never get back to it again and have to kill the app through Task Manager."
118118
return (result == DialogResult.OK, d.SelectedItems);
119119
});
120120

121+
public (MBoxButton ButtonPressed, bool CheckBoxChecked)
122+
ShowTextBoxDialog(
123+
string messageTop,
124+
string messageTextBox,
125+
string messageBottom,
126+
string title,
127+
MBoxIcon icon = MBoxIcon.None,
128+
string? okText = null,
129+
string? cancelText = null,
130+
bool okIsDangerous = false,
131+
string? checkBoxText = null,
132+
bool checkBoxChecked = false) =>
133+
((MBoxButton, bool))InvokeIfViewExists(() =>
134+
{
135+
using MessageBoxWithTextBoxForm d = new(
136+
messageTop: messageTop,
137+
messageTextBox: messageTextBox,
138+
messageBottom: messageBottom,
139+
title: title,
140+
icon: GetIcon(icon),
141+
okText: okText,
142+
cancelText: cancelText,
143+
okIsDangerous: okIsDangerous,
144+
checkBoxText: checkBoxText,
145+
checkBoxChecked: checkBoxChecked
146+
);
147+
148+
DialogResult result = FormsViewEnvironment.ViewCreated
149+
? d.ShowDialogDark(FormsViewEnvironment.ViewInternal)
150+
: d.ShowDialogDark();
151+
152+
return (DialogResultToMBoxButton(result), d.IsVerificationChecked);
153+
});
154+
121155
public void ShowError(
122156
string message,
123157
string? title = null,

AngelLoader/Forms/MainForm.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,20 +1181,19 @@ await FMScan.ScanFMs(
11811181
// Just in case, to make sure the backing dll is loaded before doing the dll check
11821182
_ = ReadmeRichTextBox.Handle;
11831183

1184-
// @Wine: Make the names be in a textbox for easy copy-pasting, and then also say which of them are
1185-
// and aren't installed, for clarity.
1184+
// @Wine: Also say which of them are and aren't installed, for clarity?
11861185
if (!WinVersion.Wine_NativeDllsInstalled())
11871186
{
1188-
(_, bool dontShowAgain) = Core.Dialogs.ShowMultiChoiceDialog(
1189-
message:
1190-
LText.AlertMessages.Wine_DllUpgradeMessage1 + $"{NL}" + $"{NL}" +
1187+
(_, bool dontShowAgain) = Core.Dialogs.ShowTextBoxDialog(
1188+
messageTop: LText.AlertMessages.Wine_DllUpgradeMessage1,
1189+
messageTextBox:
11911190
"gdiplus" + $"{NL}" +
1192-
"msftedit" + $"{NL}" + $"{NL}" +
1193-
LText.AlertMessages.Wine_DllUpgradeMessage2,
1191+
"msftedit",
1192+
messageBottom: LText.AlertMessages.Wine_DllUpgradeMessage2,
11941193
// Product name, doesn't need translation
11951194
title: "Wine",
11961195
icon: MBoxIcon.Information,
1197-
yes: LText.Global.OK,
1196+
okText: LText.Global.OK,
11981197
checkBoxText: LText.AlertMessages.DontShowAgain
11991198
);
12001199

AngelLoader/Forms/MessageBoxWithTextBoxForm.Designer.cs

Lines changed: 224 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)