admin
2024-10-18 8ea6d363df77de2dca288397da8d4f9c3d3a5c4d
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
#pragma once
#include <wx/wx.h>
#include <wx/listctrl.h>
#include <wx/dataview.h>
#include <list>
#include <map>
#include <string>
#include "../common_nopch/JsonUtil.h"
#include "TradeQueueFrame.h"
#include "common.h"
#define FRAME_WIDTH 386*DPI/100
#define FRAME_HEIGHT 660*DPI/100
using namespace std;
 
struct DelegateResult
{
    list<DelegateInfo> delegates;
    wxString money;
 
};
 
 
 
 
class MainFrame :public wxFrame
{
private:
    wxDataViewListCtrl* m_listCtrl;
    wxStaticText* msgCtrl;
    wxStaticText* avaiableMoneyLabel;
    wxStaticText* currentTime;
    list<DelegateInfo> delegateList;
    bool killed;
    long msgExpireTime;
 
public:
    static  std::map<wxString, DelegateInfo> delegateMap;
 
public:
    // Constructor
    MainFrame(const wxString& title, wxPoint position = wxDefaultPosition, wxSize size = wxDefaultSize);
    // Event handlers
 
    void showMsg(string msg, MsgTypeEnum type);
 
    // ÇëÇóÁбí
    void requestDelegatedInfoList();
 
private:
 
    static void clearMsg(MainFrame *context);
 
    // This class handles events
    void OnClose(wxCloseEvent& event);
    // Ë¢ÐÂ
    void refresh();
 
 
    static DelegateResult parseDelegates(string result);
 
 
    static void startRequestDelegatedInfoListTask(MainFrame* context);
 
 
 
    // ÐÐÑ¡ÖÐʼþ
    void OnSelectionChanged(wxDataViewEvent& event);
 
    void OnButtonOpenTradeQueueClick(wxCommandEvent& event);
 
 
};