#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);
|
|
|
};
|