home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 November / Chip_2002-11_cd1.bin / zkuste / delphi / kompon / d3456 / ICQ.ZIP / ICQ / Example / UserSearchWP.pas < prev   
Pascal/Delphi Source File  |  2002-07-02  |  3KB  |  122 lines

  1. unit UserSearchWP;
  2. {(C) Alex Demchenko(alex@ritlabs.com)}
  3.  
  4. interface
  5.  
  6. uses
  7.   Windows, Messages, Classes, Graphics, Controls, Forms,
  8.   StdCtrls, ICQWorks;
  9.  
  10. type
  11.   TUserSearchWPForm = class(TForm)
  12.     GroupBox1: TGroupBox;
  13.     Label1: TLabel;
  14.     Label2: TLabel;
  15.     FistNameEdit: TEdit;
  16.     LastNameEdit: TEdit;
  17.     NickNameEdit: TEdit;
  18.     Label3: TLabel;
  19.     EmailEdit: TEdit;
  20.     Label4: TLabel;
  21.     MinAgeEdit: TEdit;
  22.     Label5: TLabel;
  23.     Label6: TLabel;
  24.     MaxAgeEdit: TEdit;
  25.     GenderComboBox: TComboBox;
  26.     Label7: TLabel;
  27.     GroupBox2: TGroupBox;
  28.     Label8: TLabel;
  29.     LanguageComboBox: TComboBox;
  30.     Label9: TLabel;
  31.     Label10: TLabel;
  32.     Label11: TLabel;
  33.     CityEdit: TEdit;
  34.     StateEdit: TEdit;
  35.     CountryComboBox: TComboBox;
  36.     SearchOnlineUsers: TCheckBox;
  37.     Button1: TButton;
  38.     GroupBox3: TGroupBox;
  39.     Label12: TLabel;
  40.     CompanyEdit: TEdit;
  41.     Label13: TLabel;
  42.     DepartmentEdit: TEdit;
  43.     Label14: TLabel;
  44.     PositionEdit: TEdit;
  45.     OccupationComboBox: TComboBox;
  46.     Label15: TLabel;
  47.     PastComboBox: TComboBox;
  48.     Label16: TLabel;
  49.     PastDescEdit: TMemo;
  50.     Label17: TLabel;
  51.     InterestComboBox: TComboBox;
  52.     Label18: TLabel;
  53.     InterestsDescEdit: TMemo;
  54.     Label19: TLabel;
  55.     Label20: TLabel;
  56.     Label21: TLabel;
  57.     AffilationDescEdit: TMemo;
  58.     Label22: TLabel;
  59.     HomePageEdit: TEdit;
  60.     AffilationComboBox: TComboBox;
  61.     procedure FormClose(Sender: TObject; var Action: TCloseAction);
  62.     procedure Button1Click(Sender: TObject);
  63.     procedure FormCreate(Sender: TObject);
  64.   private
  65.     { Private declarations }
  66.   public
  67.     { Public declarations }
  68.   end;
  69.  
  70. var
  71.   UserSearchWPForm: TUserSearchWPForm;
  72.  
  73. implementation
  74. uses
  75.   UserSearch;
  76.  
  77. {$R *.dfm}
  78.  
  79. procedure TUserSearchWPForm.FormClose(Sender: TObject;
  80.   var Action: TCloseAction);
  81. begin
  82.   Action := caHide;
  83. end;
  84.  
  85. procedure TUserSearchWPForm.Button1Click(Sender: TObject);
  86. begin
  87.   if UserSearchForm.Showing then
  88.     UserSearchForm.Button1.Click;
  89.   Close;
  90. end;
  91.  
  92. procedure TUserSearchWPForm.FormCreate(Sender: TObject);
  93. var
  94.   i: Word;
  95. begin
  96.   //Fill in language combobox
  97.   for i := Low(Languages) to High(Languages) do
  98.     LanguageComboBox.Items.Add(Languages[i].Value);
  99.  
  100.   //Fill in country combobox
  101.   for i := Low(Countries) to High(Countries) do
  102.     CountryComboBox.Items.Add(Countries[i].Value);
  103.  
  104.   //Fill in occupation combobox
  105.   for i := Low(Occupations) to High(Occupations) do
  106.     OccupationComboBox.Items.Add(Occupations[i].Value);
  107.  
  108.   //Fill in past combobox
  109.   for i := Low(Pasts) to High(Pasts) do
  110.     PastComboBox.Items.Add(Pasts[i].Value);
  111.  
  112.   //Fill in interest combobox
  113.   for i := Low(Interests) to High(Interests) do
  114.     InterestComboBox.Items.Add(Interests[i].Value);
  115.  
  116.   //Fill in affiliation combobox
  117.   for i := Low(Affiliations) to High(Affiliations) do
  118.     AffilationComboBox.Items.Add(Affiliations[i].Value);
  119. end;
  120.  
  121. end.
  122.