aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Ava/UI/Controls/InputDialog.axaml.cs
diff options
context:
space:
mode:
authorTSRBerry <20988865+TSRBerry@users.noreply.github.com>2023-04-16 09:09:02 +0200
committerGitHub <noreply@github.com>2023-04-16 07:09:02 +0000
commit6dbcdfea47e60aadefd59a75e43549793481f853 (patch)
tree84122acbd9faffca6894f32a69e108edcf0fba9a /Ryujinx.Ava/UI/Controls/InputDialog.axaml.cs
parentc5258cf082b10f335f81487f22b7eeb86075e09e (diff)
Ava: Fix nca extraction window never closing & minor cleanup (#4569)1.1.712
* ava: Remove unused doWhileDeferred parameters * ava: Minimally improve swkbd dialog It's currently impossible to get the dialog to redirect focus to the InputBox. * ava: Fix nca extraction dialog never closing Also contains some minor cleanup
Diffstat (limited to 'Ryujinx.Ava/UI/Controls/InputDialog.axaml.cs')
-rw-r--r--Ryujinx.Ava/UI/Controls/InputDialog.axaml.cs57
1 files changed, 0 insertions, 57 deletions
diff --git a/Ryujinx.Ava/UI/Controls/InputDialog.axaml.cs b/Ryujinx.Ava/UI/Controls/InputDialog.axaml.cs
deleted file mode 100644
index 8dba5e2b..00000000
--- a/Ryujinx.Ava/UI/Controls/InputDialog.axaml.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using Avalonia.Controls;
-using FluentAvalonia.UI.Controls;
-using Ryujinx.Ava.Common.Locale;
-using Ryujinx.Ava.UI.Helpers;
-using Ryujinx.Ava.UI.Models;
-using System.Threading.Tasks;
-
-namespace Ryujinx.Ava.UI.Controls
-{
- public partial class InputDialog : UserControl
- {
- public string Message { get; set; }
- public string Input { get; set; }
- public string SubMessage { get; set; }
-
- public uint MaxLength { get; }
-
- public InputDialog(string message, string input = "", string subMessage = "", uint maxLength = int.MaxValue)
- {
- Message = message;
- Input = input;
- SubMessage = subMessage;
- MaxLength = maxLength;
-
- DataContext = this;
- }
-
- public InputDialog()
- {
- InitializeComponent();
- }
-
- public static async Task<(UserResult Result, string Input)> ShowInputDialog(string title, string message,
- string input = "", string subMessage = "", uint maxLength = int.MaxValue)
- {
- UserResult result = UserResult.Cancel;
-
- InputDialog content = new InputDialog(message, input, subMessage, maxLength);
- ContentDialog contentDialog = new ContentDialog
- {
- Title = title,
- PrimaryButtonText = LocaleManager.Instance[LocaleKeys.InputDialogOk],
- SecondaryButtonText = "",
- CloseButtonText = LocaleManager.Instance[LocaleKeys.InputDialogCancel],
- Content = content,
- PrimaryButtonCommand = MiniCommand.Create(() =>
- {
- result = UserResult.Ok;
- input = content.Input;
- })
- };
- await contentDialog.ShowAsync();
-
- return (result, input);
- }
- }
-} \ No newline at end of file