2025-05-08 21:13:36 +08:00
|
|
|
#ifndef ONLINECONTROL_H
|
|
|
|
#define ONLINECONTROL_H
|
|
|
|
|
2025-05-09 23:49:27 +08:00
|
|
|
#include "InterfaceDefine.hpp"
|
2025-05-11 21:27:59 +08:00
|
|
|
#include <InfoClient.hpp>
|
|
|
|
#include <mutex>
|
2025-05-08 21:13:36 +08:00
|
|
|
|
2025-05-11 21:27:59 +08:00
|
|
|
class HeaderControl;
|
|
|
|
class LogControl;
|
|
|
|
class ClientCore;
|
2025-05-08 21:13:36 +08:00
|
|
|
class OnlineControl : public wxPanel
|
|
|
|
{
|
|
|
|
public:
|
2025-05-11 21:27:59 +08:00
|
|
|
OnlineControl(wxWindow* parent, std::shared_ptr<ClientCore>& clientCore);
|
2025-05-08 21:13:36 +08:00
|
|
|
~OnlineControl() override;
|
2025-05-09 23:49:27 +08:00
|
|
|
|
2025-05-11 21:27:59 +08:00
|
|
|
public:
|
|
|
|
void SetHeaderControl(HeaderControl* headerControl);
|
|
|
|
void SetLogControl(LogControl* logControl);
|
|
|
|
|
2025-05-09 23:49:27 +08:00
|
|
|
private:
|
|
|
|
void Init();
|
2025-05-11 21:27:59 +08:00
|
|
|
void InitCall();
|
|
|
|
void OnFreshClients(wxCommandEvent& event);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void OnFreshClientsCall(const InfoClientVec& infoClientVec);
|
2025-05-09 23:49:27 +08:00
|
|
|
|
|
|
|
public:
|
2025-05-11 21:27:59 +08:00
|
|
|
wxButton* btnFresh_;
|
|
|
|
std::mutex mutex_;
|
2025-05-09 23:49:27 +08:00
|
|
|
wxStaticText* lbCurState_;
|
|
|
|
wxStaticText* elbCurState_;
|
|
|
|
wxStaticText* lbCurPoint_;
|
|
|
|
wxStaticText* elbCurPoint_;
|
|
|
|
wxListBox* onLineList_;
|
2025-05-11 21:27:59 +08:00
|
|
|
HeaderControl* headerControl_;
|
|
|
|
LogControl* logControl_;
|
|
|
|
std::shared_ptr<ClientCore> clientCore_;
|
2025-05-08 21:13:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ONLINECONTROL_H
|