var
jsonObject, jsonObject2, jsonObject3, jsonObject4 :TClJsonQuery;
clRest:TclRest;
mainform, mainform2, mainform3, mainform4 : TclForm;
progrid, progrid2, progrid3, progrid4 : TclProGrid;
mainvertScrollBox, mainvertScrollBox2, mainvertScrollBox3, mainvertScrollBox4 : TCLVertScrollBox;
FSender, FSender2, FSender3 : TCLProGrid;
FRow, FCol, FRow2, FCol2, FRow3, FCol3 : Integer;
Position, Position2, Position3: Integer;
a: string;
jsonMetin,ToplamJson,yeniMetin,eskikarakter1,eskikarakter2 : String;
kayitTut : TclArrayString ;
allData: TClJsonQuery;
sonrakiveri : Integer;
void usersgrid4;
{
FSender3 = TCLProGrid(mainform3.clSender);
FRow3 = mainform3.clSenderRow;
FCol3 = mainform3.clSenderCol;
//ShowMessage('['+IntToStr(FRow3)+','+IntToStr(FCol3)+'] '+'Hücresinde Bulunan Veri: '+FSender3.Cells[FCol3,FRow3]);
try
jsonObject4 = Clomosy.ClDataSetFromJSON(FSender3.Cells[FCol3,FRow3]);
jsonObject4.openorexecute;
Position3 = Pos('{', FSender3.Cells[FCol3,FRow3]);
//ShowMessage(Position3);
if (Position3 > 1)
{
ShowMessage('İçerik Bulunamadı.');
}
else
{
mainform4 = TclForm.Create(self);
ClRTSetProperty(mainform4, 'ClientWidth', 900);
ClRTSetProperty(mainform4, 'ClientHeight', 750);
mainvertScrollBox4 = mainform4.AddNewVertScrollBox(mainform4, 'mainvertScrollBox4');
mainvertScrollBox4.align = alClient;
//ShowMessage('İçerik Bulundu. Position3: ' + IntToStr(Position3));
progrid4 = mainform4.addnewprogrid(mainvertScrollBox4, 'progrid4');
progrid4.ConnectDataSet(jsonObject4);
with progrid4 do
{
align = alClient;
margins.right = 30;
margins.left = 30;
margins.bottom = 30;
width = (mainform.clwidth*90)/100;
height=(mainform.clheight*75)/100;
AutoSizeColumns(True,50);
FixedLayoutFillColor = clalphacolor.clhextocolor('#43cd80');
SelectedLayoutFillColor = clalphacolor.clhextocolor('#698b69');
SelectedLayoutFontColor = clalphacolor.clhextocolor('#ffffff');
FocusedLayoutFillColor = clalphacolor.clhextocolor('#9bcd9b');
FocusedLayoutFontColor = clalphacolor.clhextocolor('#000000');
}
mainform4.Run;
}
except
//ShowMessage('Exception Class2: '+LastExceptionClassName+' Exception Message: '+LastExceptionMessage);
}
}
void usersgrid3;
{
FSender2 = TCLProGrid(mainform2.clSender);
FRow2 = mainform2.clSenderRow;
FCol2 = mainform2.clSenderCol;
//ShowMessage('['+IntToStr(FRow2)+','+IntToStr(FCol2)+'] '+'Hücresinde Bulunan Veri: '+FSender2.Cells[FCol2,FRow2]);
try
jsonObject3 = Clomosy.ClDataSetFromJSON(FSender2.Cells[FCol2,FRow2]);
jsonObject3.openorexecute;
Position2 = Pos('{', FSender2.Cells[FCol2,FRow2]);
//ShowMessage(Position2);
if (Position2 > 1)
{
ShowMessage('İçerik Bulunamadı.');
}
else
{
mainform3 = TclForm.Create(self);
ClRTSetProperty(mainform3, 'ClientWidth', 900);
ClRTSetProperty(mainform3, 'ClientHeight', 750);
mainvertScrollBox3 = mainform3.AddNewVertScrollBox(mainform3, 'mainvertScrollBox3');
mainvertScrollBox3.align = alClient;
//ShowMessage('İçerik Bulundu. Position2: ' + IntToStr(Position2));
progrid3 = mainform3.addnewprogrid(mainvertScrollBox3, 'progrid3');
progrid3.ConnectDataSet(jsonObject3);
with progrid3 do
{
align = alClient;
margins.right = 30;
margins.left = 30;
margins.bottom = 30;
width = (mainform.clwidth*90)/100;
height=(mainform.clheight*75)/100;
AutoSizeColumns(True,50);
FixedLayoutFillColor = clalphacolor.clhextocolor('#43cd80');
SelectedLayoutFillColor = clalphacolor.clhextocolor('#698b69');
SelectedLayoutFontColor = clalphacolor.clhextocolor('#ffffff');
FocusedLayoutFillColor = clalphacolor.clhextocolor('#9bcd9b');
FocusedLayoutFontColor = clalphacolor.clhextocolor('#000000');
}
mainform3.AddNewEvent(progrid3, tbeOnProGridCellClick, 'usersgrid4');
mainform3.Run;
}
except
//ShowMessage('Exception Class2: '+LastExceptionClassName+' Exception Message: '+LastExceptionMessage);
}
}
void usersgrid2;
{
FSender = TCLProGrid(mainform.ClSender);
FRow = mainform.ClSenderRow; // 1 den başlıyor satırlar
FCol = mainform.ClSenderCol; //0 dan başlıyor sütunlar
//ShowMessage('['+IntToStr(FRow)+','+IntToStr(FCol)+'] '+'Hücresinde Bulunan Veri: '+FSender.Cells[FCol,FRow]);
try
Position = Pos('{', FSender.Cells[FCol,FRow]);
// ShowMessage(Position)
if (Position ==0)
{
ShowMessage('Substring not found.');
}
else if (Position==1)
{
mainform2 = TclForm.Create(self);
ClRTSetProperty(mainform2,'ClientWidth',900);
ClRTSetProperty(mainform2,'ClientHeight',750);
mainvertScrollBox2 = mainform2.AddNewVertScrollBox(mainform2,'mainvertScrollBox2');
mainvertScrollBox2.align=alClient;
ShowMessage(FSender.Cells[FCol,FRow]);
jsonObject2 = Clomosy.ClDataSetFromJSON(FSender.Cells[FCol,FRow]);
jsonObject2.OpenOrExecute;
ShowMessage(jsonObject2);
ShowMessage('2');
//ShowMessage('Substring found. Position: ' + IntToStr(Position));
progrid2 = mainform2.addnewprogrid(mainvertScrollBox2, 'progrid2');
ProGrid2.ConnectDataSet(jsonObject2);
with progrid2 do
{
align= alClient;
margins.right= 30;
margins.left= 30;
margins.bottom= 30;
width=(mainform.clwidth*90)/100;
height=(mainform.clheight*75)/100;
AutoSizeColumns(True,50);
FixedLayoutFillColor = clalphacolor.clhextocolor('#43cd80');
SelectedLayoutFillColor = clalphacolor.clhextocolor('#698b69');
SelectedLayoutFontColor = clalphacolor.clhextocolor('#ffffff');
FocusedLayoutFillColor = clalphacolor.clhextocolor('#9bcd9b');
FocusedLayoutFontColor = clalphacolor.clhextocolor('#000000');
}
mainform2.AddNewEvent(progrid2, tbeOnProGridCellClick, 'usersgrid3');
mainform2.run;
//mainform2.AddNewEvent(progrid2, tbeOnProGridCellClick,'idgridac2');
}
except
ShowMessage('Exception Class2: '+LastExceptionClassName+' Exception Message: '+LastExceptionMessage);
}
}
{
mainform = TclForm.Create(self);
ClRTSetProperty(mainform,'ClientWidth',1200);
ClRTSetProperty(mainform,'ClientHeight',750);
mainvertScrollBox = mainform.AddNewVertScrollBox(mainform,'mainvertScrollBox');
mainvertScrollBox.align=alClient;
progrid = mainform.addnewprogrid(mainvertScrollBox, 'progrid');
allData = TClJsonQuery.Create(nil);
clRest = TclRest.Create;
jsonObject = TClJsonQuery.Create(nil);
clRest.Accept = 'application/json';
clRest.Method = rmGet;
ToplamJson = '[';
for ( sonrakiveri=1 to 30)
{
clRest.BaseURl = ' https://dummyjson.com/users/" rel="nofollow - https://dummyjson.com/users/ ' + IntToStr(sonrakiveri);
clRest.Execute;
clRest.Execute;
//ShowMessage(clRest.Response);
jsonObject = Clomosy.ClDataSetFromJSON(clRest.Response);
jsonObject.OpenOrExecute;
with jsonObject do
{
try
if (Found)
{
First;
while (not EOF)
{
if(jsonObject.Found)
{
jsonMetin = jsonObject.getJSONString;
yeniMetin = clGetStringReplace(jsonMetin,'[','');
yeniMetin = clGetStringReplace(yeniMetin,']','');
ToplamJson = ToplamJson + yeniMetin;
}
Next;
}
}
except
ShowMessage('Exception Class3: '+LastExceptionClassName+' Exception Message: '+LastExceptionMessage);
}
}
if (sonrakiveri == 30)
{
ToplamJson = ToplamJson + ']';
}
else
{
ToplamJson = ToplamJson + ',';
}
}
allData = Clomosy.ClDataSetFromJSON(ToplamJson);
ProGrid.ConnectDataSet(allData);
with progrid do
{
align= alClient;
margins.right= 30;
margins.left= 30;
margins.bottom= 30;
width=(mainform.clwidth*90)/100;
height=(mainform.clheight*75)/100;
AutoSizeColumns(True,50);
FixedLayoutFillColor = clalphacolor.clhextocolor('#43cd80');
SelectedLayoutFillColor = clalphacolor.clhextocolor('#698b69');
SelectedLayoutFontColor = clalphacolor.clhextocolor('#ffffff');
FocusedLayoutFillColor = clalphacolor.clhextocolor('#9bcd9b');
FocusedLayoutFontColor = clalphacolor.clhextocolor('#000000');
}
mainform.AddNewEvent(progrid, tbeOnProGridCellClick,'usersgrid2');
mainform.Run;
}