#include "Frm02.h"

Frm02::Frm02(HmiApp* app, STTWidget *par, const string& id, const string& desc) : STTPage(app->getRuntime(), par, id, desc) {
	hmiApp = app;
}

Frm02::~Frm02() {
}

void Frm02::onInit() {

}

void Frm02::createParts() {
	setMainArg(0, 0, 1024, 600);
	setMainStyle(0, 0x808080, 0xffff, 0, 255, 0, 0xc0c0c0);

	/*----------------------------- Button : wMButton1                   -----------------------------*/
	wMButton1 = new STTButton(p_rt, this, "wMButton1", 0);
	wMButton1->setMainArg(344, 372, 294, 98, false);
	wMButton1->setPressedArg("进入系统", 0x0, "文泉驿微米黑", 16, 0);
	wMButton1->setPressedStyle(8, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton1->setReleasedArg("进入系统", 0x0, "文泉驿微米黑", 32, 0);
	wMButton1->setReleasedStyle(5, 255, 0xebebeb, 0x999999, 1, 1, 0x999999, 1, 0xebebeb);
	wMButton1->bindOpenFormHandler(Event::CLICKED, "Frm03", PageMode::NEWWIN, NULL);

	/*----------------------------- Label : wMLabel3                     -----------------------------*/
	wMLabel3 = new STTLabel(p_rt, this, "wMLabel3");
	wMLabel3->setMainArg(135, 124, 692, 108, "注意: 1.两份历史曲线需要在采样一段时候后才可显示 2.可提前开启Modbus TCP", TextAlign::LEFT, LabelLongMode::WRAP, 30);
	wMLabel3->setFonts(0xffffff, 30, "文泉驿微米黑", 0);
	wMLabel3->setMainStyle(0, 0xffffff, 0xffffff, GradDir::NONE, 0, 0x0, 0);
	wMLabel3->setFormatText(TextAlign::LEFT, LabelLongMode::WRAP, 30);

	/*called after widget created.*/

	return; //createParts END
}

void Frm02::onLoad() {
}

bool Frm02::onClosing() {
	return true;
}

void Frm02::onDispose() {

}
