电脑清理--->一键清理---->自动清理按一下就变成“已开启”,再按一下就编程“已关闭”。求一个这样的按钮。
解决方案 »
- 请教一个生成树的算法,即根据当前数据列表的特性生成树结构。
- 求正则 V00001到V99999
- 远程控制_____关机,重启问题
- 请教摇奖系统思想细节
- 线程如何挂起和继续?要使用最新的模式,也就是System.Threading.Monitor
- 子类怎么访问父类
- MSXML2.XMLHTTPClass为何在windows service 编程里面无法用??
- C#程序的安装问题
- 获取局域网内所有在线用户名
- propertyGrid很好用,但是在复杂的情况下要想用好它还真的有点难度,所以我想能不能自己做个类似的东西自己用呢?散分
- 什么时候需要用PerformLayout()方法
- C#有没有可以生成标准xmlrpc字符串的类库,或者解析xmlrpc字符串
{
if(Button1.Text="已开启")
{
Button1.Text="已关闭";
}
}
private void button10_Click(object sender, EventArgs e)
{
if (button1.Text == "关闭")
{
button1.Text = "开始";
}
else
{
button1.Text = "关闭";
}
}
{
if (button1.Text == "关闭")
{
button1.Text = "开始";
}
else
{
button1.Text = "关闭";
}
}
要么你就自己弄4个按钮去更换图片背景,下边根据上边按钮选择来显示不同的panel
strncpy(sStopStreamNo, pTmp, MsgStreamNoFieldLength); sStopStreamNo[MsgStreamNoFieldLength] = '\0';
TMsgStat* pMsgStat = &(y8.m_tMsgStat);char szTmpNumCount[11] = {0};memcpy(szTmpNumCount, (k6 + 57), 10);
szTmpNumCount[10] = '\0';pMsgStat->m_iTotalNum += atoi(szTmpNumCount);// 实现对对账记录条数的检查
int iActualCheckRecordNum = -1; // 设定为-1是为了不计算对账文件头FILE* fpCounterCheckFile = NULL;
if (NULL == (fpCounterCheckFile = fopen(sHwCheckPFName, "r"))){
ERRORLOG("compensateBK() : Cann't open the file(" << sHwCheckPFName << ")."); z1; z2;
if (0 == iCompFailFlag){ y6;}z9;}while (NULL != fgets(k6, j3, fpCounterCheckFile)){
k6[strlen(k6) - 1] = '\0';if (strlen(k6) > 0){// 有记录才算是新的一行 iActualCheckRecordNum++; }
}fclose(fpCounterCheckFile);if (iActualCheckRecordNum != atoi(szTmpNumCount)){ERRORLOG;z9;}}else
{ERRORLOG;z1;z2;y7;if (0 == iCompFailFlag){ y6; }fclose(fPHwNotExistFile);return COMPENSATE_HEAD_INCORRECT;
}//组头处理完毕,读下一列continue;}//如果没有头信息,则报错返回else{ ERRORLOG;z1;z2;y7;if (0 == iCompFailFlag)
{ y6;}fclose(fPHwNotExistFile); return COMPENSATE_HEAD_INCORRECT;}}DEBUGLOG;iCount++;
//如果传送进来的CompFail文件,则传送进来的文件行中最后增加了//sqlcode|,需要将此信息去掉后在进行下面处理
if (1 == iCompFailFlag){if (strstr(k6, SeparateFlag) != NULL){k6[strlen(k6)-1] = '\0';
while (k6[strlen(k6)-1] != '|'){k6[strlen(k6)-1] = '\0';}}}//如果不是组头信息,则将此行信息取到pSelectResult中
if (Wrong == analyseFileLineToRecord(iNodeIndex, k6,pSelectResult)) {ERRORLOG;if (Wrong ==
writeFailRLogRecordToFile(iNodeIndex, k6,999999, ExcError)){ERRORLOG;}continue;} sTotalfee[0] = '\0';
//成功将记录取到pSelectResult中,取得交易流水号strcpy(sTradeStreamNo,z4[0].z6);strcpy(sTelCardNumber,z4[3].z6);
strcpy(sBKResponseCode, z4[9].z6);//为了兼顾处理二次补偿文件(没有文件头),所以MsgCode直接从文件中得到
strcpy(sCurMsgCode,z4[16].z6);TMsgStat* pMsgStat = &(y8.m_tMsgStat);char szTmpMoney[13] = {0};
strcpy(szTmpMoney,z4[18].z6);szTmpMoney[12] = '\0';if (Normal == g_iCurTaskType){pMsgStat->m_iTotalMoney +=
atoi(szTmpMoney);}strcpy(sCallingNumber,z4[5].z6);strcpy(sFeeType, z4[7].z6);sTradeMoney = atoi(z4[8].z6);
sprintf(sTradeDateTime, "%s%s",z4[10].z6, z4[11].z6);//切换到数据库,第一个数据必须配置为VC的主数据库
setCurrentDB(z5[0].m_sDBNickName);//对此交易流水号和银行进行对帐iRet = callSPTransBK(sTradeStreamNo, sCurMsgCode,
MsgAutoHurryRes, sHeadMsgCode, MsgTypeFieldLength))|| (0 == strncasecmp(MsgAutoHurryReq,
sHeadMsgCode, MsgTypeFieldLength))|| (0 == strncasecmp(MsgBKPayRes, sHeadMsgCode,
MsgTypeFieldLength))))){if (Wrong == exceptionCompensateBK(iNodeIndex, fpHwCompFile,
sStartStreamNo, sStopStreamNo, sHeadMsgCode)){ERRORLOG;//回收资源,关闭文件 z1;z2;y7; y6;
return COMPENSATE_EXP_FAILED;}} //回收资源,关闭文件z1;z2;y7;//二次补偿未打开补偿文件
if (0 == iCompFailFlag){ y6;}return COMPENSATE_SUCCEED;}
TFTPExitCode transFileByFTP(int iNodeIndex, char* pFileName, const char* pFTPMode){
if (NULL == pFileName || NULL == pFTPMode){ERRORLOG;return FTP_EXITCODE_FAILED;} y9{ERRORLOG;
return FTP_EXITCODE_FAILED;}z3 sPath;char sCommand[2 * LengthOfGeneralString];TFTPInfoCfg* pTmp;
pTmp = &(y8.m_tFTPInfoCfg);//判断要FTP文件所在路径if (ACCOUNT == y8.m_iNodeType){
strcpy(sPath, TRANSBALANCEACCOUNT_DIR);} else if (BANK == y8.m_iNodeType){strcpy(sPath,
TRANSBALANCEBANK_DIR);}...//进入节点对应的目录strcat(sPath , "/");strcat(sPath, y8.m_sNodeNo);
/*使用脚本文件将文件FTP取到*/ /*ftpfile的命令格式输入参数:1 -- 本地目录(默认为../log)
2 -- 异地目录(默认为home/log)3 -- 日志文件(缺省为../log/ftp.log)
4 -- 出错记录文件(缺省为../log/ftp.error)5 -- 传输模式(bin|ascii)
6 -- 远端主机地址(如10.108.26.125)7 -- 用户名及密码(user username password,缺省为sms qazpl\,)
8 -- 待执行命令及参数(如get、put、mget、mput等) 9 -- 文件名
调用格式:ftpfile -local <localdir> -remote <remotedir> -logfile <logfile>
-errfile <errfile> -bin|-ascii -user <username> <password> <remotehost> <command>
<parameters of command> (如文件名、目录名等)*/
sprintf(sCommand, "ftpfile.sh -local %s -remote %s -logfile %s -errfile %s"
" -ascii -user %s %s %s %s %s", sPath, pTmp->m_sFTPPath, "ftp.log", "ftp.error",
pTmp->m_sFTPUser, pTmp->m_sFTPPasswd, pTmp->m_sFTPIP, pFTPMode, pFileName);
TFTPExitCode iRet = (TFTPExitCode)system(sCommand);
//FTP传送文件成功 if (FTP_EXITCODE_SUCCEED == iRet) {RUNLOG;sleep(g_pConfigMng->m_iFTPTimeOut);
// 在文件操作成功的情况下,把文件移动到备份目录int iCount = 0;z3* pFileList = NULL;