P
pzoon
Unregistered / Unconfirmed
GUEST, unregistred user!
//---------------------------------------------------------------------------
#ifndef DBGridErpH
#define DBGridErpH
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Classes.hpp>
#include <Controls.hpp>
#include <DBGrids.hpp>
#include <Grids.hpp>
#include <Forms.hpp>
#include <UDBGridErpFrm.h>
#include <DsgnIntf.hpp>
//---------------------------------------------------------------------------
//编辑器专用
class TUnlFileNameProperty : public TStringProperty
{
public:
TPropertyAttributes __fastcall GetAttributes()
{
return TPropertyAttributes () << paDialog;
}
void __fastcall Edit() //User Click Show(用户单击了选择)
{
TUDBGridErpFrm* dlg = new TUDBGridErpFrm(Application);
dlg->FileName = GetValue();
//Return String value(返回一个字符串的值)
if (dlg->Execute())
{
Value = dlg->FileName;
//Where "Value"
}
delete dlg;
}
};
//----------------------
class TUnlBaudRateProperty : public TIntegerProperty
{
public:
TPropertyAttributes __fastcall GetAttributes();
{
return TPropertyAttributes () << paValueList;
}
void __fastcall GetValues(TGetStrProc Proc)
{
Proc("1200");
Proc("2400");
Proc("4800");
Proc("9600");
Proc("19200");
}
};
//------------------------
class TUnlAboutProperty : public TStringProperty
{
public:
TPropertyAttributes __fastcall GetAttributes()
{
return TPropertyAttributes () << paDialog << paReadOnly;
}
void __fastcall Edit() //User Click Show(用户单击了选择)
{
TUDBGridErpFrm *AboutBox = new TUDBGridErpFrm(Application);
AboutBox->ShowModal();
delete AboutBox;
}
};
//--------------------------
class TMenuAboutEditor : public TDefaultEditor
{
public:
/*
int __fastcall GetVerbCount()
{
return 3;
}
AnsiString __fastcall GetVerb(int Index)
{
AnsiString S;
switch (Index)
{
case 0: S = "&About TurboPower";
break;
case 1: S = "TurboPower on the Web";
break;
case 2: S = "&Designer";
break;
}
return S;
}
void __fastcall ExecuteVerb(int Index)
{
switch (Index)
{
case 0:
ShowMessage("制作About菜单失败!");
break;
case 1:
ShellExecute(Application->Handle, "open", "http://www.jx_wbo.com",
0, 0, SW_NORMAL);
break;
case 2:
ShowMessage("制作Designer菜单失败!");
break;
}
}
*/
};
//-------------------------------
class EInvaildBaudRate : public Exception
{
public:
//初始化
EInvaildBaudRate(const AnsiString Msg) : Exception(Msg)
{
}
};
//---------------------------------------------------------------------------
//以上是属性编辑器区域*******************************************************
//---------------------------------------------------------------------------
#ifndef DBGridErpH
#define DBGridErpH
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Classes.hpp>
#include <Controls.hpp>
#include <DBGrids.hpp>
#include <Grids.hpp>
#include <Forms.hpp>
#include <UDBGridErpFrm.h>
#include <DsgnIntf.hpp>
//---------------------------------------------------------------------------
//编辑器专用
class TUnlFileNameProperty : public TStringProperty
{
public:
TPropertyAttributes __fastcall GetAttributes()
{
return TPropertyAttributes () << paDialog;
}
void __fastcall Edit() //User Click Show(用户单击了选择)
{
TUDBGridErpFrm* dlg = new TUDBGridErpFrm(Application);
dlg->FileName = GetValue();
//Return String value(返回一个字符串的值)
if (dlg->Execute())
{
Value = dlg->FileName;
//Where "Value"
}
delete dlg;
}
};
//----------------------
class TUnlBaudRateProperty : public TIntegerProperty
{
public:
TPropertyAttributes __fastcall GetAttributes();
{
return TPropertyAttributes () << paValueList;
}
void __fastcall GetValues(TGetStrProc Proc)
{
Proc("1200");
Proc("2400");
Proc("4800");
Proc("9600");
Proc("19200");
}
};
//------------------------
class TUnlAboutProperty : public TStringProperty
{
public:
TPropertyAttributes __fastcall GetAttributes()
{
return TPropertyAttributes () << paDialog << paReadOnly;
}
void __fastcall Edit() //User Click Show(用户单击了选择)
{
TUDBGridErpFrm *AboutBox = new TUDBGridErpFrm(Application);
AboutBox->ShowModal();
delete AboutBox;
}
};
//--------------------------
class TMenuAboutEditor : public TDefaultEditor
{
public:
/*
int __fastcall GetVerbCount()
{
return 3;
}
AnsiString __fastcall GetVerb(int Index)
{
AnsiString S;
switch (Index)
{
case 0: S = "&About TurboPower";
break;
case 1: S = "TurboPower on the Web";
break;
case 2: S = "&Designer";
break;
}
return S;
}
void __fastcall ExecuteVerb(int Index)
{
switch (Index)
{
case 0:
ShowMessage("制作About菜单失败!");
break;
case 1:
ShellExecute(Application->Handle, "open", "http://www.jx_wbo.com",
0, 0, SW_NORMAL);
break;
case 2:
ShowMessage("制作Designer菜单失败!");
break;
}
}
*/
};
//-------------------------------
class EInvaildBaudRate : public Exception
{
public:
//初始化
EInvaildBaudRate(const AnsiString Msg) : Exception(Msg)
{
}
};
//---------------------------------------------------------------------------
//以上是属性编辑器区域*******************************************************
//---------------------------------------------------------------------------