0; .CustomSort (SortWPhones, sorttype [ind]) ;;
: beginsorttype [ind]=0 then sorttype [ind]:=1sorttype [ind]:=0; .CustomSort (SortCelPhones, sorttype [ind]) ;;
: beginsorttype [ind]=0 then sorttype [ind]:=1sorttype [ind]:=0; .CustomSort (SortAdres, sorttype [ind]) ;;
: beginsorttype [ind]=0 then sorttype [ind]:=1sorttype [ind]:=0; .CustomSort (SortEmail, sorttype [ind]) ;;
: beginsorttype [ind]=0 then sorttype [ind]:=1sorttype [ind]:=0; .CustomSort (SortDate, sorttype [ind]) ;;;:=ind ;; TPhoneBook.ToHTMLExecute (Sender: TObject); i: integer;: tstringlist;, textcolor, bordercolor: string; shtml.Execute then begin:=ColorToHexRGB(phonebook.bgcolor.Color);:=ColorToHexRGB(phonebook.textcolor.Color);:=ColorToHexRGB(phonebook.bordercolor.Color);:=tstringlist.create;.add(laquo;lt;htmlgt;raquo;);.Add(laquo; lt; head gt; );
f.Add ( lt; title gt; Телефонний довідник lt;/title gt; );
f.Add ( lt;/head gt; ) ;. Add ( lt; body bgcolor=# + bgcolor + text=# + textcolor + laquo ; gt; ) ;. Add ( lt; font face= Verdana gt; ); border.Checked then.Add ( lt; table border= 1 leftmargin= 2 raquo ; align= center cellpadding= 0 cellspacing= 0 bordercolor=# + bordercolor + width= 98% gt; ). Add ( lt; table align= center leftmargin= 2 cellpadding= 0 cellspacing= 0 width= 98% gt; ) ;. Add ( lt; tr gt; ) ; .Add ( lt; td gt; lt; b gt; Ім'я lt;/td gt; ); cb1.Checked then f.Add ( lt; td gt; lt; b gt; amp; nbspТелефон lt;/b gt; lt;/tdgt;raquo;);cb2.Checked then f.Add ( lt; td gt; lt; b gt; amp; nbspРабочій lt;/b gt; lt;/td gt; ); cb3.Checked then f.Add ( lt; td gt; lt; b gt; amp; nbspСотовий lt;/b gt; lt;/td gt; ); cb4.Checked then f.Add ( lt; td gt; lt; b gt; amp; nbspАдрес lt;/b gt; lt;/td gt; ); cb5.Checked then f.Add ( lt; td gt; lt; b gt; amp; nbspE-mail lt;/bgt;lt;/tdgt;raquo;);.Add(laquo; lt;/tr gt; ); i:=0 to Phones.items.Count - 1 do begin.Add ( lt; tr gt; raquo ;); length (Phones.items [i] .Caption) gt; 0 then f.Add ( lt; td gt; amp; nbsp + Phones.items [i] .Caption + lt;/td gt; raquo ;) f.Add ( lt; td gt; amp; nbsp lt;/td gt; ); cb1.Checked thenlength (Phones.items [i] .SubItems [0]) gt; 0 then f.Add ( lt; td gt; amp; nbsp + Phones.items [i] .SubItems [0] + lt;/td gt; ) f.Add ( lt; td gt; amp; nbsp lt;/td gt; ); cb2.Checked thenlength (Phones.items [i] .SubItems [1]) gt; 0 then f.Add ( lt; td gt; amp; nbsp + Phones.items [i] .SubItems [1] + lt;/td gt; ) f.Add ( lt; td gt; amp; nbsp lt;/td gt; ); cb3.Checked thenlength (Phones.items [i] .SubItems [2]) gt; 0 then f.Add ( lt; td gt; amp; nbsp + Phones.items [i] .SubItems [2] + lt;/td gt; ) f.Add ( lt; td gt; amp; nbsp lt;/td gt; ); cb4.Checked thenlength (Phones.items [i] .SubItems [3]) gt; 0 then f.Add ( lt; td gt; amp; nbsp + Phones.items [i] .SubItems [3] + lt;/td gt; ) f.Add ( lt; td gt; amp; nbsp lt;/td gt; ); cb5.Checked thenlength (Phones.items [i] .SubItems [4]) gt; 0 then f.Add ( lt; td gt; amp; nbsp + Phones.items [i] .SubItems [4] + lt;/td gt; ) f.Add ( lt; td gt; amp ; nbsp lt;/td gt; ) ;. Add ( lt;/trgt;raquo;);;.Add(laquo;lt;/tablegt;raquo;);.Add(laquo;lt;/fontgt;raquo;);.Add(laquo;lt;/bodygt;raquo;);.Add(laquo;lt;/htmlgt;raquo;);.SaveToFile(shtml.FileName);(log,laquo;ExportErrorraquo;,laquo;PBToolButton6Clickraquo;);
showmessage ( Помилка Збереження файлу ) ;;
f.Free ;;; TPhoneBook.ToExcelExecute (Sender: TObject);ws,xl:variant;,maxrow:integer;,fst:integer;:=2;:=createoleobject(laquo;Excel.Applicationraquo;);:=0;.visible:=true;.WorkBooks.Add;:= XL.ActiveWorkBook.ActiveSheet;.Range[laquo;A1:O500raquo;].NumberFormat:=laquo;@raquo;;.Range[laquo;Araquo;+inttostr(fst)].Value := Laquo; №пп raquo ;;. Range [ B + inttostr (fst)]. Value:= Ім'я raquo ;;:=1; cb1.Checked then begin (col) ;. Range [Chr (Ord ( A ) + col) + inttostr (fst)]. Value:= Телефон raquo ;;; cb2.Checked then begin (col) ;. Range [Chr (Ord ( A ) + col) + inttostr (fst)]. Value:= Робочий телефон raquo ;;; cb3.Checked then begin (col) ;. Range [Chr (Ord ( A ) + col) + inttostr (fst)]. Value:= laquo ; Мобільний raquo ;;; cb4.Checked then begin (col) ;. Range [Chr (Ord ( A ) + col) + inttostr (fst)]. Value:= Адреса raquo ;;; cb5.Checked then begin (col) ;. Range [Chr (Ord ( A ) + col) + inttostr (fst)]. Value:= E-Mail raquo ;;; i:=fst + 1 to Phones.Items.Count + fst do begin:=1; .Range [ a + inttostr (i)]. Value:=i- (fst);//# работи.Range [ b + inttostr (i)]. Value: =Phones.Items [i-fst - 1] .Caption; cb1.Checked then begin (col) ;. Range [Chr (Ord ( A ) + col) + inttostr (i)]. Value:=Phones. Items [i-fst - 1] .SubItems [0] ;; cb2.Checked then begin (col) ;. Range [Chr (Ord ( A ) + col) + inttostr (i)]. Value:=Pho...