当前位置: 首页>>代码示例>>C#>>正文


C# ContentAPI.GetAjacentPrivateMessagesForCurrentUser方法代码示例

本文整理汇总了C#中ContentAPI.GetAjacentPrivateMessagesForCurrentUser方法的典型用法代码示例。如果您正苦于以下问题:C# ContentAPI.GetAjacentPrivateMessagesForCurrentUser方法的具体用法?C# ContentAPI.GetAjacentPrivateMessagesForCurrentUser怎么用?C# ContentAPI.GetAjacentPrivateMessagesForCurrentUser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ContentAPI的用法示例。


在下文中一共展示了ContentAPI.GetAjacentPrivateMessagesForCurrentUser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LoadToolBar

    protected void LoadToolBar()
    {
        UserAPI m_refUserApi = new UserAPI();
            string AppImgPath = m_refUserApi.AppImgPath;
            ContentAPI refContentAPI = new ContentAPI();
            string AppPath = refContentAPI.AppPath;

            System.Text.StringBuilder result = new System.Text.StringBuilder();
            try
            {
                divTitleBar.InnerHtml = m_refStyle.GetTitleBar(GetMessage("lbl messages"));
                result.Append("<table><tr>");

                // Back button
                result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/back.png", (string)("CommunityMessaging.aspx?action=" + (SentMode ? "viewallsent" : "viewall")), GetMessage("btn back"), GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true));

                if (m_sentMode == false)
                {
                    result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/emailAdd.png", "CommunityMessaging.aspx?action=editmsg", GetMessage("lbl compose a message"), GetMessage("lbl compose a message"), "", StyleHelper.AddEmailButtonCssClass, true));
                    result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/emailDelete.png", (string) ("CommunityMessaging.aspx?action=" + (SentMode ? "viewsentmsg" : "viewmsg") + "&mode=del&id=" + m_id), GetMessage("btn delete"), GetMessage("btn delete"), "", StyleHelper.DeleteEmailButtonCssClass));
                    if (m_bCanReply)
                    {
                        result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/emailReply.png", (string) ("CommunityMessaging.aspx?action=editmsg&id=" + m_id), GetMessage("lbl reply message"), GetMessage("lbl reply message"), "", StyleHelper.ReplyToEmailButtonCssClass));
                    }
                }
                else
                {
                    result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/emailDelete.png", (string) ("CommunityMessaging.aspx?action=" + (SentMode ? "viewsentmsg" : "viewmsg") + "&mode=del&id=" + m_id), GetMessage("btn delete"), GetMessage("btn delete"), "", StyleHelper.DeleteEmailButtonCssClass, true));
                }

                result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/emailForward.png", (string) ("CommunityMessaging.aspx?action=editmsg&mode=fwd&id=" + m_id + "&userid=" + m_msgUserId), GetMessage("lbl forward message"), GetMessage("lbl forward message"), "", StyleHelper.ForwardEmailButtonCssClass));

                long previousMsgID = 0;
                long nextMsgID = 0;
                refContentAPI.GetAjacentPrivateMessagesForCurrentUser(Convert.ToInt64(m_id), System.Convert.ToBoolean(!(SentMode)), ref previousMsgID, ref nextMsgID);
                if (previousMsgID > 0)
                {
                    result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/arrowLeft.png", (string) ("CommunityMessaging.aspx?action=" + (SentMode ? "viewsentmsg" : "viewmsg") + "&id=" + previousMsgID.ToString() + "&userid=" + m_msgUserId.ToString()), GetMessage("lbl previous message"), GetMessage("lbl previous message"), "", StyleHelper.PreviousButtonCssClass));
                }
                else
                {
                    result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/arrowLeftOff.png", "#", GetMessage("lbl previous message"), GetMessage("lbl previous message"), "", StyleHelper.PreviousDisabledButtonCssClass));
                }

                if (nextMsgID > 0)
                {
                    result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/arrowRight.png", (string) ("CommunityMessaging.aspx?action=" + (SentMode ? "viewsentmsg" : "viewmsg") + "&id=" + nextMsgID.ToString() + "&userid=" + m_msgUserId.ToString()), GetMessage("lbl next message"), GetMessage("lbl next message"), "", StyleHelper.NextButtonCssClass));
                }
                else
                {
                    result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/arrowRightOff.png", "#", GetMessage("lbl next message"), GetMessage("lbl next message"), "", StyleHelper.NextDisabledButtonCssClass));
                }

                //CommunityMessaging.aspx?action=" + IIf(SentMode, "viewsentmsg", "viewmsg") + "&id=" + aMessages(idx).ID.ToString()

                result.Append(m_refStyle.GetButtonEventsWCaption(AppPath + "images/ui/icons/print.png", "javascript:window.print();", GetMessage("lbl print message"), GetMessage("lbl print message"), "", StyleHelper.PrintButtonCssClass));
                result.Append(StyleHelper.ActionBarDivider);
                result.Append("<td>");
                if (SentMode)
                {
                    result.Append(m_refStyle.GetHelpButton("view_sent_msg", ""));
                }
                else
                {
                    result.Append(m_refStyle.GetHelpButton("view_msg", ""));
                }
                result.Append("</td>");
                result.Append("</tr></table>");

                divToolBar.InnerHtml = result.ToString();
                result = null;
            }
            catch (Exception ex)
            {
                Utilities.ShowError(ex.Message);
            }
            finally
            {
                refContentAPI = null;
            }
    }
开发者ID:jaytem,项目名称:minGit,代码行数:81,代码来源:ViewMessage.ascx.cs


注:本文中的ContentAPI.GetAjacentPrivateMessagesForCurrentUser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。