private IEnumerator Start()
 {
     base.GetComponent <CanvasGroup>().alpha = 0f;
     foreach (Selectable selectable in base.GetComponentsInChildren <Selectable>())
     {
         selectable.interactable = false;
     }
     this.m_addInviteButton.gameObject.SetActive(false);
     while (Calendar.IsActionPending())
     {
         yield return(null);
     }
     while (this.CalendarEventItem == null)
     {
         yield return(null);
     }
     if (!this.CalendarEventItem.OpenEvent(new Calendar.CalendarOpenEventHandler(this.OnOpenEvent)))
     {
         EventsListPanel componentInParent = this.CalendarEventItem.gameObject.GetComponentInParent <EventsListPanel>();
         if (componentInParent != null)
         {
             componentInParent.OnEventOpenFailed();
         }
         this.CloseDialog();
     }
     this.IsForceClosed = true;
     SceneManager.activeSceneChanged += delegate(Scene scene, Scene sceneLoadMode)
     {
         EventInviteResponseDialog.ForceClosedEventID = null;
     };
     yield break;
 }
예제 #2
0
 private void TogglePendingInvitesFilter()
 {
     this.m_isOnlyShowingPendingInvites = !this.m_isOnlyShowingPendingInvites;
     CalendarEventItem[] componentsInChildren = this.m_scrollContent.GetComponentsInChildren <CalendarEventItem>(true);
     foreach (CalendarEventItem calendarEventItem in componentsInChildren)
     {
         calendarEventItem.gameObject.SetActive(!this.m_isOnlyShowingPendingInvites || calendarEventItem.EventData.IsPendingInvite());
     }
     using (Dictionary <DateTime, GameObject> .KeyCollection.Enumerator enumerator = this.m_dateHeaders.Keys.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             DateTime        date  = enumerator.Current;
             EventsListPanel $this = this;
             this.m_dateHeaders[date].gameObject.SetActive(componentsInChildren.Any((CalendarEventItem eventItem) => eventItem.gameObject.activeInHierarchy && $this.IsEventOnDay(eventItem.EventData, date)));
         }
     }
     if (this.m_pendingInvitesButton != null)
     {
         Text componentInChildren = this.m_pendingInvitesButton.GetComponentInChildren <Text>();
         if (componentInChildren != null)
         {
             componentInChildren.text = StaticDB.GetString((!this.m_isOnlyShowingPendingInvites) ? "CALENDAR_PENDING_INVITATIONS" : "BACK", (!this.m_isOnlyShowingPendingInvites) ? "Invitations [PH]" : "Back [PH]");
         }
     }
 }
예제 #3
0
        public CalendarFiltersDialog CreateCalendarFiltersDialog(EventsListPanel eventsListPanel)
        {
            CalendarFiltersDialog calendarFiltersDialog = this.InstantiateDialog <CalendarFiltersDialog>(this.m_calendarFiltersDialogPrefab, this.Level3Canvas);

            calendarFiltersDialog.EventsListPanel = eventsListPanel;
            return(calendarFiltersDialog);
        }