diff --git a/src/NebulaAuth.LegacyConverter/Program.cs b/src/NebulaAuth.LegacyConverter/Program.cs index 5bd88be..64f48a5 100644 --- a/src/NebulaAuth.LegacyConverter/Program.cs +++ b/src/NebulaAuth.LegacyConverter/Program.cs @@ -1,8 +1,8 @@ -using AchiesUtilities.Extensions; +using System.Reflection; +using AchiesUtilities.Extensions; using NebulaAuth.LegacyConverter; using Newtonsoft.Json; using SteamLib.Utility.MafileSerialization; -using System.Reflection; try { diff --git a/src/NebulaAuth/App.xaml.cs b/src/NebulaAuth/App.xaml.cs index 537f14a..c952ba8 100644 --- a/src/NebulaAuth/App.xaml.cs +++ b/src/NebulaAuth/App.xaml.cs @@ -1,9 +1,9 @@ -using NebulaAuth.Core; +using System; +using System.Windows; +using NebulaAuth.Core; using NebulaAuth.Model; using NebulaAuth.Model.Exceptions; using NebulaAuth.Model.MAAC; -using System; -using System.Windows; namespace NebulaAuth; diff --git a/src/NebulaAuth/Converters/BoolToValueConverter.cs b/src/NebulaAuth/Converters/BoolToValueConverter.cs index 3a31d79..b0ea82c 100644 --- a/src/NebulaAuth/Converters/BoolToValueConverter.cs +++ b/src/NebulaAuth/Converters/BoolToValueConverter.cs @@ -11,7 +11,7 @@ public class BoolToValueConverter : IValueConverter if (value is not bool b) return Binding.DoNothing; if (parameter is Array) { - var arr = (Array)parameter; + var arr = (Array) parameter; if (arr.Length == 0) return Binding.DoNothing; var first = arr.GetValue(0); var second = arr.Length > 1 ? arr.GetValue(1) : null; diff --git a/src/NebulaAuth/Converters/Converters.xaml b/src/NebulaAuth/Converters/Converters.xaml index 60d8388..9a7a20c 100644 --- a/src/NebulaAuth/Converters/Converters.xaml +++ b/src/NebulaAuth/Converters/Converters.xaml @@ -13,8 +13,8 @@ - - + + diff --git a/src/NebulaAuth/Core/DialogsController.cs b/src/NebulaAuth/Core/DialogsController.cs index 8888b73..7be3a6c 100644 --- a/src/NebulaAuth/Core/DialogsController.cs +++ b/src/NebulaAuth/Core/DialogsController.cs @@ -13,25 +13,6 @@ namespace NebulaAuth.Core; public static class DialogsController { - #region CommonDialogs - - public static async Task ShowConfirmCancelDialog(string? msg = null) - { - var content = msg == null ? new ConfirmCancelDialog() : new ConfirmCancelDialog(msg); - - var result = await DialogHost.Show(content); - return result != null && (bool) result; - } - - public static async Task ShowTextFieldDialog(string? title = null, string? msg = null) - { - var content = new TextFieldDialog(title, msg); - var result = await DialogHost.Show(content); - return result as string; - } - - #endregion - public static async Task ShowLoginAgainDialog(string username, string? currentPassword = null) { var vm = new LoginAgainVM @@ -131,4 +112,23 @@ public static class DialogsController }; await DialogHost.Show(dialog); } + + #region CommonDialogs + + public static async Task ShowConfirmCancelDialog(string? msg = null) + { + var content = msg == null ? new ConfirmCancelDialog() : new ConfirmCancelDialog(msg); + + var result = await DialogHost.Show(content); + return result != null && (bool) result; + } + + public static async Task ShowTextFieldDialog(string? title = null, string? msg = null) + { + var content = new TextFieldDialog(title, msg); + var result = await DialogHost.Show(content); + return result as string; + } + + #endregion } \ No newline at end of file diff --git a/src/NebulaAuth/Core/UpdateManager.cs b/src/NebulaAuth/Core/UpdateManager.cs index 193f29c..600f978 100644 --- a/src/NebulaAuth/Core/UpdateManager.cs +++ b/src/NebulaAuth/Core/UpdateManager.cs @@ -1,7 +1,6 @@ using System; using System.IO; using AutoUpdaterDotNET; -using NebulaAuth.Model; namespace NebulaAuth.Core; @@ -24,9 +23,12 @@ public static class UpdateManager try { var testFile = Path.Combine(Environment.CurrentDirectory, "test.tmp"); - using (File.Create(testFile)) { } + using (File.Create(testFile)) + { + } + File.Delete(testFile); - return false; + return false; } catch (UnauthorizedAccessException) { diff --git a/src/NebulaAuth/MainWindow.xaml b/src/NebulaAuth/MainWindow.xaml index 99e3acb..a151e3a 100644 --- a/src/NebulaAuth/MainWindow.xaml +++ b/src/NebulaAuth/MainWindow.xaml @@ -34,7 +34,7 @@ + Executed="FocusSearchBox" /> @@ -86,15 +86,13 @@ Command="{Binding OpenMafileFolderCommand}" /> - + Command="{Binding OpenProxyManagerCommand}" /> + Command="{Binding DebugCommand}" /> @@ -276,8 +274,9 @@ SelectedValue="{Binding SelectedMafile}" PreviewMouseDown="MafileListBox_OnPreviewMouseDown"> - - + + - - - + + + + + - - + + @@ -411,15 +412,15 @@ + Background="Transparent"> @@ -448,8 +449,7 @@ Visibility="{Binding SelectedMafile, Converter={StaticResource NullableToVisibilityConverter}}" Grid.Row="1" Height="4" Style="{StaticResource MaterialDesignLinearProgressBar}" - MaxTime="30" TimeRemaining="{Binding CodeProgress, Mode=OneWay}" - /> + MaxTime="30" TimeRemaining="{Binding CodeProgress, Mode=OneWay}" /> + - - - - - CheckBox - CloseBox - - - - - + + + + + CheckBox + CloseBox + + + + + - - - + + + + - - - - - - + VerticalScrollBarVisibility="Auto" + Style="{StaticResource MaterialDesignOutlinedTextBox}" + md:TextFieldAssist.HasClearButton="True" + md:HintAssist.IsFloating="False" + md:HintAssist.Hint="{Tr SetAccountPasswordsView.InputFormat}" + md:TextFieldAssist.TextBoxIsMultiLine="True" + md:TextFieldAssist.TextBoxViewVerticalAlignment="Top" + VerticalContentAlignment="Top" /> - True False @@ -110,21 +110,20 @@ - + -