Wis*_*ter 0 c# windows-phone-7 windows-phone
为WP7制作应用程序但遇到此案例陈述错误.它出现在第3个案例中.给出"不能通过案例错误".我用Google搜索了这个错误,除非我没有正确地集中注意力,否则我确定我已经正确设置了所有内容.
private void SortFeedData(int fs)
{
//only using cases 1,2,3 since 0 is for the news page which doesn't need sorting
switch (fs)
{
case 1:
//Sort feed data for "Scores" Page
switch (ButtonSourceLeague)
{
case "Premier League":
//clears all current feed data
App.Data.FeedList.Clear();
//For News Page - BBC Football RSS Feed
App.Data.FeedList.Add("http://www.rsslivescores.com/premier-league.aspx");
break;
case "Championship":
//clears all current feed data
App.Data.FeedList.Clear();
//For News Page - Test feed
App.Data.FeedList.Add("http://www.rsslivescores.com/engchamp-league.aspx");
break;
case "League One":
//clears all current feed data
App.Data.FeedList.Clear();
//For News Page - BBC Football RSS Feed
App.Data.FeedList.Add("http://www.rsslivescores.com/premier-league.aspx");
break;
case "League Two":
//clears all current feed data
App.Data.FeedList.Clear();
//For News Page - BBC Football RSS Feed
App.Data.FeedList.Add("http://www.rsslivescores.com/premier-league.aspx");
break;
case "FA Cup":
//clears all current feed data
App.Data.FeedList.Clear();
//For News Page - BBC Football RSS Feed
App.Data.FeedList.Add("http://www.rsslivescores.com/fa-cup.aspx");
break;
case "League Cup":
//clears all current feed data
App.Data.FeedList.Clear();
//For News Page - BBC Football RSS Feed
App.Data.FeedList.Add("http://www.rsslivescores.com/english-league-cup.aspx");
break;
default:
MessageBox.Show("Error");
break;
}
break;
case 2:
//Sort feed data for "Fixtures" Page
switch (ButtonSourceLeague)
{
case "Premier League":
//clears all current feed data
App.Data.FeedList.Clear();
//For News Page - BBC Football RSS Feed
App.Data.FeedList.Add("http://www.rsslivescores.com/premier-league.aspx");
break;
case "Championship":
//clears all current feed data
App.Data.FeedList.Clear();
//For News Page - Test feed
App.Data.FeedList.Add("http://www.rsslivescores.com/RssTestFeed.aspx");
break;
case "League One":
//clears all current feed data
App.Data.FeedList.Clear();
//For News Page - BBC Football RSS Feed
App.Data.FeedList.Add("http://www.rsslivescores.com/premier-league.aspx");
break;
case "League Two":
//clears all current feed data
App.Data.FeedList.Clear();
//For News Page - BBC Football RSS Feed
App.Data.FeedList.Add("http://www.rsslivescores.com/premier-league.aspx");
break;
case "FA Cup":
//clears all current feed data
App.Data.FeedList.Clear();
//For News Page - BBC Football RSS Feed
App.Data.FeedList.Add("http://www.rsslivescores.com/premier-league.aspx");
break;
case "League Cup":
//clears all current feed data
App.Data.FeedList.Clear();
//For News Page - BBC Football RSS Feed
App.Data.FeedList.Add("http://www.rsslivescores.com/premier-league.aspx");
break;
default:
MessageBox.Show("Error");
break;
}
//Sort feed data for "My Club" Page
//Either a big-ass case statment for EVERY club we know off
//OR find a SINGLE rss feed that has info on ALL clubs
break;
case 3:
switch (ButtonSourceClub)
{
case "Manchester United":
App.Data.FeedList.Add("rss xml link here");
break;
default:
MessageBox.Show("Error");
break;
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
}
case 3:
switch (ButtonSourceClub)
{
case "Manchester United":
App.Data.FeedList.Add("rss xml link here");
break;
default:
MessageBox.Show("Error");
break;
}
break; //Here's what you're missing.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
596 次 |
| 最近记录: |