瀏覽代碼

fix: warnings

Bruce Wayne 2 年之前
父節點
當前提交
3d38c81f59
共有 2 個文件被更改,包括 7 次插入9 次删除
  1. 3 3
      NatTypeTester.ViewModels/MainWindowViewModel.cs
  2. 4 6
      NatTypeTester/Utils/Extensions.cs

+ 3 - 3
NatTypeTester.ViewModels/MainWindowViewModel.cs

@@ -21,10 +21,10 @@ public class MainWindowViewModel : ViewModelBase, IScreen
 
 	private readonly IEnumerable<string> _defaultServers = new HashSet<string>
 	{
-		@"stun.syncthing.net",
 		@"stunserver.stunprotocol.org",
-		@"stun.miwifi.com",
-		@"stun.qq.com"
+		@"stun.syncthing.net",
+		@"stun.qq.com",
+		@"stun.miwifi.com"
 	};
 
 	private SourceList<string> List { get; } = new();

+ 4 - 6
NatTypeTester/Utils/Extensions.cs

@@ -6,12 +6,10 @@ public static class Extensions
 {
 	public static async Task HandleExceptionWithContentDialogAsync(this Exception ex)
 	{
-		using DisposableContentDialog dialog = new()
-		{
-			Title = nameof(NatTypeTester),
-			Content = ex.Message,
-			PrimaryButtonText = @"OK"
-		};
+		using DisposableContentDialog dialog = new();
+		dialog.Title = nameof(NatTypeTester);
+		dialog.Content = ex.Message;
+		dialog.PrimaryButtonText = @"OK";
 		await dialog.ShowAsync();
 	}
 }