#include <SyncForm.h>
Public Types | |
enum | { IDD = IDD_SYNC_FORM } |
Public Member Functions | |
void | refreshSource (int sourceId) |
refresh UI info about a source | |
void | refreshSources () |
void | repaintPaneControls (int paneType) |
repaints sync controls from a pane associated to a source | |
void | showSyncControls (BOOL show) |
void | lockButtons () |
Lock UI buttons of main window. | |
void | unlockButtons () |
Unlock UI buttons of main window. | |
void | changeContactsStatus (CString &status) |
Used to change the status text for a source. | |
void | changeCalendarStatus (CString &status) |
void | changeTasksStatus (CString &status) |
void | changeNotesStatus (CString &status) |
void | changePicturesStatus (CString &status) |
afx_msg LRESULT | OnInitForm (WPARAM, LPARAM) |
afx_msg void | OnBnClickedMainButSync () |
afx_msg void | OnNcPaint () |
afx_msg HBRUSH | OnCtlColor (CDC *pDC, CWnd *pWnd, UINT nCtlColor) |
afx_msg BOOL | OnEraseBkgnd (CDC *pDC) |
afx_msg void | OnStnClickedMainBkSync () |
afx_msg void | OnStnClickedMainBkContacts () |
afx_msg void | OnStnClickedMainBkCalendar () |
afx_msg void | OnStnClickedMainBkTasks () |
afx_msg void | OnStnClickedMainBkNotes () |
afx_msg void | OnStnClickedMainBkPictures () |
Public Attributes | |
CFont | fontBold |
CFont | fontNormal |
CAnimatedIcon | butStart |
CAnimatedIcon | iconContacts |
CAnimatedIcon | iconCalendar |
CAnimatedIcon | iconTasks |
CAnimatedIcon | iconNotes |
CAnimatedIcon | iconPictures |
CBrush | brushHollow |
CAnimatedIcon | iconStatusContacts |
CAnimatedIcon | iconStatusCalendar |
CAnimatedIcon | iconStatusTasks |
CAnimatedIcon | iconStatusNotes |
CAnimatedIcon | iconStatusPictures |
CAnimatedIcon | iconStatusSync |
CCustomPane | paneSync |
CCustomPane | paneContacts |
CCustomPane | paneCalendar |
CCustomPane | paneTasks |
CCustomPane | paneNotes |
CCustomPane | panePictures |
int | syncSourceContactState |
int | syncSourceCalendarState |
int | syncSourceTaskState |
int | syncSourceNoteState |
int | syncSourcePictureState |
Protected Member Functions | |
virtual void | DoDataExchange (CDataExchange *pDX) |
virtual void | OnDraw (CDC *pDC) |
Private Attributes | |
bool | lockedUI |
int | panesCount |
The current number of panes displayed (4 or 5). | |
CString | contactsStatusLabel |
CString | calendarStatusLabel |
CString | tasksStatusLabel |
CString | notesStatusLabel |
CString | picturesStatusLabel |
CString | contactsLabel |
CString | calendarLabel |
CString | tasksLabel |
CString | notesLabel |
CString | picturesLabel |
Contains objects on the main screen of the UI (panes, labels, ...). TODO - refactoring: please use arrays for sources (sourceStatusLabel, iconSource,...)
void CSyncForm::changeContactsStatus | ( | CString & | status | ) |
Used to change the status text for a source.
Using a buffer to avoid re-paintings.
Referenced by refreshSource().
void CSyncForm::lockButtons | ( | ) |
Lock UI buttons of main window.
Buttons are locked when starting sync, to avoid errors clicking quickly on buttons, and avoid displaying the cancel msg together with the full-sync msg. Buttons are locked when canceling sync.
Referenced by CMainSyncFrame::OnMsgLockButtons().
LRESULT CSyncForm::OnInitForm | ( | WPARAM | , | |
LPARAM | ||||
) |
void CSyncForm::refreshSource | ( | int | sourceId | ) |
refresh UI info about a source
sourceId | : the source type id {SYNCSOURCE_CONTACTS,..}, defined in ClientUtil.h |
References changeContactsStatus(), CCustomPane::hPrevStatusIcon, isSourceVisible(), CCustomPane::state, CAnimatedIcon::StopAnim(), SYNCSOURCE_CALENDAR, and wsafeMessageBox().
void CSyncForm::repaintPaneControls | ( | int | paneType | ) |
repaints sync controls from a pane associated to a source
paneType | : the pane type id {PANE_TYPE_CONTACTS, ..}, defined in CustomPane.h |
void CSyncForm::unlockButtons | ( | ) |
Unlock UI buttons of main window.
Buttons are unlocked after the 'ContinueAfterPrepareSync()' method. Buttons are unlocked when the sync process has finished.
Referenced by CMainSyncFrame::OnMsgStartsyncEnded(), and CMainSyncFrame::OnMsgUnlockButtons().