Note – these are the steps I took to add the GUI code for SWMM 5.1.011 to my newer Delphi XE7. SWMM 5 GUI uses Delphi XE2
CONTENTS OF SWMM51011_GUI.ZIP
=============================
This archive contains source code for the Windows graphical user
interface portion of Version 5.1.011 of the Storm Water Management
Model (SWMM). The interface was written using Embarcadero's Delphi
XE2 (www.embarcadero.com). The name of the Delphi project containing
the code is Epaswmm5. All of the files for the project can be found
in the GUI5_1_011.ZIP file within this archive.
Before the Epaswmm5 project can be loaded into Delphi's Integrated
Development Environment (IDE), several special components must be
installed into the IDE's component pallette. The source code for
these components is contained in the COMPONENTS.ZIP file in this
archive. Consult the Delphi Users Guide for instructions on how to
install these components.
Step 1. Load Delphi XE7
Step 2. Load the SWMM5 dproj file
Step 3. Turn off Skins in Delphi Project Options
Step 4. Remove missing printers
Step 5. Add Xprinter.dcu to the GUI
Step 6. Set the Output Directory in Project Options
Step 7. Get rid of references to Print and Menu Items for Print
unit Umap;
{-------------------------------------------------------------------}
{ Unit: Umap.pas }
{ Project: EPA SWMM }
{ Version: 5.1 }
{ Date: 11/12/13 (5.1.000) }
{ Author: L. Rossman }
{ }
{ Delphi Pascal unit that defines the TMap object. This object }
{ contains drawing methods for rendering the Study Area Map on a }
{ memory bitmap. It also draws a backdrop image, draws the map }
{ legends, identifies the bounding rectangle for an object, and }
{ handles map re-scaling. }
{-------------------------------------------------------------------}
interface
uses
Windows, Graphics, SysUtils, Dialogs, Forms, Classes,
Controls, Math, Jpeg, Uglobals, Uproject, Uutils, Uvertex, System.UITypes, System.Types;
Step 8. Change the label4 in DABOUT – to show this is a modified version
procedure TAboutBoxForm.FormCreate(Sender: TObject);
begin
Label4.Caption := 'Storm Water Management Model'#10'Version 5.1 - QA';
Step 9. Run to see if it works