@@ -13,12 +13,10 @@ namespace SPCode.Utils
1313 public class DecompileUtil
1414 {
1515 private readonly MainWindow _win ;
16- private readonly MetroDialogSettings _metroDialogOptions ;
1716
1817 public DecompileUtil ( )
1918 {
2019 _win = Program . MainWindow ;
21- _metroDialogOptions = _win . MetroDialogOptions ;
2220 }
2321
2422 public async Task DecompilePlugin ( )
@@ -31,7 +29,7 @@ public async Task DecompilePlugin()
3129 if ( _win != null )
3230 {
3331 checkingJavaDialog = await _win . ShowProgressAsync ( Program . Translations . GetLanguage ( "JavaInstallCheck" ) + "..." ,
34- "" , false , _metroDialogOptions ) ;
32+ "" , false , _win . MetroDialogOptions ) ;
3533 MainWindow . ProcessUITasks ( ) ;
3634 }
3735 switch ( java . GetJavaStatus ( ) )
@@ -42,7 +40,7 @@ public async Task DecompilePlugin()
4240 await checkingJavaDialog . CloseAsync ( ) ;
4341 if ( await _win . ShowMessageAsync ( Program . Translations . GetLanguage ( "JavaNotFoundTitle" ) ,
4442 Program . Translations . GetLanguage ( "JavaNotFoundMessage" ) ,
45- MessageDialogStyle . AffirmativeAndNegative , _metroDialogOptions ) == MessageDialogResult . Affirmative )
43+ MessageDialogStyle . AffirmativeAndNegative , _win . MetroDialogOptions ) == MessageDialogResult . Affirmative )
4644 {
4745 await java . InstallJava ( ) ;
4846 }
@@ -54,7 +52,7 @@ public async Task DecompilePlugin()
5452 await checkingJavaDialog . CloseAsync ( ) ;
5553 if ( await _win . ShowMessageAsync ( Program . Translations . GetLanguage ( "JavaOutdatedTitle" ) ,
5654 Program . Translations . GetLanguage ( "JavaOutdatedMessage" ) ,
57- MessageDialogStyle . AffirmativeAndNegative , _metroDialogOptions ) == MessageDialogResult . Affirmative )
55+ MessageDialogStyle . AffirmativeAndNegative , _win . MetroDialogOptions ) == MessageDialogResult . Affirmative )
5856 {
5957 await java . InstallJava ( ) ;
6058 }
@@ -85,7 +83,7 @@ public async Task DecompilePlugin()
8583 if ( _win != null )
8684 {
8785 task = await _win . ShowProgressAsync ( Program . Translations . GetLanguage ( "Decompiling" ) + "..." ,
88- fInfo . FullName , false , _metroDialogOptions ) ;
86+ fInfo . FullName , false , _win . MetroDialogOptions ) ;
8987 MainWindow . ProcessUITasks ( ) ;
9088 }
9189
@@ -116,7 +114,7 @@ public async Task DecompilePlugin()
116114 {
117115 await _win . ShowMessageAsync ( $ "{ fInfo . Name } { Program . Translations . GetLanguage ( "FailedToDecompile" ) } ",
118116 $ "{ ex . Message } ", MessageDialogStyle . Affirmative ,
119- _metroDialogOptions ) ;
117+ _win . MetroDialogOptions ) ;
120118 }
121119
122120 // Load the decompiled file to SPCode
0 commit comments