-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLauncherDialog.h
95 lines (84 loc) · 3.05 KB
/
LauncherDialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#pragma once
#include "afxcmn.h"
#include "afxwin.h"
#include <vector>
#include <set>
#include <map>
// äèàëîãîâîå îêíî LauncherDialog
class LauncherDialog : public CDialog
{
DECLARE_DYNAMIC(LauncherDialog)
public:
LauncherDialog(CWnd* pParent = NULL); // ñòàíäàðòíûé êîíñòðóêòîð
virtual ~LauncherDialog();
bool isWantStartGame();
CString getStartGamePath();
CString getStartGameTitle();
// Äàííûå äèàëîãîâîãî îêíà
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_LAUNCHERDIALOG };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // ïîääåðæêà DDX/DDV
void showInstalledTabControls();
void showNewTabControls();
void CreateColumns();
void RescanInstalled();
void AddInstalledGame(CString name, CString version, std::pair<CString, CString> path);
void AddNewGame(CString name, CString version, CString sz, CString page, std::pair<CString, CString> downloadPageAndInstallName);
void SetCell(CListCtrl& ctrl, CString value, int nRow, int nCol);
void UpdateNewGamesFromUrl(CString url, CString temp_xmlfile);
void ReadNewGamesFromXMLAndAdd(CString temp_xmlfile);
void UpdateNewGamesRssAdditionalInfoFromUrl(CString url, CString temp_xmlfile);
void ReadAdditionalInfoFromXMLRss(CString temp_xmlfile);
//bool UpdateApprovedGamesFromUrl(CString url, CString res_path);
//void UpdateApprovedFromFile();
void ClearNewList();
void SortColumn(CListCtrl* ctrl, int columnIndex, bool ascending);
//std::map<CString/*game name*/, CString/*game path*/> installedGamePath;
std::set<CString> installedGameNameCache; //êåø äëÿ áûñòðîé ïðîâåðêè
//std::vector<std::pair<CString/*name*/, CString/*page*/> > networkGameDWPageAndName;
//std::set<CString> networkGameName;
//CString approvedFile;
std::vector<CString> repoList;
std::vector<CString> rssList;
std::map<CString/*game name*/, std::pair<CString /*approve*/, CString /*info*/> > approveInfo;
std::map<CString/*game title*/, std::pair<CString /*pubDate*/, CString /*Desc*/> > rssInfo;
CString m_stGamePath;
CString m_stGameTitle;
CString m_gameBaseDir;
bool m_wantPlay;
int m_lastSelFilter;
bool m_sortInstalledUp;
int m_sortInstalledLastItem;
bool m_sortNewUp;
int m_sortNewLastItem;
DECLARE_MESSAGE_MAP()
public:
CTabCtrl m_tab;
virtual BOOL OnInitDialog();
CListCtrl m_listInstalled;
CListCtrl m_listNew;
afx_msg void OnTcnSelchangeTab1(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnTcnSelchangingTab1(NMHDR *pNMHDR, LRESULT *pResult);
CButton m_btnDelete;
CButton m_btnUpdate;
CButton m_btnInstall;
CButton m_btnOpenLink;
virtual BOOL PreTranslateMessage(MSG* pMsg);
virtual void OnOK();
afx_msg void OnBnClickedBtnDelGame();
afx_msg void OnBnClickedBtnUpdate();
afx_msg void OnBnClickedBtnOpenLink();
afx_msg void OnBnClickedBtnInstall();
afx_msg void OnBnClickedBtnPlayGamem();
CButton m_btnPlayGame;
CString currDir;
afx_msg void OnBnClickedBtnResumeoldGame2();
CButton m_btnResumeGame;
CComboBox m_comboFiler;
afx_msg void OnCbnSelchangeComboFilter();
afx_msg void OnHdnItemclickListInstalled(NMHDR *pNMHDR, LRESULT *pResult);
private:
CButton m_CheckSander;
};