📄 ybcommdesigneditors.cpp
字号:
//---------------------------------------------------------------------------
#pragma hdrstop
#include "YbCommDesignEditors.h"
#include "Unit_YBComm32_About.h"
#include "Unit_YbCommDevice_Settings.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
//---------------------------------------------------------------------------
namespace Ybcommdevice
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = {__classid(TYbCommDevice)};
RegisterComponents("Victor", classes, 0);
RegisterComponentEditor(__classid(TYbCommDevice),__classid(TYbCommDeviceEditor));
}
}
//---------------------------------------------------------------------------
void __fastcall TYbCommDeviceEditor::ExecuteVerb(int Index)
{
if(Index == 0)
{
bool bPressedBtnOK;
TForm_YbCommDevice_Settings *FormSettings;
TYbCommDevice *lpComm = dynamic_cast<TYbCommDevice*>(Component);
if(lpComm)
{
FormSettings = new TForm_YbCommDevice_Settings(NULL,lpComm,false);
bPressedBtnOK = FormSettings->ShowModal() == IDOK;
delete FormSettings;
if(bPressedBtnOK)
{
Designer->Modified();
}
}
}
else
{
TForm_YBComm32_About *FormAbout = new TForm_YBComm32_About(NULL,Component->ClassName());
FormAbout->ShowModal();
delete FormAbout;
}
}
//---------------------------------------------------------------------------
AnsiString __fastcall TYbCommDeviceEditor::GetVerb(int Index)
{
if(Index == 0)
return TForm_YBComm32_About::TMsgStrings().Str_Settings;
return TForm_YBComm32_About::TMsgStrings().Str_MenuAbout;
}
//---------------------------------------------------------------------------
int __fastcall TYbCommDeviceEditor::GetVerbCount(void)
{
return 2;
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -