09-29-2012، 12:48 AM
(آخرین تغییر در ارسال: 09-29-2012، 01:35 AM توسط Amin_Mansouri.)
.NET Framework - Check if Windows booted in Normal or Safe Mode
با سورس زیر میتونید بفهمید که ایا ویندوز شما در حالت نرمال هست یا safe mode !
Code
با سورس زیر میتونید بفهمید که ایا ویندوز شما در حالت نرمال هست یا safe mode !
کد:
using System;
using System.Windows.Forms;
Code
کد:
namespace TestApp
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
String msg;
switch (SystemInformation.BootMode)
{
case BootMode.FailSafe:
msg = "The computer was booted using only the basic files and drivers." + Environment.NewLine +
"This is the same as Safe Mode.";
break;
case BootMode.FailSafeWithNetwork:
msg = "The computer was booted using the basic files, drivers, and services necessary to start networking" + Environment.NewLine +
"This is the same as Safe Mode with Networking.";
break;
default:
msg = "The computer was booted in Normal mode.";
break;
}
MessageBox.Show(msg, "Windows Mode", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg