diff --git a/v2rayN/v2rayN.Desktop/Views/AddServer2Window.axaml b/v2rayN/v2rayN.Desktop/Views/AddServer2Window.axaml
index 797d8117..a49fcf3d 100644
--- a/v2rayN/v2rayN.Desktop/Views/AddServer2Window.axaml
+++ b/v2rayN/v2rayN.Desktop/Views/AddServer2Window.axaml
@@ -23,13 +23,15 @@
x:Name="btnSave"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
- Cursor="Hand" />
+ Cursor="Hand"
+ IsDefault="True" />
+ Cursor="Hand"
+ IsCancel="True" />
diff --git a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml
index f55c3957..5c6dff35 100644
--- a/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml
+++ b/v2rayN/v2rayN.Desktop/Views/AddServerWindow.axaml
@@ -23,13 +23,15 @@
x:Name="btnSave"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
- Cursor="Hand" />
+ Cursor="Hand"
+ IsDefault="True" />
+ Cursor="Hand"
+ IsCancel="True" />
diff --git a/v2rayN/v2rayN.Desktop/Views/CheckUpdateView.axaml b/v2rayN/v2rayN.Desktop/Views/CheckUpdateView.axaml
index 28c67bc3..cd6f3843 100644
--- a/v2rayN/v2rayN.Desktop/Views/CheckUpdateView.axaml
+++ b/v2rayN/v2rayN.Desktop/Views/CheckUpdateView.axaml
@@ -6,14 +6,14 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
- d:DesignHeight="450"
+ d:DesignHeight="600"
d:DesignWidth="800"
x:DataType="vms:CheckUpdateViewModel"
mc:Ignorable="d">
@@ -67,14 +67,16 @@
Grid.Column="0"
Margin="8"
HorizontalAlignment="Left"
- VerticalAlignment="Center"
+ VerticalAlignment="Top"
IsChecked="{Binding IsSelected}" />
diff --git a/v2rayN/v2rayN.Desktop/Views/DNSSettingWindow.axaml b/v2rayN/v2rayN.Desktop/Views/DNSSettingWindow.axaml
index fdfdcd2f..a0ade9db 100644
--- a/v2rayN/v2rayN.Desktop/Views/DNSSettingWindow.axaml
+++ b/v2rayN/v2rayN.Desktop/Views/DNSSettingWindow.axaml
@@ -23,13 +23,15 @@
x:Name="btnSave"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
- Cursor="Hand" />
+ Cursor="Hand"
+ IsDefault="True" />
+ Cursor="Hand"
+ IsCancel="True" />
diff --git a/v2rayN/v2rayN.Desktop/Views/GlobalHotkeySettingWindow.axaml b/v2rayN/v2rayN.Desktop/Views/GlobalHotkeySettingWindow.axaml
index 743c9c62..d0a202c9 100644
--- a/v2rayN/v2rayN.Desktop/Views/GlobalHotkeySettingWindow.axaml
+++ b/v2rayN/v2rayN.Desktop/Views/GlobalHotkeySettingWindow.axaml
@@ -15,8 +15,8 @@
mc:Ignorable="d">
+ Cursor="Hand"
+ IsDefault="True" />
+ Cursor="Hand"
+ IsCancel="True" />
@@ -66,77 +68,77 @@
diff --git a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs
index 8c468f75..f4d6d8ea 100644
--- a/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs
+++ b/v2rayN/v2rayN.Desktop/Views/MainWindow.axaml.cs
@@ -320,17 +320,17 @@ namespace v2rayN.Desktop.Views
public async Task ScanScreenTaskAsync()
{
- ShowHideWindow(false);
-
- //var dpiXY = QRCodeHelper.GetDpiXY(Application.Current.MainWindow);
- //string result = await Task.Run(() =>
+ //ShowHideWindow(false);
+
+ NoticeHandler.Instance.SendMessageAndEnqueue("Not yet implemented.(还未实现)");
+ return;
+ //if (Application.Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
//{
- // return QRCodeHelper.ScanScreen(dpiXY.Item1, dpiXY.Item2);
- //});
+ // //var bytes = QRCodeHelper.CaptureScreen(desktop);
+ // //await ViewModel?.ScanScreenResult(bytes);
+ //}
- ShowHideWindow(true);
-
- //ViewModel?.ScanScreenResult(result);
+ //ShowHideWindow(true);
}
private async Task ScanImageTaskAsync()
{
diff --git a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml
index 7d7ccbc3..fb457f41 100644
--- a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml
+++ b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml
@@ -23,13 +23,15 @@
x:Name="btnSave"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
- Cursor="Hand" />
+ Cursor="Hand"
+ IsDefault="True" />
+ Cursor="Hand"
+ IsCancel="True" />
diff --git a/v2rayN/v2rayN.Desktop/Views/QrcodeView.axaml.cs b/v2rayN/v2rayN.Desktop/Views/QrcodeView.axaml.cs
index 2f8bab2a..dc7273be 100644
--- a/v2rayN/v2rayN.Desktop/Views/QrcodeView.axaml.cs
+++ b/v2rayN/v2rayN.Desktop/Views/QrcodeView.axaml.cs
@@ -17,9 +17,15 @@ namespace v2rayN.Desktop.Views
private Bitmap? GetQRCode(string? url)
{
- var qrCodeImage = QRCodeHelper.GenQRCode(url);
- if (qrCodeImage is null) return null;
- var ms = new MemoryStream(qrCodeImage);
+ var bytes = QRCodeHelper.GenQRCode(url);
+ return ByteToBitmap(bytes);
+ }
+
+ private Bitmap? ByteToBitmap(byte[]? bytes)
+ {
+ if (bytes is null) return null;
+
+ using var ms = new MemoryStream(bytes);
return new Bitmap(ms);
}
}
diff --git a/v2rayN/v2rayN.Desktop/Views/RoutingRuleDetailsWindow.axaml b/v2rayN/v2rayN.Desktop/Views/RoutingRuleDetailsWindow.axaml
index b11ce805..b405c0c2 100644
--- a/v2rayN/v2rayN.Desktop/Views/RoutingRuleDetailsWindow.axaml
+++ b/v2rayN/v2rayN.Desktop/Views/RoutingRuleDetailsWindow.axaml
@@ -158,13 +158,15 @@
x:Name="btnSave"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
- Cursor="Hand" />
+ Cursor="Hand"
+ IsDefault="True" />
+ Cursor="Hand"
+ IsCancel="True" />
diff --git a/v2rayN/v2rayN.Desktop/Views/RoutingRuleSettingWindow.axaml b/v2rayN/v2rayN.Desktop/Views/RoutingRuleSettingWindow.axaml
index c8867854..12616690 100644
--- a/v2rayN/v2rayN.Desktop/Views/RoutingRuleSettingWindow.axaml
+++ b/v2rayN/v2rayN.Desktop/Views/RoutingRuleSettingWindow.axaml
@@ -35,13 +35,15 @@
x:Name="btnSave"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
- Cursor="Hand" />
+ Cursor="Hand"
+ IsDefault="True" />
+ Cursor="Hand"
+ IsCancel="True" />
diff --git a/v2rayN/v2rayN.Desktop/Views/RoutingSettingWindow.axaml b/v2rayN/v2rayN.Desktop/Views/RoutingSettingWindow.axaml
index 90dbf965..3ba7aa9b 100644
--- a/v2rayN/v2rayN.Desktop/Views/RoutingSettingWindow.axaml
+++ b/v2rayN/v2rayN.Desktop/Views/RoutingSettingWindow.axaml
@@ -71,13 +71,15 @@
x:Name="btnSave"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
- Cursor="Hand" />
+ Cursor="Hand"
+ IsDefault="True" />
+ Cursor="Hand"
+ IsCancel="True" />
diff --git a/v2rayN/v2rayN.Desktop/Views/SubEditWindow.axaml b/v2rayN/v2rayN.Desktop/Views/SubEditWindow.axaml
index 30a7a5dc..c5d22cfd 100644
--- a/v2rayN/v2rayN.Desktop/Views/SubEditWindow.axaml
+++ b/v2rayN/v2rayN.Desktop/Views/SubEditWindow.axaml
@@ -24,13 +24,15 @@
x:Name="btnSave"
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
- Cursor="Hand" />
+ Cursor="Hand"
+ IsDefault="True" />
+ Cursor="Hand"
+ IsCancel="True" />
diff --git a/v2rayN/v2rayN/Views/AddServer2Window.xaml b/v2rayN/v2rayN/Views/AddServer2Window.xaml
index 904f2248..5c12a951 100644
--- a/v2rayN/v2rayN/Views/AddServer2Window.xaml
+++ b/v2rayN/v2rayN/Views/AddServer2Window.xaml
@@ -33,6 +33,7 @@
Width="100"
Content="{x:Static resx:ResUI.TbConfirm}"
Cursor="Hand"
+ IsDefault="True"
Style="{StaticResource DefButton}" />
@@ -48,7 +47,6 @@
Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
Content="{x:Static resx:ResUI.menuClose}"
IsCancel="True"
- IsDefault="True"
Style="{StaticResource MaterialDesignFlatButton}" />
@@ -84,6 +82,7 @@
Grid.Column="0"
Margin="{StaticResource Margin8}"
HorizontalAlignment="Left"
+ VerticalAlignment="Top"
IsChecked="{Binding IsSelected}" />