Hi,
I want to change my object icon depend on the device data.
below is my code
var int32 tmp = 0;
native(tmp)
{
if(current->data.fattrib & AM_DIR)
{
tmp = 1;
}
else
{
tmp = 0;
}
}
if(tmp == 0)
{itemView.Icon = ImageResource::list;}
else
{itemView.Icon = ImageResource::ship;}
I need to do if else twice.
Is there anyway to do better ?
Best Regards
Andy Dong