Created
May 14, 2019 04:23
-
-
Save kakobotasso/7242c72cdcf91fd869fbc3732bcfe640 to your computer and use it in GitHub Desktop.
MainPage.xaml.cs completed FireEvents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Xamarin.Forms; | |
namespace FireEvents | |
{ | |
[DesignTimeVisible(true)] | |
public partial class MainPage : ContentPage | |
{ | |
IEventTracker eventTracker; | |
public MainPage() | |
{ | |
InitializeComponent(); | |
eventTracker = DependencyService.Get<IEventTracker>(); | |
} | |
async void OnButton01Clicked(object sender, System.EventArgs e) | |
{ | |
eventTracker.SendEvent("Click01"); | |
} | |
async void OnButton02Clicked(object sender, System.EventArgs e) | |
{ | |
eventTracker.SendEvent("Click02", "Comment", "Hello Events"); | |
} | |
async void OnButton03Clicked(object sender, System.EventArgs e) | |
{ | |
var dictionary = new Dictionary<string, string> | |
{ | |
{"Name", "John Xamarin"}, | |
{"Phone", "55 555 555 555"}, | |
{"Email", "[email protected]"} | |
}; | |
eventTracker.SendEvent("Click03", dictionary); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment