DragonNest/Server/ServiceManagerEx/ServiceManagerEx.h

88 lines
1.9 KiB
C
Raw Normal View History

2024-12-19 09:48:26 +08:00
// ServiceManagerEx.h : ServiceManagerEx <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α׷<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
//
#pragma once
#ifndef __AFXWIN_H__
#error "PCH<43><48> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD> 'stdafx.h'<27><> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>."
#endif
#include "resource.h" // <20><> <20><>ȣ<EFBFBD>Դϴ<D4B4>.
#include "SMConfig.h"
#include "GSMServer.h"
#include "Scheduler.h"
// CServiceManagerExApp:
// <20><> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD> ServiceManagerEx.cpp<70><70> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
//
class CLogViewDisplayer;
class CServiceManagerExApp : public CWinApp
{
public:
CServiceManagerExApp();
virtual ~CServiceManagerExApp();
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
// <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
afx_msg void OnAppAbout();
DECLARE_MESSAGE_MAP()
public:
virtual BOOL OnIdle(LONG lCount);
virtual BOOL PreTranslateMessage(MSG* pMsg);
public:
bool LoadConfig();
void ReloadConfigEx();
public:
void BuildView();
void RefreshView();
void RefreshStateView();
public:
const ConfigEx& GetConfigEx() const { return m_ConfigEx; }
public:
void OnPatchStart();
void OnPatchProgress(int id, const wchar_t* key, unsigned long progress, unsigned long progressMax);
void OnPatchEnd(bool succeeded);
void OnUnzipProgress(int id, const wchar_t* filename, unsigned long progress, unsigned long progressMax);
public:
void OnWorldMaxUser(int id, int maxUser);
void OnPatchFail(int id, const wchar_t* msg);
void OnPatchCompleted(int id);
void OnCommandPatch();
private:
void LoadConfigEx();
bool CreateDisplayer();
bool InitServiceManager();
public:
bool ReportExceptionToClipboard();
bool ReportExceptionToBuffer(size_t days, OUT wstring& buffer);
bool ReportExceptionToFile(const wstring& filename);
private:
bool SaveToClipboard(const wstring& report);
private:
void BuildSchedule();
void ClearSchedule();
private:
CGSMServer m_GSMServer;
ConfigEx m_ConfigEx;
HANDLE m_hMutex;
CLogViewDisplayer* m_pLogDisplayer;
SimpleScheduler::CScheduler m_Scheduler;
};
extern CServiceManagerExApp theApp;