⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 options.c

📁 这是一个开放源代码的与WINNT/WIN2K/WIN2003兼容的操作系统
💻 C
字号:
/*
 *  FreeLoader
 *  Copyright (C) 1998-2003  Brian Palmer  <brianp@sginet.com>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <freeldr.h>

PCSTR	OptionsMenuList[] =
{
	"Safe Mode",
	"Safe Mode with Networking",
	"Safe Mode with Command Prompt",

	"SEPARATOR",

	"Enable Boot Logging",
	"Enable VGA Mode",
	"Last Known Good Configuration",
	"Directory Services Restore Mode",
	"Debugging Mode",

	"SEPARATOR",

	"Custom Boot",
	"Reboot",
};

enum OptionMenuItems
{
	SAFE_MODE = 0,
	SAFE_MODE_WITH_NETWORKING = 1,
	SAFE_MODE_WITH_COMMAND_PROMPT = 2,

	SEPARATOR1 = 3,

	ENABLE_BOOT_LOGGING = 4,
	ENABLE_VGA_MODE = 5,
	LAST_KNOWN_GOOD_CONFIGURATION = 6,
	DIRECTORY_SERVICES_RESTORE_MODE = 7,
	DEBUGGING_MODE = 8,

	SEPARATOR2 = 9,

	CUSTOM_BOOT = 10,
	REBOOT = 11,
};

ULONG		OptionsMenuItemCount = sizeof(OptionsMenuList) / sizeof(OptionsMenuList[0]);

VOID DoOptionsMenu(VOID)
{
	ULONG		SelectedMenuItem;

	if (!UiDisplayMenu(OptionsMenuList, OptionsMenuItemCount, 0, -1, &SelectedMenuItem, TRUE, NULL))
	{
		// The user pressed ESC
		return;
	}

	// Clear the backdrop
	UiDrawBackdrop();

	switch (SelectedMenuItem)
	{
	case SAFE_MODE:
		break;
	case SAFE_MODE_WITH_NETWORKING:
		break;
	case SAFE_MODE_WITH_COMMAND_PROMPT:
		break;
	//case SEPARATOR1:
	//	break;
	case ENABLE_BOOT_LOGGING:
		break;
	case ENABLE_VGA_MODE:
		break;
	case LAST_KNOWN_GOOD_CONFIGURATION:
		break;
	case DIRECTORY_SERVICES_RESTORE_MODE:
		break;
	case DEBUGGING_MODE:
		break;
	//case SEPARATOR2:
	//	break;
	case CUSTOM_BOOT:
		OptionMenuCustomBoot();
		break;
	case REBOOT:
		OptionMenuReboot();
		break;
	}
}

VOID OptionMenuReboot(VOID)
{
	UiMessageBox("The system will now reboot.");

#ifdef __i386__
	DiskStopFloppyMotor();
	SoftReboot();
#else
#endif
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -