예제 #1
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;
            }
        }
        public override void SetData(DataBaseObject data)
        {
            mData = data as DataAssignment;

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

            mTopIcon.sprite = isActivity ? mActivitySprite : mAssignmentSprite;

            mTitleText.text    = mData.Name;
            mCategoryText.text = mData.Category.Name;

            mContentText.text = AssignmentContentFormat.Create(mData, true);

            mLayout.PerformLayout();

            UpdateBox();
        }
예제 #3
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);
        }