00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00040 #include "afxwin.h"
00041 #include "afxcmn.h"
00042 #include "AnimatedIcon.h"
00043
00044 #if !defined(AFX_FORM1_H__FA98B71B_D0B7_11D3_BC39_00C04F602FEE__INCLUDED_)
00045 #define AFX_FORM1_H__FA98B71B_D0B7_11D3_BC39_00C04F602FEE__INCLUDED_
00046
00047 #if _MSC_VER > 1000
00048 #pragma once
00049 #endif // _MSC_VER > 1000
00050
00051
00052
00053 #ifndef __AFXEXT_H__
00054 #include <afxext.h>
00055 #endif
00056
00057 #include "CustomPane.h"
00058
00059
00065 class CSyncForm : public CFormView
00066 {
00067
00068 private:
00069
00070 bool lockedUI;
00071
00073 int panesCount;
00074
00075
00076 CString contactsStatusLabel;
00077 CString calendarStatusLabel;
00078 CString tasksStatusLabel;
00079 CString notesStatusLabel;
00080 CString picturesStatusLabel;
00081
00082
00083 CString contactsLabel;
00084 CString calendarLabel;
00085 CString tasksLabel;
00086 CString notesLabel;
00087 CString picturesLabel;
00088
00089
00090 protected:
00091
00092
00093 CSyncForm();
00094 DECLARE_DYNCREATE(CSyncForm)
00095
00096 virtual void DoDataExchange(CDataExchange* pDX);
00097 virtual void OnDraw(CDC* pDC);
00098 virtual ~CSyncForm();
00099
00100 #ifdef _DEBUG
00101 virtual void AssertValid() const;
00102 virtual void Dump(CDumpContext& dc) const;
00103 #endif
00104
00105
00106 DECLARE_MESSAGE_MAP()
00107
00108
00109 public:
00110
00111
00112 enum { IDD = IDD_SYNC_FORM };
00113
00114
00115
00116 CFont fontBold;
00117 CFont fontNormal;
00118 CAnimatedIcon butStart;
00119
00120 CAnimatedIcon iconContacts;
00121 CAnimatedIcon iconCalendar;
00122 CAnimatedIcon iconTasks;
00123 CAnimatedIcon iconNotes;
00124 CAnimatedIcon iconPictures;
00125
00126 CBrush brushHollow;
00127
00128
00129 CAnimatedIcon iconStatusContacts;
00130 CAnimatedIcon iconStatusCalendar;
00131 CAnimatedIcon iconStatusTasks;
00132 CAnimatedIcon iconStatusNotes;
00133 CAnimatedIcon iconStatusPictures;
00134 CAnimatedIcon iconStatusSync;
00135
00136
00137 CCustomPane paneSync;
00138 CCustomPane paneContacts;
00139 CCustomPane paneCalendar;
00140 CCustomPane paneTasks;
00141 CCustomPane paneNotes;
00142 CCustomPane panePictures;
00143
00144
00145
00146 int syncSourceContactState;
00147 int syncSourceCalendarState;
00148 int syncSourceTaskState;
00149 int syncSourceNoteState;
00150 int syncSourcePictureState;
00151
00152
00157 void refreshSource(int sourceId);
00158
00159
00160 void refreshSources();
00161
00166 void repaintPaneControls(int paneType);
00167
00168
00169 void showSyncControls(BOOL show);
00170
00171 void lockButtons();
00172 void unlockButtons();
00173
00174
00175 void changeContactsStatus(CString& status);
00176 void changeCalendarStatus(CString& status);
00177 void changeTasksStatus (CString& status);
00178 void changeNotesStatus (CString& status);
00179 void changePicturesStatus(CString& status);
00180
00181 afx_msg LRESULT OnInitForm(WPARAM, LPARAM);
00182 afx_msg void OnBnClickedMainButSync();
00183 afx_msg void OnNcPaint( );
00184 afx_msg HBRUSH OnCtlColor( CDC* pDC, CWnd* pWnd, UINT nCtlColor);
00185 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00186
00187
00188 afx_msg void OnStnClickedMainBkSync();
00189
00190
00191 afx_msg void OnStnClickedMainBkContacts();
00192 afx_msg void OnStnClickedMainBkCalendar();
00193 afx_msg void OnStnClickedMainBkTasks();
00194 afx_msg void OnStnClickedMainBkNotes();
00195 afx_msg void OnStnClickedMainBkPictures();
00196 };
00197
00198
00201 #endif