-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathAdControl.xaml.cpp
66 lines (52 loc) · 2.09 KB
/
AdControl.xaml.cpp
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//
// AdControl.xaml.cpp
// Implementation of the AdControl class
//
#include "pch.h"
#include "AdControl.xaml.h"
using namespace VBA10;
using namespace Platform;
using namespace Windows::Foundation;
using namespace Windows::Foundation::Collections;
//using namespace Windows::UI::Xaml;
//using namespace Windows::UI::Xaml::Controls;
//using namespace Windows::UI::Xaml::Controls::Primitives;
//using namespace Windows::UI::Xaml::Data;
//using namespace Windows::UI::Xaml::Input;
//using namespace Windows::UI::Xaml::Media;
//using namespace Windows::UI::Xaml::Navigation;
//using namespace Windows::UI::Core;
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236
AdControl::AdControl()
{
InitializeComponent();
}
//void AdControl::MSAdControl_ErrorOccurred(Platform::Object^ sender, Microsoft::Advertising::WinRT::UI::AdErrorEventArgs^ e)
//{
// this->Dispatcher->RunAsync(CoreDispatcherPriority::Normal, ref new DispatchedHandler([this]()
// {
// MSAdControl->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
// AdDuplex::AdControl^ AdDuplexAdControl = ref new AdDuplex::AdControl();
// AdDuplexAdControl->AdUnitId = "166555";
// AdDuplexAdControl->AppKey = "53f0124b-fa9c-40be-a364-4589d505adcd";
// AdDuplexAdControl->IsTest = false;
// adGrid->Children->Append(AdDuplexAdControl);
//
// }));
//}
//void AdControl::MSAdControl_AdRefreshed(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
//{
// this->Dispatcher->RunAsync(CoreDispatcherPriority::Normal, ref new DispatchedHandler([this]()
// {
//
// MSAdControl->Visibility = Windows::UI::Xaml::Visibility::Visible;
//
// //AdDuplexAdControl->Visibility = Windows::UI::Xaml::Visibility::Collapsed;
// //AdDuplexAdControl->IsEnabled = false; //set to false to stop checking for ad
// }));
//}
//void AdControl::AdDuplexAdControl_AdCovered(Platform::Object^ sender, AdDuplex::Banners::Core::AdCoveredEventArgs^ e)
//{
// String^ test = e->CulpritElement->GetType()->FullName;
// String^ test2 = e->CulpritElement->Name;
//}