Advance thanks to all...
I am using a timer control for calling a function (lastposition()) in each 20 seconds.Now the problem is first time there is no issue.Second time function is executing two times and the third time function is executing 3 times like that it is increasing.I dont understand what logic is missing in my code.
after 20 second lastposition function is executing 1 time
after 40 second lastposition function is executing 2 time
after 60 second lastposition function is executing 3 time
after 80 second lastposition function is executing 4 time.......
Like this ...Can anybdy check my below code and tell me what mistake in this?
I am using a timer control for calling a function (lastposition()) in each 20 seconds.Now the problem is first time there is no issue.Second time function is executing two times and the third time function is executing 3 times like that it is increasing.I dont understand what logic is missing in my code.
after 20 second lastposition function is executing 1 time
after 40 second lastposition function is executing 2 time
after 60 second lastposition function is executing 3 time
after 80 second lastposition function is executing 4 time.......
Like this ...Can anybdy check my below code and tell me what mistake in this?
Partial Public Class MainPage
Inherits UserControl
Dim _timerRealTime As New Storyboard()
Private
Sub
ChkRealTime_Checked(sender
As
Object
, e
As
RoutedEventArgs)
Handles
ChkRealTime.Checked
_timerRealTime.Duration = TimeSpan.FromMilliseconds(1)
AddHandler
_timerRealTime.Completed,
AddressOf
Me
._timerRealtime_Completed
_timerRealTime.Begin()
End
Sub
Private
Sub
_timerRealtime_Completed(sender
As
Object
, e
As
EventArgs)
LastPosition()
_timerRealTime.Duration = TimeSpan.FromSeconds(20)
_timerRealTime.Begin()
End
Sub
Private
Sub
LastPosition()
lastposdate =
""
DoorOpenClose =
"NO"
'select Max date
Dim
Proxy1
As
ComboLoadClient =
New
ComboLoadClient()
AddHandler
Proxy1.SelectmaxdateCompleted,
AddressOf
LastPositionRunning
Proxy1.SelectmaxdateAsync(
" WHERE ([Group].GroupName = '"
& TxtUsername.Text &
"' )"
)
End
Sub