Einzelnen Beitrag anzeigen

Kompon Ente
(Gast)

n/a Beiträge
 
#7
  Alt 28. Jul 2005, 09:40
Er kommt dahin, dass gefragt wird if (FMyProxy <> FCheckProxy) or (FMyProxyPort <>FCheckProxyPort) then aber dann springt er direkt zum end;

Das darf gar nicht sein, hier mal die ReadRegistry:

Delphi-Quellcode:
procedure ReadRegistry;
var
  Reg: TRegistry;
  line: String;
begin
  Reg := TRegistry.Create;
  Reg.RootKey := HKEY_CURRENT_USER;
  Reg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Internet Settings\',True);
  line := Reg.ReadString('ProxyServer');
  if line <> 'then
  begin
    if not ((Ord(line[1])>=48) and (Ord(line[1])<=57)) then
    begin
      if pos('http=',line) > 0 then
      begin
        Delete(line,1,pos('http=',line)-1);
        line := copy(line,6,pos(';',line)-6);
      end
    end;
    FSystemProxy := copy(line,1,pos(':',line)-1);
    FSystemProxyPort := copy(line,pos(':',line)+1,length(line)-1);
  end
  else
  begin
    FSystemProxy := '';
    FSystemProxyPort := '0';
  end;

  Reg.RootKey := HKEY_LOCAL_MACHINE;
  Reg.OpenKey('Software\Tisy Zeitermittlung\',True);
  if Reg.ValueExists('ProxyServer') then
  begin
    line := Reg.ReadString('ProxyServer');
    FMyProxy := copy(line,1,pos(':',line)-1);
    FMyProxyPort := copy(line,pos(':',line)+1,length(line)-1);
  end
  else
  begin
    FMyProxy := '';
    FMyProxyPort := '0';
  end;

  if not (Reg.ValueExists('Synctime')) then
    Reg.WriteInteger('Synctime',60000);

  FSynctime := Reg.ReadInteger('Synctime');
  FProxyArt := Reg.ReadInteger('ProxyEnable');
  Reg.Free;

  FCheckProxy := FMyProxy;
  FCheckProxyPort := FMyProxyPort;

end;
  Mit Zitat antworten Zitat