I have a timer. in my form is still possible to open the child window. when I open and close this window, the timer starts again. How can I continue timer operation when I open and clos the child window??? I hope very much for your help! this is my timer:
Private timer As DispatcherTimer
Private CountUp As Integer
Public Sub DispatcherTimerSetup()
timer = New DispatcherTimer()
timer.Interval = New TimeSpan(0, 0, 1)
AddHandler timer.Tick, AddressOf timer_Tick
timer.Start()
End Sub
Private Sub timer_Tick(sender As Object, e As Object)
CountUp += 1
Dim counter As TimeSpan
counter = TimeSpan.FromSeconds(CountUp)
txblCountdown.Text = counter.ToString("mm\:ss")
End Sub
child window:
Private Sub btnMapPoint_Click(sender As Object, e As RoutedEventArgs)
SaveControlValuesInObject()
Dim intIndex As Integer = CInt(sender.Name.Replace("btnMapPoint_", ""))
Frame.Navigate(GetType(Location))
TryCast(Frame.Content, Location).InitForm_Observation(_myEventErist, intIndex, GetType(Event9900000))
TryCast(Frame.Content, Location).IsChangeMapEnabled = False
TryCast(Frame.Content, Location).SetSelectedMap(DirectCast(cboMesspunkt.SelectedItem, SMS_KARTE))
End Sub
Best regards, Polina