00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #if !defined(AFX_MAINFRM_H__FA98B70F_D0B7_11D3_BC39_00C04F602FEE1__INCLUDED_)
00021 #define AFX_MAINFRM_H__FA98B70F_D0B7_11D3_BC39_00C04F602FEE1__INCLUDED_
00022
00027 #if _MSC_VER > 1000
00028 #pragma once
00029 #endif // _MSC_VER > 1000
00030
00031 #include "HwndFunctions.h"
00032 #include "ConfigFrm.h"
00033
00034
00042 class CMainSyncFrame : public CFrameWnd
00043 {
00044
00045 private:
00046
00047
00048 int contactsBegin;
00049 int calendarBegin;
00050 int tasksBegin;
00051 int notesBegin;
00052
00053 protected:
00054 CMainSyncFrame();
00055 DECLARE_DYNCREATE(CMainSyncFrame)
00056
00057 public:
00058 CConfigFrame* pConfigFrame;
00059
00060
00061 HBITMAP hBmpDarkBlue;
00062 HBITMAP hBmpBlue;
00063 HBITMAP hBmpDark;
00064 HBITMAP hBmpLight;
00065
00066 protected:
00067 HANDLE hSyncThread;
00068 DWORD dwThreadId;
00069 bool configOpened;
00070 int dpiX, dpiY;
00071
00072
00073
00074
00075 public:
00076 virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
00077 protected:
00078 virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
00079
00080
00081
00082 public:
00083 virtual ~CMainSyncFrame();
00084 void backupSyncModeSettings();
00085 void restoreSyncModeSettings();
00086 void showSettingsWindow(const int paneToDisplay = 1);
00087
00088
00089 bool checkConnectionSettings();
00090
00091 int getDpiX() {return dpiX;}
00092 int getDpiY() {return dpiY;}
00093
00094 #ifdef _DEBUG
00095 virtual void AssertValid() const;
00096 virtual void Dump(CDumpContext& dc) const;
00097 #endif
00098
00099 protected:
00100
00101 int syncModeCalendar;
00102 int syncModeContacts;
00103 int syncModeTasks;
00104 int syncModeNotes;
00105
00106
00107 int currentSource;
00108 int totalItems;
00109 int currentItem;
00110
00111 CFont fontBold;
00112
00113 public:
00114 CStatusBar wndStatusBar;
00115 CSplitter wndSplitter;
00116 bool bSyncStarted;
00117
00118 void OnConfigClosed();
00119 void StartSync();
00120 int CancelSync();
00121
00122
00123 protected:
00124
00125 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00126
00127
00128
00129 DECLARE_MESSAGE_MAP()
00130 public:
00131
00132 afx_msg LRESULT OnMsgSyncBegin(WPARAM , LPARAM);
00133 afx_msg LRESULT OnMsgSyncEnd(WPARAM , LPARAM);
00134 afx_msg LRESULT OnMsgSyncSourceBegin(WPARAM , LPARAM);
00135 afx_msg LRESULT OnMsgSyncSourceEnd(WPARAM , LPARAM);
00136 afx_msg LRESULT OnMsgItemSynced(WPARAM , LPARAM);
00137 afx_msg LRESULT OnMsgTotalItems(WPARAM , LPARAM);
00138 afx_msg LRESULT OnMsgStartSyncBegin(WPARAM , LPARAM);
00139 afx_msg LRESULT OnMsgStartsyncEnded(WPARAM , LPARAM);
00140 afx_msg LRESULT OnMsgRefreshStatusBar(WPARAM, LPARAM);
00141 afx_msg LRESULT OnMsgSyncSourceState(WPARAM, LPARAM);
00142 afx_msg LRESULT OnMsgUnlockButtons(WPARAM, LPARAM);
00143
00144 afx_msg void OnFileConfiguration();
00145 afx_msg void OnToolsFullSync();
00146 afx_msg void OnFileSynchronize();
00147 afx_msg int OnCancelSync();
00148 afx_msg void OnToolsSetloglevel();
00149
00150 afx_msg BOOL OnNcActivate(BOOL bActive);
00151 afx_msg void OnClose();
00152 };
00153
00154
00155 DWORD WINAPI syncThread(LPVOID lpParam);
00156 DWORD WINAPI syncThreadKiller(LPVOID lpParam);
00157
00159
00160
00161
00162
00165 #endif // !defined(AFX_MAINFRM_H__FA98B70F_D0B7_11D3_BC39_00C04F602FEE__INCLUDED_)