misc.h

来自「XOSL 多操作系统管理工具 源代码 多系统引导工具」· C头文件 代码 · 共 84 行

H
84
字号
#ifndef MiscH
#define MiscH

#include <newdefs.h>
#include <gui.h>

#include <xosldata.h>
#include <key.h>

class CPreference;
class CLoader;

class CMiscellaneous {
public:
	CMiscellaneous(CXOSLData &XoslDataToUse, CPreference &PreferenceToUse);
	~CMiscellaneous();

	void CreateControls();
	void InitializeControls(CTabControl *TabControl);
	void ConnectEventHandlers();
	void InitializeData();
	void InstallControls(CForm *Form);
	void RealignText();

private:
	CXOSLData &XoslData;
	CPreference &Preference;

	bool Initialized;

	void CreateKeyStr(CEdit *Edit, int Key);

private:
	// controls
	CBevel *KeysBevel;
	CLabel *KeysLabel;
	CLabel *CycleLabel;
	CEdit *CycleEdit;
	CLabel *RestartLabel;
	CEdit *RestartEdit;
	CLabel *RebootLabel;
	CEdit *RebootEdit;
	CLabel *ShutdownLabel;
	CEdit *ShutdownEdit;
	CCheckBox *PowerOff;

	CBevel *HandlingBevel;
	CLabel *HandlingLabel;
	
	CCheckBox *AutoSave;
	CCheckBox *AutoBootDialog;
	CCheckBox *SetInstBoot;
	CCheckBox *ActiveAllow;
	CCheckBox *AntiVirus;

	CBevel *PartManBevel;
	CLabel *PartManLabel;
	CLabel *PartKeyLabel;
	CEdit *PartKeyEdit;


private:
	// event handlers

	static void CycleEditKeyPress(CMiscellaneous &Miscellaneous, int &Key);
	static void RebootEditKeyPress(CMiscellaneous &Miscellaneous, int &Key);
	static void ShutdownEditKeyPress(CMiscellaneous &Miscellaneous, int &Key);
	static void RestartEditKeyPress(CMiscellaneous &Miscellaneous, int &Key);
	static void PowerOffChange(CMiscellaneous &Miscellaneous, int Checked);
	
	
    static void AutoSaveChange(CMiscellaneous &Miscellaneous, int Checked);
	static void AutoBootDialogChange(CMiscellaneous &Miscellaneous, int Checked);
	static void SetInstBootChange(CMiscellaneous &Miscellaneous, int Checked);
	static void ActiveAllowChange(CMiscellaneous &Miscellaneous, int Checked);
	static void AntiVirusChange(CMiscellaneous &Miscellaneous, int Checked);

	static void PartKeyEditKeyPress(CMiscellaneous &Miscellaneous, int &Key);


};

#endif

⌨️ 快捷键说明

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