-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApplication.h
60 lines (47 loc) · 1.2 KB
/
Application.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
#pragma once
#include "Project.h"
#include "TrayIcon.h"
#include <set>
#include <string>
#include <stdint.h>
namespace EShellMenu
{
class Application : public wxApp
{
public:
Application();
virtual ~Application();
void LoadState();
void AddProject( const tstring& project );
void RemoveProject( const tstring& project );
void AddFavorite( const tstring& command );
void RemoveFavorite( const tstring& command );
bool IsFavorite( const tstring& command );
bool IsUpdateAvailable() const
{
return m_NetworkVersion > m_CurrentVersion;
}
friend class EShellMenu::TrayIcon;
protected:
virtual void OnInitCmdLine( wxCmdLineParser& parser );
virtual bool OnCmdLineParsed( wxCmdLineParser& parser );
virtual bool OnInit();
virtual int OnRun();
virtual int OnExit();
void OnUpdateTimer( wxTimerEvent& evt );
void OnMenuUpdate( wxCommandEvent& evt );
private:
HANDLE m_MutexHandle;
tstring m_Title;
tstring m_MutexName;
TrayIcon* m_TrayIcon;
std::set< tstring > m_Projects;
std::set< tstring > m_Favorites;
tstring m_EShellPath;
tstring m_InstallPath;
uint64_t m_CurrentVersion;
uint64_t m_NetworkVersion;
bool m_UpdateNow;
wxTimer m_UpdateTimer;
};
}