| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- {******************************************************************************}
- { CnPack For Delphi/C++Builder }
- { 中国人自己的开放源码第三方开发包 }
- { (C)Copyright 2001-2018 CnPack 开发组 }
- { ------------------------------------ }
- { }
- { 本开发包是开源的自由软件,您可以遵照 CnPack 的发布协议来修 }
- { 改和重新发布这一程序。 }
- { }
- { 发布这一开发包的目的是希望它有用,但没有任何担保。甚至没有 }
- { 适合特定目的而隐含的担保。更详细的情况请参阅 CnPack 发布协议。 }
- { }
- { 您应该已经和开发包一起收到一份 CnPack 发布协议的副本。如果 }
- { 还没有,可访问我们的网站: }
- { }
- { 网站地址:http://www.cnpack.org }
- { 电子邮件:master@cnpack.org }
- { }
- {******************************************************************************}
- unit CnASPropEditors;
- {* |<PRE>
- ================================================================================
- * 软件名称:不可视工具组件包
- * 单元名称:ActiveScript 脚本引擎属性编辑器单元
- * 单元作者:周劲羽 (zjy@cnpack.org)
- * 备 注:
- * 开发平台:PWin2K SP3 + Delphi 7
- * 兼容测试:PWin9X/2000/XP + Delphi 5/6/7 C++Builder 5/6
- * 本 地 化:该单元中的字符串均符合本地化处理方式
- * 单元标识:$Id$
- * 修改记录:2003.10.31
- * 增加组件版权信息属性编辑器TCnCopyrightProperty
- ================================================================================
- |</PRE>}
- interface
- {$I CnPack.inc}
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- {$IFDEF COMPILER6_UP}
- DesignIntf, DesignEditors,
- {$ELSE}
- DsgnIntf,
- {$ENDIF}
- CnActiveScript, CnConsts;
- type
- { TCnScriptLangProperty }
- TCnScriptLangProperty = class(TStringProperty)
- public
- function GetAttributes: TPropertyAttributes; override;
- procedure GetValueList(List: TStrings);
- procedure GetValues(Proc: TGetStrProc); override;
- end;
- implementation
- { TCnScriptLangProperty }
- function TCnScriptLangProperty.GetAttributes: TPropertyAttributes;
- begin
- Result := [paValueList, paSortList, paMultiSelect];
- end;
- procedure TCnScriptLangProperty.GetValueList(List: TStrings);
- begin
- GetActiveScriptParse(List);
- end;
- procedure TCnScriptLangProperty.GetValues(Proc: TGetStrProc);
- var
- j: Integer;
- Values: TStringList;
- begin
- Values := TStringList.Create;
- try
- GetValueList(Values);
- for j := 0 to Values.Count - 1 do
- Proc(Values[j]);
- finally
- Values.Free;
- end;
- end;
- end.
|