Пример #1
0
BOOL CGrabSpecalRedPacket::PreTranslateMessage(MSG* pMsg)
{
	// TODO: 在此添加专用代码和/或调用基类
	if(pMsg->message == WM_KEYDOWN)  
	{   
		if(pMsg->wParam == VK_RETURN)  
		{  
			if (GetDlgItem(IDC_EDIT_PAGE) == this->GetFocus())
			{
				CString num;
				GetDlgItem(IDC_EDIT_PAGE)->GetWindowText(num);
				if (IsAllDigtal(num))
				{
					OnShowPagePool(atoi(num));
				}else
				{
					GetDlgItem(IDC_EDIT_PAGE)->SetWindowText(_T(""));
					UiFun::MessageBoxEx(UiFun::UI_LoadString("COMM_MODULE" , "COMM_INPUT_ERROR" ,theApp.gsLanguage) , UiFun::UI_LoadString("COMM_MODULE" , "COMM_TIP" ,theApp.gsLanguage),MFB_OK|MFB_TIP );
				}
				return TRUE;
			}
		}  
	}  
	return CDialogEx::PreTranslateMessage(pMsg);
}
Пример #2
0
void CSetAutoSendp2p::OnBnClickedOk()
{
	// TODO: 在此添加控件通知处理程序代码
	CString percentage;
	GetDlgItem(IDC_PERCENT)->GetWindowText(percentage) ;
	if (percentage == _T(""))
	{

		UiFun::MessageBoxEx(UiFun::UI_LoadString("SETAPPID" , "SETAPPFEE_PER" ,theApp.gsLanguage) , UiFun::UI_LoadString("COMM_MODULE" , "COMM_TIP" ,theApp.gsLanguage) ,MFB_OK|MFB_TIP );
		return ;
	}

	if (atoi(percentage)<=90 || atoi(percentage)>=200||!IsAllDigtal(percentage))
	{
		string error=UiFun::UI_LoadString("P2P_MODULE" , "P2P_SET_RETURNEVALUE" ,theApp.gsLanguage);
		UiFun::MessageBoxEx(error.c_str(), UiFun::UI_LoadString("COMM_MODULE" , "COMM_TIP" ,theApp.gsLanguage) ,MFB_OK|MFB_TIP );
		return;
	}
	m_percent=percentage;
	double percent = (atoi(percentage)*1.0)/100;

	double money = strtod(m_money,NULL)*percent;
	string strMoney = strprintf("%.4f",money);
	theApp.m_strAddress = strMoney.c_str();
	CDialogBase::OnOK();
}
void CWalletPassPhrase::OnBnClickedOk()
{
	// TODO: 在此添加控件通知处理程序代码
	CString PassWord= _T("");
	CString passtime = _T("");
	GetDlgItem(IDC_EDIT_PASSWORD)->GetWindowText(PassWord);
	GetDlgItem(IDC_EDIT_TIEM)->GetWindowText(passtime);
	if (PassWord == _T(""))
	{
		
		UiFun::MessageBoxEx(_T("请输入密码")  , _T("提示")  ,MFB_OK|MFB_TIP );
		return;
	}
	if (passtime == _T(""))
	{
		
		UiFun::MessageBoxEx(_T("请输入时间") , _T("提示")  ,MFB_OK|MFB_TIP );
		return;
	}
	if (!IsAllDigtal(passtime))
	{
		
		UiFun::MessageBoxEx(_T("时间必须是数字")  , _T("提示")  ,MFB_OK|MFB_TIP );
		return;
	}
	
	string strCommand;
	strCommand = strprintf("%s %s %d","walletpassphrase",PassWord,(atoi(passtime)*60));
	string strShowData =_T("");
	Json::Value root; 
	if(!CSoyPayHelp::getInstance()->SendRpc(strCommand,root))
	{
		TRACE(" rpccmd walletpassphrase error");
		UiFun::MessageBoxEx(_T("输入密码不正确,请重新输入") ,_T("提示")  ,MFB_OK|MFB_TIP );
		return;
	}


	bool isEntryp = root["passphrase"].asBool();
	if (!isEntryp)
	{
		UiFun::MessageBoxEx(_T("输入密码不正确,请重新输入"), _T("提示")  ,MFB_OK|MFB_TIP );
		return;
	}else{
		UiFun::MessageBoxEx(_T("恭喜钱包解锁成功") , _T("提示")  ,MFB_OK|MFB_TIP );
	}

	theApp.m_bIsPassLock = TRUE;
	CDialogBase::OnOK();
}
Пример #4
0
void CSetAutoSendp2p::OnEnUpdatePercent()
{
	// TODO:  如果该控件是 RICHEDIT 控件,它将不
	// 发送此通知,除非重写 CDialogBase::OnInitDialog()
	// 函数,以将 EM_SETEVENTMASK 消息发送到该控件,
	// 同时将 ENM_UPDATE 标志“或”运算到 lParam 掩码中。

	// TODO:  在此添加控件通知处理程序代码
	CString num;
	GetDlgItem(IDC_PERCENT)->GetWindowText(num);
	if (IsAllDigtal(num))
	{
		double percent = (atoi(num)*1.0)/100;

		double money = strtod(m_money,NULL)*percent;
		string strMoney = strprintf("冻结:%.4f",money);
		GetDlgItem(IDC_GETAMOUNT)->SetWindowText(strMoney.c_str());
		Invalidate();
	}
}