EBarsUtils.pas
上传用户:yjb1804
上传日期:2021-01-30
资源大小:3105k
文件大小:3k
源码类别:

Email服务器

开发平台:

Delphi

  1. unit EBarsUtils;
  2. interface
  3. uses
  4.   SysUtils, Classes, Forms, ActnList, ImgList, Controls, EBarsAbout;
  5. const
  6.   dxDownloadURL = 'http://www.devexpress.com/downloads';
  7.   dxSupportURL = 'http://www.devexpress.com/Support/Center';
  8.   dxStartURL = 'http://www.devexpress.com';
  9.   dxProductsURL = 'http://www.devexpress.com/products';
  10.   dxMyDXURL = 'https://www.devexpress.com/ClientCenter';
  11. type
  12.   dxSitePage = (spDownloads, spSupport, spStart, spProducts, spMyDX);
  13.   TdmCommonData = class(TDataModule)
  14.     alMain: TActionList;
  15.     actDockingHelp: TAction;
  16.     actRateDemo: TAction;
  17.     actDownloads: TAction;
  18.     actSupport: TAction;
  19.     actDXOnTheWeb: TAction;
  20.     actProducts: TAction;
  21.     actAbout: TAction;
  22.     actBarsHelp: TAction;
  23.     actMyDX: TAction;
  24.     actSBarsHelp: TAction;
  25.     procedure actSBarsHelpExecute(Sender: TObject);
  26.     procedure actDockingHelpExecute(Sender: TObject);
  27.     procedure actBarsHelpExecute(Sender: TObject);
  28.     procedure actRateDemoExecute(Sender: TObject);
  29.     procedure actMyDXExecute(Sender: TObject);
  30.     procedure actDownloadsExecute(Sender: TObject);
  31.     procedure actDXOnTheWebExecute(Sender: TObject);
  32.     procedure actSupportExecute(Sender: TObject);
  33.     procedure actProductsExecute(Sender: TObject);
  34.     procedure actAboutExecute(Sender: TObject);
  35.   private
  36.     FAboutFormClass: TEBarsAboutFormClass;
  37.   public
  38.     property AboutFormClass: TEBarsAboutFormClass read FAboutFormClass write FAboutFormClass;
  39.   end;
  40. procedure Browse(ASitePage: dxSitePage);
  41. var
  42.   dmCommonData: TdmCommonData;
  43. implementation
  44. {$R *.dfm}
  45. uses
  46.   Windows, ShellAPI, EBarsDemoRating;
  47. procedure Browse(ASitePage: dxSitePage);
  48. var
  49.   AURL: string;
  50. begin
  51.   case ASitePage of
  52.     spDownloads: AURL := dxDownloadURL;
  53.     spSupport: AURL := dxSupportURL;
  54.     spStart: AURL := dxStartURL;
  55.     spProducts: AURL := dxProductsURL;
  56.     spMyDX: AURL := dxMyDXURL;
  57.   end;
  58.   ShellExecute(0, 'OPEN', PChar(AURL), nil, nil, SW_SHOW);
  59. end;
  60. procedure TdmCommonData.actSBarsHelpExecute(Sender: TObject);
  61. begin
  62.   Application.HelpFile := '........ExpressSideBarHelpeSideBar.hlp';
  63.   Application.HelpCommand(HELP_FINDER, 0);
  64. end;
  65. procedure TdmCommonData.actDockingHelpExecute(Sender: TObject);
  66. begin
  67.   Application.HelpFile := '........ExpressDocking LibraryHelpdocking.hlp';
  68.   Application.HelpCommand(HELP_FINDER, 0);
  69. end;
  70. procedure TdmCommonData.actBarsHelpExecute(Sender: TObject);
  71. begin
  72.   Application.HelpFile := '......HelpExpressBars6.hlp';
  73.   Application.HelpCommand(HELP_FINDER, 0);
  74. end;
  75. procedure TdmCommonData.actRateDemoExecute(Sender: TObject);
  76. begin
  77.   with TEBarsDemoRatingForm.Create(Self) do
  78.     try
  79.       ShowModal;
  80.     finally
  81.       Free;
  82.     end;
  83. end;
  84. procedure TdmCommonData.actMyDXExecute(Sender: TObject);
  85. begin
  86.   Browse(spMyDX);
  87. end;
  88. procedure TdmCommonData.actDownloadsExecute(Sender: TObject);
  89. begin
  90.   Browse(spDownloads);
  91. end;
  92. procedure TdmCommonData.actDXOnTheWebExecute(Sender: TObject);
  93. begin
  94.   Browse(spStart);
  95. end;
  96. procedure TdmCommonData.actSupportExecute(Sender: TObject);
  97. begin
  98.   Browse(spSupport);
  99. end;
  100. procedure TdmCommonData.actProductsExecute(Sender: TObject);
  101. begin
  102.   Browse(spProducts);
  103. end;
  104. procedure TdmCommonData.actAboutExecute(Sender: TObject);
  105. begin
  106.   with FAboutFormClass.Create(nil) do
  107.     try
  108.       ShowModal;
  109.     finally
  110.       Free;
  111.     end;
  112. end;
  113. end.