📄 dlg_entrypar.cpp
字号:
// (Version 1.00 :: 10-Mar-1999 :: Harutoshi Yoshida)
// Dlg_EntryPar.cpp : 僀儞僾儕儊儞僥乕僔儑儞 僼傽僀儖
//
#include "stdafx.h"
#include "KSG.h"
#include "Dlg_EntryPar.h"
#include "C_Work.h"
#include "KSG_Main.h"
#include "C_File.h"
#include "C_Proc.h"
#if !C_DEFINE_INC
#include "C_Define.h"
#endif
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDlg_EntryPar 僟僀傾儘僌
CDlg_EntryPar::CDlg_EntryPar(CWnd* pParent /*=NULL*/)
: CDialog(CDlg_EntryPar::IDD, pParent)
{
//{{AFX_DATA_INIT(CDlg_EntryPar)
// 儊儌 - ClassWizard 偼偙偺埵抲偵儅僢僺儞僌梡偺儅僋儘傪捛壛傑偨偼嶍彍偟傑偡丅
//}}AFX_DATA_INIT
}
void CDlg_EntryPar::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlg_EntryPar)
// 儊儌 - ClassWizard 偼偙偺埵抲偵儅僢僺儞僌梡偺儅僋儘傪捛壛傑偨偼嶍彍偟傑偡丅
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDlg_EntryPar, CDialog)
//{{AFX_MSG_MAP(CDlg_EntryPar)
ON_WM_CLOSE()
ON_BN_CLICKED(IDC_BTN_PR01, OnBtnPr01)
ON_BN_CLICKED(IDC_BTN_PR02, OnBtnPr02)
ON_BN_CLICKED(IDC_BTN_PR03, OnBtnPr03)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDlg_EntryPar 儊僢僙乕僕 僴儞僪儔
void CDlg_EntryPar::OnCancel() { return; }
void CDlg_EntryPar::OnOK() { return; }
void CDlg_EntryPar::OnClose()
{
dialog_close(DSP_EDT);
CDialog::OnOK();
}
/////////////////////////////////////////////////////////////////////
/*-------------------------------------
m:25-Dec-1998
@p << Edit to Work >>
-------------------------------------*/
void CDlg_EntryPar::Edit2Work()
{
#if ATSUGI
char buf[64];
int cnt, num, idat;
long ldat;
char *p;
for (cnt=0;cnt<14;cnt++){
idat = 0;
ldat = 0;
GetDlgItemText(IDC_EDT_PR01+cnt, buf, 40+1);
switch (cnt){ //
case 0: // 00:(尰峴)俫俷俽俿 俬俢
num = 8;
p = SetPara[Ent_p].NowH_ID;
memmove(p, buf, num);
break;
case 1: // 01:(尰峴)抂枛俬俢
num = 8;
p = SetPara[Ent_p].NowT_ID;
memmove(p, buf, num);
break;
case 2: // 02:(怴婯)俫俷俽俿 俬俢
num = 8;
p = SetPara[Ent_p].NewH_ID;
memmove(p, buf, num);
break;
case 3: // 03:(怴婯)抂枛俬俢
num = 8;
p = SetPara[Ent_p].NewT_ID;
memmove(p, buf, num);
break;
case 4: // 04:僩儕僈壛懍搙
num = 8;
p = SetPara[Ent_p].Trg_ACC;
sscanf(buf, "%ld", &ldat);
sprintf(p, "%08ld", ldat);
break;
case 5: // 05:僩儕僈恔搙
num = 2;
p = SetPara[Ent_p].Trg_Sin;
sscanf(buf, "%d", &idat);
sprintf(p, "%02d", idat);
break;
case 6: // 06:*(捠曬桪愭)
num = 2;
p = SetPara[Ent_p].Snd_Dis;
memfill(p, num, ' ');
break;
case 7: // 07:*(捠曬愭揹榖斣崋)
num = 12;
p = SetPara[Ent_p].Tel_Num;
memfill(p, num, ' ');
break;
case 8: // 08:儕僩儔僀夞悢
num = 2;
p = SetPara[Ent_p].RetryCt;
sscanf(buf, "%d", &idat);
sprintf(p, "%02d", idat);
break;
case 9: // 09:儕僩儔僀娫妘
num = 2;
p = SetPara[Ent_p].RetryIv;
sscanf(buf, "%d", &idat);
sprintf(p, "%02d", idat);
break;
case 10: // 10:*(敪怣曽幃)
num = 2;
p = SetPara[Ent_p].Tel_Typ;
memfill(p, num, ' ');
break;
case 11: // 11:*(捠曬桪愭恔搙)
num = 2;
p = SetPara[Ent_p].Snd_Lev;
memfill(p, num, ' ');
break;
case 12: // 12:*(捠曬懸婡帪娫)
num = 4;
p = SetPara[Ent_p].Wait_Tm;
memfill(p, num, ' ');
break;
case 13: // 13:僐儊儞僩
num = 40;
p = SetPara[Ent_p].Re_Mark; //
memmove(p, buf, num);
break;
}
p[num] = (char) 0x0d; p[num+1] = (char) 0x0a;
}
memmove(SetPara[Ent_p].DatKind, "51\x0d\x0a", 4);
#endif
}
/*-------------------------------------
m:25-Dec-1998
@p << Work to Edit >>
-------------------------------------*/
void CDlg_EntryPar::Wrok2Edit()
{
#if ATSUGI
int a;
char buf[15][41];
// 愝掕僷儔儊乕僞偺俤倓倝倲昞帵
memmove(buf[ 0], SetPara[Ent_p].NowH_ID, 8); buf[ 0][ 8] = NULL; // (尰峴)俫俷俽俿 俬俢
memmove(buf[ 1], SetPara[Ent_p].NowT_ID, 8); buf[ 1][ 8] = NULL; // (尰峴)抂枛俬俢
memmove(buf[ 2], SetPara[Ent_p].NewH_ID, 8); buf[ 2][ 8] = NULL; // (怴婯)俫俷俽俿 俬俢
memmove(buf[ 3], SetPara[Ent_p].NewT_ID, 8); buf[ 3][ 8] = NULL; // (怴婯)抂枛俬俢
memmove(buf[ 4], SetPara[Ent_p].Trg_ACC, 8); buf[ 4][ 8] = NULL; // 僩儕僈壛懍搙
memmove(buf[ 5], SetPara[Ent_p].Trg_Sin, 2); buf[ 5][ 2] = NULL; // 僩儕僈恔搙
memmove(buf[ 6], SetPara[Ent_p].Snd_Dis, 2); buf[ 6][ 2] = NULL; // 捠曬桪愭
memmove(buf[ 7], SetPara[Ent_p].Tel_Num, 12); buf[ 7][12] = NULL; // 捠曬愭揹榖斣崋
memmove(buf[ 8], SetPara[Ent_p].RetryCt, 2); buf[ 8][ 2] = NULL; // 儕僩儔僀夞悢
memmove(buf[ 9], SetPara[Ent_p].RetryIv, 2); buf[ 9][ 2] = NULL; // 儕僩儔僀娫妘
memmove(buf[10], SetPara[Ent_p].Tel_Typ, 2); buf[10][ 2] = NULL; // 敪怣曽幃
memmove(buf[11], SetPara[Ent_p].Snd_Lev, 2); buf[11][ 2] = NULL; // 捠曬桪愭恔搙
memmove(buf[12], SetPara[Ent_p].Wait_Tm, 4); buf[12][ 4] = NULL; // 捠曬懸婡帪娫
memmove(buf[13], SetPara[Ent_p].Re_Mark, 40); buf[13][40] = NULL; // 僐儊儞僩
for (a=0;a<14;a++){
SetDlgItemText(IDC_EDT_PR01+a, buf[a]);
}
// 庴怣僷儔儊乕僞偺俽倲倎倲倝們昞帵
memmove(buf[ 0], RcvPara[Ent_p].Host_ID, 8); buf[ 0][ 8] = NULL; // 俫俷俽俿 俬俢
memmove(buf[ 1], RcvPara[Ent_p].Term_ID, 8); buf[ 1][ 8] = NULL; // 抂枛俬俢
memmove(buf[ 2], RcvPara[Ent_p].Trg_ACC, 8); buf[ 2][ 8] = NULL; // 僩儕僈壛懍搙
memmove(buf[ 3], RcvPara[Ent_p].Trg_Sin, 2); buf[ 3][ 2] = NULL; // 僩儕僈恔搙
memmove(buf[ 4], RcvPara[Ent_p].Snd_Dis, 2); buf[ 4][ 2] = NULL; // 捠曬桪愭
memmove(buf[ 5], RcvPara[Ent_p].Tel_Num, 12); buf[ 5][12] = NULL; // 捠曬愭揹榖斣崋
memmove(buf[ 6], RcvPara[Ent_p].RetryCt, 2); buf[ 6][ 2] = NULL; // 儕僩儔僀夞悢
memmove(buf[ 7], RcvPara[Ent_p].RetryIv, 2); buf[ 7][ 2] = NULL; // 儕僩儔僀娫妘
memmove(buf[ 8], RcvPara[Ent_p].Tel_Typ, 2); buf[ 8][ 2] = NULL; // 敪怣曽幃
memmove(buf[ 9], RcvPara[Ent_p].Snd_Lev, 2); buf[ 9][ 2] = NULL; // 捠曬桪愭恔搙
memmove(buf[10], RcvPara[Ent_p].Wait_Tm, 4); buf[10][ 4] = NULL; // 捠曬懸婡帪娫
for (a=0;a<11;a++){
SetDlgItemText(IDC_STC_PR01+a, buf[a]);
}
#endif
}
/////////////////////////////////////////////////////////////////////
/*=====================================
m:25-Dec-1999
@p << 弶婜壔 >>
=====================================*/
BOOL CDlg_EntryPar::OnInitDialog()
{
CDialog::OnInitDialog();
pOpenDlg = this;
// 儊僯儏乕儃僞儞(倃)丗柍岠
GetSystemMenu(FALSE)->EnableMenuItem(SC_CLOSE, MF_DISABLED);
// 尰嵼偺搊榐斣崋僨乕僞昞帵
Wrok2Edit();
return (TRUE);
}
/*=====================================
m:25-Dec-1999
@p << 搊榐 >>
=====================================*/
void CDlg_EntryPar::OnBtnPr01()
{
int err;
CC_File cFile;
Edit2Work();
// 曐懚
err = cFile.C_ParaSave(1); // 01:愝掕僷儔儊乕僞
Wrok2Edit();
}
/*=====================================
m:25-Dec-1999
@p << 報嶞 >>
=====================================*/
void CDlg_EntryPar::OnBtnPr02()
{
Print_req = Disp.Num;
}
/*=====================================
m:25-Dec-1999
@p << 栠傞 >>
=====================================*/
void CDlg_EntryPar::OnBtnPr03()
{
DspReqStack(DSP_EDT);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -