private void USBListTable_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex != 5) { return; } var list = new USBDispatcher().UpdateList(); list[e.RowIndex].Eject(); }
public void UpdateFormData() { var toGBcoeff = Math.Pow(1024, 3); var currentRow = USBListTable.CurrentRow; var list = new USBDispatcher().UpdateList(); USBListTable.Rows.Clear(); foreach (var usb in list) { USBListTable.Rows.Add(usb.Name, usb.Letter, (usb.FreeMemory / toGBcoeff).ToString("0.00 GB"), (usb.UsedMemory / toGBcoeff).ToString("0.00 GB"), (usb.TotalMemory / toGBcoeff).ToString("0.00 GB"), null); } }