unit UImporterOrgaSujet;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, ExtCtrls, CheckLst;

type
  TImporterOrgaSujetDLGForm = class(TForm)
    ImporterOrgaSujetALPHATimer: TTimer;
    ListeSujetsCheckListBox: TCheckListBox;
    Panel1: TPanel;
    BitBtn2: TBitBtn;
    BitBtn1: TBitBtn;
    procedure ImporterOrgaSujetALPHATimerTimer(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure ListeSujetsCheckListBoxClickCheck(Sender: TObject);
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;

var
  ImporterOrgaSujetDLGForm: TImporterOrgaSujetDLGForm;

implementation

uses UDocometre;

{$R *.dfm}

procedure TImporterOrgaSujetDLGForm.ImporterOrgaSujetALPHATimerTimer(
  Sender: TObject);
begin
  if ALphaBlendValue < 240
  then ALphaBlendValue := ALphaBlendValue + 40
  else begin
    ALphaBlendValue := 255;
		ImporterOrgaSujetALPHATimer.Enabled := false;
  end;
end;

procedure TImporterOrgaSujetDLGForm.FormShow(Sender: TObject);
var i : integer;
begin
	ALphaBlendValue := 0;
	ImporterOrgaSujetALPHATimer.Enabled := true;
  ListeSujetsCheckListBox.Clear;
  for i := 0 to DocDOCOMETRE.SUJETS.Count - 1
  do ListeSujetsCheckListBox.Items.Add(DocDOCOMETRE.SUJETS[i].NOM)
end;

procedure TImporterOrgaSujetDLGForm.ListeSujetsCheckListBoxClickCheck(
	Sender: TObject);
var i : integer;
begin
	if ListeSujetsCheckListBox.Checked[ListeSujetsCheckListBox.ItemIndex] then
	begin
		for i := 0 to ListeSujetsCheckListBox.Count - 1
		do if i <> ListeSujetsCheckListBox.ItemIndex
			 then ListeSujetsCheckListBox.Checked[i] := false;
	end;
end;

end.
