private void updateLastScannedInfo() { if (cbReplace.Checked && (cbDiscToReplace.Items.Count > 0)) { cbDiscToReplace.Enabled = true; DiscInDatabase discToReplace = cbDiscToReplace.SelectedItem as DiscInDatabase; if (discToReplace != null) { llScanned.Text = discToReplace.Scanned.ToString(); llLastOptions.Text = discToReplace.GetOptionsDescription(); if (string.IsNullOrEmpty(discToReplace.FromDrive)) { llLastDrive.Text = Properties.Resources.NoDrive; llLastDrive.ForeColor = Color.Black; } else { llLastDrive.Text = discToReplace.FromDrive; if (discToReplace.FromDrive.ToLower() != readFromDrive.ToLower()) { llLastDrive.ForeColor = Color.Red; } else { llLastDrive.ForeColor = Color.Black; } } tbUserLabel.Text = discToReplace.Name; tbUserLabel.Enabled = false; } } else { llScanned.Text = "(not scanned)"; llLastOptions.Text = "(none)"; llLastDrive.Text = Properties.Resources.NoDrive; llLastDrive.ForeColor = Color.Black; cbDiscToReplace.Enabled = false; tbUserLabel.Enabled = true; } }
public DlgDiscProperties(DiscInDatabase discInDatabase) : this() { this.discInDatabase = discInDatabase; tbUserLabel.Text = discInDatabase.Name; if (string.IsNullOrEmpty(discInDatabase.VolumeLabel)) { llVolumeLabel.Text = Properties.Resources.NoLabel; } else { llVolumeLabel.Text = discInDatabase.VolumeLabel; } llDriveFormat.Text = discInDatabase.DriveFormat; llDriveType.Text = discInDatabase.DriveType.ToString(); llFreeSpace.Text = discInDatabase.TotalFreeSpace.ToKBAndB(); llSize.Text = discInDatabase.TotalSize.ToKBAndB(); tbKeywords.Text = discInDatabase.Keywords; tbPhysicalLocation.Text = discInDatabase.PhysicalLocation; tbDescription.Text = discInDatabase.Description; llScanned.Text = discInDatabase.Scanned.ToString(); llLastOptions.Text = discInDatabase.GetOptionsDescription(); llSerialNumber.Text = discInDatabase.SerialNumber; if (string.IsNullOrEmpty(discInDatabase.FromDrive)) { llDriveName.Text = Properties.Resources.NoDrive; } else { llDriveName.Text = discInDatabase.FromDrive; } if (discInDatabase.LogicalFolders != null) { ucItemFolderClassification.LogicalFolders = discInDatabase.LogicalFolders.ToArray(); } // ucItemFolderClassification.ImageList = folderImages; }