using System; using System.Collections.Generic; using System.Text; using Microsoft.Win32; namespace SL_Switcher { class ThirdPartyProgram : Program { private List m_accepted_versions = new List(); public ThirdPartyProgram(RegistryKey key, string vendor, string product) : base(key, vendor, product) { } public override void Load(Microsoft.Win32.RegistryKey key, string vendor, string name) { base.Load(key, vendor, name); string version_list = GetStr(key, "AcceptedBaseVersions"); string[] versions = version_list.Split(' '); AcceptedBaseVersions.Clear(); foreach (string ver in versions) { AcceptedBaseVersions.Add(ver); } } /// /// Base official versions that work for this third party application. /// Several versions may be accepted, as the executable isn't used, and only /// the necessary libraries and data files must be compatible. /// public List AcceptedBaseVersions { get { return m_accepted_versions; } set { m_accepted_versions = value; } } /// /// List of accepted base versions, as a string. /// public string AcceptedBaseVersionsAsString { get { string tmp = ""; foreach (string s in AcceptedBaseVersions) { if (tmp != "") tmp += ", "; tmp += s; } return tmp; } } public override string ToString() { return "Third party " + this.Name + " by " + this.Provider + ", version " + this.AppVersion; } } }