Dim tracker As RangeDownloadTracker = Downloader.CreateTracker
CustomListView1.AddTextItem("Cancel the second download",tracker)
Private Sub CustomListView1_ItemClick (Index As Int, Value As Object)
Dim tr As RangeDownloadTracker = Value
' ✅ إلغاء التحميل
tr.Cancel = True
Log("تم إلغاء التنزيل رقم: " & Index)
End Sub
The problem is that I have more than one tracker, and every time I click the download button on CustomListView, a new tracker is created. Dim tracker As RangeDownloadTracker = Downloader.CreateTracker
There can be up to five at once.
I want to use the cancel event,
but the problem is how do I know which tracker button to cancel?
1. Don´t expect me checking your app.
2. If you create a tracker. REMEBER IT in a Map or a List.
3. If you want to chancel downloads go over all of them and set Tracker.Cancel = True
4. Learn coding
Dim tracker As RangeDownloadTracker = Downloader.CreateTracker
CustomListView1.AddTextItem("Cancel the second download",tracker)
Private Sub CustomListView1_ItemClick (Index As Int, Value As Object)
Dim tr As RangeDownloadTracker = Value
' ✅ إلغاء التحميل
tr.Cancel = True
Log("تم إلغاء التنزيل رقم: " & Index)
End Sub