2018-09-28 19:38:22 +03:00
|
|
|
|
using Windows.UI.Xaml.Media;
|
2016-04-25 22:57:44 +03:00
|
|
|
|
using Xamarin.Forms.Internals;
|
2016-03-22 23:02:25 +03:00
|
|
|
|
|
|
|
|
|
namespace Xamarin.Forms.Platform.UWP
|
|
|
|
|
{
|
|
|
|
|
internal class WindowsTicker : Ticker
|
|
|
|
|
{
|
2018-09-28 19:38:22 +03:00
|
|
|
|
protected override void DisableTimer()
|
2016-03-22 23:02:25 +03:00
|
|
|
|
{
|
2018-09-28 19:38:22 +03:00
|
|
|
|
CompositionTarget.Rendering -= RenderingFrameEventHandler;
|
2016-03-22 23:02:25 +03:00
|
|
|
|
}
|
|
|
|
|
|
2018-09-28 19:38:22 +03:00
|
|
|
|
protected override void EnableTimer()
|
2016-03-22 23:02:25 +03:00
|
|
|
|
{
|
2018-09-28 19:38:22 +03:00
|
|
|
|
CompositionTarget.Rendering += RenderingFrameEventHandler;
|
2016-03-22 23:02:25 +03:00
|
|
|
|
}
|
|
|
|
|
|
2018-09-28 19:38:22 +03:00
|
|
|
|
void RenderingFrameEventHandler(object sender, object args)
|
2016-03-22 23:02:25 +03:00
|
|
|
|
{
|
2018-09-28 19:38:22 +03:00
|
|
|
|
SendSignals();
|
2016-03-22 23:02:25 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|