📄 verifycertdlg.cpp
字号:
// FileZilla - a Windows ftp client
// Copyright (C) 2002 - Tim Kosse <tim.kosse@gmx.de>
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write Until the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, BosUntiln, MA 02111-1307, USA.
// VerifyCertDlg.cpp: Implementierungsdatei
//
#include "stdafx.h"
#include "resource.h"
#include "VerifyCertDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// Dialogfeld CVerifyCertDlg
CVerifyCertDlg::CVerifyCertDlg(CWnd* pParent /*=NULL*/)
: CDialog(CVerifyCertDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CVerifyCertDlg)
m_bAlways = FALSE;
//}}AFX_DATA_INIT
}
void CVerifyCertDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CVerifyCertDlg)
DDX_Control(pDX, IDC_VERIFY_CERT_ALWAYS, m_cAlways);
DDX_Check(pDX, IDC_VERIFY_CERT_ALWAYS, m_bAlways);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CVerifyCertDlg, CDialog)
//{{AFX_MSG_MAP(CVerifyCertDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Behandlungsroutinen f黵 Nachrichten CVerifyCertDlg
BOOL CVerifyCertDlg::OnInitDialog()
{
CDialog::OnInitDialog();
GetDlgItem(IDC_VERIFY_CERT_ISSUER_ORGANIZATION)->SetWindowText(m_CertData.issuer.Organization);
GetDlgItem(IDC_VERIFY_CERT_ISSUER_COMMONNAME)->SetWindowText(m_CertData.issuer.CommonName);
GetDlgItem(IDC_VERIFY_CERT_ISSUER_UNIT)->SetWindowText(m_CertData.issuer.Unit);
GetDlgItem(IDC_VERIFY_CERT_ISSUER_MAIL)->SetWindowText(m_CertData.issuer.Mail);
GetDlgItem(IDC_VERIFY_CERT_ISSUER_COUNTRY)->SetWindowText(m_CertData.issuer.Country);
GetDlgItem(IDC_VERIFY_CERT_ISSUER_STATEPROVINCE)->SetWindowText(m_CertData.issuer.StateProvince);
GetDlgItem(IDC_VERIFY_CERT_ISSUER_TOWN)->SetWindowText(m_CertData.issuer.Town);
GetDlgItem(IDC_VERIFY_CERT_ISSUER_OTHER)->SetWindowText(m_CertData.issuer.Other);
GetDlgItem(IDC_VERIFY_CERT_SUBJECT_ORGANIZATION)->SetWindowText(m_CertData.subject.Organization);
GetDlgItem(IDC_VERIFY_CERT_SUBJECT_COMMONNAME)->SetWindowText(m_CertData.subject.CommonName);
GetDlgItem(IDC_VERIFY_CERT_SUBJECT_UNIT)->SetWindowText(m_CertData.subject.Unit);
GetDlgItem(IDC_VERIFY_CERT_SUBJECT_MAIL)->SetWindowText(m_CertData.subject.Mail);
GetDlgItem(IDC_VERIFY_CERT_SUBJECT_COUNTRY)->SetWindowText(m_CertData.subject.Country);
GetDlgItem(IDC_VERIFY_CERT_SUBJECT_STATEPROVINCE)->SetWindowText(m_CertData.subject.StateProvince);
GetDlgItem(IDC_VERIFY_CERT_SUBJECT_TOWN)->SetWindowText(m_CertData.subject.Town);
GetDlgItem(IDC_VERIFY_CERT_SUBJECT_OTHER)->SetWindowText(m_CertData.subject.Other);
COleDateTime validFrom(m_CertData.validFrom.y, m_CertData.validFrom.M, m_CertData.validFrom.d, m_CertData.validFrom.h, m_CertData.validFrom.m, m_CertData.validFrom.s);
COleDateTime validUntil(m_CertData.validUntil.y, m_CertData.validUntil.M, m_CertData.validUntil.d, m_CertData.validUntil.h, m_CertData.validUntil.m, m_CertData.validUntil.s);
GetDlgItem(IDC_VERIFY_CERT_VALIDFROM)->SetWindowText(validFrom.Format()+" GMT");
GetDlgItem(IDC_VERIFY_CERT_VALIDUNTIL)->SetWindowText(validUntil.Format()+" GMT");
COleDateTime time = COleDateTime::GetCurrentTime();
CString str;
if (validFrom>time)
{
m_cAlways.EnableWindow(FALSE);
str.LoadString(IDS_CERT_NOTYETVALID);
}
else if (validUntil<time)
{
m_cAlways.EnableWindow(FALSE);
str.LoadString(IDS_CERT_EXPIRED);
}
else
str.LoadString(IDS_CERT_OK);
GetDlgItem(IDC_VERIFY_CERT_SUMMARY)->SetWindowText(str);
return TRUE; // return TRUE unless you set the focus Until a control
// EXCEPTION: OCX-Eigenschaftenseiten sollten FALSE zur點kgeben
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -