function IsDotAddress(const s: string): boolean; var i : integer; begin Result := True; for i := 1 to Length(s) do if not (s[i] in ['0'..'9', '.']) then Result := False; end;
procedure TClientForm.Timer1Timer(Sender: TObject); var f : TForm; begin Timer1.Enabled := False;
f := Self; with ClientConnectForm do begin Left := (f.Left + f.Width div 2) - Width div 2; Top := (f.Top + f.Height div 2) - Height div 2;
if ShowModal = mrOK then with ClientSocket1 do begin if IsDotAddress(ServerCombo.Text) then begin Host := ''; Address := ServerCombo.Text; end else begin Address := ''; Host := ServerCombo.Text; end; Port := StrToInt(PortEdit.Text);
StartAnim; Active := True; end; end; end;
procedure TClientForm.FormClose(Sender: TObject; var Action: TCloseAction); begin if BorderStyle<>bsNone then FormSettings1.SaveSettings; Disconnect1Click(nil); end;