public static OperationSystem DownloadOS(String OSname) { if (uniqueOperationSystem == null) { uniqueOperationSystem = new OperationSystem(OSname); uniqueOperationSystem.StartDrivers(); } return(uniqueOperationSystem); }
public static OperationSystem getInstance(string version) { lock (syncRoot) { if (instance == null) { instance = new OperationSystem(version); } } return(instance); }
static void Main(string[] args) { (new Thread(() => { OperationSystem os = OperationSystem.getInstance("Windows 10"); Console.WriteLine(os.Version); })).Start(); OperationSystem os1 = OperationSystem.getInstance("Windows 8"); Console.WriteLine(os1.Version); Console.ReadLine(); }
public void StartComputer(String OSname) { OperationSystem = OperationSystem.DownloadOS(OSname); }