📄 form1.cpp
字号:
// This file is in the public domain.
// There are no restrictions on any sort of usage of this file.
// This file's encoding is UTF-8.
#include <gui/System/Console.h>
#include <gui/System/Mona/Forms/Application.h>
#include <gui/System/Mona/Forms/Button.h>
#include <gui/System/Mona/Forms/Form.h>
using namespace System;
using namespace System::Drawing;
using namespace System::Mona::Forms;
class Form1 : public Form
{
public:
_P<Button> button1;
Form1()
{
this->InitializeComponent();
}
private:
void InitializeComponent()
{
this->button1 = new Button();
this->set_Location(Point(20, 64));
this->set_ClientSize(Size(110, 36));
this->set_Text("ぼたん");
this->button1->set_Bounds(Rectangle(8, 8, 94, 20));
this->button1->set_Text("ヽ(`Д´)ノウワァァン!!");
this->button1->add_Click(new EventHandler<Form1>(this, &Form1::button1_Click));
this->get_Controls()->Add(this->button1.get());
}
void button1_Click(_P<Object> sender, _P<EventArgs> e)
{
Console::WriteLine("Uwaaaaaaan!!");
}
public:
static void Main(_A<String> args)
{
Application::Run(new Form1());
}
};
SET_MAIN_CLASS(Form1)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -