private BaseFetcher SelectDefaultFetcher()
{
BaseFetcher fetcher = null;
if(!String.IsNullOrEmpty(PreferenceHelper.GetPreference("SinaWeibo_ID"))
&& !String.IsNullOrEmpty(PreferenceHelper.GetPreference("SinaWeibo_FollowerID"))
&& !String.IsNullOrEmpty(PreferenceHelper.GetPreference("SinaWeibo_Token")))
{
LogoSource = PreferenceHelper.GetPreference("SinaWeibo_FollowerAvatar2");
Name = PreferenceHelper.GetPreference("SinaWeibo_FollowerNickName");
HerID = PreferenceHelper.GetPreference("SinaWeibo_FollowerID");
fetcher = new SinaWeiboFetcher();
m_type = EntryType.SinaWeibo;
}
else if (!String.IsNullOrEmpty(PreferenceHelper.GetPreference("Renren_ID"))
&& !String.IsNullOrEmpty(PreferenceHelper.GetPreference("Renren_FollowerID")))
{
// 因为人人的avatar2 很可能是不规则的,所以这里用低清的
LogoSource = PreferenceHelper.GetPreference("Renren_FollowerAvatar");
Name = PreferenceHelper.GetPreference("Renren_FollowerNickName");
HerID = PreferenceHelper.GetPreference("Renren_FollowerID");
fetcher = new RenrenFetcher();
m_type = EntryType.Renren;
}
else if (!String.IsNullOrEmpty(PreferenceHelper.GetPreference("Douban_ID"))
&& !String.IsNullOrEmpty(PreferenceHelper.GetPreference("Douban_FollowerID"))
&& !String.IsNullOrEmpty(PreferenceHelper.GetPreference("Douban_Token")))
{
LogoSource = PreferenceHelper.GetPreference("Douban_FollowerAvatar2");
Name = PreferenceHelper.GetPreference("Douban_FollowerNickName");
HerID = PreferenceHelper.GetPreference("Renren_FollowerID");
fetcher = new DoubanFetcher();
m_type = EntryType.Douban;
}
return fetcher;
}