mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 21:52:25 +00:00
Compare commits
7 commits
c5b4857b77
...
f6dd2178e7
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f6dd2178e7 | ||
![]() |
4d2eb324f1 | ||
![]() |
3f2ab8ddcb | ||
![]() |
e45c1ddb36 | ||
![]() |
893c04b3b7 | ||
![]() |
d8b0363bb7 | ||
![]() |
e3a90442a9 |
13 changed files with 88 additions and 73 deletions
|
@ -46,11 +46,13 @@
|
||||||
|
|
||||||
public bool InitApp()
|
public bool InitApp()
|
||||||
{
|
{
|
||||||
_config = ConfigHandler.LoadConfig();
|
Logging.Setup();
|
||||||
if (_config == null)
|
var config = ConfigHandler.LoadConfig();
|
||||||
|
if (config == null)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
_config = config;
|
||||||
Thread.CurrentThread.CurrentUICulture = new(_config.UiItem.CurrentLanguage);
|
Thread.CurrentThread.CurrentUICulture = new(_config.UiItem.CurrentLanguage);
|
||||||
|
|
||||||
//Under Win10
|
//Under Win10
|
||||||
|
@ -70,10 +72,9 @@
|
||||||
|
|
||||||
public bool InitComponents()
|
public bool InitComponents()
|
||||||
{
|
{
|
||||||
Logging.Setup();
|
|
||||||
Logging.LoggingEnabled(_config.GuiItem.EnableLog);
|
|
||||||
Logging.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}");
|
Logging.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}");
|
||||||
Logging.SaveLog($"{Environment.OSVersion} - {(Environment.Is64BitOperatingSystem ? 64 : 32)}");
|
Logging.SaveLog($"{Environment.OSVersion} - {(Environment.Is64BitOperatingSystem ? 64 : 32)}");
|
||||||
|
Logging.LoggingEnabled(_config.GuiItem.EnableLog);
|
||||||
Logging.ClearLogs();
|
Logging.ClearLogs();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -31,9 +31,17 @@ public partial class App : Application
|
||||||
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||||
{
|
{
|
||||||
AppHandler.Instance.InitComponents();
|
AppHandler.Instance.InitComponents();
|
||||||
|
desktop.ShutdownMode = Avalonia.Controls.ShutdownMode.OnExplicitShutdown;
|
||||||
desktop.Exit += OnExit;
|
desktop.Exit += OnExit;
|
||||||
desktop.MainWindow = new MainWindow();
|
var mainWindow = new MainWindow();
|
||||||
|
if (!AppHandler.Instance.Config.UiItem.AutoHideStartup)
|
||||||
|
{
|
||||||
|
desktop.MainWindow = mainWindow;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
desktop.MainWindow = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
base.OnFrameworkInitializationCompleted();
|
base.OnFrameworkInitializationCompleted();
|
||||||
|
|
|
@ -41,7 +41,34 @@ namespace v2rayN.Desktop.Views
|
||||||
ViewModel = new MainWindowViewModel(UpdateViewHandler);
|
ViewModel = new MainWindowViewModel(UpdateViewHandler);
|
||||||
Locator.CurrentMutable.RegisterLazySingleton(() => ViewModel, typeof(MainWindowViewModel));
|
Locator.CurrentMutable.RegisterLazySingleton(() => ViewModel, typeof(MainWindowViewModel));
|
||||||
|
|
||||||
//WindowsHandler.Instance.RegisterGlobalHotkey(_config, OnHotkeyHandler, null);
|
switch (_config.UiItem.MainGirdOrientation)
|
||||||
|
{
|
||||||
|
case EGirdOrientation.Horizontal:
|
||||||
|
tabProfiles.Content ??= new ProfilesView(this);
|
||||||
|
tabMsgView.Content ??= new MsgView();
|
||||||
|
tabClashProxies.Content ??= new ClashProxiesView();
|
||||||
|
tabClashConnections.Content ??= new ClashConnectionsView();
|
||||||
|
gridMain.IsVisible = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case EGirdOrientation.Vertical:
|
||||||
|
tabProfiles1.Content ??= new ProfilesView(this);
|
||||||
|
tabMsgView1.Content ??= new MsgView();
|
||||||
|
tabClashProxies1.Content ??= new ClashProxiesView();
|
||||||
|
tabClashConnections1.Content ??= new ClashConnectionsView();
|
||||||
|
gridMain1.IsVisible = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case EGirdOrientation.Tab:
|
||||||
|
default:
|
||||||
|
tabProfiles2.Content ??= new ProfilesView(this);
|
||||||
|
tabMsgView2.Content ??= new MsgView();
|
||||||
|
tabClashProxies2.Content ??= new ClashProxiesView();
|
||||||
|
tabClashConnections2.Content ??= new ClashConnectionsView();
|
||||||
|
gridMain2.IsVisible = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
conTheme.Content ??= new ThemeSettingView();
|
||||||
|
|
||||||
this.WhenActivated(disposables =>
|
this.WhenActivated(disposables =>
|
||||||
{
|
{
|
||||||
|
@ -84,7 +111,6 @@ namespace v2rayN.Desktop.Views
|
||||||
switch (_config.UiItem.MainGirdOrientation)
|
switch (_config.UiItem.MainGirdOrientation)
|
||||||
{
|
{
|
||||||
case EGirdOrientation.Horizontal:
|
case EGirdOrientation.Horizontal:
|
||||||
gridMain.IsVisible = true;
|
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabMsgView.IsVisible).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabMsgView.IsVisible).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashProxies.IsVisible).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashProxies.IsVisible).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashConnections.IsVisible).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashConnections.IsVisible).DisposeWith(disposables);
|
||||||
|
@ -92,7 +118,6 @@ namespace v2rayN.Desktop.Views
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EGirdOrientation.Vertical:
|
case EGirdOrientation.Vertical:
|
||||||
gridMain1.IsVisible = true;
|
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabMsgView1.IsVisible).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabMsgView1.IsVisible).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashProxies1.IsVisible).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashProxies1.IsVisible).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashConnections1.IsVisible).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashConnections1.IsVisible).DisposeWith(disposables);
|
||||||
|
@ -101,7 +126,6 @@ namespace v2rayN.Desktop.Views
|
||||||
|
|
||||||
case EGirdOrientation.Tab:
|
case EGirdOrientation.Tab:
|
||||||
default:
|
default:
|
||||||
gridMain2.IsVisible = true;
|
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashProxies2.IsVisible).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashProxies2.IsVisible).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashConnections2.IsVisible).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashConnections2.IsVisible).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.TabMainSelectedIndex, v => v.tabMain2.SelectedIndex).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.TabMainSelectedIndex, v => v.tabMain2.SelectedIndex).DisposeWith(disposables);
|
||||||
|
@ -128,35 +152,10 @@ namespace v2rayN.Desktop.Views
|
||||||
menuGlobalHotkeySetting.IsVisible = false;
|
menuGlobalHotkeySetting.IsVisible = false;
|
||||||
}
|
}
|
||||||
menuAddServerViaScan.IsVisible = false;
|
menuAddServerViaScan.IsVisible = false;
|
||||||
|
|
||||||
switch (_config.UiItem.MainGirdOrientation)
|
|
||||||
{
|
|
||||||
case EGirdOrientation.Horizontal:
|
|
||||||
tabProfiles.Content ??= new ProfilesView(this);
|
|
||||||
tabMsgView.Content ??= new MsgView();
|
|
||||||
tabClashProxies.Content ??= new ClashProxiesView();
|
|
||||||
tabClashConnections.Content ??= new ClashConnectionsView();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case EGirdOrientation.Vertical:
|
|
||||||
tabProfiles1.Content ??= new ProfilesView(this);
|
|
||||||
tabMsgView1.Content ??= new MsgView();
|
|
||||||
tabClashProxies1.Content ??= new ClashProxiesView();
|
|
||||||
tabClashConnections1.Content ??= new ClashConnectionsView();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case EGirdOrientation.Tab:
|
|
||||||
default:
|
|
||||||
tabProfiles2.Content ??= new ProfilesView(this);
|
|
||||||
tabMsgView2.Content ??= new MsgView();
|
|
||||||
tabClashProxies2.Content ??= new ClashProxiesView();
|
|
||||||
tabClashConnections2.Content ??= new ClashConnectionsView();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
conTheme.Content ??= new ThemeSettingView();
|
|
||||||
|
|
||||||
RestoreUI();
|
RestoreUI();
|
||||||
AddHelpMenuItem();
|
AddHelpMenuItem();
|
||||||
|
//WindowsHandler.Instance.RegisterGlobalHotkey(_config, OnHotkeyHandler, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Event
|
#region Event
|
||||||
|
@ -397,6 +396,10 @@ namespace v2rayN.Desktop.Views
|
||||||
if (bl)
|
if (bl)
|
||||||
{
|
{
|
||||||
this.Show();
|
this.Show();
|
||||||
|
if (Application.Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||||
|
{
|
||||||
|
desktop.MainWindow = this;
|
||||||
|
}
|
||||||
if (this.WindowState == WindowState.Minimized)
|
if (this.WindowState == WindowState.Minimized)
|
||||||
{
|
{
|
||||||
this.WindowState = WindowState.Normal;
|
this.WindowState = WindowState.Normal;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
||||||
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
||||||
Title="{x:Static resx:ResUI.menuRoutingRuleSetting}"
|
Title="{x:Static resx:ResUI.menuRoutingRuleSetting}"
|
||||||
Width="960"
|
Width="1000"
|
||||||
Height="700"
|
Height="700"
|
||||||
x:DataType="vms:RoutingRuleSettingViewModel"
|
x:DataType="vms:RoutingRuleSettingViewModel"
|
||||||
ShowInTaskbar="False"
|
ShowInTaskbar="False"
|
||||||
|
@ -237,11 +237,11 @@
|
||||||
Binding="{Binding Network}"
|
Binding="{Binding Network}"
|
||||||
Header="network" />
|
Header="network" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="200"
|
Width="*"
|
||||||
Binding="{Binding Domains}"
|
Binding="{Binding Domains}"
|
||||||
Header="domain" />
|
Header="domain" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="200"
|
Width="*"
|
||||||
Binding="{Binding Ips}"
|
Binding="{Binding Ips}"
|
||||||
Header="ip" />
|
Header="ip" />
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
||||||
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
||||||
Title="{x:Static resx:ResUI.menuRoutingSetting}"
|
Title="{x:Static resx:ResUI.menuRoutingSetting}"
|
||||||
Width="990"
|
Width="1000"
|
||||||
Height="700"
|
Height="700"
|
||||||
x:DataType="vms:RoutingSettingViewModel"
|
x:DataType="vms:RoutingSettingViewModel"
|
||||||
ShowInTaskbar="False"
|
ShowInTaskbar="False"
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridCheckBoxColumn Width="40" Binding="{Binding IsActive}" />
|
<DataGridCheckBoxColumn Width="40" Binding="{Binding IsActive}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="250"
|
Width="*"
|
||||||
Binding="{Binding Remarks}"
|
Binding="{Binding Remarks}"
|
||||||
Header="{x:Static resx:ResUI.LvRemarks}" />
|
Header="{x:Static resx:ResUI.LvRemarks}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
|
@ -121,7 +121,7 @@
|
||||||
Binding="{Binding Sort}"
|
Binding="{Binding Sort}"
|
||||||
Header="{x:Static resx:ResUI.LvSort}" />
|
Header="{x:Static resx:ResUI.LvSort}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="300"
|
Width="*"
|
||||||
Binding="{Binding Url}"
|
Binding="{Binding Url}"
|
||||||
Header="{x:Static resx:ResUI.LvUrl}" />
|
Header="{x:Static resx:ResUI.LvUrl}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
|
|
|
@ -77,9 +77,13 @@ namespace v2rayN.Desktop.Views
|
||||||
{
|
{
|
||||||
if (Application.Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
if (Application.Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||||
{
|
{
|
||||||
desktop.MainWindow.Icon = AvaUtils.GetAppIcon(_config.SystemProxyItem.SysProxyType);
|
var icon = AvaUtils.GetAppIcon(_config.SystemProxyItem.SysProxyType);
|
||||||
|
if (desktop.MainWindow != null)
|
||||||
|
{
|
||||||
|
desktop.MainWindow.Icon = icon;
|
||||||
|
}
|
||||||
var iconslist = TrayIcon.GetIcons(Application.Current);
|
var iconslist = TrayIcon.GetIcons(Application.Current);
|
||||||
iconslist[0].Icon = desktop.MainWindow.Icon;
|
iconslist[0].Icon = icon;
|
||||||
TrayIcon.SetIcons(Application.Current, iconslist);
|
TrayIcon.SetIcons(Application.Current, iconslist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,7 @@
|
||||||
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
||||||
Title="{x:Static resx:ResUI.menuSubSetting}"
|
Title="{x:Static resx:ResUI.menuSubSetting}"
|
||||||
Width="700"
|
Width="700"
|
||||||
Height="600"
|
Height="650"
|
||||||
d:DesignHeight="600"
|
|
||||||
d:DesignWidth="800"
|
|
||||||
ShowInTaskbar="False"
|
ShowInTaskbar="False"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
|
|
@ -8,10 +8,8 @@
|
||||||
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
||||||
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
||||||
Title="{x:Static resx:ResUI.menuSubSetting}"
|
Title="{x:Static resx:ResUI.menuSubSetting}"
|
||||||
Width="800"
|
Width="1000"
|
||||||
Height="600"
|
Height="700"
|
||||||
d:DesignHeight="450"
|
|
||||||
d:DesignWidth="800"
|
|
||||||
x:DataType="vms:SubSettingViewModel"
|
x:DataType="vms:SubSettingViewModel"
|
||||||
ShowInTaskbar="False"
|
ShowInTaskbar="False"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
|
@ -49,7 +47,7 @@
|
||||||
</DataGrid.KeyBindings>
|
</DataGrid.KeyBindings>
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="120"
|
Width="*"
|
||||||
Binding="{Binding Remarks}"
|
Binding="{Binding Remarks}"
|
||||||
Header="{x:Static resx:ResUI.LvRemarks}" />
|
Header="{x:Static resx:ResUI.LvRemarks}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
|
|
|
@ -40,7 +40,6 @@ namespace v2rayN.Views
|
||||||
ViewModel = new MainWindowViewModel(UpdateViewHandler);
|
ViewModel = new MainWindowViewModel(UpdateViewHandler);
|
||||||
Locator.CurrentMutable.RegisterLazySingleton(() => ViewModel, typeof(MainWindowViewModel));
|
Locator.CurrentMutable.RegisterLazySingleton(() => ViewModel, typeof(MainWindowViewModel));
|
||||||
|
|
||||||
WindowsHandler.Instance.RegisterGlobalHotkey(_config, OnHotkeyHandler, null);
|
|
||||||
switch (_config.UiItem.MainGirdOrientation)
|
switch (_config.UiItem.MainGirdOrientation)
|
||||||
{
|
{
|
||||||
case EGirdOrientation.Horizontal:
|
case EGirdOrientation.Horizontal:
|
||||||
|
@ -48,6 +47,7 @@ namespace v2rayN.Views
|
||||||
tabMsgView.Content ??= new MsgView();
|
tabMsgView.Content ??= new MsgView();
|
||||||
tabClashProxies.Content ??= new ClashProxiesView();
|
tabClashProxies.Content ??= new ClashProxiesView();
|
||||||
tabClashConnections.Content ??= new ClashConnectionsView();
|
tabClashConnections.Content ??= new ClashConnectionsView();
|
||||||
|
gridMain.Visibility = Visibility.Visible;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EGirdOrientation.Vertical:
|
case EGirdOrientation.Vertical:
|
||||||
|
@ -55,6 +55,7 @@ namespace v2rayN.Views
|
||||||
tabMsgView1.Content ??= new MsgView();
|
tabMsgView1.Content ??= new MsgView();
|
||||||
tabClashProxies1.Content ??= new ClashProxiesView();
|
tabClashProxies1.Content ??= new ClashProxiesView();
|
||||||
tabClashConnections1.Content ??= new ClashConnectionsView();
|
tabClashConnections1.Content ??= new ClashConnectionsView();
|
||||||
|
gridMain1.Visibility = Visibility.Visible;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EGirdOrientation.Tab:
|
case EGirdOrientation.Tab:
|
||||||
|
@ -63,6 +64,7 @@ namespace v2rayN.Views
|
||||||
tabMsgView2.Content ??= new MsgView();
|
tabMsgView2.Content ??= new MsgView();
|
||||||
tabClashProxies2.Content ??= new ClashProxiesView();
|
tabClashProxies2.Content ??= new ClashProxiesView();
|
||||||
tabClashConnections2.Content ??= new ClashConnectionsView();
|
tabClashConnections2.Content ??= new ClashConnectionsView();
|
||||||
|
gridMain2.Visibility = Visibility.Visible;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pbTheme.Content ??= new ThemeSettingView();
|
pbTheme.Content ??= new ThemeSettingView();
|
||||||
|
@ -108,7 +110,6 @@ namespace v2rayN.Views
|
||||||
switch (_config.UiItem.MainGirdOrientation)
|
switch (_config.UiItem.MainGirdOrientation)
|
||||||
{
|
{
|
||||||
case EGirdOrientation.Horizontal:
|
case EGirdOrientation.Horizontal:
|
||||||
gridMain.Visibility = Visibility.Visible;
|
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabMsgView.Visibility).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabMsgView.Visibility).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashProxies.Visibility).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashProxies.Visibility).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashConnections.Visibility).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashConnections.Visibility).DisposeWith(disposables);
|
||||||
|
@ -116,7 +117,6 @@ namespace v2rayN.Views
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EGirdOrientation.Vertical:
|
case EGirdOrientation.Vertical:
|
||||||
gridMain1.Visibility = Visibility.Visible;
|
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabMsgView1.Visibility).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabMsgView1.Visibility).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashProxies1.Visibility).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashProxies1.Visibility).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashConnections1.Visibility).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashConnections1.Visibility).DisposeWith(disposables);
|
||||||
|
@ -125,7 +125,6 @@ namespace v2rayN.Views
|
||||||
|
|
||||||
case EGirdOrientation.Tab:
|
case EGirdOrientation.Tab:
|
||||||
default:
|
default:
|
||||||
gridMain2.Visibility = Visibility.Visible;
|
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashProxies2.Visibility).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashProxies2.Visibility).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashConnections2.Visibility).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.ShowClashUI, v => v.tabClashConnections2.Visibility).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.TabMainSelectedIndex, v => v.tabMain2.SelectedIndex).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.TabMainSelectedIndex, v => v.tabMain2.SelectedIndex).DisposeWith(disposables);
|
||||||
|
@ -142,6 +141,7 @@ namespace v2rayN.Views
|
||||||
|
|
||||||
RestoreUI();
|
RestoreUI();
|
||||||
AddHelpMenuItem();
|
AddHelpMenuItem();
|
||||||
|
WindowsHandler.Instance.RegisterGlobalHotkey(_config, OnHotkeyHandler, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Event
|
#region Event
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
<reactiveui:ReactiveWindow
|
<reactiveui:ReactiveWindow
|
||||||
x:Class="v2rayN.Views.RoutingRuleSettingWindow"
|
x:Class="v2rayN.Views.RoutingRuleSettingWindow"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
||||||
xmlns:reactiveui="http://reactiveui.net"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:reactiveui="http://reactiveui.net"
|
||||||
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
||||||
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
||||||
Title="{x:Static resx:ResUI.menuRoutingRuleSetting}"
|
Title="{x:Static resx:ResUI.menuRoutingRuleSetting}"
|
||||||
Width="960"
|
Width="1000"
|
||||||
Height="700"
|
Height="700"
|
||||||
x:TypeArguments="vms:RoutingRuleSettingViewModel"
|
x:TypeArguments="vms:RoutingRuleSettingViewModel"
|
||||||
|
ResizeMode="CanResize"
|
||||||
ShowInTaskbar="False"
|
ShowInTaskbar="False"
|
||||||
Style="{StaticResource WindowGlobal}"
|
Style="{StaticResource WindowGlobal}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
|
@ -321,11 +322,11 @@
|
||||||
Binding="{Binding Network}"
|
Binding="{Binding Network}"
|
||||||
Header="network" />
|
Header="network" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="200"
|
Width="*"
|
||||||
Binding="{Binding Domains}"
|
Binding="{Binding Domains}"
|
||||||
Header="domain" />
|
Header="domain" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="200"
|
Width="*"
|
||||||
Binding="{Binding Ips}"
|
Binding="{Binding Ips}"
|
||||||
Header="ip" />
|
Header="ip" />
|
||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
|
|
|
@ -9,9 +9,10 @@
|
||||||
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
||||||
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
||||||
Title="{x:Static resx:ResUI.menuRoutingSetting}"
|
Title="{x:Static resx:ResUI.menuRoutingSetting}"
|
||||||
Width="990"
|
Width="1000"
|
||||||
Height="700"
|
Height="700"
|
||||||
x:TypeArguments="vms:RoutingSettingViewModel"
|
x:TypeArguments="vms:RoutingSettingViewModel"
|
||||||
|
ResizeMode="CanResize"
|
||||||
ShowInTaskbar="False"
|
ShowInTaskbar="False"
|
||||||
Style="{StaticResource WindowGlobal}"
|
Style="{StaticResource WindowGlobal}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
|
@ -174,7 +175,7 @@
|
||||||
</DataGrid.Resources>
|
</DataGrid.Resources>
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="250"
|
Width="*"
|
||||||
Binding="{Binding Remarks}"
|
Binding="{Binding Remarks}"
|
||||||
Header="{x:Static resx:ResUI.LvRemarks}" />
|
Header="{x:Static resx:ResUI.LvRemarks}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
|
@ -186,7 +187,7 @@
|
||||||
Binding="{Binding Sort}"
|
Binding="{Binding Sort}"
|
||||||
Header="{x:Static resx:ResUI.LvSort}" />
|
Header="{x:Static resx:ResUI.LvSort}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="300"
|
Width="*"
|
||||||
Binding="{Binding Url}"
|
Binding="{Binding Url}"
|
||||||
Header="{x:Static resx:ResUI.LvUrl}" />
|
Header="{x:Static resx:ResUI.LvUrl}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
<reactiveui:ReactiveWindow
|
<reactiveui:ReactiveWindow
|
||||||
x:Class="v2rayN.Views.SubEditWindow"
|
x:Class="v2rayN.Views.SubEditWindow"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
||||||
xmlns:reactiveui="http://reactiveui.net"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:reactiveui="http://reactiveui.net"
|
||||||
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
||||||
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
||||||
Title="{x:Static resx:ResUI.menuSubSetting}"
|
Title="{x:Static resx:ResUI.menuSubSetting}"
|
||||||
Width="700"
|
Width="700"
|
||||||
Height="600"
|
Height="650"
|
||||||
x:TypeArguments="vms:SubEditViewModel"
|
x:TypeArguments="vms:SubEditViewModel"
|
||||||
ShowInTaskbar="False"
|
ShowInTaskbar="False"
|
||||||
Style="{StaticResource WindowGlobal}"
|
Style="{StaticResource WindowGlobal}"
|
||||||
|
|
|
@ -9,9 +9,10 @@
|
||||||
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
|
||||||
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
||||||
Title="{x:Static resx:ResUI.menuSubSetting}"
|
Title="{x:Static resx:ResUI.menuSubSetting}"
|
||||||
Width="800"
|
Width="1000"
|
||||||
Height="600"
|
Height="700"
|
||||||
x:TypeArguments="vms:SubSettingViewModel"
|
x:TypeArguments="vms:SubSettingViewModel"
|
||||||
|
ResizeMode="CanResize"
|
||||||
ShowInTaskbar="False"
|
ShowInTaskbar="False"
|
||||||
Style="{StaticResource WindowGlobal}"
|
Style="{StaticResource WindowGlobal}"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
|
@ -92,7 +93,7 @@
|
||||||
Style="{StaticResource DefDataGrid}">
|
Style="{StaticResource DefDataGrid}">
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
Width="120"
|
Width="*"
|
||||||
Binding="{Binding Remarks}"
|
Binding="{Binding Remarks}"
|
||||||
Header="{x:Static resx:ResUI.LvRemarks}" />
|
Header="{x:Static resx:ResUI.LvRemarks}" />
|
||||||
<DataGridTextColumn
|
<DataGridTextColumn
|
||||||
|
|
Loading…
Reference in a new issue