我有一个脚本可以将电子表格中的事件导入日历:
function caltest1() {
var sheet = SpreadsheetApp.getActiveSheet();
var startRow = 2; // First row of data to process
var numRows = 3; // Number of rows to process
var dataRange = sheet.getRange(startRow, 1, numRows, 5);
var data = dataRange.getValues();
var cal = CalendarApp.getDefaultCalendar();
for (i in data) {
var row = data[i];
var title = row[0]; // First column
var desc = row[1]; // Second column
var tstart = row[2];
var tstop = row[3];
var loc = row[4];
//cal.createEvent(title, …Run Code Online (Sandbox Code Playgroud) 这是我的C#代码,现在它在控制台中显示数据.
class PlaceViewModel
{
public List<Vantaa.IntroPage.Place> Places;
}
public class Place
{
public string id { get; set; }
public string title { get; set; }
public string latitude { get; set; }
public string longitude { get; set; }
public string www { get; set; }
}
public class RootObject
{
public List<Place> Places { get; set; }
}
protected override void OnNavigatedTo(NavigationEventArgs e)
{
WebClient webClient = new WebClient();
webClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(webClient_DownloadStringCompleted);
webClient.DownloadStringAsync(new Uri("http://mobiilivantaa.lightscreenmedia.com/api/place"));
}
private void …Run Code Online (Sandbox Code Playgroud) 我是Windows手机的初学者,我不知道如何从JSON字符串填充列表框.在我的应用程序中,将有一个来自Web服务的Json String.
所以,这是我的json String [json Array]:
{
"type":"ok",
"result":
{
"Country":[{
"title":"Country-1",
"description":"US",
"status":"1"
},
{
"title":"Country-2",
"description":"Australia",
"status":"0"
},
{
"title":"Country-3",
"description":"Brazil,
"status":"0"
}
]
}
}
Run Code Online (Sandbox Code Playgroud)
我想在我的应用程序中的列表框中绑定它.我真的不知道,如何在列表框中绑定.
请给我完整的xaml和c#代码.