00001
00002
00003
00004
00005
00006 #if !defined(AFX_SHEDULERWND_H__6C83160D_AC85_4A7F_A1A4_78EF69C3E03D__INCLUDED_)
00007 #define AFX_SHEDULERWND_H__6C83160D_AC85_4A7F_A1A4_78EF69C3E03D__INCLUDED_
00008
00009 #include "Sheduler_Tasks.h"
00010 #include "Scheduler_Log.h"
00011 #include "WndSplitter.h"
00012 #include "fsScheduleMgr.h"
00013 #if _MSC_VER > 1000
00014 #pragma once
00015 #endif
00016
00017 #include "fsEventsMgr.h"
00018 #include "plugins.h"
00019
00020 class CShedulerWnd : public CWnd
00021 {
00022 friend class CScheduler_Log;
00023
00024 public:
00025 CShedulerWnd();
00026
00027 public:
00028
00029 public:
00030
00031
00032
00033
00034 public:
00035 static HMENU Plugin_GetViewMenu();
00036 static HMENU Plugin_GetMainMenu();
00037
00038 static void Plugin_SetLanguage (wgLanguage, HMENU hMenuMain, HMENU);
00039 static void Plugin_GetPluginNames(LPCSTR *ppszLong, LPCSTR *ppszShort);
00040 static void Plugin_GetMenuViewItems(wgMenuViewItem **ppItems, int *cItems);
00041 static void Plugin_GetMenuImages(fsSetImage **ppImages, int *pcImages);
00042 static void Plugin_GetToolBarInfo(wgTButtonInfo **ppButtons, int *pcButtons);
00043 static HWND Plugin_CreateMainWindow (HWND hParent);
00044
00045 BOOL SaveSchedules();
00046
00047 void TurnoffWhenDone (fsShutdownType enST, BOOL bUse);
00048
00049 BOOL TurnoffWhenDone(fsShutdownType enST, int* ppos = NULL);
00050
00051 void HangupWhenDone (BOOL bUse);
00052 BOOL HangupWhenDone(int* ppos = NULL);
00053
00054 void ExitWhenDone (BOOL bUse);
00055 BOOL ExitWhenDone(int* ppos = NULL);
00056
00057 void SaveAll();
00058
00059 void UpdateTask (fsSchedule* task);
00060
00061 void AddTask (fsSchedule *task);
00062
00063 afx_msg void OnCreatenewtask();
00064 fsScheduleMgr* GetMgr();
00065
00066 void OnProperties (fsSchedule *task);
00067
00068 static void _ScheduleMgrEventFunc (fsSchedule *task, fsScheduleMgrEvent ev, LPVOID lp);
00069 CSheduler_Tasks m_wndTasks;
00070 BOOL Create (CWnd *pParent);
00071 virtual ~CShedulerWnd();
00072
00073 protected:
00074
00075 afx_msg LRESULT OnInsert(WPARAM, LPARAM);
00076 afx_msg void OnLogShowCol (UINT uCmd);
00077 afx_msg void OnTasksListShowCol (UINT uCmd);
00078 void UpdateLogColMenu (CMenu* menu);
00079 void UpdateTasksListColMenu (CMenu* menu);
00080 afx_msg LRESULT OnUpdateMenuView (WPARAM, LPARAM lp);
00081 void ShowLog (BOOL bShow);
00082 void ApplyLanguageToMenuView (CMenu *menu);
00083 afx_msg void OnShowLog();
00084 LRESULT afx_msg OnUpdateToolBar (WPARAM wp, LPARAM);
00085 afx_msg LRESULT OnUpdateMenu (WPARAM, LPARAM lp);
00086
00087 BOOL m_bShowLog;
00088 fsEventsMgr m_evMgr;
00089
00090 static void _ScheduleMgrEventDesc (LPCSTR pszEvent, fsScheduleMgrEventType enType, LPVOID lp);
00091
00092 void LoadTasks();
00093 fsScheduleMgr m_mgr;
00094 CWndSplitter m_wndSplitter;
00095 CScheduler_Log m_wndLog;
00096 afx_msg LRESULT OnAppQueryExit (WPARAM, LPARAM);
00097 afx_msg LRESULT OnAppExit (WPARAM, LPARAM);
00098
00099 afx_msg void OnDestroy();
00100 afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
00101 afx_msg void OnSize(UINT nType, int cx, int cy);
00102 afx_msg void OnTasksDeletetask();
00103 afx_msg void OnTasksDisable();
00104 afx_msg void OnTasksEnable();
00105 afx_msg void OnTasksProperties();
00106 afx_msg void OnSetFocus(CWnd* pOldWnd);
00107
00108 DECLARE_MESSAGE_MAP()
00109 };
00110
00111
00112
00113 #endif