Skip to content

Commit b34490c

Browse files
committed
UI improved
1 parent 12ef6c2 commit b34490c

19 files changed

Lines changed: 441 additions & 142 deletions

Icon/NETworkManager.ico

65 Bytes
Binary file not shown.

Icon/NETworkManager.svg

Lines changed: 24 additions & 24 deletions
Loading

NETworkManager.svg

Lines changed: 24 additions & 24 deletions
Loading

Source/NETworkManager/MainWindow.xaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
88
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
99
xmlns:IconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
10-
xmlns:Documentation="clr-namespace:NETworkManager.Models.Documentation"
1110
xmlns:Resources="clr-namespace:NETworkManager.Properties"
1211
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
1312
mc:Ignorable="d"
@@ -29,7 +28,7 @@
2928
</Controls:MetroWindow.IconTemplate>
3029
<Controls:MetroWindow.RightWindowCommands>
3130
<Controls:WindowCommands>
32-
<Button Command="{Binding OpenDocumentationCommand}" Cursor="Hand">
31+
<Button Focusable="False" Command="{Binding OpenDocumentationCommand}" Cursor="Hand">
3332
<StackPanel Orientation="Horizontal">
3433
<Rectangle Width="20" Height="20" Fill="{Binding RelativeSource={RelativeSource AncestorType=Button}, Path=Foreground}">
3534
<Rectangle.OpacityMask>
@@ -39,7 +38,7 @@
3938
<TextBlock Text="{DynamicResource String_Documentation}" VerticalAlignment="Center" Margin="5,0,0,0" />
4039
</StackPanel>
4140
</Button>
42-
<Button Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.NETworkManager_ProjectUrl}" Cursor="Hand">
41+
<Button Focusable="False" Command="{Binding OpenWebsiteCommand}" CommandParameter="{x:Static Resources:Resources.NETworkManager_ProjectUrl}" Cursor="Hand">
4342
<StackPanel Orientation="Horizontal">
4443
<Rectangle Width="20" Height="20" Fill="{Binding RelativeSource={RelativeSource AncestorType=Button}, Path=Foreground}">
4544
<Rectangle.OpacityMask>
65 Bytes
Binary file not shown.
65 Bytes
Binary file not shown.

Source/NETworkManager/ViewModels/PingHostViewModel.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,16 @@ private async void EditGroupAction(object group)
351351
await dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
352352
}
353353

354+
public ICommand ClearSearchCommand
355+
{
356+
get { return new RelayCommand(p => ClearSearchAction()); }
357+
}
358+
359+
private void ClearSearchAction()
360+
{
361+
Search = string.Empty;
362+
}
363+
354364
public ItemActionCallback CloseItemCommand
355365
{
356366
get { return CloseItemAction; }

Source/NETworkManager/ViewModels/PortScannerHostViewModel.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,16 @@ private async void EditGroupAction(object group)
341341
await dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
342342
}
343343

344+
public ICommand ClearSearchCommand
345+
{
346+
get { return new RelayCommand(p => ClearSearchAction()); }
347+
}
348+
349+
private void ClearSearchAction()
350+
{
351+
Search = string.Empty;
352+
}
353+
344354
public ItemActionCallback CloseItemCommand
345355
{
346356
get { return CloseItemAction; }

Source/NETworkManager/ViewModels/PuTTYViewModel.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,16 @@ private async void EditGroupAction(object group)
433433
ConfigurationManager.Current.FixAirspace = true;
434434
await dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
435435
}
436+
437+
public ICommand ClearSearchCommand
438+
{
439+
get { return new RelayCommand(p => ClearSearchAction()); }
440+
}
441+
442+
private void ClearSearchAction()
443+
{
444+
Search = string.Empty;
445+
}
436446
#endregion
437447

438448
#region Methods

Source/NETworkManager/ViewModels/RemoteDesktopViewModel.cs

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,7 @@ private void LoadSettings()
168168
}
169169
#endregion
170170

171-
#region ICommand & Actions
172-
public ItemActionCallback CloseItemCommand
173-
{
174-
get { return CloseItemAction; }
175-
}
176-
177-
private void CloseItemAction(ItemActionCallbackArgs<TabablzControl> args)
178-
{
179-
((args.DragablzItem.Content as DragablzTabItem).View as RemoteDesktopControl).OnClose();
180-
}
181-
171+
#region ICommand & Actions
182172
public ICommand ConnectNewSessionCommand
183173
{
184174
get { return new RelayCommand(p => ConnectNewSessionAction(), ConnectNewSession_CanExecute); }
@@ -594,6 +584,26 @@ private async void EditGroupAction(object group)
594584
ConfigurationManager.Current.FixAirspace = true;
595585
await dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
596586
}
587+
588+
public ICommand ClearSearchCommand
589+
{
590+
get { return new RelayCommand(p => ClearSearchAction()); }
591+
}
592+
593+
private void ClearSearchAction()
594+
{
595+
Search = string.Empty;
596+
}
597+
598+
public ItemActionCallback CloseItemCommand
599+
{
600+
get { return CloseItemAction; }
601+
}
602+
603+
private void CloseItemAction(ItemActionCallbackArgs<TabablzControl> args)
604+
{
605+
((args.DragablzItem.Content as DragablzTabItem).View as RemoteDesktopControl).OnClose();
606+
}
597607
#endregion
598608

599609
#region Methods

0 commit comments

Comments
 (0)