diff --git a/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs b/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs index 0bbdb208..0e141b74 100644 --- a/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs @@ -56,7 +56,8 @@ public class ProfilesViewModel : MyReactiveObject public ReactiveCommand MoveUpCmd { get; } public ReactiveCommand MoveDownCmd { get; } - public ReactiveCommand MoveBottomCmd { get; } + public ReactiveCommand MoveBottomCmd { get; } + public ReactiveCommand MoveToGroupCmd { get; } //servers ping public ReactiveCommand MixedTestServerCmd { get; } @@ -179,6 +180,10 @@ public class ProfilesViewModel : MyReactiveObject { await MoveServer(EMove.Bottom); }, canEditRemove); + MoveToGroupCmd = ReactiveCommand.CreateFromTask(async sub => + { + SelectedMoveToGroup = sub; + }); //servers ping FastRealPingCmd = ReactiveCommand.CreateFromTask(async () => diff --git a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml index dc5f2e86..116f35fa 100644 --- a/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml +++ b/v2rayN/v2rayN.Desktop/Views/ProfilesView.axaml @@ -7,6 +7,7 @@ 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" + x:Name="Root" d:DesignHeight="450" d:DesignWidth="800" x:DataType="vms:ProfilesViewModel" @@ -141,19 +142,18 @@ InputGesture="Ctrl+T" /> - - - - - - - - + + + + + + //servers move //this.OneWayBind(ViewModel, vm => vm.SubItems, v => v.cmbMoveToGroup.ItemsSource).DisposeWith(disposables); - this.Bind(ViewModel, vm => vm.SelectedMoveToGroup, v => v.cmbMoveToGroup.SelectedItem).DisposeWith(disposables); + //this.Bind(ViewModel, vm => vm.SelectedMoveToGroup, v => v.cmbMoveToGroup.SelectedItem).DisposeWith(disposables); this.BindCommand(ViewModel, vm => vm.MoveTopCmd, v => v.menuMoveTop).DisposeWith(disposables); this.BindCommand(ViewModel, vm => vm.MoveUpCmd, v => v.menuMoveUp).DisposeWith(disposables);