⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlg_pass.cpp

📁 对日本KSG震动探测仪器编写的伴侣服务代码
💻 CPP
字号:
// (Version 1.00 :: 10-Mar-1999 :: Harutoshi Yoshida)

// Dlg_Pass.cpp : 僀儞僾儕儊儞僥乕僔儑儞 僼傽僀儖
//

#include "stdafx.h"
#include "KSG.h"
#include "Dlg_Pass.h"

#include "C_Proc.h"
#include "C_Work.h"
#include "KSG_Main.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDlg_Pass 僟僀傾儘僌


CDlg_Pass::CDlg_Pass(CWnd* pParent /*=NULL*/)
	: CDialog(CDlg_Pass::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlg_Pass)
		// 儊儌 - ClassWizard 偼偙偺埵抲偵儅僢僺儞僌梡偺儅僋儘傪捛壛傑偨偼嶍彍偟傑偡丅
	//}}AFX_DATA_INIT
}


void CDlg_Pass::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlg_Pass)
		// 儊儌 - ClassWizard 偼偙偺埵抲偵儅僢僺儞僌梡偺儅僋儘傪捛壛傑偨偼嶍彍偟傑偡丅
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlg_Pass, CDialog)
	//{{AFX_MSG_MAP(CDlg_Pass)
	ON_WM_CLOSE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlg_Pass 儊僢僙乕僕 僴儞僪儔

/*=====================================
@p	<< Dialog弶婜壔 >>
=====================================*/
BOOL CDlg_Pass::OnInitDialog() 
{
	CDialog::OnInitDialog();

	User_work = 1;
	// 儊僯儏乕儃僞儞(倃)丗柍岠
	GetSystemMenu(FALSE)->EnableMenuItem(SC_CLOSE, MF_DISABLED);

	Pass_enable = 0;

	return TRUE;  // 僐儞僩儘乕儖偵僼僅乕僇僗傪愝掕偟側偄偲偒丄栠傝抣偼 TRUE 偲側傝傑偡
	              // 椺奜: OCX 僾儘僷僥傿 儁乕僕偺栠傝抣偼 FALSE 偲側傝傑偡
}

/*=====================================
@p	<< Dialog僋儘乕僘 >>
=====================================*/
void CDlg_Pass::OnClose() 
{
	User_work = 0;
	CDialog::OnClose();
}

/*=====================================
@p	<< 俷俲儃僞儞 >>
=====================================*/
void CDlg_Pass::OnOK() 
{
	CWnd*	pWnd;
	char	buf[32];
	#if HY_KAI
		char	*sdw = "d";
	#else
		char	*sdw = "specialdebugmode";
	#endif
	char	*kok = "$KOKUSAI";
//	char	*kok = "$";

	GetDlgItemText(IDC_EDIT_PASS, buf, 30);
	// special DEBUG mode check
	if (strcmp(buf, sdw) == 0){		// 僨僶僢僌儌乕僪擖椡
		SpecialDebug = 1 - SpecialDebug;
		Pass_enable = 1;
	}
	else{
		if (SpecialDebug){
			Pass_enable = 1;
		}
		else{
			// 捠忢僷僗儚乕僪妋擣
			// CQHY:23-Feb
			if (strcmp(buf, Pass_word) == 0) {				// 僷僗儚乕僪俷俲
				Pass_enable = 1;
			}
			else if (strcmp(buf, kok) == 0) {				// 僷僗儚乕僪俷俲
				Pass_enable = 1;
			}
			else {											// 僷僗儚乕僪俶俧
				AfxMessageBox(War_msg[3]);
				SetDlgItemText(IDC_EDIT_PASS, "");
				pWnd = GetDlgItem(IDC_EDIT_PASS);
				pWnd->SetFocus();
			}
		}
	}

	if (Pass_enable){
		User_work = 0;
		CDialog::OnOK();
	}
}

/*=====================================
@p	<< 僉儍儞僙儖儃僞儞 >>
=====================================*/
void CDlg_Pass::OnCancel() 
{
	User_work = 0;
	CDialog::OnCancel();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -