@@ -44,11 +44,11 @@ public static IShellPage CurrentInstance
4444 }
4545 }
4646 }
47- public static Dialogs . ExceptionDialog exceptionDialog { get ; set ; }
48- public static Dialogs . ConsentDialog consentDialog { get ; set ; }
49- public static Dialogs . PropertiesDialog propertiesDialog { get ; set ; }
50- public static Dialogs . LayoutDialog layoutDialog { get ; set ; }
51- public static Dialogs . AddItemDialog addItemDialog { get ; set ; }
47+ public static Dialogs . ExceptionDialog ExceptionDialogDisplay { get ; set ; }
48+ public static Dialogs . ConsentDialog ConsentDialogDisplay { get ; set ; }
49+ public static Dialogs . PropertiesDialog PropertiesDialogDisplay { get ; set ; }
50+ public static Dialogs . LayoutDialog LayoutDialogDisplay { get ; set ; }
51+ public static Dialogs . AddItemDialog AddItemDialogDisplay { get ; set ; }
5252 public static ObservableCollection < INavigationControlItem > sideBarItems = new ObservableCollection < INavigationControlItem > ( ) ;
5353 public static ObservableCollection < LocationItem > locationItems = new ObservableCollection < LocationItem > ( ) ;
5454 public static ObservableCollection < WSLDistroItem > linuxDistroItems = new ObservableCollection < WSLDistroItem > ( ) ;
@@ -68,11 +68,11 @@ public App()
6868
6969 RegisterUncaughtExceptionLogger ( ) ;
7070
71- consentDialog = new Dialogs . ConsentDialog ( ) ;
72- propertiesDialog = new Dialogs . PropertiesDialog ( ) ;
73- layoutDialog = new Dialogs . LayoutDialog ( ) ;
74- addItemDialog = new Dialogs . AddItemDialog ( ) ;
75- exceptionDialog = new Dialogs . ExceptionDialog ( ) ;
71+ ConsentDialogDisplay = new Dialogs . ConsentDialog ( ) ;
72+ PropertiesDialogDisplay = new Dialogs . PropertiesDialog ( ) ;
73+ LayoutDialogDisplay = new Dialogs . LayoutDialog ( ) ;
74+ AddItemDialogDisplay = new Dialogs . AddItemDialog ( ) ;
75+ ExceptionDialogDisplay = new Dialogs . ExceptionDialog ( ) ;
7676 // this.UnhandledException += App_UnhandledException;
7777 Clipboard . ContentChanged += Clipboard_ContentChanged ;
7878 Clipboard_ContentChanged ( null , null ) ;
@@ -129,54 +129,27 @@ public static void Clipboard_ContentChanged(object sender, object e)
129129 DataPackageView packageView = Clipboard . GetContent ( ) ;
130130 if ( packageView . Contains ( StandardDataFormats . StorageItems ) && App . CurrentInstance . CurrentPageType != typeof ( YourHome ) )
131131 {
132- App . PS . isEnabled = true ;
132+ App . PS . IsEnabled = true ;
133133 }
134134 else
135135 {
136- App . PS . isEnabled = false ;
136+ App . PS . IsEnabled = false ;
137137 }
138138 }
139139 else
140140 {
141- App . PS . isEnabled = false ;
141+ App . PS . IsEnabled = false ;
142142 }
143143 }
144144 catch ( Exception )
145145 {
146- App . PS . isEnabled = false ;
146+ App . PS . IsEnabled = false ;
147147 }
148148
149149 }
150150
151- public static Windows . UI . Xaml . UnhandledExceptionEventArgs exceptionInfo { get ; set ; }
152- public static string exceptionStackTrace { get ; set ; }
153-
154- private async void App_UnhandledException ( object sender , Windows . UI . Xaml . UnhandledExceptionEventArgs e )
155- {
156- e . Handled = true ;
157- exceptionInfo = e ;
158- exceptionStackTrace = e . Exception . StackTrace ;
159- await exceptionDialog . ShowAsync ( ContentDialogPlacement . Popup ) ;
160- }
161-
162- public static IReadOnlyList < ContentDialog > FindDisplayedContentDialogs < T > ( )
163- {
164- var popupElements = VisualTreeHelper . GetOpenPopupsForXamlRoot ( Window . Current . Content . XamlRoot ) ;
165- List < ContentDialog > dialogs = new List < ContentDialog > ( ) ;
166- List < ContentDialog > openDialogs = new List < ContentDialog > ( ) ;
167- Interaction . FindChildren < ContentDialog > ( dialogs , Window . Current . Content . XamlRoot . Content as DependencyObject ) ;
168- foreach ( var dialog in dialogs )
169- {
170- var popups = new List < Popup > ( ) ;
171- Interaction . FindChildren < Popup > ( popups , dialog ) ;
172- if ( popups . First ( ) . IsOpen && popups . First ( ) is T )
173- {
174- openDialogs . Add ( dialog ) ;
175- }
176- }
177- return openDialogs ;
178- }
179-
151+ public static Windows . UI . Xaml . UnhandledExceptionEventArgs ExceptionInfo { get ; set ; }
152+ public static string ExceptionStackTrace { get ; set ; }
180153 public static PasteState PS { get ; set ; } = new PasteState ( ) ;
181154 public static List < string > pathsToDeleteAfterPaste = new List < string > ( ) ;
182155
@@ -194,8 +167,8 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
194167 {
195168 var dialog = new ContentDialog ( )
196169 {
197- Title = "What's new in v0.7.4 " ,
198- Content = "• Fixed a crash when opening the preferences page in settings ." ,
170+ Title = "What's new in v0.7.5 " ,
171+ Content = "• Fixed a crash that would sometimes occur when right clicking on a file or folder. \n • Fixed an issue where the status bar wouldn't hide on the new tab page. \n • Fixed an issue where clicking on the quick access item for home wouldn't navigate to the home page. \n • Fixed a bug that prevented users from right clicking on the navigation bar ." ,
199172 PrimaryButtonText = "Lets go!"
200173 } ;
201174
@@ -206,11 +179,10 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
206179
207180 bool canEnablePrelaunch = Windows . Foundation . Metadata . ApiInformation . IsMethodPresent ( "Windows.ApplicationModel.Core.CoreApplication" , "EnablePrelaunch" ) ;
208181
209- Frame rootFrame = Window . Current . Content as Frame ;
210182
211183 // Do not repeat app initialization when the Window already has content,
212184 // just ensure that the window is active
213- if ( rootFrame == null )
185+ if ( ! ( Window . Current . Content is Frame rootFrame ) )
214186 {
215187 // Create a Frame to act as the navigation context and navigate to the first page
216188 rootFrame = new Frame ( ) ;
@@ -255,8 +227,7 @@ protected override void OnActivated(IActivatedEventArgs args)
255227 Logger . Info ( "App activated" ) ;
256228
257229 // Window management
258- Frame rootFrame = Window . Current . Content as Frame ;
259- if ( rootFrame == null )
230+ if ( ! ( Window . Current . Content is Frame rootFrame ) )
260231 {
261232 rootFrame = new Frame ( ) ;
262233 Window . Current . Content = rootFrame ;
0 commit comments