public override void OnAddSummary(SummaryRequestHandler handler) { base.OnAddSummary(handler); List <ManagementObject> list = new List <ManagementObject>(); foreach (DataGridViewRow dataGridViewRow in dataGridViewDrivers.Rows) { if (Convert.ToBoolean(dataGridViewRow.Cells[columnSelected.Name].Value) == true) { if (dataGridViewRow.Tag is ManagementObject driver) { list.Add(driver); } } } UserData["DriverItems"] = list; AddAction("GeneralDescription", string.Format("The following driver(s) will be captured ({0}):", list.Count)); AddAction("DriverInformation", string.Empty); foreach (ManagementObject driver in list) { AddActionDetailMessage("DriverInformation", driver["DeviceName"].ToString()); } }
public override void OnAddSummary(SummaryRequestHandler handler) { base.OnAddSummary(handler); List <HPDriverPackage> list = new List <HPDriverPackage>(); foreach (DataGridViewRow dataGridViewRow in dataGridViewDriverPackages.Rows) { if (Convert.ToBoolean(dataGridViewRow.Cells[columnSelected.Name].Value) == true) { if (dataGridViewRow.Tag is HPDriverPackage pack) { list.Add(pack); } } } UserData["DriverPackItems"] = list; AddAction("GeneralDescription", string.Format("The following driver pack(s) will be imported ({0}):", list.Count)); AddAction("DriverPackInformation", string.Empty); foreach (HPDriverPackage package in list) { AddActionDetailMessage("DriverPackInformation", package.Model); } }
public override void OnAddSummary(SummaryRequestHandler handler) { base.OnAddSummary(handler); }