-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGamePage.xaml.h
38 lines (27 loc) · 918 Bytes
/
GamePage.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
//
// GamePage.xaml.h
// Declaration of the GamePage class
//
#pragma once
#include "GamePage.g.h"
namespace ThatNumbersGame {
/// <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 GamePage sealed {
private:
enum EGameState{ WAITING, DISPLAYING, ANSWERING, LOST};
EGameState eCurrentGameState = EGameState::WAITING;
int iNumDigits = 1;
Platform::String^ sLastNumber = "";
Windows::UI::Xaml::DispatcherTimer^ oDisplayTimer = ref new Windows::UI::Xaml::DispatcherTimer();
void timerTick(Object^ sender, Object^ e);
void advanceState();
public:
GamePage();
private:
void btnNext_onClick(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void txtAnswer_keyDown(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e);
};
}