コード例 #1
0
        private void updatePostBody()
        {
            var    rftBodyHelper = new RtfHelper();
            string header        = null;

            if (m_Post != null)
            {
                var postType = m_Post.Type.HasValue ? m_Post.Type.Value : FacebookWrapper.ObjectModel.Post.eType.status;
                switch (postType)
                {
                case Post.eType.checkin:
                    header = "has checked in:";
                    break;

                case Post.eType.link:
                    header = "has posted a link:";
                    break;

                case Post.eType.photo:
                    header = "has posted a photo:";
                    break;

                case Post.eType.status:
                    break;

                case Post.eType.swf:
                    header = "has posted a clip:";
                    break;

                case Post.eType.video:
                    header = "has posted a video:";
                    break;

                default:
                    break;
                }

                rftBodyHelper.AppendLine(header);
                rftBodyHelper.AppendLine(m_Post.Message);
                rftBodyHelper.AppendBoldText(m_Post.Name);
                rftBodyHelper.AppendNewLine();
                rftBodyHelper.AppendLine(m_Post.Link);
            }

            Utils.UpdateRtfText(m_PostBody, rftBodyHelper.RtfText);
        }
コード例 #2
0
ファイル: PostItemControl.cs プロジェクト: hugebdu/dp_ex3
        private void updatePostBody()
        {
            var rftBodyHelper = new RtfHelper();
            string header = null;

            if (m_Post != null)
            {
                var postType = m_Post.Type.HasValue ? m_Post.Type.Value : FacebookWrapper.ObjectModel.Post.eType.status;
                switch (postType)
                {
                    case Post.eType.checkin:
                        header = "has checked in:";
                        break;
                    case Post.eType.link:
                        header = "has posted a link:";
                        break;
                    case Post.eType.photo:
                        header = "has posted a photo:";
                        break;
                    case Post.eType.status:
                        break;
                    case Post.eType.swf:
                        header = "has posted a clip:";
                        break;
                    case Post.eType.video:
                        header = "has posted a video:";
                        break;
                    default:
                        break;
                }

                rftBodyHelper.AppendLine(header);
                rftBodyHelper.AppendLine(m_Post.Message);
                rftBodyHelper.AppendBoldText(m_Post.Name);
                rftBodyHelper.AppendNewLine();
                rftBodyHelper.AppendLine(m_Post.Link);
            }

            Utils.UpdateRtfText(m_PostBody, rftBodyHelper.RtfText);
        }