PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Dotnet code to windev mobile code
Dotnet code to windev mobile code
Débuté par Mitchell, 16 aoû. 2008 11:30 - 4 réponses
Posté le 16 août 2008 - 11:30
Dear Windev Coders,
Please help me how to convert this dotnet code to windev code :
int tagsread
inventory testinventory = new inventory();
tagsread = testinventory.Countclass[1]
tagIDs = new string[tagsread]
for (int i=0; i
Posté le 19 août 2008 - 00:55
Hi Mitch,
Try the following;
tagsread is int
// make sure you add the inventory .net class to your project
testinventory is object inventory
tagsread = testinventory:Countclass[1]
//create array with number elements matching
// the # of tags read
tagsID is array of tagsread string
for i = 0 to (tagsread - 1)
tagsID = testinventory:ToArray():ToString()
end
The above is complete untested and since I don't know exactly what type of object testInventory is, you'll have to experiment the most will the the testinventory:ToArray() line. You may into having to implement an intermediant object of .Net Collection.
In WinDev v12 there is a .Net example that shows how to get the process list from the machine. Check that out for more info.
Cheers!
Ken
Posté le 19 août 2008 - 00:55
Hi Mitch,
Try the following;
tagsread is int
// make sure you add the inventory .net class to your project
testinventory is object inventory
tagsread = testinventory:Countclass[1]
//create array with number elements matching
// the # of tags read
tagsID is array of tagsread string
for i = 0 to (tagsread - 1)
tagsID = testinventory:ToArray():ToString()
end
The above is completely untested and since I don't know exactly what type of object testInventory is, you'll have to experiment with the the testinventory.ToArray() line. You may into having to implement an intermediant object of .Net Collection.
In WinDev v12 there is a .Net example that shows how to get the process list from the machine. Check that out for more info.
Cheers!
Ken
Posté le 19 août 2008 - 00:56
Hi Ken,
thanks for the reply,u send 3 times, unfortunately it is still not working. I also puzzled how to code it in windev.
the following line is giving an error or not accepted :
tagsID = testinventory:ToArray():ToString() ---> not accepted in windev

tagsread = testinventory:Countclass[1] ---> doesnt support this type of assignment [ ]


help please :-(
Posté le 19 août 2008 - 00:56
Hi Mitch,
Try the following;
tagsread is int
// make sure you add the inventory .net class to your project
testinventory is object inventory
tagsread = testinventory:Countclass[1]
//create array with number elements matching
// the # of tags read
tagsID is array of tagsread string
for i = 0 to (tagsread - 1)
tagsID = testinventory:ToArray():ToString()
end
The above is complete untested and since I don't know exactly what type of object testInventory is, you'll have to experiment the most will the the testinventory.ToArray() line. You may into having to implement an intermediant object of .Net Collection.
In WinDev v12 there is a .Net example that shows how to get the process list from the machine. Check that out for more info.
Cheers!
Ken