CRLDisplayNotebook.cpp

Go to the documentation of this file.
00001 
00010 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) && defined(PKIFRESOURCES_ALLOW_GCC_PRAGMA)
00011     #pragma implementation "CRLDisplayNotebook.cpp"
00012 #endif
00013 
00014 //Pick up PKIF windows SDK configuration macros instead of WX's 
00015 #include "PKIFdll.h"
00016 // For compilers that support precompilation, includes "wx/wx.h".
00017 #include "wx/wxprec.h"
00018 
00019 #ifdef __BORLANDC__
00020     #pragma hdrstop
00021 #endif
00022 
00023 #include "CRLDisplayNotebook.h"
00024 
00025 // WDR: class implementations
00026 
00027 //----------------------------------------------------------------------------
00028 // CPKIFCRLDisplayNotebook
00029 //----------------------------------------------------------------------------
00030 
00031 // WDR: event table for CPKIFCRLDisplayNotebook
00032 
00033 BEGIN_EVENT_TABLE(CPKIFCRLDisplayNotebook,wxDialog)
00034     EVT_BUTTON( wxID_OK, CPKIFCRLDisplayNotebook::OnOK )
00035     EVT_BUTTON( wxID_CANCEL, CPKIFCRLDisplayNotebook::OnCancel )
00036     EVT_INIT_DIALOG( CPKIFCRLDisplayNotebook::OnInitDialog )
00037 END_EVENT_TABLE()
00038 
00046 CPKIFCRLDisplayNotebook::CPKIFCRLDisplayNotebook( wxWindow *parent, wxWindowID id, const wxString &title,
00047     const wxPoint &position, const wxSize& size, long style ) :
00048     wxDialog( parent, id, title, position, size, style )
00049 {
00050     // WDR: dialog function PathSettingsNotebook for CPKIFCRLDisplayNotebook
00051     wxSizer* sizerTop = CRLDisplayNotebook( this, TRUE, TRUE);
00052     SetSizer(sizerTop); 
00053 
00054     wxNotebook* pNotebook = static_cast<wxNotebook *>(this->FindWindow(ID_NOTEBOOK_CRL_DISPLAY)); 
00055     wxASSERT(pNotebook);
00056 
00057     wxPanel *generalCRLDetailsPanel = new wxPanel( pNotebook, -1 );
00058     m_pGeneralCRLDetailsPanel = new CPKIFGeneralCRLDetailsPanel(generalCRLDetailsPanel);
00059     pNotebook->AddPage( generalCRLDetailsPanel, wxT("General") );
00060 
00061     wxPanel *crlDetailsPanel = new wxPanel( pNotebook, -1 );
00062     m_pCRLDetailsPanel = new CPKIFCRLDetailsPanel(crlDetailsPanel);
00063     pNotebook->AddPage( crlDetailsPanel, wxT("Revocation List") );
00064 
00065     sizerTop->Layout();
00066     sizerTop->SetSizeHints(this);
00067     sizerTop->Fit(this);
00068 }
00076 CPKIFCRLDisplayNotebook::~CPKIFCRLDisplayNotebook()
00077 {
00078     if(m_pGeneralCRLDetailsPanel) delete m_pGeneralCRLDetailsPanel;
00079     if(m_pCRLDetailsPanel) delete m_pCRLDetailsPanel;
00080 }
00081 
00082 // WDR: handler implementations for CPKIFCRLDisplayNotebook
00090 void CPKIFCRLDisplayNotebook::OnCancel( wxCommandEvent &event )
00091 {
00092     EndModal(wxID_CANCEL);
00093 }
00101 void CPKIFCRLDisplayNotebook::OnOK( wxCommandEvent &event )
00102 {
00103     if(m_pGeneralCRLDetailsPanel->Validate() && m_pCRLDetailsPanel->Validate())
00104         EndModal(wxID_OK);
00105 }
00113 void CPKIFCRLDisplayNotebook::OnInitDialog(wxInitDialogEvent& event)
00114 {
00115     m_pGeneralCRLDetailsPanel->SetCRL(m_crl);
00116     m_pGeneralCRLDetailsPanel->OnInitDialog(event); 
00117     m_pCRLDetailsPanel->SetCRL(m_crl);
00118     m_pCRLDetailsPanel->OnInitDialog(event);    
00119 }
00127 void CPKIFCRLDisplayNotebook::SetCRL(CPKIFCRLPtr& crl)
00128 {
00129     m_crl = crl;
00130 }

Generated on Mon Nov 15 11:15:50 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6