| 1 |
// |
| 2 |
// MainPage.xaml.h |
| 3 |
// Declaration of the MainPage class. |
| 4 |
// |
| 5 |
|
| 6 |
#pragma once |
| 7 |
|
| 8 |
#include "MainPage.g.h" |
| 9 |
|
| 10 |
using web::http::client::http_client; |
| 11 |
using web::http::oauth2::experimental::oauth2_config; |
| 12 |
|
| 13 |
namespace OAuth2Live |
| 14 |
{ |
| 15 |
/// <summary> |
| 16 |
/// An empty page that can be used on its own or navigated to within a Frame. |
| 17 |
/// </summary> |
| 18 |
public |
| 19 |
ref class MainPage sealed |
| 20 |
{ |
| 21 |
public: |
| 22 |
MainPage(); |
| 23 |
|
| 24 |
protected: |
| 25 |
virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs ^ e) override; |
| 26 |
|
| 27 |
private: |
| 28 |
oauth2_config m_live_oauth2_config; |
| 29 |
std::unique_ptr<http_client> m_live_client; |
| 30 |
|
| 31 |
void _UpdateButtonState(); |
| 32 |
void _GetToken(); |
| 33 |
|
| 34 |
void GetTokenButtonClick(Platform::Object ^ sender, Windows::UI::Xaml::Navigation::NavigationEventArgs ^ e); |
| 35 |
void RefreshTokenButtonClick(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e); |
| 36 |
void ImplicitGrantUnchecked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e); |
| 37 |
void ImplicitGrantChecked(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e); |
| 38 |
|
| 39 |
void GetInfoButtonClick(Platform::Object ^ sender, Windows::UI::Xaml::Navigation::NavigationEventArgs ^ e); |
| 40 |
void GetContactsButtonClick(Platform::Object ^ sender, Windows::UI::Xaml::Navigation::NavigationEventArgs ^ e); |
| 41 |
void GetEventsButtonClick(Platform::Object ^ sender, Windows::UI::Xaml::Navigation::NavigationEventArgs ^ e); |
| 42 |
|
| 43 |
void AccessTokenTextChanged(Platform::Object ^ sender, Windows::UI::Xaml::Controls::TextChangedEventArgs ^ e); |
| 44 |
}; |
| 45 |
} // namespace OAuth2Live |