1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49:
| procedure TXXX_profile.FormShow(Sender: TObject); const CLAVE = '\Software\Tst\tm'; const key = '\Software\Tst';
var f, g: Integer; Reg, Reg2: TRegistry; Lista, Lista3: TStringList; ListItem, ListItem2: TListItem; begin profil_list.Items.Clear;
begin reg := TRegistry.Create; Lista := TStringList.Create; with Reg do begin RootKey := HKEY_CURRENT_USER; OpenKey(CLAVE, true); GetValueNames(Lista); end; end;
begin reg2 := TRegistry.Create; Lista3 := TStringList.Create; with Reg2 do begin RootKey := HKEY_CURRENT_USER; OpenKey(key, false); GetKeyNames(Lista3); end; end;
begin for f := 0 to Lista.Count - 1 do if not ((Lista.Strings[f] = '1') or (Lista.Strings[f] = '2')) then begin ListItem := Profil_List.Items.Add; ListItem.Caption := Lista.Strings[f]; ListItem.SubItems.Add(getstrpart(reg.readstring(Lista.Strings[f]), 1)); ListItem.SubItems.Add(getstrpart(reg.readstring(Lista.Strings[f]), 2)); ListItem.SubItems.Add(getstrpart(reg.readstring(Lista.Strings[f]), 3)); end; end; |
Das Problem ist dieser Teil
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17:
| begin for g := 0 to Lista3.Count - 1 do begin for f := 0 to Lista.Count - 1 do
if not ((trim(LowerCase(Lista3.Strings[g])) = trim(LowerCase(Lista.Strings[f]))) or (Lista3.Strings[g] = '1') or (Lista3.Strings[g] = '2')) then begin ListItem2 := Profil_List.Items.Add; ListItem2.Caption := Lista3.Strings[g]; ListItem2.SubItems.Add('nicht verfügbar - da alter Datensatz'); ListItem2.SubItems.Add('nicht verfügbar - da alter Datensatz'); ListItem2.SubItems.Add('nicht verfügbar - da alter Datensatz'); break; end; end; end; end; |
Es werden OBWOHL ich (trim(LowerCase(Lista3.Strings[g])) = trim(LowerCase(Lista.Strings[f]))
da drin stehen habe DENNOCH DOPPELT Einträge!
und ich drehe echt durch sitze an diesem Problem schon seit mehr als einer Woche!
Ok bin halt auch noch blutjunge Anfängerin
Wer kann mir helfen?