Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Source/NETworkManager/Controls/PowerShellControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private void UserControl_Loaded(object sender, RoutedEventArgs e)
WindowHost.Height = (int)((ActualHeight - 20) * dpi.DpiScaleY);
WindowHost.Width = (int)((ActualWidth - 20) * dpi.DpiScaleX);

Connect().ConfigureAwait(false);
_ = Connect();

_initialized = true;
}
Expand Down Expand Up @@ -248,7 +248,7 @@ private void Reconnect()
if (IsConnected)
Disconnect();

Connect().ConfigureAwait(false);
_ = Connect();
}

public void CloseTab()
Expand Down
4 changes: 2 additions & 2 deletions Source/NETworkManager/Controls/PuTTYControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private void UserControl_Loaded(object sender, RoutedEventArgs e)
WindowHost.Height = (int)((ActualHeight - 20) * dpi.DpiScaleY);
WindowHost.Width = (int)((ActualWidth - 20) * dpi.DpiScaleX);

Connect().ConfigureAwait(false);
_ = Connect();

_initialized = true;
}
Expand Down Expand Up @@ -262,7 +262,7 @@ private void Reconnect()
if (IsConnected)
Disconnect();

Connect().ConfigureAwait(false);
_ = Connect();
}

public void RestartSession()
Expand Down
4 changes: 2 additions & 2 deletions Source/NETworkManager/Controls/TigerVNCControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private void UserControl_Loaded(object sender, RoutedEventArgs e)
WindowHost.Height = (int)(ActualHeight * dpi.DpiScaleY);
WindowHost.Width = (int)(ActualWidth * dpi.DpiScaleX);

Connect().ConfigureAwait(false);
_ = Connect();

_initialized = true;
}
Expand Down Expand Up @@ -233,7 +233,7 @@ private void Reconnect()
if (IsConnected)
Disconnect();

Connect().ConfigureAwait(false);
_ = Connect();
}

public void CloseTab()
Expand Down
9 changes: 4 additions & 5 deletions Source/NETworkManager/ProfileDialogManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using MahApps.Metro.SimpleChildWindow;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Controls;
using NETworkManager.Localization.Resources;
using NETworkManager.Models;
Expand Down Expand Up @@ -581,7 +581,7 @@ void CloseChild()
switch (instance.SelectedMethod.Method)
{
case ProfileImportSource.ActiveDirectory:
ShowSearchAdComputersDialog(parentWindow, viewModel, targetGroup, previousState: null).ConfigureAwait(false);
_ = ShowSearchAdComputersDialog(parentWindow, viewModel, targetGroup, previousState: null);
break;
}
}, _ => CloseChild());
Expand Down Expand Up @@ -614,10 +614,9 @@ void CloseChild()
{
CloseChild();

ShowImportProfilesResultDialog(parentWindow, viewModel, targetGroup, candidates,
_ = ShowImportProfilesResultDialog(parentWindow, viewModel, targetGroup, candidates,
ProfileImportSource.ActiveDirectory, Strings.ImportProfiles_Source_ActiveDirectory,
backToSourceCallback: () => ShowSearchAdComputersDialog(parentWindow, viewModel, targetGroup, searchViewModel).ConfigureAwait(false)
).ConfigureAwait(false);
backToSourceCallback: () => _ = ShowSearchAdComputersDialog(parentWindow, viewModel, targetGroup, searchViewModel));
}, CloseChild, previousState);

childWindow.Title = Strings.ImportComputersFromActiveDirectory;
Expand Down
4 changes: 2 additions & 2 deletions Source/NETworkManager/ViewModels/BitCalculatorViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using log4net;
using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
Expand Down Expand Up @@ -197,7 +197,7 @@ private void CalculateAction()
/// <summary>
/// Gets the command to export the result.
/// </summary>
public ICommand ExportCommand => new RelayCommand(_ => ExportAction().ConfigureAwait(false));
public ICommand ExportCommand => new RelayCommand(parameter => { _ = ExportAction(); });

/// <summary>
/// Action to export the result.
Expand Down
8 changes: 4 additions & 4 deletions Source/NETworkManager/ViewModels/ConnectionsViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using log4net;
using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization;
Expand Down Expand Up @@ -65,7 +65,7 @@ public ConnectionsViewModel()
};

// Get connections
Refresh(true).ConfigureAwait(false);
_ = Refresh(true);

// Auto refresh
_autoRefreshTimer.Tick += AutoRefreshTimer_Tick;
Expand Down Expand Up @@ -303,7 +303,7 @@ public string StatusMessage
/// <summary>
/// Gets the command to refresh the connections.
/// </summary>
public ICommand RefreshCommand => new RelayCommand(_ => RefreshAction().ConfigureAwait(false), Refresh_CanExecute);
public ICommand RefreshCommand => new RelayCommand(parameter => { _ = RefreshAction(); }, Refresh_CanExecute);

/// <summary>
/// Checks if the refresh command can be executed.
Expand Down Expand Up @@ -332,7 +332,7 @@ private async Task RefreshAction()
/// <summary>
/// Gets the command to export the connections.
/// </summary>
public ICommand ExportCommand => new RelayCommand(_ => ExportAction().ConfigureAwait(false));
public ICommand ExportCommand => new RelayCommand(parameter => { _ = ExportAction(); });

/// <summary>
/// Action to export the connections.
Expand Down
23 changes: 9 additions & 14 deletions Source/NETworkManager/ViewModels/DNSLookupHostViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Dragablz;
using Dragablz;
using NETworkManager.Controls;
using NETworkManager.Localization.Resources;
using NETworkManager.Models;
Expand Down Expand Up @@ -378,9 +378,8 @@ private void LookupProfileAction()
/// </summary>
private void AddProfileAction()
{
ProfileDialogManager
.ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.DNSLookup)
.ConfigureAwait(false);
_ = ProfileDialogManager
.ShowAddProfileDialog(Application.Current.MainWindow, this, null, null, ApplicationName.DNSLookup);
}

/// <summary>
Expand All @@ -401,8 +400,7 @@ private bool ModifyProfile_CanExecute(object obj)
/// </summary>
private void EditProfileAction()
{
ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
.ConfigureAwait(false);
_ = ProfileDialogManager.ShowEditProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}

/// <summary>
Expand All @@ -415,8 +413,7 @@ private void EditProfileAction()
/// </summary>
private void CopyAsProfileAction()
{
ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile)
.ConfigureAwait(false);
_ = ProfileDialogManager.ShowCopyAsProfileDialog(Application.Current.MainWindow, this, SelectedProfile);
}

/// <summary>
Expand All @@ -429,9 +426,8 @@ private void CopyAsProfileAction()
/// </summary>
private void DeleteProfileAction()
{
ProfileDialogManager
.ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List<ProfileInfo> { SelectedProfile })
.ConfigureAwait(false);
_ = ProfileDialogManager
.ShowDeleteProfileDialog(Application.Current.MainWindow, this, new List<ProfileInfo> { SelectedProfile });
}

/// <summary>
Expand All @@ -444,9 +440,8 @@ private void DeleteProfileAction()
/// </summary>
private void EditGroupAction(object group)
{
ProfileDialogManager
.ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"))
.ConfigureAwait(false);
_ = ProfileDialogManager
.ShowEditGroupDialog(Application.Current.MainWindow, this, ProfileManager.GetGroupByName($"{group}"));
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DnsClient;
using DnsClient;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
using NETworkManager.Models.Network;
Expand Down Expand Up @@ -299,7 +299,7 @@ private void LoadSettings()
/// </summary>
private void AddDNSServerAction()
{
AddDNSServer().ConfigureAwait(false);
_ = AddDNSServer();
}

/// <summary>
Expand All @@ -312,7 +312,7 @@ private void AddDNSServerAction()
/// </summary>
private void EditDNSServerAction()
{
EditDNSServer().ConfigureAwait(false);
_ = EditDNSServer();
}

/// <summary>
Expand All @@ -325,7 +325,7 @@ private void EditDNSServerAction()
/// </summary>
private void DeleteDNSServerAction()
{
DeleteDNSServer().ConfigureAwait(false);
_ = DeleteDNSServer();
}

#endregion
Expand Down
8 changes: 4 additions & 4 deletions Source/NETworkManager/ViewModels/DNSLookupViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DnsClient;
using DnsClient;
using log4net;
using MahApps.Metro.Controls;
using MahApps.Metro.SimpleChildWindow;
Expand Down Expand Up @@ -288,7 +288,7 @@ public void OnLoaded()
return;

if (!string.IsNullOrEmpty(Host))
QueryAsync().ConfigureAwait(false);
_ = QueryAsync();

_firstLoad = false;
}
Expand Down Expand Up @@ -343,7 +343,7 @@ private bool Query_CanExecute(object parameter)
private void QueryAction()
{
if (!IsRunning)
QueryAsync().ConfigureAwait(false);
_ = QueryAsync();
}

/// <summary>
Expand All @@ -356,7 +356,7 @@ private void QueryAction()
/// </summary>
private void ExportAction()
{
Export().ConfigureAwait(false);
_ = Export();
}

#endregion
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using log4net;
using log4net;
using MahApps.Metro.SimpleChildWindow;
using NETworkManager.Localization.Resources;
using NETworkManager.Models.Export;
Expand Down Expand Up @@ -275,7 +275,7 @@ private void LoadSettings()
/// <summary>
/// Gets the command to restart the application as administrator.
/// </summary>
public ICommand RestartAsAdminCommand => new RelayCommand(_ => RestartAsAdminAction().ConfigureAwait(false));
public ICommand RestartAsAdminCommand => new RelayCommand(parameter => { _ = RestartAsAdminAction(); });

/// <summary>
/// Action to restart the application as administrator.
Expand All @@ -295,7 +295,7 @@ private async Task RestartAsAdminAction()
/// <summary>
/// Gets the command to start the capture.
/// </summary>
public ICommand CaptureCommand => new RelayCommand(_ => CaptureAction().ConfigureAwait(false), Capture_CanExecute);
public ICommand CaptureCommand => new RelayCommand(parameter => { _ = CaptureAction(); }, Capture_CanExecute);

private bool Capture_CanExecute(object _) => ConfigurationManager.Current.IsAdmin && !IsCapturing;

Expand Down Expand Up @@ -337,7 +337,7 @@ private async Task CaptureAction()
/// <summary>
/// Gets the command to export the result.
/// </summary>
public ICommand ExportCommand => new RelayCommand(_ => ExportAction().ConfigureAwait(false));
public ICommand ExportCommand => new RelayCommand(parameter => { _ = ExportAction(); });

/// <summary>
/// Action to export the result.
Expand Down
Loading
Loading