base
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
// Options.h
|
||||
#ifndef __OPTIONS__
|
||||
#define __OPTIONS__
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "MarkupSTL.h"
|
||||
|
||||
#define OPTIONS_NUM 41
|
||||
|
||||
class COptions
|
||||
{
|
||||
public:
|
||||
static bool Init(LPCTSTR pszConfigFile);
|
||||
|
||||
static void SetOption(int OptionID,CString sValue);
|
||||
static void SetOption(int OptionID,int nValue);
|
||||
|
||||
static CString GetOption(int nOptionID);
|
||||
static int GetOptionVal(int nOptionID);
|
||||
|
||||
static class CCriticalSection m_csSync;
|
||||
|
||||
protected:
|
||||
static CString m_sConfigFile;
|
||||
|
||||
enum OPTION_TYPE {
|
||||
OT_STRING = 0,
|
||||
OT_NUMBER,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
bool bCached;
|
||||
OPTION_TYPE type;
|
||||
CString sValue;
|
||||
int nValue;
|
||||
} OPTIONCACHE_STRUCT;
|
||||
|
||||
static bool m_bInitialized;
|
||||
static CMarkupSTL m_markup;
|
||||
|
||||
static OPTIONCACHE_STRUCT m_aoc[OPTIONS_NUM];
|
||||
};
|
||||
|
||||
enum OPTIONS {
|
||||
OPTION_WINDOWSPOS = 0,
|
||||
OPTION_SPLITTERSIZE,
|
||||
OPTION_REMOTETREESIZE,
|
||||
OPTION_LOCALTREESIZE,
|
||||
OPTION_SHOWREMOTETREE,
|
||||
OPTION_SHOWLOCALTREE,
|
||||
OPTION_REMOTELISTSTYLE,
|
||||
OPTION_LOCALLISTSTYLE,
|
||||
OPTION_SHOWREMOTESTATUS,
|
||||
OPTION_SHOWLOCALSTATUS, // 10
|
||||
OPTION_REMOTECOLUMNWIDTHS,
|
||||
OPTION_LOCALCOLUMNWIDTHS,
|
||||
OPTION_REMOTECOLUMNSORT,
|
||||
OPTION_LOCALCOLUMNSORT,
|
||||
OPTION_SHOWTOPTOOLBAR,
|
||||
OPTION_SHOWMIDTOOLBAR,
|
||||
OPTION_USERID,
|
||||
OPTION_PASSWORD,
|
||||
OPTION_AUTOCONNECT,
|
||||
OPTION_SAVEPASSWORD, // 20
|
||||
OPTION_FILEEXISTSACTION,
|
||||
OPTION_AFTEREXEC,
|
||||
OPTION_SEARCHSUBURL,
|
||||
OPTION_URLTAGTYPE,
|
||||
OPTION_URLSTAG,
|
||||
OPTION_URLETAG,
|
||||
OPTION_PROXYHOST,
|
||||
OPTION_PROXYPORT,
|
||||
OPTION_USEIEPROXY,
|
||||
OPTION_WRITEPOLICY, //30
|
||||
OPTION_NAME_01,
|
||||
OPTION_NAME_02,
|
||||
OPTION_NAME_03,
|
||||
OPTION_PHONE_01,
|
||||
OPTION_PHONE_02,
|
||||
OPTION_PHONE_03,
|
||||
OPTION_MAIL_01,
|
||||
OPTION_MAIL_02,
|
||||
OPTION_MAIL_03,
|
||||
OPTION_LOG_DIR,
|
||||
OPTION_LOG_UPLOAD
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user