private async void Top_Button_Click(object sender, RoutedEventArgs e) { string game_title = instinct.GetItem("gamesTrailer1Title"); instinct.PostEvent( page, page_title, "Trailers", game_title, "Play Video" ); CancellationToken cancellationToken = source.Token; await instinct.GetPlaylist("gamesTrailer1Media", null, FeatureImage, FeatureVideo, cancellationToken); }
private async void Top_Button_Click(object sender, RoutedEventArgs e) { source.Cancel(); instinct.PostEvent( page, page_title, page_title, accessory1Title, "Play Video" ); CancellationToken cancellationToken = source.Token; await instinct.GetPlaylist("accessories1Media", null, FeatureImage, FeatureVideo, cancellationToken); }
private async void UpdateUI() { await instinct.ReadMap(); console = instinct.GetItem("console2Title"); page_title = console + " Video"; instinct.PostView(page, page_title); instinct.PostEvent( page, page_title, "Consoles", console, "Play Video" ); CancellationToken cancellationToken = source.Token; await instinct.GetPlaylist("console2Media", null, FeatureImage, FeatureVideo, cancellationToken); }
private async void UpdateUI() { await instinct.ReadMap(); service = instinct.GetItem("gamesXboxLiveTitle"); page_title = service + " Video"; instinct.PostView(page, page_title); instinct.PostEvent( page, page_title, service, service, "Play Video" ); CancellationToken cancellationToken = source.Token; await instinct.GetPlaylist("gamesXboxLiveMedia", null, FeatureImage, FeatureVideo, cancellationToken); }
public static void CalculateResults() { // Clear previous recommendation Recommendations.console = ""; Recommendations.headset = false; Recommendations.controller = false; Recommendations.premium = false; var answers = new List <Answer>(); answers.Add(answer1); answers.Add(answer2); answers.Add(answer3); answers.Add(answer4); answers.Add(answer5); // POST analytics Instinct instinct = new Instinct(); foreach (var item in answers) { //Debug.WriteLine("Answer #" + item.id + "\tText: " + item.answer_text); //instinct.PostEvent("Help Me Choose", item.answer_text, item.question_text); instinct.PostEvent( "/consoles/help-me-choose-results", "Help Me Choose Results", "Help Me Choose Answers", item.question_text, item.answer_text ); } // Populate tables var XboxOneX = new Console(); XboxOneX.name = "Xbox One X"; XboxOneX.value = 0; var XboxOneS = new Console(); XboxOneS.name = "Xbox One S"; XboxOneS.value = 0; var XboxOneSAD = new Console(); XboxOneSAD.name = "Xbox One S All Digital"; XboxOneSAD.value = 0; // Question 1 - First Console? // Q1 1: Yes first console 2: No, upgrading 3: Always want the newest console // Question 2 - Discs or Digital? // Q2 1: Digital 2: Discs 3: Both switch (answer2.answer_value) { case 1: XboxOneSAD.value++; break; case 2: XboxOneX.value++; XboxOneS.value++; break; case 3: XboxOneX.value++; XboxOneS.value++; break; } // Question 3 - What matters most? // Q3 1: Best 2: Great 3: Affordable switch (answer3.answer_value) { case 1: XboxOneX.value++; break; case 2: XboxOneX.value++; XboxOneS.value++; break; case 3: XboxOneS.value++; XboxOneSAD.value++; break; } // Question 4 - What age group? // Q4 1: Kids 2: Teens 3: Adults /* * string gameCopy = ""; * switch (answer4.answer_value) * { * case 1: * gameCopy = "Show games for kids"; * break; * case 2: * gameCopy = "Show games for teens"; * break; * case 3: * gameCopy = "Show games for adults"; * break; * } */ // Question 5 - Who are you playing with? // Q5 1: Myself 2: Friends at home 3: Friends online if (answer5.answer_value != 2) { Recommendations.headset = true; } if (answer5.answer_value != 1) { // Add extra controller Recommendations.controller = true; } // Iterate through console tallies var consoles = new List <Console>(); consoles.Add(XboxOneX); consoles.Add(XboxOneS); consoles.Add(XboxOneSAD); // Default is XboxOneS Console recommendedConsole = XboxOneS; foreach (var item in consoles) { if (item.value > recommendedConsole.value) { recommendedConsole = item; } } if (recommendedConsole.name == "Xbox One X") { Recommendations.premium = true; } Recommendations.console = recommendedConsole.name; }