mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2025-12-06 07:12:04 +01:00
29 lines
473 B
C#
29 lines
473 B
C#
#if WPF
|
|
using System.Windows.Threading;
|
|
#elif UWP
|
|
using Windows.UI.Xaml;
|
|
#elif WINUI
|
|
using Microsoft.UI.Xaml;
|
|
#elif AVALONIA
|
|
using Avalonia.Threading;
|
|
#endif
|
|
|
|
namespace MapControl
|
|
{
|
|
internal class UpdateTimer : DispatcherTimer
|
|
{
|
|
public void Run(bool restart = false)
|
|
{
|
|
if (restart)
|
|
{
|
|
Stop();
|
|
}
|
|
|
|
if (!IsEnabled)
|
|
{
|
|
Start();
|
|
}
|
|
}
|
|
}
|
|
}
|