mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-27 18:42:52 +00:00
Compare commits
No commits in common. "555960e2100d360a96c826c71d767cb0a4355032" and "a7f35d449588a01b5cb357985d0e7cf92092eacf" have entirely different histories.
555960e210
...
a7f35d4495
17 changed files with 44 additions and 135 deletions
|
|
@ -69,7 +69,7 @@ namespace ServiceLib
|
||||||
public const int MinFontSize = 8;
|
public const int MinFontSize = 8;
|
||||||
public const string RebootAs = "rebootas";
|
public const string RebootAs = "rebootas";
|
||||||
public const string AvaAssets = "avares://v2rayN/Assets/";
|
public const string AvaAssets = "avares://v2rayN/Assets/";
|
||||||
public const string LocalAppData = "V2RAYN_LOCAL_APPLICATION_DATA_V2";
|
public const string LocalAppData = "V2RAYN_LOCAL_APPLICATION_DATA";
|
||||||
public const string V2RayLocalAsset = "V2RAY_LOCATION_ASSET";
|
public const string V2RayLocalAsset = "V2RAY_LOCATION_ASSET";
|
||||||
public const string XrayLocalAsset = "XRAY_LOCATION_ASSET";
|
public const string XrayLocalAsset = "XRAY_LOCATION_ASSET";
|
||||||
public const int SpeedTestPageSize = 1000;
|
public const int SpeedTestPageSize = 1000;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
|
@ -222,20 +222,20 @@ namespace ServiceLib.Services
|
||||||
|
|
||||||
public async Task<int> RunAvailabilityCheck(IWebProxy? webProxy)
|
public async Task<int> RunAvailabilityCheck(IWebProxy? webProxy)
|
||||||
{
|
{
|
||||||
var responseTime = -1;
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
webProxy ??= await GetWebProxy(true);
|
webProxy ??= await GetWebProxy(true);
|
||||||
var config = AppHandler.Instance.Config;
|
|
||||||
|
|
||||||
for (var i = 0; i < 2; i++)
|
try
|
||||||
{
|
{
|
||||||
responseTime = await GetRealPingTime(config.SpeedTestItem.SpeedPingTestUrl, webProxy, 10);
|
var config = AppHandler.Instance.Config;
|
||||||
if (responseTime > 0)
|
var responseTime = await GetRealPingTime(config.SpeedTestItem.SpeedPingTestUrl, webProxy, 10);
|
||||||
{
|
return responseTime;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
await Task.Delay(500);
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logging.SaveLog(_tag, ex);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
@ -243,7 +243,6 @@ namespace ServiceLib.Services
|
||||||
Logging.SaveLog(_tag, ex);
|
Logging.SaveLog(_tag, ex);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return responseTime;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<int> GetRealPingTime(string url, IWebProxy? webProxy, int downloadTimeout)
|
public async Task<int> GetRealPingTime(string url, IWebProxy? webProxy, int downloadTimeout)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
using System.Reactive;
|
using System.Reactive;
|
||||||
|
using System.Text;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
using ReactiveUI.Fody.Helpers;
|
||||||
|
|
||||||
namespace ServiceLib.ViewModels
|
namespace ServiceLib.ViewModels
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -316,8 +316,6 @@ namespace ServiceLib.ViewModels
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateView?.Invoke(EViewAction.DispatcherServerAvailability, ResUI.Speedtesting);
|
|
||||||
|
|
||||||
var msg = await (new UpdateService()).RunAvailabilityCheck();
|
var msg = await (new UpdateService()).RunAvailabilityCheck();
|
||||||
|
|
||||||
NoticeHandler.Instance.SendMessageEx(msg);
|
NoticeHandler.Instance.SendMessageEx(msg);
|
||||||
|
|
|
||||||
|
|
@ -247,10 +247,7 @@ namespace v2rayN.Desktop.Views
|
||||||
|
|
||||||
case EViewAction.AddServerViaClipboard:
|
case EViewAction.AddServerViaClipboard:
|
||||||
var clipboardData = await AvaUtils.GetClipboardData(this);
|
var clipboardData = await AvaUtils.GetClipboardData(this);
|
||||||
if (ViewModel != null)
|
ViewModel?.AddServerViaClipboardAsync(clipboardData);
|
||||||
{
|
|
||||||
await ViewModel.AddServerViaClipboardAsync(clipboardData);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EViewAction.AdjustMainLvColWidth:
|
case EViewAction.AdjustMainLvColWidth:
|
||||||
|
|
@ -297,10 +294,7 @@ namespace v2rayN.Desktop.Views
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WindowCloseReason.ApplicationShutdown or WindowCloseReason.OSShutdown:
|
case WindowCloseReason.ApplicationShutdown or WindowCloseReason.OSShutdown:
|
||||||
if (ViewModel != null)
|
await ViewModel?.MyAppExitAsync(true);
|
||||||
{
|
|
||||||
await ViewModel.MyAppExitAsync(true);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -315,10 +309,7 @@ namespace v2rayN.Desktop.Views
|
||||||
{
|
{
|
||||||
case Key.V:
|
case Key.V:
|
||||||
var clipboardData = await AvaUtils.GetClipboardData(this);
|
var clipboardData = await AvaUtils.GetClipboardData(this);
|
||||||
if (ViewModel != null)
|
ViewModel?.AddServerViaClipboardAsync(clipboardData);
|
||||||
{
|
|
||||||
await ViewModel.AddServerViaClipboardAsync(clipboardData);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Key.S:
|
case Key.S:
|
||||||
|
|
@ -367,11 +358,7 @@ namespace v2rayN.Desktop.Views
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
await ViewModel?.ScanImageResult(fileName);
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
|
||||||
await ViewModel.ScanImageResult(fileName);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MenuCheckUpdate_Click(object? sender, RoutedEventArgs e)
|
private void MenuCheckUpdate_Click(object? sender, RoutedEventArgs e)
|
||||||
|
|
@ -395,10 +382,8 @@ namespace v2rayN.Desktop.Views
|
||||||
|
|
||||||
_blCloseByUser = true;
|
_blCloseByUser = true;
|
||||||
StorageUI();
|
StorageUI();
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
await ViewModel?.MyAppExitAsync(false);
|
||||||
await ViewModel.MyAppExitAsync(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Event
|
#endregion Event
|
||||||
|
|
|
||||||
|
|
@ -247,11 +247,8 @@ namespace v2rayN.Desktop.Views
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ClbdestOverride_SelectionChanged(object? sender, SelectionChangedEventArgs e)
|
private void ClbdestOverride_SelectionChanged(object? sender, SelectionChangedEventArgs e)
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
{
|
||||||
ViewModel.destOverride = clbdestOverride.SelectedItems.Cast<string>().ToList();
|
ViewModel.destOverride = clbdestOverride.SelectedItems.Cast<string>().ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,16 +102,11 @@ namespace v2rayN.Desktop.Views
|
||||||
private async void LstProfiles_Sorting(object? sender, DataGridColumnEventArgs e)
|
private async void LstProfiles_Sorting(object? sender, DataGridColumnEventArgs e)
|
||||||
{
|
{
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
|
await ViewModel?.SortServer(e.Column.Tag.ToString());
|
||||||
if (ViewModel != null && e.Column?.Tag?.ToString() != null)
|
|
||||||
{
|
|
||||||
await ViewModel.SortServer(e.Column.Tag.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
e.Handled = false;
|
e.Handled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Event
|
//#region Event
|
||||||
|
|
||||||
private async Task<bool> UpdateViewHandler(EViewAction action, object? obj)
|
private async Task<bool> UpdateViewHandler(EViewAction action, object? obj)
|
||||||
{
|
{
|
||||||
|
|
@ -184,9 +179,7 @@ namespace v2rayN.Desktop.Views
|
||||||
|
|
||||||
case EViewAction.DispatcherRefreshServersBiz:
|
case EViewAction.DispatcherRefreshServersBiz:
|
||||||
Dispatcher.UIThread.Post(() =>
|
Dispatcher.UIThread.Post(() =>
|
||||||
{
|
ViewModel?.RefreshServersBiz(),
|
||||||
_ = RefreshServersBiz();
|
|
||||||
},
|
|
||||||
DispatcherPriority.Default);
|
DispatcherPriority.Default);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -205,26 +198,10 @@ namespace v2rayN.Desktop.Views
|
||||||
await DialogHost.Show(dialog);
|
await DialogHost.Show(dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task RefreshServersBiz()
|
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
|
||||||
await ViewModel.RefreshServersBiz();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lstProfiles.SelectedIndex > 0)
|
|
||||||
{
|
|
||||||
lstProfiles.ScrollIntoView(lstProfiles.SelectedItem, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void lstProfiles_SelectionChanged(object? sender, SelectionChangedEventArgs e)
|
private void lstProfiles_SelectionChanged(object? sender, SelectionChangedEventArgs e)
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
{
|
||||||
ViewModel.SelectedProfiles = lstProfiles.SelectedItems.Cast<ProfileItemModel>().ToList();
|
ViewModel.SelectedProfiles = lstProfiles.SelectedItems.Cast<ProfileItemModel>().ToList();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void LstProfiles_DoubleTapped(object? sender, Avalonia.Input.TappedEventArgs e)
|
private void LstProfiles_DoubleTapped(object? sender, Avalonia.Input.TappedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
@ -356,9 +333,9 @@ namespace v2rayN.Desktop.Views
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Event
|
//#endregion Event
|
||||||
|
|
||||||
#region UI
|
//#region UI
|
||||||
|
|
||||||
private void RestoreUI()
|
private void RestoreUI()
|
||||||
{
|
{
|
||||||
|
|
@ -411,9 +388,9 @@ namespace v2rayN.Desktop.Views
|
||||||
_config.UiItem.MainColumnItem = lvColumnItem;
|
_config.UiItem.MainColumnItem = lvColumnItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion UI
|
//#endregion UI
|
||||||
|
|
||||||
#region Drag and Drop
|
//#region Drag and Drop
|
||||||
|
|
||||||
//private Point startPoint = new();
|
//private Point startPoint = new();
|
||||||
//private int startIndex = -1;
|
//private int startIndex = -1;
|
||||||
|
|
@ -503,6 +480,6 @@ namespace v2rayN.Desktop.Views
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
#endregion Drag and Drop
|
//#endregion Drag and Drop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,20 +84,14 @@ namespace v2rayN.Desktop.Views
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ClbProtocol_SelectionChanged(object? sender, SelectionChangedEventArgs e)
|
private void ClbProtocol_SelectionChanged(object? sender, SelectionChangedEventArgs e)
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
{
|
||||||
ViewModel.ProtocolItems = clbProtocol.SelectedItems.Cast<string>().ToList();
|
ViewModel.ProtocolItems = clbProtocol.SelectedItems.Cast<string>().ToList();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void ClbInboundTag_SelectionChanged(object? sender, SelectionChangedEventArgs e)
|
private void ClbInboundTag_SelectionChanged(object? sender, SelectionChangedEventArgs e)
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
{
|
||||||
ViewModel.InboundTagItems = clbInboundTag.SelectedItems.Cast<string>().ToList();
|
ViewModel.InboundTagItems = clbInboundTag.SelectedItems.Cast<string>().ToList();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void linkRuleobjectDoc_Click(object? sender, RoutedEventArgs e)
|
private void linkRuleobjectDoc_Click(object? sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -166,12 +166,9 @@ namespace v2rayN.Desktop.Views
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lstRules_SelectionChanged(object? sender, SelectionChangedEventArgs e)
|
private void lstRules_SelectionChanged(object? sender, SelectionChangedEventArgs e)
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
{
|
||||||
ViewModel.SelectedSources = lstRules.SelectedItems.Cast<RulesItemModel>().ToList();
|
ViewModel.SelectedSources = lstRules.SelectedItems.Cast<RulesItemModel>().ToList();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void LstRules_DoubleTapped(object? sender, Avalonia.Input.TappedEventArgs e)
|
private void LstRules_DoubleTapped(object? sender, Avalonia.Input.TappedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -107,12 +107,9 @@ namespace v2rayN.Desktop.Views
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lstRoutings_SelectionChanged(object? sender, SelectionChangedEventArgs e)
|
private void lstRoutings_SelectionChanged(object? sender, SelectionChangedEventArgs e)
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
{
|
||||||
ViewModel.SelectedSources = lstRoutings.SelectedItems.Cast<RoutingItemModel>().ToList();
|
ViewModel.SelectedSources = lstRoutings.SelectedItems.Cast<RoutingItemModel>().ToList();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void LstRoutings_DoubleTapped(object? sender, TappedEventArgs e)
|
private void LstRoutings_DoubleTapped(object? sender, TappedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -83,12 +83,9 @@ namespace v2rayN.Desktop.Views
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LstSubscription_SelectionChanged(object? sender, SelectionChangedEventArgs e)
|
private void LstSubscription_SelectionChanged(object? sender, SelectionChangedEventArgs e)
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
{
|
||||||
ViewModel.SelectedSources = lstSubscription.SelectedItems.Cast<SubItem>().ToList();
|
ViewModel.SelectedSources = lstSubscription.SelectedItems.Cast<SubItem>().ToList();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void menuClose_Click(object? sender, RoutedEventArgs e)
|
private void menuClose_Click(object? sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -258,11 +258,8 @@ namespace v2rayN.Views
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ClbdestOverride_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
private void ClbdestOverride_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
{
|
||||||
ViewModel.destOverride = clbdestOverride.SelectedItems.Cast<string>().ToList();
|
ViewModel.destOverride = clbdestOverride.SelectedItems.Cast<string>().ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ namespace v2rayN.Views
|
||||||
case EViewAction.DispatcherRefreshServersBiz:
|
case EViewAction.DispatcherRefreshServersBiz:
|
||||||
Application.Current?.Dispatcher.Invoke((() =>
|
Application.Current?.Dispatcher.Invoke((() =>
|
||||||
{
|
{
|
||||||
_ = RefreshServersBiz();
|
ViewModel?.RefreshServersBiz();
|
||||||
}), DispatcherPriority.Normal);
|
}), DispatcherPriority.Normal);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -186,26 +186,10 @@ namespace v2rayN.Views
|
||||||
await DialogHost.Show(dialog, "RootDialog");
|
await DialogHost.Show(dialog, "RootDialog");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task RefreshServersBiz()
|
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
|
||||||
await ViewModel.RefreshServersBiz();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lstProfiles.SelectedIndex > 0)
|
|
||||||
{
|
|
||||||
lstProfiles.ScrollIntoView(lstProfiles.SelectedItem, null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void lstProfiles_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
private void lstProfiles_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
{
|
||||||
ViewModel.SelectedProfiles = lstProfiles.SelectedItems.Cast<ProfileItemModel>().ToList();
|
ViewModel.SelectedProfiles = lstProfiles.SelectedItems.Cast<ProfileItemModel>().ToList();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void LstProfiles_LoadingRow(object? sender, DataGridRowEventArgs e)
|
private void LstProfiles_LoadingRow(object? sender, DataGridRowEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -78,20 +78,14 @@ namespace v2rayN.Views
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ClbProtocol_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
private void ClbProtocol_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
{
|
||||||
ViewModel.ProtocolItems = clbProtocol.SelectedItems.Cast<string>().ToList();
|
ViewModel.ProtocolItems = clbProtocol.SelectedItems.Cast<string>().ToList();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void ClbInboundTag_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
private void ClbInboundTag_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
{
|
||||||
ViewModel.InboundTagItems = clbInboundTag.SelectedItems.Cast<string>().ToList();
|
ViewModel.InboundTagItems = clbInboundTag.SelectedItems.Cast<string>().ToList();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void linkRuleobjectDoc_Click(object sender, RoutedEventArgs e)
|
private void linkRuleobjectDoc_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -161,12 +161,9 @@ namespace v2rayN.Views
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lstRules_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
private void lstRules_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
{
|
||||||
ViewModel.SelectedSources = lstRules.SelectedItems.Cast<RulesItemModel>().ToList();
|
ViewModel.SelectedSources = lstRules.SelectedItems.Cast<RulesItemModel>().ToList();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void LstRules_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
private void LstRules_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -112,12 +112,9 @@ namespace v2rayN.Views
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lstRoutings_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
private void lstRoutings_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
{
|
||||||
ViewModel.SelectedSources = lstRoutings.SelectedItems.Cast<RoutingItemModel>().ToList();
|
ViewModel.SelectedSources = lstRoutings.SelectedItems.Cast<RoutingItemModel>().ToList();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void LstRoutings_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
private void LstRoutings_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -93,12 +93,9 @@ namespace v2rayN.Views
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LstSubscription_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
private void LstSubscription_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||||
{
|
|
||||||
if (ViewModel != null)
|
|
||||||
{
|
{
|
||||||
ViewModel.SelectedSources = lstSubscription.SelectedItems.Cast<SubItem>().ToList();
|
ViewModel.SelectedSources = lstSubscription.SelectedItems.Cast<SubItem>().ToList();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private void menuClose_Click(object sender, System.Windows.RoutedEventArgs e)
|
private void menuClose_Click(object sender, System.Windows.RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue