www.pudn.com > EmailServer.zip > License.pas


unit License; 
 
(******************************************************************************) 
(*                                                                            *) 
(* Hermes License Dialog Window                                               *) 
(* Part of Hermes SMTP/POP3 Server.                                           *) 
(* Copyright(C) 2000 by Alexander J. Fanti, All Rights Reserver Worldwide.    *) 
(*                                                                            *) 
(* Created January 20, 2000 by Alexander J. Fanti.  See License.txt           *) 
(*                                                                            *) 
(* Used by: About                                                             *) 
(*                                                                            *) 
(* Description: This is a license dialog window to display the program's      *) 
(*              license information.                                          *) 
(*                                                                            *) 
(* Revisions: 1/21/2000  AJF  Commented                                       *) 
(*                                                                            *) 
(******************************************************************************) 
 
interface 
 
uses 
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 
  StdCtrls, Buttons, ExtCtrls, ComCtrls; 
 
type 
  TfrmLicense = class(TForm) 
    pnlButtons: TPanel; 
    btnOK: TBitBtn; 
    btnPrint: TButton; 
    btnSave: TButton; 
    SaveDialog1: TSaveDialog; 
    reLicense: TRichEdit; 
    procedure pnlButtonsResize(Sender: TObject); 
    procedure FormCreate(Sender: TObject); 
    procedure btnSaveClick(Sender: TObject); 
    procedure btnPrintClick(Sender: TObject); 
  private 
    { Private declarations } 
  public 
    { Public declarations } 
  end; 
 
var 
  frmLicense: TfrmLicense; 
 
implementation 
 
{$R *.DFM} 
 
procedure TfrmLicense.FormCreate(Sender: TObject); 
begin 
  // I will clear the display 
  reLicense.Clear; 
  // and insert the License text here! 
  // I have to do this because I've noticed that sometimes Delphi will 
  // "lose" text in a memo or richedit control if it's added at design 
  // time.  I want to ensure that the license is never lost. 
 
  reLicense.Lines.Add('The Hermes SMTP/POP3 Mail Server License'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('Copyright (C) 2000 by Alexander J. Fanti'); 
  reLicense.Lines.Add('All Rights Reserved Worldwide.'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('For more information visit www.impchat.com'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('This software is NOT waranteed at all.'); 
  reLicense.Lines.Add('If it doesn''t work for you... sorry.'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('Here''s the basic deal for those of you who don''t '); 
  reLicense.Lines.Add('want to read:'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('You can use this software to save yourself money...'); 
  reLicense.Lines.Add('But not to make yourself money.'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('Here''s what you can do...'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('1) You can use this software for education purposes.'); 
  reLicense.Lines.Add('   Learn how servers work, learn how SMTP and POP3 '); 
  reLicense.Lines.Add('   work, learn how DNS works, learn how OOP works, '); 
  reLicense.Lines.Add('   learn how Delphi works, and lots of other neat '); 
  reLicense.Lines.Add('   stuff...'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('2) You can use this software to save yourself money.'); 
  reLicense.Lines.Add('   You can use it instead of buying a mail server from'); 
  reLicense.Lines.Add('   some company.'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('3) Give this software to anyone you want.'); 
  reLicense.Lines.Add('   You do have my permission to distribute this '); 
  reLicense.Lines.Add('   software via CD-ROM archive or FTP/HTTP, provided '); 
  reLicense.Lines.Add('   you adhere to the rules of the license.'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('Here''s what you CAN''T do...'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('1) YOU MAY NOT: Remove my name and copyright from any '); 
  reLicense.Lines.Add('   part of this software.  My name and copyright MUST '); 
  reLicense.Lines.Add('   remain attached to all parts of this software.  '); 
  reLicense.Lines.Add('   Further, you may not distribute parts of this '); 
  reLicense.Lines.Add('   software.  This software must be distributed in '); 
  reLicense.Lines.Add('   the complete form I have provided or not at all.'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('2) YOU MAY NOT: Sell this software, or parts of this '); 
  reLicense.Lines.Add('   software.  You may charge a copy or distribution '); 
  reLicense.Lines.Add('   fee of no more than $3.00, but you must indicate '); 
  reLicense.Lines.Add('   to the seller that they are NOT buying this '); 
  reLicense.Lines.Add('   software, but a copying fee, and you must tell them'); 
  reLicense.Lines.Add('   they can get this software freely from'); 
  reLicense.Lines.Add('   http://www.impchat.com'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('3) YOU MAY NOT distribute this software as part of '); 
  reLicense.Lines.Add('   your own product.  For instance, if you are an '); 
  reLicense.Lines.Add('   ISP, you may not give this software to your '); 
  reLicense.Lines.Add('   customers as part of their purchase of services '); 
  reLicense.Lines.Add('   from you.  You may tell them where to download '); 
  reLicense.Lines.Add('   this software, and you may run a public FTP or '); 
  reLicense.Lines.Add('   HTTP server where you allow downloading of this '); 
  reLicense.Lines.Add('   software to the public and your customers, but if '); 
  reLicense.Lines.Add('   you want to give them a copy as part of an '); 
  reLicense.Lines.Add('   exchange of goods or services, you must get my '); 
  reLicense.Lines.Add('   permission to do so.'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('4) YOU MAY NOT represent this software as your own.  '); 
  reLicense.Lines.Add('   It is mine.  I created it.  I own it, and I''m '); 
  reLicense.Lines.Add('   letting you use it.  It is not yours.  Do not tell '); 
  reLicense.Lines.Add('   people that it is yours.'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('5) YOU MAY NOT use all or any part of this software '); 
  reLicense.Lines.Add('   in a commercial product or project.  Don''t even '); 
  reLicense.Lines.Add('   think about it.'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('This software is freeware.'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('This means that you can use it on any number of '); 
  reLicense.Lines.Add('computers, for any number of users, for as long as '); 
  reLicense.Lines.Add('you want.'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('You may distribute this software to anyone via any '); 
  reLicense.Lines.Add('means provided the License terms are met.  These '); 
  reLicense.Lines.Add('include, but are not limited to:'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('1) My copyright remains in the program, source code '); 
  reLicense.Lines.Add('   and all associated files.'); 
  reLicense.Lines.Add('2) All files are distributed together in unaltered '); 
  reLicense.Lines.Add('   form.'); 
  reLicense.Lines.Add('3) You may not represent this software as your own.'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('This software is also open source.'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('This means I have provided the source code to the '); 
  reLicense.Lines.Add('software for people to examine.  I am doing this '); 
  reLicense.Lines.Add('to promote the finding and fixing of bugs in the '); 
  reLicense.Lines.Add('program, and to promote participation in program '); 
  reLicense.Lines.Add('development.  I am retaining ALL rights to it.  I '); 
  reLicense.Lines.Add('still own it, even though I''m letting you see it.  '); 
  reLicense.Lines.Add('You may read it, copy it, modify it and take it '); 
  reLicense.Lines.Add('apart provided the following conditions are met:'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('1) My copyright remains on all parts of the software.'); 
  reLicense.Lines.Add('2) You may NOT derive any software from this software '); 
  reLicense.Lines.Add('   NOR can you use any part of this software in any '); 
  reLicense.Lines.Add('   other software.'); 
  reLicense.Lines.Add('3) You may NOT distribute any modifications of this '); 
  reLicense.Lines.Add('   software.  I will be the only source of '); 
  reLicense.Lines.Add('   modification to this software.  If you have found'); 
  reLicense.Lines.Add('   a bug, fixed a bug, or want enhancements or other '); 
  reLicense.Lines.Add('   modifications, you may send me information about '); 
  reLicense.Lines.Add('   them.  If you want to make custom modifications '); 
  reLicense.Lines.Add('   for your personal use, you must write me for '); 
  reLicense.Lines.Add('   permission.'); 
  reLicense.Lines.Add(''); 
  reLicense.Lines.Add('Note: the ML version is NOT open-source, only Freeware'); 
  reLicense.Lines.Add('      The non-ML version IS open-source.'); 
  reLicense.Lines.Add(''); 
end; 
 
procedure TfrmLicense.pnlButtonsResize(Sender: TObject); 
begin 
  // when the user re-sizes the window to get a better view, keep the 
  // OK button looking good... not great, but good enough. 
  btnOK.Left := pnlButtons.Width - btnOK.Width - 12; 
end; 
 
procedure TfrmLicense.btnSaveClick(Sender: TObject); 
begin 
  // Let the user save the license to a file for later use or printing 
  if SaveDialog1.Execute then reLicense.Lines.SaveToFile(SaveDialog1.Filename); 
end; 
 
procedure TfrmLicense.btnPrintClick(Sender: TObject); 
begin 
  // Print the license to the default printer in the richedit's crappy way... 
  reLicense.Print('Hermes SMTP/POP3 Server License'); 
end; 
 
end.