2025-05-08 21:44:16 +08:00
|
|
|
#include "ControlManager.h"
|
2025-05-11 21:27:59 +08:00
|
|
|
#include <ClientCore.h>
|
2025-05-08 21:44:16 +08:00
|
|
|
|
|
|
|
ControlManager::ControlManager(wxWindow* parent) : parent_(parent), header_(nullptr), local_(nullptr)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2025-05-11 21:27:59 +08:00
|
|
|
void ControlManager::Init(std::shared_ptr<ClientCore>& clientCore)
|
2025-05-08 21:44:16 +08:00
|
|
|
{
|
2025-05-11 00:00:10 +08:00
|
|
|
log_ = new LogControl(parent_);
|
2025-05-11 21:27:59 +08:00
|
|
|
header_ = new HeaderControl(parent_, clientCore);
|
2025-05-08 21:44:16 +08:00
|
|
|
local_ = new LocalControl(parent_);
|
2025-05-09 22:31:51 +08:00
|
|
|
remote_ = new RemoteControl(parent_);
|
|
|
|
task_ = new TaskControl(parent_);
|
2025-05-11 21:27:59 +08:00
|
|
|
online_ = new OnlineControl(parent_, clientCore);
|
2025-05-11 00:00:10 +08:00
|
|
|
|
|
|
|
header_->SetLogControl(log_);
|
2025-05-11 21:27:59 +08:00
|
|
|
online_->SetLogControl(log_);
|
|
|
|
|
|
|
|
clientCore->SetLogCallback([this](const wxString& msg) { log_->AddLog(msg); });
|
2025-05-08 21:44:16 +08:00
|
|
|
}
|