Settings_Pop3Server.pas
上传用户:dh8233980
上传日期:2014-10-16
资源大小:1015k
文件大小:3k
- unit Settings_Pop3Server;
- (******************************************************************************)
- (* *)
- (* Hermes Pop3 Server Settings Dialog Box *)
- (* Part of Hermes SMTP/POP3 Server. *)
- (* Copyright(C) 2000 by Alexander J. Fanti, All Rights Reserver Worldwide. *)
- (* *)
- (* Created January 10, 2000 by Alexander J. Fanti. See License.txt *)
- (* *)
- (* Used by: Main *)
- (* Uses: DataU1, WSocket *)
- (* *)
- (* Description: This Modal dialog window allows the user to change Pop3 *)
- (* server settings *)
- (* *)
- (* Revisions: 1/21/2000 AJF Commented *)
- (* *)
- (******************************************************************************)
- interface
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- Spin, StdCtrls, Buttons;
- type
- TfrmSettings_Pop3Server = class(TForm)
- cbxCreateUser: TCheckBox;
- cbxCreatePassword: TCheckBox;
- Label2: TLabel;
- lstAddress: TComboBox;
- Label3: TLabel;
- spePort: TSpinEdit;
- btnOK: TBitBtn;
- btnCancel: TBitBtn;
- Label5: TLabel;
- lblConnectionInactivityTimeout: TLabel;
- speInactivityTimeout: TSpinEdit;
- procedure FormShow(Sender: TObject);
- procedure btnOKClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- frmSettings_Pop3Server: TfrmSettings_Pop3Server;
- implementation
- uses WSocket, DataU1;
- {$R *.DFM}
- procedure TfrmSettings_Pop3Server.FormShow(Sender: TObject);
- var
- x : Integer;
- begin
- // List available IP addresses (or ANY)
- lstAddress.Clear;
- lstAddress.Items.Add('*** Any ***');
- for x := 0 to LocalIPList.Count -1 do
- lstAddress.Items.Add(LocalIPList[x]);
- // Populate Dialog with Setting Information
- lstAddress.ItemIndex := 0;
- for x := 0 to lstAddress.Items.Count -1 do
- if INI.Pop3_BindAddress = lstAddress.Items[x] then
- lstAddress.ItemIndex := x;
- spePort.Value := INI.Pop3_Port;
- cbxCreateUser.Checked := INI.Pop3_CreateUserOnDemand;
- cbxCreatePassword.Checked := INI.Pop3_CreateUserPasswordOnDemand;
- speInactivityTimeout.Value := INI.Pop3_InactivityTimeout;
- end;
- procedure TfrmSettings_Pop3Server.btnOKClick(Sender: TObject);
- begin
- // Retrieve Settings from Dialog
- if lstAddress.ItemIndex = 0 then INI.Pop3_BindAddress := '0.0.0.0'
- else INI.Pop3_BindAddress := lstAddress.Items[lstAddress.ItemIndex];
- INI.Pop3_Port := spePort.Value;
- INI.Pop3_CreateUserOnDemand := cbxCreateUser.Checked;
- INI.Pop3_CreateUserPasswordOnDemand := cbxCreatePassword.Checked;
- INI.Pop3_InactivityTimeout := speInactivityTimeout.Value;
- end;
- end.