From: Steve Brokenshire Date: Sun, 13 Mar 2016 10:49:47 +0000 (+0000) Subject: Added comments to describe functions for frmContactEditorAddress X-Git-Tag: release-0.11~94 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=70d0309634e84cf79f4dacc3e71ec736e449163c;p=xestiaab%2F.git Added comments to describe functions for frmContactEditorAddress --- diff --git a/source/contacteditor/frmContactEditorAddress.cpp b/source/contacteditor/frmContactEditorAddress.cpp index 1556618..883e82e 100644 --- a/source/contacteditor/frmContactEditorAddress.cpp +++ b/source/contacteditor/frmContactEditorAddress.cpp @@ -26,8 +26,12 @@ frmContactEditorAddress::frmContactEditorAddress( wxWindow* parent ) : frmContactEditorAddressADT( parent ) { + + // Setup the window. + EditorMode = FALSE; sliPriority->Disable(); + } void frmContactEditorAddress::InitAddressEditor( wxInitDialogEvent& event ) @@ -37,16 +41,22 @@ void frmContactEditorAddress::InitAddressEditor( wxInitDialogEvent& event ) void frmContactEditorAddress::EnablePriority( wxCommandEvent& event ) { + + // Enable/disable the priority setting. + if (chkUsePref->IsChecked()){ sliPriority->Enable(); } else { sliPriority->Disable(); } + } void frmContactEditorAddress::ProcessData( wxCommandEvent& event ) { + // Process data. + // Check what edit mode we are in and go from there. long ListCtrlIndex; @@ -285,12 +295,18 @@ void frmContactEditorAddress::ProcessData( wxCommandEvent& event ) void frmContactEditorAddress::CloseWindow( wxCommandEvent& event ) { + + // Close the window. + this->Close(); + } void frmContactEditorAddress::CopyAddress( wxCommandEvent& event ) { + // Copy the address. + wxString MailingLabel; bool AddComma = FALSE; @@ -363,6 +379,9 @@ void frmContactEditorAddress::CopyAddress( wxCommandEvent& event ) void frmContactEditorAddress::SetEditorMode( bool EditMode, SectionType SectType ) { + + // Set the editor mode. + // Set if the editor is adding or editing an address. // FALSE = Add // TRUE = Edit @@ -520,6 +539,8 @@ void frmContactEditorAddress::SetupPointers( std::map *AddressLis int AddressIndex ) { + // Setup the pointers. + AddressListPtr = AddressList; AddressListTownPtr = AddressListTown; AddressListCountyPtr = AddressListCounty;