2020using System . Windows . Markup ;
2121using NETworkManager . Models . Update ;
2222using NETworkManager . Models . Documentation ;
23+ using NETworkManager . Models . Network ;
2324using ContextMenu = System . Windows . Controls . ContextMenu ;
2425
2526namespace NETworkManager
@@ -248,6 +249,10 @@ public MainWindow()
248249 // Language Meta
249250 LanguageProperty . OverrideMetadata ( typeof ( FrameworkElement ) , new FrameworkPropertyMetadata ( XmlLanguage . GetLanguage ( LocalizationManager . Culture . IetfLanguageTag ) ) ) ;
250251
252+ // Update settings
253+ if ( AssemblyManager . Current . Version > new Version ( SettingsManager . Current . SettingsVersion ) )
254+ SettingsManager . Update ( AssemblyManager . Current . Version , new Version ( SettingsManager . Current . SettingsVersion ) ) ;
255+
251256 // Load appearance
252257 AppearanceManager . Load ( ) ;
253258
@@ -306,7 +311,7 @@ protected override async void OnContentRendered(EventArgs e)
306311 if ( CommandLineManager . Current . Autostart && SettingsManager . Current . Autostart_StartMinimizedInTray )
307312 HideWindowToTray ( ) ;
308313
309- // Chech for updates...
314+ // Search for updates...
310315 if ( SettingsManager . Current . Update_CheckForUpdatesAtStartup )
311316 CheckForUpdates ( ) ;
312317 }
@@ -420,6 +425,7 @@ private async void MetroWindowMain_Closing(object sender, CancelEventArgs e)
420425 private SubnetCalculatorHostView _subnetCalculatorHostView ;
421426 private HTTPHeadersHostView _httpHeadersHostView ;
422427 private LookupHostView _lookupHostView ;
428+ private WhoisHostView _whoisHostView ;
423429 private ConnectionsView _connectionsView ;
424430 private ListenersView _listenersView ;
425431 private ARPTableView _arpTableView ;
@@ -495,13 +501,6 @@ private void ChangeApplicationView(ApplicationViewManager.Name name)
495501
496502 ContentControlApplication . Content = _wakeOnLanView ;
497503 break ;
498-
499- case ApplicationViewManager . Name . HTTPHeaders :
500- if ( _httpHeadersHostView == null )
501- _httpHeadersHostView = new HTTPHeadersHostView ( ) ;
502-
503- ContentControlApplication . Content = _httpHeadersHostView ;
504- break ;
505504 case ApplicationViewManager . Name . SubnetCalculator :
506505 if ( _subnetCalculatorHostView == null )
507506 _subnetCalculatorHostView = new SubnetCalculatorHostView ( ) ;
@@ -514,6 +513,18 @@ private void ChangeApplicationView(ApplicationViewManager.Name name)
514513
515514 ContentControlApplication . Content = _lookupHostView ;
516515 break ;
516+ case ApplicationViewManager . Name . Whois :
517+ if ( _whoisHostView == null )
518+ _whoisHostView = new WhoisHostView ( ) ;
519+
520+ ContentControlApplication . Content = _whoisHostView ;
521+ break ;
522+ case ApplicationViewManager . Name . HTTPHeaders :
523+ if ( _httpHeadersHostView == null )
524+ _httpHeadersHostView = new HTTPHeadersHostView ( ) ;
525+
526+ ContentControlApplication . Content = _httpHeadersHostView ;
527+ break ;
517528 case ApplicationViewManager . Name . Connections :
518529 if ( _connectionsView == null )
519530 _connectionsView = new ConnectionsView ( ) ;
@@ -580,6 +591,8 @@ private void RefreshApplicationView(ApplicationViewManager.Name name)
580591 break ;
581592 case ApplicationViewManager . Name . Lookup :
582593 break ;
594+ case ApplicationViewManager . Name . Whois :
595+ break ;
583596 case ApplicationViewManager . Name . Connections :
584597 break ;
585598 case ApplicationViewManager . Name . Listeners :
0 commit comments