1
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
saviour-backup-system/Saviour Backup System/addBackupWizard.cs

43 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
namespace Saviour_Backup_System
{
public partial class addBackupWizard : Form
{
private string folderPath = "";
public addBackupWizard()
{
InitializeComponent();
populateDropdown();
}
private void directoryBrowseButton_Click(object sender, EventArgs e)
{
FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();
if (folderBrowserDialog.ShowDialog() == DialogResult.OK)
{
folderPath = folderBrowserDialog.SelectedPath;
}
folderBrowserDialog.Dispose(); //memory management
}
private void populateDropdown()
{
DriveInfo[] drives = USBTools.getConnectedDrives();
foreach (DriveInfo drive in drives)
{
drivesDropdown.Items.Add(drive.VolumeLabel);
}
}
}
}