using System; using System.Collections.Generic; using System.Text; using Developpez.Dotnet.System.Providers; namespace Developpez.Dotnet.System { /// /// Informations du système d'exploitation sur lequel l'application s'exécute /// public static class SystemInfos { #region Informations /// /// Type de plateforme du système /// public static PlatformID PlatformType { get { return Environment.OSVersion.Platform; } } /// /// Nom véritable du système d'exploitation actuel /// public static string PlatformDisplayedName { get { return SystemInterop.Provider.PlatformDisplayedName; } } /// /// Renvoie la version installée de DirectX /// public static DirectXVersion DirectXVersion { get { return SystemInterop.Provider.DirectXVersion; } } #endregion #region Actions /// /// Redémarre le système /// /// true si c'est un succès, false sinon public static bool Reboot() { return Reboot(RebootReason.None); } /// /// Redémarre le système avec la raison spécifiée /// /// Raison du redémarrage /// true si c'est un succès, false sinon public static bool Reboot(RebootReason reason) { return SystemInterop.Provider.Reboot(reason); } #endregion } }