Example #1
0
bool COptions::SetOption(unsigned int nID, int value)
{
	if (nID >= OPTIONS_NUM)
		return false;

	if (options[nID].type != number)
		return false;

	ContinueSetOption(nID, value);
	return true;
}
Example #2
0
bool COptions::SetOption(unsigned int nID, std::wstring const& value)
{
	if (nID >= OPTIONS_NUM) {
		return false;
	}

	if (options[nID].type != string) {
		return SetOption(nID, fz::to_integral<int>(value));
	}

	ContinueSetOption(nID, value);
	return true;
}
Example #3
0
bool COptions::SetOption(unsigned int nID, wxString const& value)
{
	if (nID >= OPTIONS_NUM)
		return false;

	if (options[nID].type != string) {
		long tmp;
		if (!value.ToLong(&tmp))
			return false;

		return SetOption(nID, tmp);
	}

	ContinueSetOption(nID, value);
	return true;
}