| 165 |
BOOL OpenFTDlg(PFileVar fv) |
BOOL OpenFTDlg(PFileVar fv) |
| 166 |
{ |
{ |
| 167 |
PFileTransDlg FTDlg; |
PFileTransDlg FTDlg; |
| 168 |
|
#ifdef I18N |
| 169 |
|
HWND HFTDlg; |
| 170 |
|
#endif |
| 171 |
|
|
| 172 |
FTDlg = new CFileTransDlg(); |
FTDlg = new CFileTransDlg(); |
| 173 |
|
|
| 174 |
if (FTDlg!=NULL) |
if (FTDlg!=NULL) |
| 175 |
{ |
{ |
| 176 |
|
#ifdef I18N |
| 177 |
|
FTDlg->Create(fv, &cv, &ts); |
| 178 |
|
#else |
| 179 |
FTDlg->Create(fv, &cv); |
FTDlg->Create(fv, &cv); |
| 180 |
|
#endif |
| 181 |
FTDlg->RefreshNum(); |
FTDlg->RefreshNum(); |
| 182 |
if (fv->OpId == OpLog) |
if (fv->OpId == OpLog) |
| 183 |
FTDlg->ShowWindow(SW_MINIMIZE); |
FTDlg->ShowWindow(SW_MINIMIZE); |
| 188 |
else |
else |
| 189 |
SendDlg = FTDlg; /* File send */ |
SendDlg = FTDlg; /* File send */ |
| 190 |
|
|
| 191 |
|
#ifdef I18N |
| 192 |
|
HFTDlg=FTDlg->GetSafeHwnd(); |
| 193 |
|
|
| 194 |
|
GetDlgItemText(HFTDlg, IDC_TRANS_FILENAME, ts.UIMsg, sizeof(ts.UIMsg)); |
| 195 |
|
get_lang_msg("DLG_FILETRANS_FILENAME", ts.UIMsg, ts.UILanguageFile); |
| 196 |
|
SetDlgItemText(HFTDlg, IDC_TRANS_FILENAME, ts.UIMsg); |
| 197 |
|
GetDlgItemText(HFTDlg, IDC_FULLPATH_LABEL, ts.UIMsg, sizeof(ts.UIMsg)); |
| 198 |
|
get_lang_msg("DLG_FILETRANS_FULLPATH", ts.UIMsg, ts.UILanguageFile); |
| 199 |
|
SetDlgItemText(HFTDlg, IDC_FULLPATH_LABEL, ts.UIMsg); |
| 200 |
|
GetDlgItemText(HFTDlg, IDC_TRANS_TRANS, ts.UIMsg, sizeof(ts.UIMsg)); |
| 201 |
|
get_lang_msg("DLG_FILETRANS_TRNAS", ts.UIMsg, ts.UILanguageFile); |
| 202 |
|
SetDlgItemText(HFTDlg, IDC_TRANS_TRANS, ts.UIMsg); |
| 203 |
|
GetDlgItemText(HFTDlg, IDCANCEL, ts.UIMsg, sizeof(ts.UIMsg)); |
| 204 |
|
get_lang_msg("BTN_CANCEL", ts.UIMsg, ts.UILanguageFile); |
| 205 |
|
SetDlgItemText(HFTDlg, IDCANCEL, ts.UIMsg); |
| 206 |
|
GetDlgItemText(HFTDlg, IDC_TRANSPAUSESTART, ts.UIMsg, sizeof(ts.UIMsg)); |
| 207 |
|
get_lang_msg("DLG_FILETRANS_PAUSE", ts.UIMsg, ts.UILanguageFile); |
| 208 |
|
SetDlgItemText(HFTDlg, IDC_TRANSPAUSESTART, ts.UIMsg); |
| 209 |
|
GetDlgItemText(HFTDlg, IDC_TRANSHELP, ts.UIMsg, sizeof(ts.UIMsg)); |
| 210 |
|
get_lang_msg("BTN_HELP", ts.UIMsg, ts.UILanguageFile); |
| 211 |
|
SetDlgItemText(HFTDlg, IDC_TRANSHELP, ts.UIMsg); |
| 212 |
|
#endif |
| 213 |
|
|
| 214 |
return (FTDlg!=NULL); |
return (FTDlg!=NULL); |
| 215 |
} |
} |
| 216 |
|
|
| 283 |
strncat(LogVar->FullName, ts.LogDefaultName, sizeof(LogVar->FullName)); |
strncat(LogVar->FullName, ts.LogDefaultName, sizeof(LogVar->FullName)); |
| 284 |
ParseStrftimeFileName(LogVar->FullName); |
ParseStrftimeFileName(LogVar->FullName); |
| 285 |
|
|
| 286 |
|
#ifdef I18N |
| 287 |
|
if (! (*GetTransFname)(LogVar, ts.FileDir, GTF_LOG, &Option, &ts)) |
| 288 |
|
#else |
| 289 |
if (! (*GetTransFname)(LogVar, ts.FileDir, GTF_LOG, &Option)) |
if (! (*GetTransFname)(LogVar, ts.FileDir, GTF_LOG, &Option)) |
| 290 |
|
#endif |
| 291 |
{ |
{ |
| 292 |
FreeFileVar(&LogVar); |
FreeFileVar(&LogVar); |
| 293 |
FreeTTFILE(); |
FreeTTFILE(); |
| 313 |
|
|
| 314 |
} |
} |
| 315 |
else |
else |
| 316 |
|
#ifdef I18N |
| 317 |
|
(*SetFileVar)(FileVar, &ts); |
| 318 |
|
#else |
| 319 |
(*SetFileVar)(LogVar); |
(*SetFileVar)(LogVar); |
| 320 |
|
#endif |
| 321 |
|
|
| 322 |
if (ts.TransBin > 0) |
if (ts.TransBin > 0) |
| 323 |
{ |
{ |
| 453 |
DWORD wrote; |
DWORD wrote; |
| 454 |
|
|
| 455 |
if (LogVar == NULL || !LogVar->FileOpen) { |
if (LogVar == NULL || !LogVar->FileOpen) { |
| 456 |
|
#ifdef I18N |
| 457 |
|
char uimsg[MAX_UIMSG]; |
| 458 |
|
strcpy(uimsg, "ERROR"); |
| 459 |
|
get_lang_msg("MSG_ERROR", uimsg, ts.UILanguageFile); |
| 460 |
|
strcpy(ts.UIMsg, "It is not opened by the log file yet."); |
| 461 |
|
get_lang_msg("MSG_COMMENT_LOG_OPEN_ERROR", ts.UIMsg, ts.UILanguageFile); |
| 462 |
|
::MessageBox(NULL, ts.UIMsg, uimsg, MB_OK|MB_ICONEXCLAMATION); |
| 463 |
|
#else |
| 464 |
::MessageBox(NULL, "It is not opened by the log file yet.", "ERROR", MB_OK|MB_ICONEXCLAMATION); |
::MessageBox(NULL, "It is not opened by the log file yet.", "ERROR", MB_OK|MB_ICONEXCLAMATION); |
| 465 |
|
#endif |
| 466 |
return; |
return; |
| 467 |
} |
} |
| 468 |
|
|
| 634 |
{ |
{ |
| 635 |
Option = MAKELONG(ts.TransBin,0); |
Option = MAKELONG(ts.TransBin,0); |
| 636 |
SendVar->FullName[0] = 0; |
SendVar->FullName[0] = 0; |
| 637 |
|
#ifdef I18N |
| 638 |
|
if (! (*GetTransFname)(SendVar, ts.FileDir, GTF_SEND, &Option, &ts)) |
| 639 |
|
#else |
| 640 |
if (! (*GetTransFname)(SendVar, ts.FileDir, GTF_SEND, &Option)) |
if (! (*GetTransFname)(SendVar, ts.FileDir, GTF_SEND, &Option)) |
| 641 |
{ |
#endif |
| 642 |
|
{ |
| 643 |
FileTransEnd(OpSendFile); |
FileTransEnd(OpSendFile); |
| 644 |
return; |
return; |
| 645 |
} |
} |
| 646 |
ts.TransBin = LOWORD(Option); |
ts.TransBin = LOWORD(Option); |
| 647 |
} |
} |
| 648 |
else |
else |
| 649 |
|
#ifdef I18N |
| 650 |
|
(*SetFileVar)(FileVar, &ts); |
| 651 |
|
#else |
| 652 |
(*SetFileVar)(SendVar); |
(*SetFileVar)(SendVar); |
| 653 |
|
#endif |
| 654 |
|
|
| 655 |
SendVar->FileHandle = _lopen(SendVar->FullName,OF_READ); |
SendVar->FileHandle = _lopen(SendVar->FullName,OF_READ); |
| 656 |
SendVar->FileOpen = (SendVar->FileHandle>0); |
SendVar->FileOpen = (SendVar->FileHandle>0); |
| 816 |
{ |
{ |
| 817 |
int vsize; |
int vsize; |
| 818 |
PProtoDlg pd; |
PProtoDlg pd; |
| 819 |
|
#ifdef I18N |
| 820 |
|
HWND Hpd; |
| 821 |
|
#endif |
| 822 |
|
|
| 823 |
ProtoId = IdProto; |
ProtoId = IdProto; |
| 824 |
|
|
| 870 |
ProtoVar = NULL; |
ProtoVar = NULL; |
| 871 |
return FALSE; |
return FALSE; |
| 872 |
} |
} |
| 873 |
|
#ifdef I18N |
| 874 |
|
pd->Create(fv,&ts); |
| 875 |
|
#else |
| 876 |
pd->Create(fv); |
pd->Create(fv); |
| 877 |
|
#endif |
| 878 |
|
|
| 879 |
|
#ifdef I18N |
| 880 |
|
Hpd=pd->GetSafeHwnd(); |
| 881 |
|
|
| 882 |
|
GetDlgItemText(Hpd, IDC_PROT_FILENAME, ts.UIMsg, sizeof(ts.UIMsg)); |
| 883 |
|
get_lang_msg("DLG_PROT_FIELNAME", ts.UIMsg, ts.UILanguageFile); |
| 884 |
|
SetDlgItemText(Hpd, IDC_PROT_FILENAME, ts.UIMsg); |
| 885 |
|
GetDlgItemText(Hpd, IDC_PROT_PROT, ts.UIMsg, sizeof(ts.UIMsg)); |
| 886 |
|
get_lang_msg("DLG_PROT_PROTO", ts.UIMsg, ts.UILanguageFile); |
| 887 |
|
SetDlgItemText(Hpd, IDC_PROT_PROT, ts.UIMsg); |
| 888 |
|
GetDlgItemText(Hpd, IDC_PROT_PACKET, ts.UIMsg, sizeof(ts.UIMsg)); |
| 889 |
|
get_lang_msg("DLG_PROT_PACKET", ts.UIMsg, ts.UILanguageFile); |
| 890 |
|
SetDlgItemText(Hpd, IDC_PROT_PACKET, ts.UIMsg); |
| 891 |
|
GetDlgItemText(Hpd, IDC_PROT_TRANS, ts.UIMsg, sizeof(ts.UIMsg)); |
| 892 |
|
get_lang_msg("DLG_PROT_TRANS", ts.UIMsg, ts.UILanguageFile); |
| 893 |
|
SetDlgItemText(Hpd, IDC_PROT_TRANS, ts.UIMsg); |
| 894 |
|
GetDlgItemText(Hpd, IDCANCEL, ts.UIMsg, sizeof(ts.UIMsg)); |
| 895 |
|
get_lang_msg("BTN_CANCEL", ts.UIMsg, ts.UILanguageFile); |
| 896 |
|
SetDlgItemText(Hpd, IDCANCEL, ts.UIMsg); |
| 897 |
|
#endif |
| 898 |
|
|
| 899 |
(*ProtoInit)(ProtoId,FileVar,ProtoVar,&cv,&ts); |
(*ProtoInit)(ProtoId,FileVar,ProtoVar,&cv,&ts); |
| 900 |
|
|
| 975 |
P = ActiveWin; |
P = ActiveWin; |
| 976 |
if (PtDlg==NULL) return P; |
if (PtDlg==NULL) return P; |
| 977 |
|
|
| 978 |
|
#ifdef I18N |
| 979 |
|
if ((*ProtoParse)(ProtoId,FileVar,ProtoVar,&cv,&ts)) |
| 980 |
|
#else |
| 981 |
if ((*ProtoParse)(ProtoId,FileVar,ProtoVar,&cv)) |
if ((*ProtoParse)(ProtoId,FileVar,ProtoVar,&cv)) |
| 982 |
|
#endif |
| 983 |
P = 0; /* continue */ |
P = 0; /* continue */ |
| 984 |
else { |
else { |
| 985 |
CommSend(&cv); |
CommSend(&cv); |
| 1018 |
FileVar->OpId = OpKmtSend; |
FileVar->OpId = OpKmtSend; |
| 1019 |
if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0) |
if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0) |
| 1020 |
{ |
{ |
| 1021 |
|
#ifdef I18N |
| 1022 |
|
if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_KERMIT,&w,&ts) || |
| 1023 |
|
#else |
| 1024 |
if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_KERMIT,&w) || |
if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_KERMIT,&w) || |
| 1025 |
|
#endif |
| 1026 |
(FileVar->NumFname==0)) |
(FileVar->NumFname==0)) |
| 1027 |
{ |
{ |
| 1028 |
ProtoEnd(); |
ProtoEnd(); |
| 1030 |
} |
} |
| 1031 |
} |
} |
| 1032 |
else |
else |
| 1033 |
|
#ifdef I18N |
| 1034 |
|
(*SetFileVar)(FileVar, &ts); |
| 1035 |
|
#else |
| 1036 |
(*SetFileVar)(FileVar); |
(*SetFileVar)(FileVar); |
| 1037 |
break; |
#endif |
| 1038 |
|
break; |
| 1039 |
case IdKmtReceive: |
case IdKmtReceive: |
| 1040 |
FileVar->OpId = OpKmtRcv; |
FileVar->OpId = OpKmtRcv; |
| 1041 |
break; |
break; |
| 1051 |
} |
} |
| 1052 |
} |
} |
| 1053 |
else |
else |
| 1054 |
|
#ifdef I18N |
| 1055 |
|
(*SetFileVar)(FileVar, &ts); |
| 1056 |
|
#else |
| 1057 |
(*SetFileVar)(FileVar); |
(*SetFileVar)(FileVar); |
| 1058 |
break; |
#endif |
| 1059 |
|
break; |
| 1060 |
case IdKmtFinish: |
case IdKmtFinish: |
| 1061 |
FileVar->OpId = OpKmtFin; |
FileVar->OpId = OpKmtFin; |
| 1062 |
break; |
break; |
| 1089 |
if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0) |
if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0) |
| 1090 |
{ |
{ |
| 1091 |
Option = MAKELONG(ts.XmodemBin,ts.XmodemOpt); |
Option = MAKELONG(ts.XmodemBin,ts.XmodemOpt); |
| 1092 |
|
#ifdef I18N |
| 1093 |
|
if (! (*GetXFname)(FileVar->HMainWin, |
| 1094 |
|
mode==IdXReceive,&Option,FileVar,ts.FileDir,&ts)) |
| 1095 |
|
#else |
| 1096 |
if (! (*GetXFname)(FileVar->HMainWin, |
if (! (*GetXFname)(FileVar->HMainWin, |
| 1097 |
mode==IdXReceive,&Option,FileVar,ts.FileDir)) |
mode==IdXReceive,&Option,FileVar,ts.FileDir)) |
| 1098 |
|
#endif |
| 1099 |
{ |
{ |
| 1100 |
ProtoEnd(); |
ProtoEnd(); |
| 1101 |
return; |
return; |
| 1104 |
ts.XmodemBin = LOWORD(Option); |
ts.XmodemBin = LOWORD(Option); |
| 1105 |
} |
} |
| 1106 |
else |
else |
| 1107 |
|
#ifdef I18N |
| 1108 |
|
(*SetFileVar)(FileVar, &ts); |
| 1109 |
|
#else |
| 1110 |
(*SetFileVar)(FileVar); |
(*SetFileVar)(FileVar); |
| 1111 |
|
#endif |
| 1112 |
|
|
| 1113 |
if (mode==IdXReceive) |
if (mode==IdXReceive) |
| 1114 |
FileVar->FileHandle = _lcreat(FileVar->FullName,0); |
FileVar->FileHandle = _lcreat(FileVar->FullName,0); |
| 1145 |
FileVar->OpId = OpZSend; |
FileVar->OpId = OpZSend; |
| 1146 |
if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0) |
if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0) |
| 1147 |
{ |
{ |
| 1148 |
|
#ifdef I18N |
| 1149 |
|
if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_Z,&Opt,&ts) || |
| 1150 |
|
#else |
| 1151 |
if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_Z,&Opt) || |
if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_Z,&Opt) || |
| 1152 |
|
#endif |
| 1153 |
(FileVar->NumFname==0)) |
(FileVar->NumFname==0)) |
| 1154 |
{ |
{ |
| 1155 |
ProtoEnd(); |
ProtoEnd(); |
| 1158 |
ts.XmodemBin = Opt; |
ts.XmodemBin = Opt; |
| 1159 |
} |
} |
| 1160 |
else |
else |
| 1161 |
|
#ifdef I18N |
| 1162 |
|
(*SetFileVar)(FileVar, &ts); |
| 1163 |
|
#else |
| 1164 |
(*SetFileVar)(FileVar); |
(*SetFileVar)(FileVar); |
| 1165 |
|
#endif |
| 1166 |
} |
} |
| 1167 |
else /* IdZReceive or IdZAuto */ |
else /* IdZReceive or IdZAuto */ |
| 1168 |
FileVar->OpId = OpZRcv; |
FileVar->OpId = OpZRcv; |
| 1189 |
if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0) |
if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0) |
| 1190 |
{ |
{ |
| 1191 |
FileVar->FullName[0] = 0; |
FileVar->FullName[0] = 0; |
| 1192 |
|
#ifdef I18N |
| 1193 |
|
if (! (*GetTransFname)(FileVar, ts.FileDir, GTF_BP, &Option, &ts)) |
| 1194 |
|
#else |
| 1195 |
if (! (*GetTransFname)(FileVar, ts.FileDir, GTF_BP, &Option)) |
if (! (*GetTransFname)(FileVar, ts.FileDir, GTF_BP, &Option)) |
| 1196 |
{ |
#endif |
| 1197 |
|
{ |
| 1198 |
ProtoEnd(); |
ProtoEnd(); |
| 1199 |
return; |
return; |
| 1200 |
} |
} |
| 1201 |
} |
} |
| 1202 |
else |
else |
| 1203 |
|
#ifdef I18N |
| 1204 |
|
(*SetFileVar)(FileVar, &ts); |
| 1205 |
|
#else |
| 1206 |
(*SetFileVar)(FileVar); |
(*SetFileVar)(FileVar); |
| 1207 |
|
#endif |
| 1208 |
} |
} |
| 1209 |
else /* IdBPReceive or IdBPAuto */ |
else /* IdBPReceive or IdBPAuto */ |
| 1210 |
FileVar->OpId = OpBPRcv; |
FileVar->OpId = OpBPRcv; |
| 1231 |
FileVar->OpId = OpQVSend; |
FileVar->OpId = OpQVSend; |
| 1232 |
if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0) |
if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0) |
| 1233 |
{ |
{ |
| 1234 |
|
#ifdef I18N |
| 1235 |
|
if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_QV, &W, &ts) || |
| 1236 |
|
#else |
| 1237 |
if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_QV, &W) || |
if (! (*GetMultiFname)(FileVar,ts.FileDir,GMF_QV, &W) || |
| 1238 |
|
#endif |
| 1239 |
(FileVar->NumFname==0)) |
(FileVar->NumFname==0)) |
| 1240 |
{ |
{ |
| 1241 |
ProtoEnd(); |
ProtoEnd(); |
| 1243 |
} |
} |
| 1244 |
} |
} |
| 1245 |
else |
else |
| 1246 |
|
#ifdef I18N |
| 1247 |
|
(*SetFileVar)(FileVar, &ts); |
| 1248 |
|
#else |
| 1249 |
(*SetFileVar)(FileVar); |
(*SetFileVar)(FileVar); |
| 1250 |
|
#endif |
| 1251 |
} |
} |
| 1252 |
else |
else |
| 1253 |
FileVar->OpId = OpQVRcv; |
FileVar->OpId = OpQVRcv; |
| 1264 |
|
|
| 1265 |
/* |
/* |
| 1266 |
* $Log$ |
* $Log$ |
| 1267 |
|
* Revision 1.8 2007/01/04 15:11:44 maya |
| 1268 |
|
* 表示メッセージの読み込み対応 |
| 1269 |
|
* |
| 1270 |
* Revision 1.7 2006/12/25 16:13:54 yutakapon |
* Revision 1.7 2006/12/25 16:13:54 yutakapon |
| 1271 |
* ログ採取中にマクロがストールする問題への修正。 |
* ログ採取中にマクロがストールする問題への修正。 |
| 1272 |
* ログ採取中に一度マクロを止めると、バッファのインデックスが同期取れなくなり、 |
* ログ採取中に一度マクロを止めると、バッファのインデックスが同期取れなくなり、 |