unit frmExcludeHideUnit; {$MODE Delphi} interface uses LCLIntf, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls,CEFuncProc, ExtCtrls, LResources; type { TfrmExcludeHide } TfrmExcludeHide = class(TForm) Label4: TLabel; Panel1: TPanel; Label1: TLabel; Panel5: TPanel; RadioButton1: TRadioButton; RadioButton2: TRadioButton; Panel2: TPanel; Label2: TLabel; ListBox1: TListBox; Panel3: TPanel; Label3: TLabel; ListBox2: TListBox; Panel4: TPanel; Button2: TButton; Button1: TButton; procedure FormCreate(Sender: TObject); procedure ListBox1DblClick(Sender: TObject); procedure Button1Click(Sender: TObject); procedure ListBox2DblClick(Sender: TObject); procedure RadioButton1Click(Sender: TObject); procedure Panel1Resize(Sender: TObject); private { Private declarations } public { Public declarations } end; var frmExcludeHide: TfrmExcludeHide; implementation uses formsettingsunit, processlist; procedure TfrmExcludeHide.FormCreate(Sender: TObject); var i:integer; begin //get processlist GetProcessList(listbox1); //and fill listbox2 with the items from the donthidelist; for i:=0 to length(formsettings.tempdonthidelist)-1 do listbox2.Items.Add(formsettings.tempdonthidelist[i]); if not formsettings.tempHideAll then radiobutton1.Checked:=true else radiobutton2.checked:=true; end; procedure TfrmExcludeHide.ListBox1DblClick(Sender: TObject); begin if (listbox1.ItemIndex<>-1) and (listbox2.Items.IndexOf(listbox1.Items[listbox1.itemindex])=-1) then listbox2.Items.Add(lowercase(listbox1.Items[listbox1.itemindex])); end; procedure TfrmExcludeHide.Button1Click(Sender: TObject); var i: integer; begin setlength(formsettings.tempdonthidelist,listbox2.items.count); for i:=0 to listbox2.items.count-1 do formsettings.tempdonthidelist[i]:=listbox2.Items[i]; formsettings.tempHideAll:=radiobutton2.checked; modalresult:=mrok; end; procedure TfrmExcludeHide.ListBox2DblClick(Sender: TObject); var i: integer; begin if listbox2.selcount>0 then begin i:=0; while i