UTAboutProp.pas
上传用户:lyghuaxia
上传日期:2022-06-27
资源大小:659k
文件大小:1k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. unit UTAboutProp;
  2. interface
  3. uses
  4.   DesignIntf, DesignEditors;
  5. type
  6.   TAboutGlibWMIProp = class(TPropertyEditor)
  7.   public
  8.     procedure Edit(); override;
  9.     function GetValue(): string; override;
  10.     function GetAttributes(): TPropertyAttributes; override;
  11.   end;
  12. implementation
  13. uses
  14.   SysUtils, FormAbout, UConstantes;
  15. procedure TAboutGlibWMIProp.Edit();
  16. begin
  17.   with TFAbout.Create(nil) do
  18.   try
  19.     ShowModal();
  20.   finally
  21.     Free();
  22.   end;
  23. end;
  24. function TAboutGlibWMIProp.GetValue(): string;
  25. begin
  26.   result := Format(GLIBSI_LBL,[GLIBSI_VERSION]);
  27.   result := GLIBSI_VERSION;
  28. end;
  29. function TAboutGlibWMIProp.GetAttributes(): TPropertyAttributes;
  30. begin
  31.   result := [paDialog,paReadOnly];
  32. end;
  33. end.