📄 hb_jr.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "haibao.h"
#include "hb_jr.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm3 *Form3;
//---------------------------------------------------------------------------
__fastcall TForm3::TForm3(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm3::quedingClick(TObject *Sender)
{int i,n;
if(shurulei3->Text=="")
ShowMessage("你的类名或模版还没添加");
else
{n=haibao1->ListBox1->Count;
for(i=0;i<n;i++)
{ if(shurulei3->Text==haibao1->ListBox1->Items->Strings[i])
{ShowMessage("在公共类里已有相同的标题");shurulei3->Clear();
return; //for 循环用来判断在公共类里是否有相同的标题
}
}
n=haibao1->ListBox2->Count;
for(i=0;i<n;i++)
{ if(shurulei3->Text==haibao1->ListBox2->Items->Strings[i])
{ShowMessage("在节日类里已有相同的标题");shurulei3->Clear();
return; //for 循环用来判断在节日类里是否有相同的标题
}
}
haibao1->ListBox2->Items->Strings[haibao1->ListBox2->Count]=shurulei3->Text;
remove("jieriinfo");
haibao1->ListBox2->Items->SaveToFile("jieriinfo");
mobanwenben->Lines->SaveToFile(shurulei3->Text); //写入模版
shurulei3->Clear();
mobanwenben->Clear();
Form3->Close();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm3::fanhuiClick(TObject *Sender)
{
Form3->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm3::N1Click(TObject *Sender)
{ TFontStyles TF;
if (FontDialog1->Execute ( ))
if (mobanwenben->SelLength >0)
{ //用字体对话框中的设置修改被选文本的字体
mobanwenben->SelAttributes->Size =FontDialog1->Font->Size;
TF = FontDialog1->Font->Style;
mobanwenben->SelAttributes->Style =TF;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm3::N2Click(TObject *Sender)
{
if(ColorDialog1->Execute())
mobanwenben->SelAttributes->Color=ColorDialog1->Color;
}
//---------------------------------------------------------------------------
void __fastcall TForm3::N3Click(TObject *Sender)
{
mobanwenben->CopyToClipboard ( );
}
//---------------------------------------------------------------------------
void __fastcall TForm3::N5Click(TObject *Sender)
{
mobanwenben->PasteFromClipboard ( );
}
//---------------------------------------------------------------------------
void __fastcall TForm3::N4Click(TObject *Sender)
{
mobanwenben->CutToClipboard ( );
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -