Projects STRLCPY NETworkManager Commits dd1daeeb
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■
    Source/NETworkManager/Controls/DragablzTabHostWindow.xaml.cs
    skipped 9 lines
    10 10  using MahApps.Metro.Controls.Dialogs;
    11 11  using NETworkManager.Localization.Translators;
    12 12  using NETworkManager.Models;
     13 +using System.Threading.Tasks;
    13 14   
    14 15  namespace NETworkManager.Controls
    15 16  {
    skipped 161 lines
    177 178   {
    178 179   ConfigurationManager.Current.FixAirspace = true;
    179 180   
    180  - await this.ShowMessageAsync(NETworkManager.Localization.Resources.Strings.Error, string.Format("{0}\n\nMessage:\n{1}", NETworkManager.Localization.Resources.Strings.CouldNotSendKeystroke, ex.Message, MessageDialogStyle.Affirmative, AppearanceManager.MetroDialog));
     181 + await this.ShowMessageAsync(Localization.Resources.Strings.Error, string.Format("{0}\n\nMessage:\n{1}", NETworkManager.Localization.Resources.Strings.CouldNotSendKeystroke, ex.Message, MessageDialogStyle.Affirmative, AppearanceManager.MetroDialog));
    181 182   
    182 183   ConfigurationManager.Current.FixAirspace = false;
    183 184   }
    skipped 89 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/Controls/PowerShellControl.xaml.cs
    skipped 116 lines
    117 117   #endregion
    118 118   
    119 119   #region Methods
    120  - private async void Connect()
     120 + private async Task Connect()
    121 121   {
    122 122   IsConnecting = true;
    123 123   
    124 124   var info = new ProcessStartInfo
    125 125   {
    126 126   FileName = _sessionInfo.ApplicationFilePath,
    127  - Arguments = Models.PowerShell.PowerShell.BuildCommandLine(_sessionInfo)
     127 + Arguments = PowerShell.BuildCommandLine(_sessionInfo)
    128 128   };
    129 129   
    130 130   try
    skipped 137 lines
  • ■ ■ ■ ■
    Source/NETworkManager/Controls/PuTTYControl.xaml.cs
    skipped 118 lines
    119 119   #endregion
    120 120   
    121 121   #region Methods
    122  - private async void Connect()
     122 + private async Task Connect()
    123 123   {
    124 124   IsConnecting = true;
    125 125   
    skipped 162 lines
  • ■ ■ ■ ■
    Source/NETworkManager/Controls/RemoteDesktopControl.xaml.cs
    skipped 445 lines
    446 446   InitiateReconnection();
    447 447   }
    448 448   
    449  - private async void InitiateReconnection()
     449 + private async Task InitiateReconnection()
    450 450   {
    451 451   IsReconnecting = true;
    452 452   
    skipped 13 lines
  • ■ ■ ■ ■
    Source/NETworkManager/Controls/TightVNCControl.xaml.cs
    skipped 117 lines
    118 118   #endregion
    119 119   
    120 120   #region Methods
    121  - private async void Connect()
     121 + private async Task Connect()
    122 122   {
    123 123   IsConnecting = true;
    124 124   
    skipped 153 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/MainWindow.xaml.cs
    skipped 27 lines
    28 28  using NETworkManager.Models;
    29 29  using NETworkManager.Models.EventSystem;
    30 30  using System.Windows.Threading;
     31 +using System.Threading.Tasks;
    31 32   
    32 33  namespace NETworkManager
    33 34  {
    skipped 847 lines
    881 882   OpenSettings();
    882 883   }
    883 884   
    884  - private async void CloseSettings()
     885 + private async Task CloseSettings()
    885 886   {
    886 887   ShowSettingsView = false;
    887 888   
    skipped 55 lines
    943 944   #endregion
    944 945   
    945 946   #region Profiles
    946  - private async void LoadProfile(ProfileFileInfo info)
     947 + private async Task LoadProfile(ProfileFileInfo info)
    947 948   {
    948 949   if (info.IsEncrypted && !info.IsPasswordValid)
    949 950   {
    skipped 29 lines
    979 980   }
    980 981   }
    981 982   
    982  - private async void SwitchProfile(ProfileFileInfo info)
     983 + private async Task SwitchProfile(ProfileFileInfo info)
    983 984   {
    984 985   try
    985 986   {
    skipped 403 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ProfileDialogManager.cs
    skipped 1 lines
    2 2  using NETworkManager.Profiles;
    3 3  using NETworkManager.ViewModels;
    4 4  using NETworkManager.Views;
     5 +using System.Threading.Tasks;
    5 6   
    6 7  namespace NETworkManager
    7 8  {
    skipped 1 lines
    9 10   {
    10 11   
    11 12   #region Add profile, Edit profile, CopyAs profile, Delete profile, Edit group
    12  - public static async void ShowAddProfileDialog(IProfileManager viewModel, IDialogCoordinator dialogCoordinator)
     13 + public static async Task ShowAddProfileDialog(IProfileManager viewModel, IDialogCoordinator dialogCoordinator)
    13 14   {
    14 15   var customDialog = new CustomDialog
    15 16   {
    skipped 22 lines
    38 39   await dialogCoordinator.ShowMetroDialogAsync(viewModel, customDialog);
    39 40   }
    40 41   
    41  - public static async void ShowEditProfileDialog(IProfileManager viewModel, IDialogCoordinator dialogCoordinator, ProfileInfo selectedProfile)
     42 + public static async Task ShowEditProfileDialog(IProfileManager viewModel, IDialogCoordinator dialogCoordinator, ProfileInfo selectedProfile)
    42 43   {
    43 44   var customDialog = new CustomDialog
    44 45   {
    skipped 23 lines
    68 69   await dialogCoordinator.ShowMetroDialogAsync(viewModel, customDialog);
    69 70   }
    70 71   
    71  - public static async void ShowCopyAsProfileDialog(IProfileManager viewModel, IDialogCoordinator dialogCoordinator, ProfileInfo selectedProfile)
     72 + public static async Task ShowCopyAsProfileDialog(IProfileManager viewModel, IDialogCoordinator dialogCoordinator, ProfileInfo selectedProfile)
    72 73   {
    73 74   var customDialog = new CustomDialog
    74 75   {
    skipped 21 lines
    96 97   await dialogCoordinator.ShowMetroDialogAsync(viewModel, customDialog);
    97 98   }
    98 99   
    99  - public static async void ShowDeleteProfileDialog(IProfileManager viewModel, IDialogCoordinator dialogCoordinator, ProfileInfo selectedProfile)
     100 + public static async Task ShowDeleteProfileDialog(IProfileManager viewModel, IDialogCoordinator dialogCoordinator, ProfileInfo selectedProfile)
    100 101   {
    101 102   var customDialog = new CustomDialog
    102 103   {
    skipped 21 lines
    124 125   await dialogCoordinator.ShowMetroDialogAsync(viewModel, customDialog);
    125 126   }
    126 127   
    127  - public static async void ShowEditGroupDialog(IProfileManager viewModel, IDialogCoordinator dialogCoordinator, string group)
     128 + public static async Task ShowEditGroupDialog(IProfileManager viewModel, IDialogCoordinator dialogCoordinator, string group)
    128 129   {
    129 130   var customDialog = new CustomDialog
    130 131   {
    skipped 172 lines
  • ■ ■ ■ ■
    Source/NETworkManager/StatusWindow.xaml.cs
    skipped 150 lines
    151 151   #endregion
    152 152   
    153 153   #region Methods
    154  - private async void Refresh(bool startTimer = false)
     154 + private async Task Refresh(bool startTimer = false)
    155 155   {
    156 156   IsRefreshing = true;
    157 157   
    skipped 130 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/ARPTableViewModel.cs
    skipped 213 lines
    214 214   Run();
    215 215   }
    216 216   
    217  - private async void Run()
     217 + private async Task Run()
    218 218   {
    219 219   await Refresh();
    220 220   
    skipped 15 lines
    236 236   return Application.Current.MainWindow != null && !((MetroWindow)Application.Current.MainWindow).IsAnyDialogOpen;
    237 237   }
    238 238   
    239  - private async void RefreshAction()
     239 + private async Task RefreshAction()
    240 240   {
    241 241   IsStatusMessageDisplayed = false;
    242 242   
    skipped 7 lines
    250 250   return Application.Current.MainWindow != null && !((MetroWindow)Application.Current.MainWindow).IsAnyDialogOpen;
    251 251   }
    252 252   
    253  - private async void DeleteTableAction()
     253 + private async Task DeleteTableAction()
    254 254   {
    255 255   IsStatusMessageDisplayed = false;
    256 256   
    skipped 18 lines
    275 275   
    276 276   private bool DeleteEntry_CanExecute(object paramter) => Application.Current.MainWindow != null && !((MetroWindow)Application.Current.MainWindow).IsAnyDialogOpen;
    277 277   
    278  - private async void DeleteEntryAction()
     278 + private async Task DeleteEntryAction()
    279 279   {
    280 280   IsStatusMessageDisplayed = false;
    281 281   
    skipped 18 lines
    300 300   
    301 301   private bool AddEntry_CanExecute(object paramter) => Application.Current.MainWindow != null && !((MetroWindow)Application.Current.MainWindow).IsAnyDialogOpen;
    302 302   
    303  - private async void AddEntryAction()
     303 + private async Task AddEntryAction()
    304 304   {
    305 305   IsStatusMessageDisplayed = false;
    306 306   
    skipped 57 lines
    364 364   
    365 365   public ICommand ExportCommand => new RelayCommand(p => ExportAction());
    366 366   
    367  - private async void ExportAction()
     367 + private async Task ExportAction()
    368 368   {
    369 369   var customDialog = new CustomDialog
    370 370   {
    skipped 113 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/ConnectionsViewModel.cs
    skipped 213 lines
    214 214   Run();
    215 215   }
    216 216   
    217  - private async void Run()
     217 + private async Task Run()
    218 218   {
    219 219   await Refresh();
    220 220   
    skipped 15 lines
    236 236   return Application.Current.MainWindow != null && !((MetroWindow)Application.Current.MainWindow).IsAnyDialogOpen;
    237 237   }
    238 238   
    239  - private async void RefreshAction()
     239 + private async Task RefreshAction()
    240 240   {
    241 241   IsStatusMessageDisplayed = false;
    242 242   
    skipped 44 lines
    287 287   
    288 288   public ICommand ExportCommand => new RelayCommand(p => ExportAction());
    289 289   
    290  - private async void ExportAction()
     290 + private async Task ExportAction()
    291 291   {
    292 292   var customDialog = new CustomDialog
    293 293   {
    skipped 106 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/DNSLookupSettingsViewModel.cs
    skipped 8 lines
    9 9  using NETworkManager.Models.Network;
    10 10  using NETworkManager.Views;
    11 11  using DnsClient;
     12 +using System.Threading.Tasks;
    12 13   
    13 14  namespace NETworkManager.ViewModels
    14 15  {
    skipped 255 lines
    270 271   #endregion
    271 272   
    272 273   #region Methods
    273  - 
    274  - public async void AddDNSServer()
     274 + public async Task AddDNSServer()
    275 275   {
    276 276   var customDialog = new CustomDialog
    277 277   {
    skipped 18 lines
    296 296   await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
    297 297   }
    298 298   
    299  - public async void EditDNSServer()
     299 + public async Task EditDNSServer()
    300 300   {
    301 301   var customDialog = new CustomDialog
    302 302   {
    skipped 19 lines
    322 322   await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
    323 323   }
    324 324   
    325  - public async void DeleteDNSServer()
     325 + public async Task DeleteDNSServer()
    326 326   {
    327 327   var customDialog = new CustomDialog
    328 328   {
    skipped 23 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/DNSLookupViewModel.cs
    skipped 17 lines
    18 18  using NETworkManager.Models.Export;
    19 19  using NETworkManager.Views;
    20 20  using DnsClient;
     21 +using System.Threading.Tasks;
    21 22   
    22 23  namespace NETworkManager.ViewModels
    23 24  {
    skipped 270 lines
    294 295   
    295 296   public ICommand ExportCommand => new RelayCommand(p => ExportAction());
    296 297   
    297  - private async void ExportAction()
     298 + private async Task ExportAction()
    298 299   {
    299 300   var customDialog = new CustomDialog
    300 301   {
    skipped 170 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/DiscoveryProtocolViewModel.cs
    skipped 283 lines
    284 284   _isLoading = false;
    285 285   }
    286 286   
    287  - private async void LoadNetworkInterfaces()
     287 + private async Task LoadNetworkInterfaces()
    288 288   {
    289 289   IsNetworkInterfaceLoading = true;
    290 290   
    skipped 24 lines
    315 315   
    316 316   private bool ReloadNetworkInterfaces_CanExecute(object obj) => !IsNetworkInterfaceLoading && Application.Current.MainWindow != null && !((MetroWindow)Application.Current.MainWindow).IsAnyDialogOpen;
    317 317   
    318  - private async void ReloadNetworkInterfacesAction()
     318 + private async Task ReloadNetworkInterfacesAction()
    319 319   {
    320 320   IsNetworkInterfaceLoading = true;
    321 321   
    skipped 14 lines
    336 336   
    337 337   public ICommand OpenNetworkConnectionsCommand => new RelayCommand(p => OpenNetworkConnectionsAction());
    338 338   
    339  - public async void OpenNetworkConnectionsAction()
     339 + public async Task OpenNetworkConnectionsAction()
    340 340   {
    341 341   try
    342 342   {
    skipped 7 lines
    350 350   
    351 351   public ICommand RestartAsAdminCommand => new RelayCommand(p => RestartAsAdminAction());
    352 352   
    353  - public async void RestartAsAdminAction()
     353 + public async Task RestartAsAdminAction()
    354 354   {
    355 355   try
    356 356   {
    skipped 7 lines
    364 364   
    365 365   public ICommand CaptureCommand => new RelayCommand(p => CaptureAction());
    366 366   
    367  - public async void CaptureAction()
     367 + public async Task CaptureAction()
    368 368   {
    369 369   if (FirstRun)
    370 370   FirstRun = false;
    skipped 91 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/IPScannerViewModel.cs
    skipped 25 lines
    26 26  using NETworkManager.Localization.Translators;
    27 27  using NETworkManager.Models;
    28 28  using NETworkManager.Models.EventSystem;
     29 +using System.Threading.Tasks;
    29 30   
    30 31  namespace NETworkManager.ViewModels
    31 32  {
    skipped 293 lines
    325 326   
    326 327   public ICommand AddProfileSelectedHostCommand => new RelayCommand(p => AddProfileSelectedHostAction());
    327 328   
    328  - private async void AddProfileSelectedHostAction()
     329 + private async Task AddProfileSelectedHostAction()
    329 330   {
    330 331   ProfileInfo profileInfo = new ProfileInfo()
    331 332   {
    skipped 97 lines
    429 430   StartScan();
    430 431   }
    431 432   
    432  - private async void StartScan()
     433 + private async Task StartScan()
    433 434   {
    434 435   IsStatusMessageDisplayed = false;
    435 436   IsScanRunning = true;
    skipped 99 lines
    535 536   IsScanRunning = false;
    536 537   }
    537 538   
    538  - private async void DetectIPRange()
     539 + private async Task DetectIPRange()
    539 540   {
    540 541   IsSubnetDetectionRunning = true;
    541 542   
    skipped 31 lines
    573 574   IsSubnetDetectionRunning = false;
    574 575   }
    575 576   
    576  - private async void CustomCommand(object guid)
     577 + private async Task CustomCommand(object guid)
    577 578   {
    578 579   if (guid is Guid id)
    579 580   {
    skipped 39 lines
    619 620   list.ForEach(x => SettingsManager.Current.IPScanner_HostsHistory.Add(x));
    620 621   }
    621 622   
    622  - private async void Export()
     623 + private async Task Export()
    623 624   {
    624 625   var customDialog = new CustomDialog
    625 626   {
    skipped 93 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/ListenersViewModel.cs
    skipped 216 lines
    217 217   Run();
    218 218   }
    219 219   
    220  - private async void Run()
     220 + private async Task Run()
    221 221   {
    222 222   await Refresh();
    223 223   
    skipped 13 lines
    237 237   
    238 238   private bool Refresh_CanExecute(object paramter) => Application.Current.MainWindow != null && !((MetroWindow)Application.Current.MainWindow).IsAnyDialogOpen;
    239 239   
    240  - private async void RefreshAction()
     240 + private async Task RefreshAction()
    241 241   {
    242 242   IsStatusMessageDisplayed = false;
    243 243   
    skipped 23 lines
    267 267   
    268 268   public ICommand ExportCommand => new RelayCommand(p => ExportAction());
    269 269   
    270  - private async void ExportAction()
     270 + private async Task ExportAction()
    271 271   {
    272 272   var customDialog = new CustomDialog
    273 273   {
    skipped 104 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/LookupOUILookupViewModel.cs
    skipped 14 lines
    15 15  using NETworkManager.Models.Export;
    16 16  using NETworkManager.Utilities;
    17 17  using NETworkManager.Views;
     18 +using System.Threading.Tasks;
    18 19   
    19 20  namespace NETworkManager.ViewModels
    20 21  {
    skipped 179 lines
    200 201   
    201 202   public ICommand ExportCommand => new RelayCommand(p => ExportAction());
    202 203   
    203  - private async void ExportAction()
     204 + private async Task ExportAction()
    204 205   {
    205 206   var customDialog = new CustomDialog
    206 207   {
    skipped 48 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/LookupPortViewModel.cs
    skipped 13 lines
    14 14  using NETworkManager.Models.Export;
    15 15  using NETworkManager.Utilities;
    16 16  using NETworkManager.Views;
     17 +using System.Threading.Tasks;
    17 18   
    18 19  namespace NETworkManager.ViewModels
    19 20  {
    skipped 119 lines
    139 140   
    140 141   private bool PortLookup_CanExecute(object parameter) => Application.Current.MainWindow != null && !((MetroWindow)Application.Current.MainWindow).IsAnyDialogOpen && !PortOrServiceHasError;
    141 142   
    142  - private async void PortLookupAction()
     143 + private async Task PortLookupAction()
    143 144   {
    144 145   IsLookupRunning = true;
    145 146   
    skipped 103 lines
    249 250   
    250 251   public ICommand ExportCommand => new RelayCommand(p => ExportAction());
    251 252   
    252  - private async void ExportAction()
     253 + private async Task ExportAction()
    253 254   {
    254 255   var customDialog = new CustomDialog
    255 256   {
    skipped 48 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/NetworkInterfaceViewModel.cs
    skipped 580 lines
    581 581   public Func<double, string> FormatterSpeed { get; set; }
    582 582   public SeriesCollection Series { get; set; }
    583 583   
    584  - private async void LoadNetworkInterfaces()
     584 + private async Task LoadNetworkInterfaces()
    585 585   {
    586 586   IsNetworkInterfaceLoading = true;
    587 587   
    skipped 25 lines
    613 613   
    614 614   private bool ReloadNetworkInterfaces_CanExecute(object obj) => !IsNetworkInterfaceLoading && Application.Current.MainWindow != null && !((MetroWindow)Application.Current.MainWindow).IsAnyDialogOpen;
    615 615   
    616  - private async void ReloadNetworkInterfacesAction()
     616 + private async Task ReloadNetworkInterfacesAction()
    617 617   {
    618 618   IsNetworkInterfaceLoading = true;
    619 619   
    skipped 16 lines
    636 636   
    637 637   private bool OpenNetworkConnections_CanExecute(object paramter) => Application.Current.MainWindow != null && !((MetroWindow)Application.Current.MainWindow).IsAnyDialogOpen;
    638 638   
    639  - public async void OpenNetworkConnectionsAction()
     639 + public async Task OpenNetworkConnectionsAction()
    640 640   {
    641 641   try
    642 642   {
    skipped 66 lines
    709 709   
    710 710   private bool FlushDNS_CanExecute(object paramter) => Application.Current.MainWindow != null && !((MetroWindow)Application.Current.MainWindow).IsAnyDialogOpen;
    711 711   
    712  - private async void FlushDNSAction()
     712 + private async Task FlushDNSAction()
    713 713   {
    714 714   IsConfigurationRunning = true;
    715 715   IsStatusMessageDisplayed = false;
    skipped 14 lines
    730 730   
    731 731   private bool ReleaseRenew_CanExecute(object paramter) => Application.Current.MainWindow != null && !((MetroWindow)Application.Current.MainWindow).IsAnyDialogOpen;
    732 732   
    733  - private async void ReleaseRenewAction()
     733 + private async Task ReleaseRenewAction()
    734 734   {
    735 735   IsConfigurationRunning = true;
    736 736   
    skipped 6 lines
    743 743   
    744 744   private bool Release_CanExecute(object paramter) => Application.Current.MainWindow != null && !((MetroWindow)Application.Current.MainWindow).IsAnyDialogOpen;
    745 745   
    746  - private async void ReleaseAction()
     746 + private async Task ReleaseAction()
    747 747   {
    748 748   IsConfigurationRunning = true;
    749 749   
    skipped 6 lines
    756 756   
    757 757   private bool Renew_CanExecute(object paramter) => Application.Current.MainWindow != null && !((MetroWindow)Application.Current.MainWindow).IsAnyDialogOpen;
    758 758   
    759  - private async void RenewAction()
     759 + private async Task RenewAction()
    760 760   {
    761 761   IsConfigurationRunning = true;
    762 762   
    skipped 6 lines
    769 769   
    770 770   private bool AddIPv4Address_CanExecute(object paramter) => Application.Current.MainWindow != null && !((MetroWindow)Application.Current.MainWindow).IsAnyDialogOpen;
    771 771   
    772  - private async void AddIPv4AddressAction()
     772 + private async Task AddIPv4AddressAction()
    773 773   {
    774 774   var customDialog = new CustomDialog
    775 775   {
    skipped 48 lines
    824 824   ConfigSecondaryDNSServer = dnsServers.Count > 1 ? dnsServers[1].ToString() : string.Empty;
    825 825   }
    826 826   }
    827  - public async void ApplyConfiguration()
     827 + public async Task ApplyConfiguration()
    828 828   {
    829 829   IsConfigurationRunning = true;
    830 830   IsStatusMessageDisplayed = false;
    skipped 48 lines
    879 879   }
    880 880   }
    881 881   
    882  - public async void AddIPv4Address(string ipAddress, string subnetmaskOrCidr)
     882 + public async Task AddIPv4Address(string ipAddress, string subnetmaskOrCidr)
    883 883   {
    884 884   IsConfigurationRunning = true;
    885 885   IsStatusMessageDisplayed = false;
    skipped 28 lines
    914 914   }
    915 915   }
    916 916   
    917  - public async void ApplyProfileConfig()
     917 + public async Task ApplyProfileConfig()
    918 918   {
    919 919   IsConfigurationRunning = true;
    920 920   IsStatusMessageDisplayed = false;
    skipped 240 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/PingMonitorHostViewModel.cs
    skipped 12 lines
    13 13  using System.Net;
    14 14  using NETworkManager.Profiles;
    15 15  using System.Windows.Threading;
     16 +using System.Threading.Tasks;
    16 17   
    17 18  namespace NETworkManager.ViewModels
    18 19  {
    skipped 323 lines
    342 343   #endregion
    343 344   
    344 345   #region Methods
    345  - public async void AddHost(string host)
     346 + public async Task AddHost(string host)
    346 347   {
    347 348   IsWorking = true;
    348 349   IsStatusMessageDisplayed = false;
    skipped 142 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/PingMonitorViewModel.cs
    skipped 14 lines
    15 15  using NETworkManager.Views;
    16 16  using NETworkManager.Models.Export;
    17 17  using System.Collections.ObjectModel;
     18 +using System.Threading.Tasks;
    18 19   
    19 20  namespace NETworkManager.ViewModels
    20 21  {
    skipped 260 lines
    281 282   }
    282 283   }
    283 284   
    284  - public async void Export()
     285 + public async Task Export()
    285 286   {
    286 287   var customDialog = new CustomDialog
    287 288   {
    skipped 98 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/PortScannerSettingsViewModel.cs
    skipped 5 lines
    6 6  using System.Windows.Input;
    7 7  using MahApps.Metro.Controls.Dialogs;
    8 8  using NETworkManager.Views;
     9 +using System.Threading.Tasks;
    9 10   
    10 11  namespace NETworkManager.ViewModels
    11 12  {
    skipped 157 lines
    169 170   
    170 171   
    171 172   #region Methods
    172  -
    173  - 
    174  - public async void AddPortProfile()
     173 + public async Task AddPortProfile()
    175 174   {
    176 175   var customDialog = new CustomDialog
    177 176   {
    skipped 18 lines
    196 195   await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
    197 196   }
    198 197   
    199  - public async void EditPortProfile()
     198 + public async Task EditPortProfile()
    200 199   {
    201 200   var customDialog = new CustomDialog
    202 201   {
    skipped 19 lines
    222 221   await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
    223 222   }
    224 223   
    225  - public async void DeletePortProfile()
     224 + public async Task DeletePortProfile()
    226 225   {
    227 226   var customDialog = new CustomDialog
    228 227   {
    skipped 23 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/PortScannerViewModel.cs
    skipped 19 lines
    20 20  using NETworkManager.Models.Export;
    21 21  using NETworkManager.Views;
    22 22  using NETworkManager.Localization.Translators;
     23 +using System.Threading.Tasks;
    23 24   
    24 25  namespace NETworkManager.ViewModels
    25 26  {
    skipped 324 lines
    350 351   #endregion
    351 352   
    352 353   #region Methods
    353  - private async void OpenPortProfileSelection()
     354 + private async Task OpenPortProfileSelection()
    354 355   {
    355 356   var customDialog = new CustomDialog
    356 357   {
    skipped 18 lines
    375 376   await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
    376 377   }
    377 378   
    378  - private async void StartScan()
     379 + private async Task StartScan()
    379 380   {
    380 381   _isLoading = true;
    381 382   
    skipped 90 lines
    472 473   IsScanRunning = false;
    473 474   }
    474 475   
    475  - private async void Export()
     476 + private async Task Export()
    476 477   {
    477 478   var customDialog = new CustomDialog
    478 479   {
    skipped 130 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/PowerShellHostViewModel.cs
    skipped 17 lines
    18 18  using System.Windows.Threading;
    19 19  using NETworkManager.Models;
    20 20  using NETworkManager.Models.EventSystem;
     21 +using System.Threading.Tasks;
    21 22   
    22 23  namespace NETworkManager.ViewModels
    23 24  {
    skipped 299 lines
    323 324   IsConfigured = !string.IsNullOrEmpty(SettingsManager.Current.PowerShell_ApplicationFilePath) && File.Exists(SettingsManager.Current.PowerShell_ApplicationFilePath);
    324 325   }
    325 326   
    326  - private async void Connect(string host = null)
     327 + private async Task Connect(string host = null)
    327 328   {
    328 329   var customDialog = new CustomDialog
    329 330   {
    skipped 162 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/PowerShellSettingsViewModel.cs
    skipped 7 lines
    8 8  using System.Linq;
    9 9  using System.Windows.Input;
    10 10  using NETworkManager.Models.PowerShell;
    11  -using NETworkManager.Settings;
     11 +using System.Threading.Tasks;
    12 12   
    13 13  namespace NETworkManager.ViewModels
    14 14  {
    skipped 137 lines
    152 152   #endregion
    153 153   
    154 154   #region Methods
    155  - private async void Configure()
     155 + private async Task Configure()
    156 156   {
    157 157   try
    158 158   {
    skipped 21 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/ProfilesViewModel.cs
    skipped 10 lines
    11 11  using System.Windows.Threading;
    12 12  using NETworkManager.Profiles;
    13 13  using NETworkManager.Settings;
     14 +using System.Threading.Tasks;
    14 15   
    15 16  namespace NETworkManager.ViewModels
    16 17  {
    skipped 140 lines
    157 158   #endregion
    158 159   
    159 160   #region Methods
    160  - public async void AddProfile()
     161 + public async Task AddProfile()
    161 162   {
    162 163   var customDialog = new CustomDialog
    163 164   {
    skipped 18 lines
    182 183   await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
    183 184   }
    184 185   
    185  - public async void EditProfile()
     186 + public async Task EditProfile()
    186 187   {
    187 188   var customDialog = new CustomDialog
    188 189   {
    skipped 20 lines
    209 210   await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
    210 211   }
    211 212   
    212  - public async void CopyAsProfile()
     213 + public async Task CopyAsProfile()
    213 214   {
    214 215   var customDialog = new CustomDialog
    215 216   {
    skipped 18 lines
    234 235   await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
    235 236   }
    236 237   
    237  - public async void DeleteProfile()
     238 + public async Task DeleteProfile()
    238 239   {
    239 240   var customDialog = new CustomDialog
    240 241   {
    skipped 21 lines
    262 263   await _dialogCoordinator.ShowMetroDialogAsync(this, customDialog);
    263 264   }
    264 265   
    265  - public async void EditGroup(object group)
     266 + public async Task EditGroup(object group)
    266 267   {
    267 268   var customDialog = new CustomDialog
    268 269   {
    skipped 22 lines
    291 292   
    292 293   public ICommand ResetProfilesCommand => new RelayCommand(p => ResetProfilesAction());
    293 294   
    294  - private async void ResetProfilesAction()
     295 + private async Task ResetProfilesAction()
    295 296   {
    296 297   var customDialog = new CustomDialog
    297 298   {
    skipped 59 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/PuTTYHostViewModel.cs
    skipped 17 lines
    18 18  using System.Windows.Threading;
    19 19  using NETworkManager.Models;
    20 20  using NETworkManager.Models.EventSystem;
     21 +using System.Threading.Tasks;
    21 22   
    22 23  namespace NETworkManager.ViewModels
    23 24  {
    skipped 327 lines
    351 352   IsConfigured = !string.IsNullOrEmpty(SettingsManager.Current.PuTTY_ApplicationFilePath) && File.Exists(SettingsManager.Current.PuTTY_ApplicationFilePath);
    352 353   }
    353 354   
    354  - private async void Connect(string host = null)
     355 + private async Task Connect(string host = null)
    355 356   {
    356 357   var customDialog = new CustomDialog
    357 358   {
    skipped 250 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/PuTTYSettingsViewModel.cs
    skipped 7 lines
    8 8  using NETworkManager.Models.PuTTY;
    9 9  using System.Collections.Generic;
    10 10  using System.Linq;
     11 +using System.Threading.Tasks;
    11 12   
    12 13  namespace NETworkManager.ViewModels
    13 14  {
    skipped 452 lines
    466 467   #endregion
    467 468   
    468 469   #region Methods
    469  - private async void Configure()
     470 + private async Task Configure()
    470 471   {
    471 472   try
    472 473   {
    skipped 47 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/RemoteDesktopHostViewModel.cs
    skipped 15 lines
    16 16  using NETworkManager.Profiles;
    17 17  using System.Windows.Threading;
    18 18  using NETworkManager.Models;
     19 +using System.Threading.Tasks;
    19 20   
    20 21  namespace NETworkManager.ViewModels
    21 22  {
    skipped 332 lines
    354 355   
    355 356   #region Methods
    356 357   // Connect via Dialog
    357  - private async void Connect(string host = null)
     358 + private async Task Connect(string host = null)
    358 359   {
    359 360   var customDialog = new CustomDialog
    360 361   {
    skipped 51 lines
    412 413   }
    413 414   
    414 415   // Connect via Profile with Credentials
    415  - private async void ConnectProfileAs()
     416 + private async Task ConnectProfileAs()
    416 417   {
    417 418   var profileInfo = SelectedProfile;
    418 419   
    skipped 149 lines
  • ■ ■ ■ ■
    Source/NETworkManager/ViewModels/SettingsAutostartViewModel.cs
    skipped 82 lines
    83 83   #endregion
    84 84   
    85 85   #region Methods
    86  - private async void EnableDisableAutostart(bool enable)
     86 + private async Task EnableDisableAutostart(bool enable)
    87 87   {
    88 88   ConfiguringAutostart = true;
    89 89   
    skipped 20 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/SettingsProfilesViewModel.cs
    skipped 121 lines
    122 122   
    123 123   public ICommand ChangeLocationCommand => new RelayCommand(p => ChangeLocationAction());
    124 124   
    125  - private async void ChangeLocationAction()
     125 + private async Task ChangeLocationAction()
    126 126   {
    127 127   MovingFiles = true;
    128 128   
    skipped 125 lines
    254 254   
    255 255   public ICommand AddProfileFileCommand => new RelayCommand(p => AddProfileFileAction());
    256 256   
    257  - private async void AddProfileFileAction()
     257 + private async Task AddProfileFileAction()
    258 258   {
    259 259   var customDialog = new CustomDialog
    260 260   {
    skipped 20 lines
    281 281   
    282 282   public ICommand EditProfileFileCommand => new RelayCommand(p => EditProfileFileAction());
    283 283   
    284  - private async void EditProfileFileAction()
     284 + private async Task EditProfileFileAction()
    285 285   {
    286 286   var customDialog = new CustomDialog
    287 287   {
    skipped 25 lines
    313 313   return ProfileFiles.Cast<ProfileFileInfo>().Count() > 1;
    314 314   }
    315 315   
    316  - private async void DeleteProfileFileAction()
     316 + private async Task DeleteProfileFileAction()
    317 317   {
    318 318   var customDialog = new CustomDialog
    319 319   {
    skipped 20 lines
    340 340   
    341 341   public ICommand EnableEncryptionCommand => new RelayCommand(p => EnableEncryptionAction());
    342 342   
    343  - private async void EnableEncryptionAction()
     343 + private async Task EnableEncryptionAction()
    344 344   {
    345 345   var settings = AppearanceManager.MetroDialog;
    346 346   
    skipped 39 lines
    386 386   
    387 387   public ICommand ChangeMasterPasswordCommand => new RelayCommand(p => ChangeMasterPasswordAction());
    388 388   
    389  - private async void ChangeMasterPasswordAction()
     389 + private async Task ChangeMasterPasswordAction()
    390 390   {
    391 391   var customDialog = new CustomDialog
    392 392   {
    skipped 38 lines
    431 431   
    432 432   public ICommand DisableEncryptionCommand => new RelayCommand(p => DisableEncryptionAction());
    433 433   
    434  - private async void DisableEncryptionAction()
     434 + private async Task DisableEncryptionAction()
    435 435   {
    436 436   var customDialog = new CustomDialog
    437 437   {
    skipped 51 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/SettingsSettingsViewModel.cs
    skipped 184 lines
    185 185   
    186 186   public ICommand ChangeLocationCommand => new RelayCommand(p => ChangeLocationAction());
    187 187   
    188  - private async void ChangeLocationAction()
     188 + private async Task ChangeLocationAction()
    189 189   {
    190 190   MovingFiles = true;
    191 191   
    skipped 84 lines
    276 276   
    277 277   public ICommand ImportSettingsCommand => new RelayCommand(p => ImportSettingsAction());
    278 278   
    279  - private async void ImportSettingsAction()
     279 + private async Task ImportSettingsAction()
    280 280   {
    281 281   var settings = AppearanceManager.MetroDialog;
    282 282   
    skipped 52 lines
    335 335   
    336 336   public ICommand ResetSettingsCommand => new RelayCommand(p => ResetSettingsAction());
    337 337   
    338  - public async void ResetSettingsAction()
     338 + public async Task ResetSettingsAction()
    339 339   {
    340 340   var settings = AppearanceManager.MetroDialog;
    341 341   
    skipped 53 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/SubnetCalculatorSubnettingViewModel.cs
    skipped 242 lines
    243 243   
    244 244   public ICommand ExportCommand => new RelayCommand(p => ExportAction());
    245 245   
    246  - private async void ExportAction()
     246 + private async Task ExportAction()
    247 247   {
    248 248   var customDialog = new CustomDialog
    249 249   {
    skipped 30 lines
    280 280   #endregion
    281 281   
    282 282   #region Methods
    283  - private async void Calculate()
     283 + private async Task Calculate()
    284 284   {
    285 285   IsStatusMessageDisplayed = false;
    286 286   IsCalculationRunning = true;
    skipped 87 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/TigerVNCHostViewModel.cs
    skipped 17 lines
    18 18  using System.Windows.Threading;
    19 19  using NETworkManager.Models;
    20 20  using NETworkManager.Models.EventSystem;
     21 +using System.Threading.Tasks;
    21 22   
    22 23  namespace NETworkManager.ViewModels
    23 24  {
    skipped 300 lines
    324 325   IsConfigured = !string.IsNullOrEmpty(SettingsManager.Current.TigerVNC_ApplicationFilePath) && File.Exists(SettingsManager.Current.TigerVNC_ApplicationFilePath);
    325 326   }
    326 327   
    327  - private async void Connect(string host = null)
     328 + private async Task Connect(string host = null)
    328 329   {
    329 330   var customDialog = new CustomDialog
    330 331   {
    skipped 172 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/TigerVNCSettingsViewModel.cs
    skipped 4 lines
    5 5  using System;
    6 6  using System.Diagnostics;
    7 7  using System.IO;
     8 +using System.Threading.Tasks;
    8 9  using System.Windows.Input;
    9 10   
    10 11  namespace NETworkManager.ViewModels
    skipped 99 lines
    110 111   #endregion
    111 112   
    112 113   #region Methods
    113  - private async void Configure()
     114 + private async Task Configure()
    114 115   {
    115 116   try
    116 117   {
    skipped 21 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/TracerouteViewModel.cs
    skipped 20 lines
    21 21  using NETworkManager.Views;
    22 22  using NETworkManager.Models;
    23 23  using NETworkManager.Models.EventSystem;
     24 +using System.Threading.Tasks;
    24 25   
    25 26  namespace NETworkManager.ViewModels
    26 27  {
    skipped 267 lines
    294 295   _cancellationTokenSource.Cancel();
    295 296   }
    296 297   
    297  - private async void StartTrace()
     298 + private async Task StartTrace()
    298 299   {
    299 300   IsStatusMessageDisplayed = false;
    300 301   IsTraceRunning = true;
    skipped 71 lines
    372 373   IsTraceRunning = false;
    373 374   }
    374 375   
    375  - private async void Export()
     376 + private async Task Export()
    376 377   {
    377 378   var customDialog = new CustomDialog
    378 379   {
    skipped 96 lines
  • ■ ■ ■ ■
    Source/NETworkManager/ViewModels/WakeOnLANViewModel.cs
    skipped 370 lines
    371 371   #endregion
    372 372   
    373 373   #region Methods
    374  - private async void WakeUp(WakeOnLANInfo info)
     374 + private async Task WakeUp(WakeOnLANInfo info)
    375 375   {
    376 376   IsStatusMessageDisplayed = false;
    377 377   IsSending = true;
    skipped 104 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/WebConsoleHostViewModel.cs
    skipped 16 lines
    17 17  using NETworkManager.Models;
    18 18  using NETworkManager.Models.EventSystem;
    19 19  using Microsoft.Web.WebView2.Core;
     20 +using System.Threading.Tasks;
    20 21   
    21 22  namespace NETworkManager.ViewModels
    22 23  {
    skipped 304 lines
    327 328   #endregion
    328 329   
    329 330   #region Methods
    330  - private async void Connect()
     331 + private async Task Connect()
    331 332   {
    332 333   var customDialog = new CustomDialog
    333 334   {
    skipped 140 lines
  • ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/WhoisViewModel.cs
    skipped 13 lines
    14 14  using NETworkManager.Models.Export;
    15 15  using NETworkManager.Localization.Resources;
    16 16  using NETworkManager.Views;
     17 +using System.Threading.Tasks;
    17 18   
    18 19  namespace NETworkManager.ViewModels
    19 20  {
    skipped 130 lines
    150 151   
    151 152   public ICommand ExportCommand => new RelayCommand(p => ExportAction());
    152 153   
    153  - private async void ExportAction()
     154 + private async Task ExportAction()
    154 155   {
    155 156   var customDialog = new CustomDialog
    156 157   {
    skipped 30 lines
    187 188   #endregion
    188 189   
    189 190   #region Methods
    190  - private async void Query()
     191 + private async Task Query()
    191 192   {
    192 193   IsStatusMessageDisplayed = false;
    193 194   IsWhoisRunning = true;
    skipped 66 lines
  • ■ ■ ■ ■ ■ ■
    Source/NETworkManager/ViewModels/WiFiViewModel.cs
    skipped 364 lines
    365 365   
    366 366   private bool ScanNetworks_CanExecute(object obj) => !IsAdaptersLoading && !IsNetworksLoading;
    367 367   
    368  - private async void ScanNetworksAction()
     368 + private async Task ScanNetworksAction()
    369 369   {
    370 370   await ScanNetworks(SelectedAdapter.WiFiAdapter, true);
    371 371   }
    372 372   #endregion
    373 373   
    374 374   #region Methods
    375  - private async void LoadAdapters()
     375 + private async Task LoadAdapters()
    376 376   {
    377 377   IsAdaptersLoading = true;
    378 378   
    skipped 17 lines
    396 396   IsAdaptersLoading = false;
    397 397   }
    398 398   
    399  - private async void ReloadAdapter()
     399 + private async Task ReloadAdapter()
    400 400   {
    401 401   IsAdaptersLoading = true;
    402 402   
    skipped 181 lines
  • ■ ■ ■ ■
    Source/NETworkManager/Views/PowerShellHostView.xaml.cs
    skipped 37 lines
    38 38   _viewModel.ConnectProfileCommand.Execute(null);
    39 39   }
    40 40   
    41  - public async void AddTab(string host)
     41 + public async Task AddTab(string host)
    42 42   {
    43 43   // Wait for the interface to load, before displaying the dialog to connect a new profile...
    44 44   // MahApps will throw an exception...
    skipped 19 lines
  • ■ ■ ■ ■
    Source/NETworkManager/Views/PuTTYHostView.xaml.cs
    skipped 37 lines
    38 38   _viewModel.ConnectProfileCommand.Execute(null);
    39 39   }
    40 40   
    41  - public async void AddTab(string host)
     41 + public async Task AddTab(string host)
    42 42   {
    43 43   // Wait for the interface to load, before displaying the dialog to connect a new profile...
    44 44   // MahApps will throw an exception...
    skipped 19 lines
  • ■ ■ ■ ■
    Source/NETworkManager/Views/RemoteDesktopHostView.xaml.cs
    skipped 36 lines
    37 37   _viewModel.ConnectProfileCommand.Execute(null);
    38 38   }
    39 39   
    40  - public async void AddTab(string host)
     40 + public async Task AddTab(string host)
    41 41   {
    42 42   // Wait for the interface to load, before displaying the dialog to connect a new Profile...
    43 43   // MahApps will throw an exception...
    skipped 18 lines
  • ■ ■ ■ ■
    Source/NETworkManager/Views/TigerVNCHostView.xaml.cs
    skipped 38 lines
    39 39   _viewModel.ConnectProfileCommand.Execute(null);
    40 40   }
    41 41   
    42  - public async void AddTab(string host)
     42 + public async Task AddTab(string host)
    43 43   {
    44 44   // Wait for the interface to load, before displaying the dialog to connect a new profile...
    45 45   // MahApps will throw an exception...
    skipped 19 lines
  • ■ ■ ■ ■ ■ ■
    docs/04_Changelog.md
    skipped 23 lines
    24 24  - Design of some buttons fixed [#591](https://github.com/BornToBeRoot/NETworkManager/issues/591){:target="_blank"}
    25 25   
    26 26  ## Other
     27 +- Code refactored / cleanup
     28 + - async void with async task replaced [#383](https://github.com/BornToBeRoot/NETworkManager/issues/383){:target="_blank"}
    27 29   
    28 30  -->
    29 31   
    skipped 484 lines
Please wait...
Page is in error, reload to recover