@@ -156,6 +156,9 @@ internal void LoadLanguage()
156156 case 1 :
157157 langUri = new Uri ( "..\\ Resources\\ Languages\\ nl.xaml" , UriKind . Relative ) ;
158158 break ;
159+ case 2 :
160+ langUri = new Uri ( "..\\ Resources\\ Languages\\ yourlang.xaml" , UriKind . Relative ) ;
161+ break ;
159162 }
160163 }
161164 catch ( Exception ex )
@@ -648,10 +651,7 @@ private void AboutMenuItem_OnClick(object sender, RoutedEventArgs e)
648651 /// <param name="e">The RoutedEventArgs</param>
649652 private void RamExportMenuItem_OnClick ( object sender , RoutedEventArgs e )
650653 {
651- if ( Utils . ExportLogs ( LogType . Ram , _logController ) )
652- {
653- MessageBox . Show ( ( string ) Application . Current . FindResource ( "ExportedAllData" ) , "MemPlus" , MessageBoxButton . OK , MessageBoxImage . Information ) ;
654- }
654+ ExportLogs ( LogType . Ram ) ;
655655 }
656656
657657 /// <summary>
@@ -661,10 +661,7 @@ private void RamExportMenuItem_OnClick(object sender, RoutedEventArgs e)
661661 /// <param name="e">The RoutedEventArgs</param>
662662 private void ProcessExportMenuItem_OnClick ( object sender , RoutedEventArgs e )
663663 {
664- if ( Utils . ExportLogs ( LogType . Process , _logController ) )
665- {
666- MessageBox . Show ( ( string ) Application . Current . FindResource ( "ExportedAllData" ) , "MemPlus" , MessageBoxButton . OK , MessageBoxImage . Information ) ;
667- }
664+ ExportLogs ( LogType . Process ) ;
668665 }
669666
670667 /// <summary>
@@ -674,10 +671,7 @@ private void ProcessExportMenuItem_OnClick(object sender, RoutedEventArgs e)
674671 /// <param name="e">The RoutedEventArgs</param>
675672 private void ApplicationExportMenuItem_OnClick ( object sender , RoutedEventArgs e )
676673 {
677- if ( Utils . ExportLogs ( LogType . Application , _logController ) )
678- {
679- MessageBox . Show ( ( string ) Application . Current . FindResource ( "ExportedAllData" ) , "MemPlus" , MessageBoxButton . OK , MessageBoxImage . Information ) ;
680- }
674+ ExportLogs ( LogType . Application ) ;
681675 }
682676
683677 /// <summary>
@@ -687,7 +681,16 @@ private void ApplicationExportMenuItem_OnClick(object sender, RoutedEventArgs e)
687681 /// <param name="e">The RoutedEventArgs</param>
688682 private void ExportAllLogsMenuItem_OnClick ( object sender , RoutedEventArgs e )
689683 {
690- if ( Utils . ExportLogs ( null , _logController ) )
684+ ExportLogs ( null ) ;
685+ }
686+
687+ /// <summary>
688+ /// Export logs of a certain type
689+ /// </summary>
690+ /// <param name="logType">The type of log that needs to be exported</param>
691+ private void ExportLogs ( LogType ? logType )
692+ {
693+ if ( Utils . ExportLogs ( logType , _logController ) )
691694 {
692695 MessageBox . Show ( ( string ) Application . Current . FindResource ( "ExportedAllData" ) , "MemPlus" , MessageBoxButton . OK , MessageBoxImage . Information ) ;
693696 }
0 commit comments