зеркало из https://github.com/DeGsoft/maui-linux.git
32 строки
522 B
C#
32 строки
522 B
C#
|
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();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|