Ejemplo n.º 1
0
        public IEnumerator GetEnumerator()
        {
            DateTime i_Date = new DateTime();

            foreach (User fbUser in FacebookAppLogic.Instance.LoggedinUser.Friends)
            {
                BirthdayData bData;
                if (TryParseFriendBirthdayDateToSystemTime(ref i_Date, fbUser))
                {
                    bData = new BirthdayData();
                    if (rm_Strategy.IsBirthdayNeeded(i_Date, bData))
                    {
                        bData.Name = fbUser.Name;
                        yield return bData;
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public bool IsBirthdayNeeded(DateTime i_UserBirthday, BirthdayData i_Bdata)
        {
            bool result = true;
            if ((DateTime.Now.Day == i_UserBirthday.Date.Day) && (DateTime.Now.Month == i_UserBirthday.Date.Month))
            {
                i_Bdata.Date = FriendsBirthdays.BirthdaysDates.Today;
            }
            else if ((DateTime.Now.AddDays(1).Day == i_UserBirthday.Date.Day) && (DateTime.Now.Month == i_UserBirthday.Date.Month))
            {
                i_Bdata.Date = FriendsBirthdays.BirthdaysDates.Tomorrow;
            }
            else
            {
                result = false;
            }

            return result;
        }