maui-linux/Xamarin.Forms.Platform.WinRT/WindowsTicker.cs

32 строки
522 B
C#
Исходник Обычный вид История

2016-03-22 23:02:25 +03:00
using System;
using Windows.UI.Xaml;
#if WINDOWS_UWP
namespace Xamarin.Forms.Platform.UWP
#else
namespace Xamarin.Forms.Platform.WinRT
#endif
{
internal class WindowsTicker : Ticker
{
DispatcherTimer _timer;
public WindowsTicker()
{
_timer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(15) };
_timer.Tick += (sender, args) => SendSignals();
}
protected override void DisableTimer()
{
_timer.Stop();
}
protected override void EnableTimer()
{
_timer.Start();
}
}
}