コード例 #1
0
bool COptionsPageProxy::LoadPage()
{
	bool failure = false;

	SetTextFromOption(XRCID("ID_PROXY_HOST"), OPTION_PROXY_HOST, failure);
	SetTextFromOption(XRCID("ID_PROXY_PORT"), OPTION_PROXY_PORT, failure);
	SetTextFromOption(XRCID("ID_PROXY_USER"), OPTION_PROXY_USER, failure);
	SetTextFromOption(XRCID("ID_PROXY_PASS"), OPTION_PROXY_PASS, failure);

	int type = m_pOptions->GetOptionVal(OPTION_PROXY_TYPE);
	switch (type)
	{
	default:
	case 0:
		SetRCheck(XRCID("ID_PROXYTYPE_NONE"), true, failure);
		break;
	case 1:
		SetRCheck(XRCID("ID_PROXYTYPE_HTTP"), true, failure);
		break;
	case 2:
		SetRCheck(XRCID("ID_PROXYTYPE_SOCKS5"), true, failure);
		break;
	}

	if (!failure)
		SetCtrlState();

	return !failure;
}
コード例 #2
0
bool COptionsPageConnection::LoadPage()
{
	bool failure = false;
	SetTextFromOption(XRCID("ID_RETRIES"), OPTION_RECONNECTCOUNT, failure);
	SetTextFromOption(XRCID("ID_RETRYDELAY"), OPTION_RECONNECTDELAY, failure);
	return !failure;
}
コード例 #3
0
bool COptionsPageFtpProxy::LoadPage()
{
	bool failure = false;

	SetTextFromOption(XRCID("ID_PROXY_HOST"), OPTION_FTP_PROXY_HOST, failure);
	SetTextFromOption(XRCID("ID_PROXY_USER"), OPTION_FTP_PROXY_USER, failure);
	SetTextFromOption(XRCID("ID_PROXY_PASS"), OPTION_FTP_PROXY_PASS, failure);

	int type = m_pOptions->GetOptionVal(OPTION_FTP_PROXY_TYPE);
	switch (type)
	{
	default:
	case 0:
		SetRCheck(XRCID("ID_PROXYTYPE_NONE"), true, failure);
		break;
	case 1:
		SetRCheck(XRCID("ID_PROXYTYPE_USER"), true, failure);
		break;
	case 2:
		SetRCheck(XRCID("ID_PROXYTYPE_SITE"), true, failure);
		break;
	case 3:
		SetRCheck(XRCID("ID_PROXYTYPE_OPEN"), true, failure);
		break;
	case 4:
		SetRCheck(XRCID("ID_PROXYTYPE_CUSTOM"), true, failure);
		SetTextFromOption(XRCID("ID_LOGINSEQUENCE"), OPTION_FTP_PROXY_CUSTOMLOGINSEQUENCE, failure);
		break;
	}

	if (!failure)
		SetCtrlState();

	return !failure;
}
コード例 #4
0
bool COptionsPageEditAssociations::LoadPage()
{
	bool failure = false;

	COptions* pOptions = COptions::Get();

	SetTextFromOption(XRCID("ID_ASSOCIATIONS"), OPTION_EDIT_CUSTOMASSOCIATIONS, failure);
	SetCheck(XRCID("ID_INHERIT"), pOptions->GetOptionVal(OPTION_EDIT_INHERITASSOCIATIONS) != 0, failure);

	return !failure;
}
コード例 #5
0
bool COptionsPageConnectionActive::LoadPage()
{
	bool failure = false;
	SetCheckFromOption(XRCID("ID_LIMITPORTS"), OPTION_LIMITPORTS, failure);
	SetTextFromOption(XRCID("ID_LOWESTPORT"), OPTION_LIMITPORTS_LOW, failure);
	SetTextFromOption(XRCID("ID_HIGHESTPORT"), OPTION_LIMITPORTS_HIGH, failure);

	SetRCheck(XRCID("ID_ACTIVEMODE1"), m_pOptions->GetOptionVal(OPTION_EXTERNALIPMODE) == 0, failure);
	SetRCheck(XRCID("ID_ACTIVEMODE2"), m_pOptions->GetOptionVal(OPTION_EXTERNALIPMODE) == 1, failure);
	SetRCheck(XRCID("ID_ACTIVEMODE3"), m_pOptions->GetOptionVal(OPTION_EXTERNALIPMODE) == 2, failure);

	SetTextFromOption(XRCID("ID_ACTIVEIP"), OPTION_EXTERNALIP, failure);
	SetTextFromOption(XRCID("ID_ACTIVERESOLVER"), OPTION_EXTERNALIPRESOLVER, failure);
	SetCheckFromOption(XRCID("ID_NOEXTERNALONLOCAL"), OPTION_NOEXTERNALONLOCAL, failure);

	if (!failure)
		SetCtrlState();

	return !failure;
}
コード例 #6
0
bool COptionsPageFilelists::LoadPage()
{
	bool failure = false;

	SetChoice(XRCID("ID_SORTMODE"), m_pOptions->GetOptionVal(OPTION_FILELIST_DIRSORT), failure);

	SetTextFromOption(XRCID("ID_COMPARISON_THRESHOLD"), OPTION_COMPARISON_THRESHOLD, failure);

	SetChoice(XRCID("ID_DOUBLECLICK_FILE"), m_pOptions->GetOptionVal(OPTION_DOUBLECLICK_ACTION_FILE), failure);
	SetChoice(XRCID("ID_DOUBLECLICK_DIRECTORY"), m_pOptions->GetOptionVal(OPTION_DOUBLECLICK_ACTION_DIRECTORY), failure);

	return !failure;
}
コード例 #7
0
bool COptionsPageTransfer::LoadPage()
{
	bool failure = false;

	wxTextCtrl* pTextCtrl = XRCCTRL(*this, "ID_DOWNLOADLIMIT", wxTextCtrl);
	if (!pTextCtrl)
		return false;
	pTextCtrl->SetMaxLength(9);
	pTextCtrl->ChangeValue(m_pOptions->GetOption(OPTION_SPEEDLIMIT_INBOUND));

	pTextCtrl = XRCCTRL(*this, "ID_UPLOADLIMIT", wxTextCtrl);
	if (!pTextCtrl)
		return false;
	pTextCtrl->SetMaxLength(9);
	pTextCtrl->ChangeValue(m_pOptions->GetOption(OPTION_SPEEDLIMIT_OUTBOUND));

	SetTextFromOption(XRCID("ID_NUMTRANSFERS"), OPTION_NUMTRANSFERS, failure);
	SetTextFromOption(XRCID("ID_NUMDOWNLOADS"), OPTION_CONCURRENTDOWNLOADLIMIT, failure);
	SetTextFromOption(XRCID("ID_NUMUPLOADS"), OPTION_CONCURRENTUPLOADLIMIT, failure);
	SetTextFromOption(XRCID("ID_TIMEOUT"), OPTION_TIMEOUT, failure);
	SetChoice(XRCID("ID_BURSTTOLERANCE"), m_pOptions->GetOptionVal(OPTION_SPEEDLIMIT_BURSTTOLERANCE), failure);

	return !failure;
}
コード例 #8
0
bool COptionsPageTransfer::LoadPage()
{
	bool failure = false;
	SetTextFromOption(XRCID("ID_NUMTRANSFERS"), OPTION_NUMTRANSFERS, failure);
	SetTextFromOption(XRCID("ID_NUMDOWNLOADS"), OPTION_CONCURRENTDOWNLOADLIMIT, failure);
	SetTextFromOption(XRCID("ID_NUMUPLOADS"), OPTION_CONCURRENTUPLOADLIMIT, failure);
	SetTextFromOption(XRCID("ID_TIMEOUT"), OPTION_TIMEOUT, failure);
	SetTextFromOption(XRCID("ID_DOWNLOADLIMIT"), OPTION_SPEEDLIMIT_INBOUND, failure);
	SetTextFromOption(XRCID("ID_UPLOADLIMIT"), OPTION_SPEEDLIMIT_OUTBOUND, failure);
	SetChoice(XRCID("ID_BURSTTOLERANCE"), m_pOptions->GetOptionVal(OPTION_SPEEDLIMIT_BURSTTOLERANCE), failure);

	return !failure;
}