public override void RefreshUI()
        {
            UIHeader.Show(mHeaderTag);

            DataManager.Me.FetchData();
            RefreshContent();
        }
Exemple #2
0
 private void OnSwitchPage()
 {
     if (mNavigation.CurrentPage != 0)
     {
         mChatPage.Close();
         mContactPage.Open();
         UIHeader.Show(mHeaderTag);
     }
 }
        public override void RefreshUI()
        {
            mNavigation.SetPage(mCameFromSubmitted ? 1 : 0);

            mSlideArea.SetExitEdge(RectTransform.Edge.Top);
            mSlideArea.SetEnterEdge(mEnterLeft ? RectTransform.Edge.Left : RectTransform.Edge.Top);
            mEnterLeft = false;

            UIHeader.Show(mHeaderTag);

            RefreshContent();
        }
Exemple #4
0
        public void ChatWith(DataUser contact)
        {
            mCurrentContact = contact;
            GlobalStatus.SetSeenMessages(mCurrentContact.ID);
            ChatManager.FetchChat(mCurrentContact.ID);

            mContactPage.Close();
            mChatPage.Open(mCurrentContact);

            mChatPage.Refresh();

            UIHeader.Show(mHeaderTag, BackToContacts);
        }
Exemple #5
0
        public override void RefreshUI()
        {
            UIHeader.Show(mHeaderTag, OnClickHeader);

            bool isActivity = mCurrentAssignment.EndAt.HasValue && mCurrentAssignment.StartAt.HasValue;

            mTitleIcon.sprite = isActivity ? mActivitySprite : mAssignmentSprite;
            mTitle.text       = mCurrentAssignment.Name;
            mCategory.text    = mCurrentAssignment.Category.Name;
            mContent.text     = AssignmentContentFormat.Create(mCurrentAssignment, false);

            for (int i = 0; i < mBoxImages.Length; i++)
            {
                mBoxImages[i].sprite = mCurrentAssignment.IsWaiting ? mBoxAttention : mBoxDone;
            }
        }
Exemple #6
0
        public override void RefreshUI()
        {
            UIHeader.Show(mHeaderTag, OnClickHeader);

            bool isActivity = mCurrentAssignment.EndAt.HasValue && mCurrentAssignment.StartAt.HasValue;

            mTitleIcon.sprite = isActivity ? mActivitySprite : mAssignmentSprite;
            mTitle.text       = mCurrentAssignment.Name;
            mCategory.text    = mCurrentAssignment.Category.Name;
            mContent.text     = AssignmentContentFormat.Create(mCurrentAssignment, false);

            // Remaining timespan
            mBoxImage.sprite = mCurrentAssignment.NeedAttention ? mBoxAttention : mBoxDone;

            SetDescriptionImageButton(!string.IsNullOrEmpty(mCurrentAssignment.DescriptionImageURL));

            mSubmission.SetAssignment(mCurrentAssignment);
        }
Exemple #7
0
        public override void RefreshUI()
        {
            mEnteredWithFocus = mToFocus != null;

            if (!mEnteredWithFocus)
            {
                UIHeader.Show(mHeaderTag);
            }
            else
            {
                UIHeader.Show(mHeaderTag, () => UIManager.Open(UILocation.Progress));
            }

            RefreshContent();

            if (mEnteredWithFocus)
            {
                mNavigation.SetPage(mFocusIsOngoing ? 0 : 1);

                if (mFocusIsOngoing)
                {
                    LayoutRebuilder.ForceRebuildLayoutImmediate(mCurrentView);

                    Vector2 position = mCurrentView.anchoredPosition;
                    position.y = -mFocusGoal.GetComponent <RectTransform>().anchoredPosition.y;
                    mCurrentView.anchoredPosition = position;
                }
                else
                {
                    LayoutRebuilder.ForceRebuildLayoutImmediate(mPreviousView);

                    Vector2 position = mPreviousView.anchoredPosition;
                    position.y = -mFocusGoal.GetComponent <RectTransform>().anchoredPosition.y;
                    mPreviousView.anchoredPosition = position;

                    //Debug.Log("Move to wanted position. " + position.y);
                }

                mFocusGoal.Flash();
                mFocusGoal = null;
                mToFocus   = null;
            }
        }
 public override void RefreshUI()
 {
     UIHeader.Show(mHeaderTag);
 }
Exemple #9
0
 private void BackToContacts()
 {
     mChatPage.Close();
     mContactPage.Open();
     UIHeader.Show(mHeaderTag);
 }