TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nagendra Panyam
NA
190
17.5k
working with drives
Feb 14 2019 9:04 PM
foreach (DiskinfoDetails item in diskList1)
{
if (item.Status.Equals("Unencrypted") || item.Status.Equals("Encryption paused") || item.Status.Equals("Encryption in-progress"))
{
continue;
}
if (result == 3)
{
SystemStateInfo systemStateInfo = SystemDataLib.GetSystemState();
systemStateInfo.SystemState = ENUMSYSTEMSTATE.ENCRYPTION_COMPLETED;
SystemDataLib.SaveSystemState(systemStateInfo);
SystemDataLib.UpdateDiskStatus("Encryption Completed");
//diskList2.Add(item);
// Refresh Grid
//DriveInformation.Clear();
var data = GetSystemInfoHelper.GetPartitons();
foreach (var diskInformation in data)
{
if (bootDrive != null && item.DriveLetter == bootDrive.Replace(":", ""))
{
item.DriveSize = diskInformation.DriveSize;
item.DiskLabel = diskInformation.DiskLabel;
item.DevicePath = diskInformation.DevicePath;
item.Status = diskInformation.Status;
item.IsWindowsDrive = diskInformation.IsWindowsDrive;
break;
}
}
}
if (result == 4)
{
SystemStateInfo systemStateInfo = SystemDataLib.GetSystemState();
systemStateInfo.SystemState = ENUMSYSTEMSTATE.DECRYPTION_INPROGRESS;
SystemDataLib.SaveSystemState(systemStateInfo);
SystemDataLib.UpdateDiskStatus("Decryption In-progress");
//diskList2.Add(item);
// Refresh Grid
//DriveInformation.Clear();
var data = GetSystemInfoHelper.GetPartitons();
foreach (var diskInformation in data)
{
if (bootDrive != null && item.DriveLetter == bootDrive.Replace(":", ""))
{
item.DriveSize = diskInformation.DriveSize;
item.DiskLabel = diskInformation.DiskLabel;
item.DevicePath = diskInformation.DevicePath;
item.Status = diskInformation.Status;
item.IsWindowsDrive = diskInformation.IsWindowsDrive;
break;
}
}
}
if (result == 1)
{
SystemStateInfo systemStateInfo = SystemDataLib.GetSystemState();
systemStateInfo.SystemState = ENUMSYSTEMSTATE.DECRYPTION_COMPLETED;
SystemDataLib.SaveSystemState(systemStateInfo);
SystemDataLib.UpdateDiskStatus("Unencrypted");
BootDriveSystemSateInfo bootDriveSystemSate = SystemDataLib.GetBootDriveSystemSate();
bootDriveSystemSate.SystemState = ENUMSYSTEMSTATE.DECRYPTION_COMPLETED;
SystemDataLib.SaveBootDriveSystemState(bootDriveSystemSate);
var data = GetSystemInfoHelper.GetPartitons();
foreach (var diskInformation in data)
{
if (bootDrive != null && item.DriveLetter == bootDrive.Replace(":", ""))
{
item.DriveSize = diskInformation.DriveSize;
item.DiskLabel = diskInformation.DiskLabel;
item.DevicePath = diskInformation.DevicePath;
item.Status = diskInformation.Status;
item.IsWindowsDrive = diskInformation.IsWindowsDrive;
break;
}
}
}
diskList2.Add(item);
}
can i modify above logic to any simple,bcause it tooks more time to get system drives
Reply
Answers (
6
)
Filter the Card/Bank/SSN and Encrypt them
Extract image resolution from pdf using itextsharp in vb.net