#pragma once #include #include #include #include #include #include #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 delegates; wxString money; }; class MainFrame :public wxFrame { private: wxDataViewListCtrl* m_listCtrl; wxStaticText* msgCtrl; wxStaticText* avaiableMoneyLabel; wxStaticText* currentTime; list delegateList; bool killed; long msgExpireTime; public: static std::map 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); };