private void processStartButton() { int appVendorCount = checkedComboBoxEditVendors.Properties.Items.Count; int serverCount = memoEditServers.Lines.Length; int vCenterServerCount = memoEditvCenter.Lines.Length; progressBarControl1.Properties.Maximum = appVendorCount * serverCount; foreach (String server in memoEditServers.Lines) { ddcPatches = ""; psePatches = ""; RegistryQuery rq = new RegistryQuery(server); for (int i = 0; i < appVendorCount; i++) { if (checkedComboBoxEditVendors.Properties.Items[i].CheckState == CheckState.Checked) { String appVendor = (string)checkedComboBoxEditVendors.Properties.Items[i].Value; alAppNameVer = rq.Get(appVendor); CreateUpdateString(); ProcessArrayList(appVendor,server); } } } sw.Close(); }
private void WriteToCSV(RegistryQuery.AppNameVer anv, String server, String appVendor, ProductUpdate pu) { String servicePack = (String)htBuild[anv.DisplayVersion]; switch (pu) { case ProductUpdate.DDC: sw.WriteLine("{0},{1},{2},{3},{4}", appVendor, anv.DisplayName, anv.DisplayVersion, ddcPatches, server); sw.Flush(); break; case ProductUpdate.PSE: sw.WriteLine("{0},{1},{2},{3},{4}", appVendor, anv.DisplayName, anv.DisplayVersion, psePatches, server); sw.Flush(); break; case ProductUpdate.NONE: sw.WriteLine("{0},{1},{2},{3},{4}", appVendor, anv.DisplayName, anv.DisplayVersion, servicePack ,server); sw.Flush(); break; } }