@@ -110,43 +110,32 @@ public enum SnippetFilterMode
110110 public MainViewModel ( IFlyoutService flyoutService )
111111 {
112112 _flyoutService = flyoutService ;
113- try
114- {
115- _menuOpenIcon = Application . Current . Resources [ "MenuOpen" ] as Geometry ;
116- _menuCloseIcon = Application . Current . Resources [ "MenuClose" ] as Geometry ;
117- if ( _menuOpenIcon == null || _menuCloseIcon == null )
118- {
119- throw new InvalidOperationException ( "Icons not found in resources." ) ;
120- }
121-
122- SplitViewOpenPaneLength = settingsService . PanelLength ;
123- WindowX = settingsService . WindowX ;
124- WindowY = settingsService . WindowY ;
125- WindowWidth = settingsService . WindowWidth ;
126- WindowHeight = settingsService . WindowHeight ;
127- opt . EnableEmailHyperlinks = settingsService . EnableEmailLinks ;
128- opt . EnableHyperlinks = settingsService . EnableHyperinks ;
129- opt . ConvertTabsToSpaces = settingsService . TabToSpaces ;
130- opt . HighlightCurrentLine = settingsService . HighlightLine ;
131- opt . IndentationSize = settingsService . IntendationSize ;
132-
133- IsFilteringEnabled = settingsService . EnableFiltering ;
134- EnableBraceStyleFolding = settingsService . EnableBraceStyleFolding ;
135- EnablePythonFolding = settingsService . EnablePythonFolding ;
136- EnableXmlFolding = settingsService . EnableXmlFolding ;
137- ShowEmptyLanguages = settingsService . ShowEmptyLanguages ;
138- ShowEmptyCategories = settingsService . ShowEmptyCategories ;
139113
140- }
141- catch ( InvalidOperationException ex )
142- {
143- MessageBox . Show ( $ "Error while starting the application:\n { ex . Message } ") ;
144- }
145- catch ( Exception ex )
114+ _menuOpenIcon = Application . Current . Resources [ "MenuOpen" ] as Geometry ;
115+ _menuCloseIcon = Application . Current . Resources [ "MenuClose" ] as Geometry ;
116+ if ( _menuOpenIcon == null || _menuCloseIcon == null )
146117 {
147- MessageBox . Show ( $ "Unexpected error: \n { ex . Message } ") ;
118+ throw new InvalidOperationException ( "Icons not found in resources. ") ;
148119 }
149120
121+ SplitViewOpenPaneLength = settingsService . PanelLength ;
122+ WindowX = settingsService . WindowX ;
123+ WindowY = settingsService . WindowY ;
124+ WindowWidth = settingsService . WindowWidth ;
125+ WindowHeight = settingsService . WindowHeight ;
126+ opt . EnableEmailHyperlinks = settingsService . EnableEmailLinks ;
127+ opt . EnableHyperlinks = settingsService . EnableHyperinks ;
128+ opt . ConvertTabsToSpaces = settingsService . TabToSpaces ;
129+ opt . HighlightCurrentLine = settingsService . HighlightLine ;
130+ opt . IndentationSize = settingsService . IntendationSize ;
131+
132+ IsFilteringEnabled = settingsService . EnableFiltering ;
133+ EnableBraceStyleFolding = settingsService . EnableBraceStyleFolding ;
134+ EnablePythonFolding = settingsService . EnablePythonFolding ;
135+ EnableXmlFolding = settingsService . EnableXmlFolding ;
136+ ShowEmptyLanguages = settingsService . ShowEmptyLanguages ;
137+ ShowEmptyCategories = settingsService . ShowEmptyCategories ;
138+
150139 }
151140 public async Task InitializeAsync ( )
152141 {
0 commit comments