forked from microsoft/Windows-universal-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Scenario2_Polling.xaml.h
51 lines (44 loc) · 1.79 KB
/
Scenario2_Polling.xaml.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************
//
// Scenario2_Polling.xaml.h
// Declaration of the Scenario2_Polling class
//
#pragma once
#include "pch.h"
#include "Scenario2_Polling.g.h"
#include "MainPage.xaml.h"
namespace SDKTemplate
{
/// <summary>
/// An empty page that can be used on its own or navigated to within a Frame.
/// </summary>
[Windows::Foundation::Metadata::WebHostHidden]
public ref class Scenario2_Polling sealed
{
public:
Scenario2_Polling();
protected:
virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
virtual void OnNavigatedFrom(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
private:
SDKTemplate::MainPage^ rootPage;
Windows::UI::Core::CoreDispatcher^ dispatcher;
Windows::Devices::Sensors::Compass^ compass;
Windows::Foundation::EventRegistrationToken visibilityToken;
uint32 desiredReportInterval;
Windows::UI::Xaml::DispatcherTimer^ dispatcherTimer;
void VisibilityChanged(Platform::Object^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ e);
void DisplayCurrentReading(Platform::Object^ sender, Platform::Object^ e);
void ScenarioEnable(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void ScenarioDisable(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
};
}