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
{"movies":[{"id":1494,"movieCode":["HO00004079"],"title_en":"The Lord of the Rings The Return of the King","title_th":"มหาสงครามชิงพิภพ","rating":"ทป.","rating_id":1,"duration":201,"release_date":"2023-07-13","sneak_date":"2021-04-22","synopsis_th":"การเดินทางของเหล่าพันธมิตรผู้กล้าแห่งวงแหวนกำลังจะถึงคราวสิ้นสุด! The Lord of the Rings: The Return of the King พร้อมส่งบทสรุปแห่งมหาสงครามชิงพิภพ ณ ดินแดนมิดเดิลเอิร์ธ ฝีมือการกำกับภาพยนตร์ของ ปีเตอร์ แจ็คสัน (Peter Jackson) จากบทภาพยนตร์ของทีมนักเขียนบทภาพยนตร์ ฟราส วอล์ช (Fran Walsh), ฟิลลิปปา โบเยนส์ (Philippa Boyens) และตัวแจ็คสันเอง ภาพยนตร์ดัดแปลงจากปลายปากกาการเขียนของ เจ.อาร์.อาร์. โทลคีน (J.R.R. Tolkien) พร้อมกลับมาฉายบนจอยักษ์อีกครั้ง เฉพาะโรงภาพยนตร์ที่เปิดบริการ\r\n","synopsis_en":"Gandalf and Aragorn lead the World of Men against Sauron's army to draw his gaze from Frodo and Sam as they approach Mount Doom with the One Ring.\r\n","director":"Peter Jackson","actor":"Orlando Bloom/Sean Bean/Karl Urban/Elijah Wood/Ian McKellen/Cate Blanchett/Andy Serk |
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.Linq; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.ComponentModel; | |
using System.Runtime.CompilerServices; | |
using Windows.ApplicationModel.Resources.Core; | |
using Windows.Foundation; | |
using Windows.Foundation.Collections; | |
using Windows.UI.Xaml.Data; |
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
public static async Task LoadLocalDataAsync() | |
{ | |
// Retrieve recipe data from Recipes.txt | |
var file = await Package.Current.InstalledLocation.GetFileAsync("Assets\\movies.json"); | |
var result = await FileIO.ReadTextAsync(file); | |
// Parse the JSON recipe data | |
var movies = JsonArray.Parse(result); | |
// Convert the JSON objects into RecipeDataItems and RecipeDataGroups |
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.Linq; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.ComponentModel; | |
using System.Runtime.CompilerServices; | |
using Windows.ApplicationModel.Resources.Core; | |
using Windows.Foundation; | |
using Windows.Foundation.Collections; | |
using Windows.UI.Xaml.Data; |
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
var selectionRect = event.srcElement.getBoundingClientRect(); | |
var buttonCoordinates = { x: selectionRect.left, y: selectionRect.top, width: selectionRect.width, height: selectionRect.height }; | |
var placement = Windows.UI.Popups.Placement.above; |
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
var id = (data.place.countryCode + "-" + data.place.city).replace(" ", "_"); | |
var displayName = data.place.city + " weather "; | |
var shortName = data.place.city; | |
var argument = id + "-pin"; | |
var options = Windows.UI.StartScreen.TileOptions.showNameOnLogo; | |
var imageUri = new Windows.Foundation.Uri("ms-appx:///images/logo150.png"); |
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
function unpinByElementAsync(element, unwantedTileID) { | |
var selectionRect = element.getBoundingClientRect(); | |
var buttonCoordinates = { x: selectionRect.left, y: selectionRect.top, width: selectionRect.width, height: selectionRect.height }; | |
var placement = Windows.UI.Popups.Placement.above; | |
var tileToDelete = new Windows.UI.StartScreen.SecondaryTile(unwantedTileID); | |
return new WinJS.Promise(function (complete, error, progress) { | |
tileToGetDeleted.requestDeleteForSelectionAsync(buttonCoordinates, placement).done(function (isDeleted) { |
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
var reference = Windows.Storage.Streams.RandomAccessStreamReference.createFromFile(dataToShare.photoFile); | |
dataRequest.properties.thumbnail = reference; | |
dataRequest.setBitmap(reference); |
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
Data.getWeatherFromLocation(13.739135, 100.547324).then(function (result) { | |
WinJS.Binding.processAll(element.querySelector("#weatherData"), result); | |
}); |
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
function getWeatherFromLocation(lat, lon) { | |
return new WinJS.Promise(function (complete, error, process) { | |
WinJS.xhr({ url: "http://api.wunderground.com/api/" + apiKey + "/conditions/q/" + lat + "," + lon + ".json" }) | |
.then(function (xhr) { | |
var result = JSON.parse(xhr.responseText).current_observation; | |
var condition = { | |
icon: result.icon_url, | |
temp: result.temp_c, |
NewerOlder