Update FileSystemDialog.xaml.cs

This commit is contained in:
Jan Philipp Weber 2020-09-04 12:52:15 +02:00 committed by GitHub
parent 2e31d8c983
commit c970ce6873
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,10 +19,8 @@ using SafeExamBrowser.I18n.Contracts;
using SafeExamBrowser.UserInterface.Contracts.FileSystemDialog; using SafeExamBrowser.UserInterface.Contracts.FileSystemDialog;
using SafeExamBrowser.UserInterface.Contracts.Windows; using SafeExamBrowser.UserInterface.Contracts.Windows;
using SafeExamBrowser.UserInterface.Shared.Utilities; using SafeExamBrowser.UserInterface.Shared.Utilities;
// uni-goettingen-patch: start
using Microsoft.Win32; using Microsoft.Win32;
// uni-goettingen-patch: end
namespace SafeExamBrowser.UserInterface.Desktop.Windows namespace SafeExamBrowser.UserInterface.Desktop.Windows
{ {
@ -288,8 +286,7 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
InitializeText(); InitializeText();
InitializeFileSystem(); InitializeFileSystem();
} }
// uni-goettingen-patch: begin
private DriveInfo[] GetDrives(bool showAll = false) private DriveInfo[] GetDrives(bool showAll = false)
{ {
var drives = DriveInfo.GetDrives(); var drives = DriveInfo.GetDrives();
@ -302,13 +299,10 @@ namespace SafeExamBrowser.UserInterface.Desktop.Windows
return drives; return drives;
} }
// uni-goettingen-patch: end
private void InitializeFileSystem() private void InitializeFileSystem()
{ {
// uni-goettingen-patch: begin
foreach (var drive in GetDrives()) foreach (var drive in GetDrives())
// uni-goettingen-patch: end
{ {
FileSystem.Items.Add(CreateItem(drive.RootDirectory)); FileSystem.Items.Add(CreateItem(drive.RootDirectory));
} }