Registriert seit: 28. Sep 2008
Ort: berlin
7 Beiträge
Delphi 7 Enterprise
|
AW: delphi zugriffsverletzung bei adresse in modul. lesen von adresse
25. Jul 2010, 12:27
hallo,
den ClientTeil bekommt Autos vom Server :
Delphi-Quellcode:
procedure TfrCarTic.ScoutPCommandHandlers0Command(ASender: TIdCommand);
var aCar : TCarRecord;
begin
//memo1.Text := memo1.Text + ' ' + inttostr(Asender.Params.Count);
aCar.id := Asender.Params[0];
aCar.tel1 := Asender.Params[1];
aCar.tel2 := Asender.Params[2];
aCar.marke := Asender.Params[3];
aCar.OnlyModell := Asender.Params[4];
aCar.farbe := Asender.Params[5];
aCar.ez := Asender.Params[6];
aCar.preis := Asender.Params[7];
aCar.stadt := Asender.Params[8];
aCar.plz := Asender.Params[9];
aCar.km := Asender.Params[10];
aCar.kw := Asender.Params[11];
aCar.aufbau := Asender.Params[12];
aCar.klima := Asender.Params[13];
aCar.fuel := Asender.Params[14];
aCar.getriebe := Asender.Params[15];
aCar.description := Asender.Params[16];
aCar.doors := Asender.Params[17];
aCar.unfall := Asender.Params[18];
aCar.anbieter := Asender.Params[19];
aCar.neu := Asender.Params[20];
aCar.ABS := Asender.Params[21];
aCar.ESP := Asender.Params[22];
aCar.Metallic := Asender.Params[23];
aCar.allRadAntrieb := Asender.Params[24];
aCar.leichtmetallfelgen := Asender.Params[25];
aCar.lederAusstattung := Asender.Params[26];
aCar.schiebedach := Asender.Params[27];
aCar.navigationSystem := Asender.Params[28];
aCar.schadstoffklasse := Asender.Params[29];
aCar.umwepltPlakette := Asender.Params[30];
aCar.image1 := Asender.Params[31];
aCar.image2 := Asender.Params[32];
aCar.image3 := Asender.Params[33];
aCar.servolenkung := Asender.Params[34];
aCar.standheizung := Asender.Params[35];
aCar.condition := Asender.Params[36];
aCar.version := Asender.Params[37];
aCar.modell := aCar.OnlyModell + ' ' + aCar.version;
if isGridFree then
begin
isGridFree := false;
try
putongrid(aCar);
except
end;
isGridFree := true;
end;
end;
und danach fügt diese Daten in eine StringGrid zu:
Delphi-Quellcode:
var urlkomplett : string;
begin
with frCarTic.GridErg do
begin
InsertRows(1,1,true);
// Anpassen der Col anzahl der einträge
//AddCheckBox(vNr,1,false,false);
frcartic.GridErg.AutoNumberCol(0);
Cells[vid,1] := aCar.id ;
Cells[vmarke,1] := aCar.marke;
Cells[vmodell,1] := aCar.modell ;
Cells[vfarbe,1] := aCar.farbe ;
Cells[vez,1] := aCar.ez ;
Cells[vpreis,1] := aCar.preis ;
Cells[vstadt,1] := aCar.stadt ;
Cells[vplz,1] := aCar.plz ;
Cells[vkm,1] := aCar.km ;
Cells[vkw,1] := aCar.kw ;
Cells[vaufbau,1] := aCar.aufbau ;
Cells[vCondition,1] := aCar.condition ;
Cells[vklima,1] := aCar.klima ;
Cells[vfuel,1] := aCar.fuel;
Cells[vtel1,1] := aCar.tel1 ;
Cells[vtel2,1] := aCar.tel2 ;
Cells[vgetriebe,1] := aCar.getriebe ;
Cells[vdescription,1] := aCar.description ;
Cells[vdoors,1] := aCar.doors ;
Cells[vanbieter,1] := aCar.anbieter ;
Cells[vschadstoffklasse,1] := aCar.schadstoffklasse ;
Cells[vumweltPlakette,1] := aCar.umwepltPlakette ;
Cells[vimage1,1] := aCar.image1 ;
Cells[vimage2,1] := aCar.image2 ;
Cells[vimage3,1] := aCar.image3 ; }
//Cells[vuhr,1] := TimeToStr(time);
{Cells[vboerse,1] := aCar.boerse ;
Cells[vnurModell,1] := aCar.OnlyModell ;
Cells[vversion,1] := aCar.version ;
frcartic.GridErg.RowColor[1] := ColorToSelect; }
end;
{ frcartic.GridErg.AddCheckBox(vUnfall,1,aCar.unfall = 'y',false);
frcartic.GridErg.Cells[vAnbieter,1] := aCar.anbieter;
frcartic.GridErg.AddCheckBox(vneu,1,aCar.neu = 'N',false);
frcartic.GridErg.AddCheckBox(vlederausstattung,1,aCar.lederAusstattung = '1',false);
frcartic.GridErg.AddCheckBox(vnavigationsystem,1,aCar.navigationSystem = '1',false);
frcartic.GridErg.AddCheckBox(vschiebedach,1,aCar.schiebedach = '1',false);
frcartic.GridErg.AddCheckBox(vAllradAntrieb,1,aCar.allRadAntrieb = '1',false);
frcartic.GridErg.AddCheckBox(vABS,1,aCar.ABS = '1',false);
frcartic.GridErg.AddCheckBox(vleichtmetallfelgen,1,aCar.leichtmetallfelgen = '1',false);
frcartic.GridErg.AddCheckBox(vESP,1,aCar.ESP = '1',false);
frcartic.GridErg.AddCheckBox(vservolenkung,1,aCar.servolenkung = '1',false);
frcartic.GridErg.AddCheckBox(vstandheizung,1,aCar.standheizung = '1',false);
frcartic.GridErg.AddCheckBox(vMetallic,1,aCar.Metallic = '1',false); }
frcartic.GridErg.RowHeights[1] := 35 ;
inc(rowcounter);
frcartic.GridErg.RowCount := rowcounter;
//frcartic.GridErg.Row := frcartic.GridErg.Row + 1;
//frcartic.GridErg.FixedRows := 1 ;
// if playSnd = true then
// sndPlaySound(PWideChar('.\Media\'+SoundToPlay+'.wav'),SND_ASYNC); //SND_ASYNC = 0
end;
Danke
Geändert von mkinzler (25. Jul 2010 um 13:31 Uhr)
Grund: Code-Tags durch Delphi-Tags ersetzt
|