public void Open() { if (open) { return; } this.smbios = new SMBIOS(); Opcode.Open(); if (mainboardEnabled) { Add(new Mainboard.MainboardGroup(smbios, settings)); } if (CpuEnabled) { Add(new CPU.CPUGroup(settings)); } if (ramEnabled) { Add(new RAM.RAMGroup(smbios, settings)); } if (gpuEnabled) { Add(new ATI.ATIGroup(settings)); } if (fanControllerEnabled) { Add(new Heatmaster.HeatmasterGroup(settings)); } if (hddEnabled) { Add(new HDD.HarddriveGroup(settings)); } open = true; }
public void Close() { if (!open) { return; } while (groups.Count > 0) { IGroup group = groups[groups.Count - 1]; Remove(group); } Opcode.Close();; this.smbios = null; open = false; }