예제 #1
0
 public static OperationSystem DownloadOS(String OSname)
 {
     if (uniqueOperationSystem == null)
     {
         uniqueOperationSystem = new OperationSystem(OSname);
         uniqueOperationSystem.StartDrivers();
     }
     return(uniqueOperationSystem);
 }
예제 #2
0
 public static OperationSystem getInstance(string version)
 {
     lock (syncRoot)
     {
         if (instance == null)
         {
             instance = new OperationSystem(version);
         }
     }
     return(instance);
 }
예제 #3
0
        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();
        }
예제 #4
0
 public void StartComputer(String OSname)
 {
     OperationSystem = OperationSystem.DownloadOS(OSname);
 }