private void execute() { if (!currentlyRenaming) { if (file != null) { if (!string.IsNullOrWhiteSpace(file.FullName)) { // Determine if [SHIFT] key is held. Bypass Directory Processing, which will use the Shell to open the item. if (!KeyboardUtilities.IsKeyDown(System.Windows.Forms.Keys.ShiftKey)) { // if directory, perform special handling if (file.IsDirectory && Location == "Desktop" && Settings.Instance.EnableDynamicDesktop && DesktopManager.IsEnabled) { _desktopManager.NavigationManager.NavigateTo(file.FullName); return; } else if (file.IsDirectory) { FolderHelper.OpenLocation(file.FullName); return; } } _desktopManager.IsOverlayOpen = false; ShellHelper.ExecuteProcess(file.FullName); return; } } CairoMessage.Show(DisplayString.sError_FileNotFoundInfo, DisplayString.sError_OhNo, MessageBoxButton.OK, CairoMessageImage.Error); } }
private void OpenLocationSettingsButton_OnClick(object sender, RoutedEventArgs e) { ShellHelper.ExecuteProcess("ms-settings:privacy-location"); }