1111using Rubberduck . UI ;
1212using Rubberduck . UI . Command . MenuItems ;
1313using Rubberduck . UI . ParserErrors ;
14+ using Rubberduck . VBEditor ;
15+ using MessageBox = System . Windows . MessageBox ;
1416
1517namespace Rubberduck
1618{
@@ -23,16 +25,9 @@ public class App : IDisposable
2325 private readonly IGeneralConfigService _configService ;
2426 private readonly IAppMenu _appMenus ;
2527
26- private readonly VBE _vbe ;
27- private readonly AddIn _addIn ;
28- private Inspector _inspector ;
29- private ParserErrorsPresenter _parserErrorsPresenter ;
30- private readonly IGeneralConfigService _configService = new ConfigurationLoader ( ) ;
31- private readonly ActiveCodePaneEditor _editor ;
32- private readonly IRubberduckCodePaneFactory _factory ;
28+ private IParserErrorsPresenter _parserErrorsPresenter ;
3329 private readonly Logger _logger ;
3430 private IRubberduckParser _parser ;
35- private IParserErrorsPresenter _parserErrorsPresenter ;
3631
3732 private Configuration _config ;
3833
@@ -49,9 +44,6 @@ public App(IMessageBox messageBox,
4944 _inspectorFactory = inspectorFactory ;
5045 _configService = configService ;
5146 _appMenus = appMenus ;
52- _vbe = vbe ;
53- _addIn = addIn ;
54- _factory = new RubberduckCodePaneFactory ( ) ;
5547 _logger = LogManager . GetCurrentClassLogger ( ) ;
5648
5749 _configService . SettingsChanged += _configService_SettingsChanged ;
@@ -91,7 +83,7 @@ private void LoadConfig()
9183 catch ( CultureNotFoundException exception )
9284 {
9385 _logger . Error ( exception , "Error Setting Culture for RubberDuck" ) ;
94- MessageBox . Show ( exception . Message , "Rubberduck" , MessageBoxButtons . OK , MessageBoxIcon . Error ) ;
86+ _messageBox . Show ( exception . Message , "Rubberduck" , MessageBoxButtons . OK , MessageBoxIcon . Error ) ;
9587 _config . UserSettings . LanguageSetting . Code = currentCulture . Name ;
9688 _configService . SaveConfiguration ( _config ) ;
9789 }
0 commit comments