codice:
unit Email;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, RzPanel, StdCtrls, Buttons, Mask, ToolWin,
TLHelp32, Printers,
ComCtrls, ScktComp,
XPStyleActnCtrls, ActnList, ActnMan, Menus, RzDlgBtn, jpeg, StdActns, ExtActns,
RzButton, WinTypes, ShellAPI, mmSystem, Sockets, WinInet, RzShellDialogs,
RzRadGrp, RzEdit, RzStatus, Registry, RzLabel, RzDBLbl,
RzRadChk, StrUtils, RzCmboBx, RzSpnEdt;
type
TForm1 = class(TForm)
Lista: TRzComboBox;
Conta: TLabel;
GroupBox2: TGroupBox;
Label8: TLabel;
Server: TRzComboBox;
NomeServer: TLabel;
Pannello1: TPanel;
Contatto: TLabel;
Label1: TLabel;
Label2: TLabel;
procedure FormCreate(Sender: TObject);
procedure ServerChangeClik(Sender: TObject);
procedure RubricaChangeClik(Sender: TObject);
procedure CaricaClick(Sender: TObject);
private
public
{ Public declarations }
end;
var
Form1: TForm1;
slConfig: TStrings;
const
CurrentState : byte = 1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
//Carica i contatti
CaricaClick(Sender);
end;
//Info Lista Server
procedure TForm1.ServerChangeClik(Sender: TObject);
begin
NomeServer.Caption := slConfig.Values[Server.Text];
end;
//Info Lista Rubrica
procedure TForm1.RubricaChangeClik(Sender: TObject);
begin
Contatto.Caption := slConfig.Values[Lista.Text];
end;
procedure TForm1.CaricaClick(Sender: TObject);
var
CLines, I : Integer;
begin
slConfig := TStringList.Create;
slConfig.LoadFromFile('Rubrica.ini');
for I := 0 to pred(slConfig.Count) do Lista.Items.Add(slConfig.Names[i]);
slConfig.LoadFromFile('Server.ini');
for I := 0 to pred(slConfig.Count) do Server.Items.Add(slConfig.Names[i]);
CLines := 0;
for I := 0 to Lista.Items.Count - 1 do
begin
CLines := CLines + 1;
end;
Conta.Caption := 'Ci Sono '+ IntToStr(CLines) + ' Contatti!';
CLines := 0;
for I := 0 to Server.Items.Count - 1 do
begin
CLines := CLines + 1;
end;
Label1.Caption := 'Ci Sono '+ IntToStr(CLines) + ' Server!';
end;
end.
Come posso procedere?