Skip to content

Commit 3967c98

Browse files
committed
CTRL+T for new tab added
1 parent 704a7f7 commit 3967c98

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

Source/NETworkManager/ViewModels/Applications/RemoteDesktopViewModel.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,12 @@ private void LoadSettings()
172172
#region ICommand & Actions
173173
public ICommand ConnectNewSessionCommand
174174
{
175-
get { return new RelayCommand(p => ConnectNewSessionAction()); }
175+
get { return new RelayCommand(p => ConnectNewSessionAction(), ConnectNewSession_CanExecute); }
176+
}
177+
178+
private bool ConnectNewSession_CanExecute(object parameter)
179+
{
180+
return IsRDP8dot1Available;
176181
}
177182

178183
private async void ConnectNewSessionAction()

Source/NETworkManager/Views/Applications/PingHostView.xaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
<Converter:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
1212
<Converter:NullOrEmptyToBoolConverter x:Key="NullOrEmptyToBoolConverter" />
1313
</UserControl.Resources>
14+
<UserControl.InputBindings>
15+
<KeyBinding Key="T" Modifiers="Ctrl" Command="{Binding AddPingTabCommand}" />
16+
</UserControl.InputBindings>
1417
<Grid>
1518
<dragablz:TabablzControl Grid.Column="0" Grid.Row="0" Margin="-0,-2,0,0" ItemsSource="{Binding TabItems}" SelectedIndex="{Binding SelectedTabIndex}">
1619
<dragablz:TabablzControl.InterTabController>

Source/NETworkManager/Views/Applications/RemoteDesktopView.xaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
<Converter:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
1717
<Converter:NullOrEmptyToBoolConverter x:Key="NullOrEmptyToBoolConverter" />
1818
</UserControl.Resources>
19+
<UserControl.InputBindings>
20+
<KeyBinding Key="T" Modifiers="Ctrl" Command="{Binding ConnectNewSessionCommand}" />
21+
</UserControl.InputBindings>
1922
<Grid>
2023
<Grid Visibility="{Binding IsRDP8dot1Available, Converter={StaticResource BooleanToVisibilityConverter}}">
2124
<Grid.ColumnDefinitions>

0 commit comments

Comments
 (0)