1
Fork 0

Added code for getting selected device from connected devices menu!

This commit is contained in:
Jake Howard 2014-07-22 23:26:16 +01:00
parent eb87e65a4a
commit f1fd4ae0ac

View file

@ -13,6 +13,7 @@ namespace Saviour_Backup_System
{ {
public partial class mainWindow : Form public partial class mainWindow : Form
{ {
public string selectedDevice;
public mainWindow() public mainWindow()
{ {
InitializeComponent(); InitializeComponent();
@ -35,13 +36,12 @@ namespace Saviour_Backup_System
refreshDriveList(); refreshDriveList();
} }
private void connectedDrivesList_Click(object sender, EventArgs e) private void connectedDrivesList_Select(object sender, EventArgs e)
{ {
string currentItem = connectedDrivesList.SelectedItems.ToString(); deviceTab.Visible = true;
ribbonControl1.RecalcLayout();
int index = connectedDrivesList.FindString(currentItem); selectedDevice = connectedDrivesList.SelectedItems[0].Text;
MessageBox.Show(selectedDevice);
} }
} }
} }