Ejemplo n.º 1
0
 public bool IsPendingInvite()
 {
     return(CalendarStatusExtensions.IsInvited(new uint?(this.InviteStatus)) && this.StartTime >= DateAndTime.GetServerTimeLocal() && (this.CalendarType == CalendarType.Player || this.CalendarType == CalendarType.GuildSignup || this.CalendarType == CalendarType.CommunitySignup));
 }
Ejemplo n.º 2
0
 public void SetEventInfo(CalendarEventData eventData)
 {
     this.EventData   = eventData;
     this.m_date.text = this.GetDateString(eventData.EventTime);
     if (this.m_time != null)
     {
         this.m_time.text = eventData.EventTime.ToString(StaticDB.GetString("SHORT_TIME", "h:mm tt"));
     }
     this.m_eventName.text = eventData.Title;
     if (this.m_subtext != null)
     {
         TextCycler component = this.m_subtext.GetComponent <TextCycler>();
         Community  community = CommunityData.Instance.GetCommunity(this.EventData.ClubID);
         if (this.EventData.CalendarType == CalendarType.CommunityAnnouncement)
         {
             if (community != null)
             {
                 component.AddString(community.Name);
             }
         }
         else if (CalendarStatusExtensions.IsAttending(new uint?(this.EventData.InviteStatus)))
         {
             component.AddString(StaticDB.GetString("YOU_ARE_GOING", "You are going [PH]"));
             if (community != null)
             {
                 component.AddString(community.Name);
             }
             this.UpdateNumAttendees();
         }
         else if (this.EventData.InviteStatus == 8u)
         {
             component.AddString(StaticDB.GetString("TENTATIVE", "Tentative [PH]"));
             if (community != null)
             {
                 component.AddString(community.Name);
             }
         }
         else if (CalendarStatusExtensions.IsInvited(new uint?(this.EventData.InviteStatus)))
         {
             if (!string.IsNullOrEmpty(this.EventData.InvitedBy))
             {
                 component.AddString(string.Format(StaticDB.GetString("INVITED_BY", "Invited by {0} [PH]"), this.EventData.InvitedBy));
             }
             else
             {
                 component.AddString(StaticDB.GetString("REPLY_TO_EVENT", "Reply to this event [PH]"));
             }
             if (community != null)
             {
                 component.AddString(community.Name);
             }
         }
         else if (this.EventData.InviteStatus == 2u)
         {
             component.AddString(StaticDB.GetString("DECLINED", "You are not going [PH]"));
         }
         else
         {
             this.m_subtext.gameObject.SetActive(false);
         }
     }
     if (this.m_inviteStatus != null)
     {
         if (CalendarStatusExtensions.IsAttending(new uint?(this.EventData.InviteStatus)))
         {
             this.m_inviteStatus.sprite = this.m_checkMark;
         }
         else if (this.EventData.InviteStatus == 8u)
         {
             this.m_inviteStatus.sprite = this.m_questionMark;
         }
         else if (CalendarStatusExtensions.IsInvited(new uint?(this.EventData.InviteStatus)))
         {
             this.m_inviteStatus.sprite = this.m_exclamationMark;
         }
         else if (this.EventData.InviteStatus == 2u)
         {
             this.m_inviteStatus.sprite = this.m_xMark;
         }
         else
         {
             this.m_inviteStatus.gameObject.SetActive(false);
         }
     }
 }