public string ENVFileName(SeasonType seasonType, WeatherType weatherType) { //int index = (int)seasonType * 3 + (int)weatherType; //return ENVFileNames[index]; var envfilekey = seasonType.ToString() + weatherType.ToString(); var envfile = ENVFileNames[envfilekey]; // Trace.TraceInformation("Selected Environment file is {1}", envfilekey, envfile); return(envfile); }
/// <summary> /// 加载数据 /// </summary> public async void LoadData() { //try //{ if (Loading || !HasNext) { return; } Page += 1; Loading = true; var url = $"https://api.bilibili.com/pgc/app/follow/v2/{ SeasonType.ToString() }?access_key={ ApiHelper.access_key}&appkey={ApiHelper.AndroidKey.Appkey}&build={ApiHelper.build}&platform=android&pn={Page}&ps=20&status={Status}&ts={ApiHelper.GetTimeSpan}"; url += "&sign=" + ApiHelper.GetSign(url); var result = await WebClientClass.GetResults(new Uri(url)); var obj = JObject.Parse(result); if (obj["code"].ToInt32() == 0) { var data = JsonConvert.DeserializeObject <FollowResult>(obj["result"].ToString()); HasNext = data.has_next == 1; Total = data.total; if (data.follow_list != null) { foreach (var item in data.follow_list) { item._status = Status; FollowList.Add(item); } } } else { Utils.ShowMessageToast(obj["message"].ToString()); } //} //catch (Exception ex) //{ // Utils.ShowMessageToast(HandelError(ex).message); //} //finally //{ Loading = false; //} }
public string GetEnvironmentFileName(SeasonType seasonType, WeatherType weatherType) { string envfilekey = seasonType.ToString() + weatherType.ToString(); return(fileNames[envfilekey]); }
private void SeasonChangedHandler(SeasonType season) { seasonText.text = season.ToString(); }