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


C# ContentAPI.GetMessage方法代码示例

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


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

示例1: Page_Init

    protected void Page_Init(object sender, EventArgs e)
    {
        var m_refMsg = new ContentAPI().EkMsgRef;

        BackLabel.Text = m_refMsg.GetMessage("btn back");
        DeleteLabel.Text = m_refMsg.GetMessage("btn delete");

        //Register CSS
        Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronWorkareaCss);
        Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronWorkareaIeCss);
        Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronFixedPositionToolbarCss);
        Ektron.Cms.API.JS.RegisterJS(this, Ektron.Cms.API.JS.ManagedScript.EktronJFunctJS);

        ltrlStyleSheetJS.Text = _styleHelper.GetClientScript();

        _msgHelper = new EkMessageHelper(_contentApi.RequestInformationRef);

        Utilities.ValidateUserLogin();
        if (_contentApi.RequestInformationRef.IsMembershipUser == 1 || !_contentApi.IsARoleMember(Ektron.Cms.Common.EkEnumeration.CmsRoleIds.AdminPersonalize)) {
            Response.Redirect(_contentApi.ApplicationPath + "reterror.aspx?info=" + _contentApi.EkMsgRef.GetMessage("msg login cms user"), true);
            return;
        }

        BindToolbars();
        this.image_link_100.Attributes.Add("onclick", string.Format("return validateList('{0}');", _msgHelper.GetMessage("select target content")));
    }
开发者ID:jaytem,项目名称:minGit,代码行数:26,代码来源:TargetContentDelete.aspx.cs

示例2: Page_Init

    protected void Page_Init(object sender, EventArgs e)
    {
        var m_refMsg = new ContentAPI().EkMsgRef;

        CancelLabel.Text = m_refMsg.GetMessage("generic Cancel");
        SaveLabel.Text = m_refMsg.GetMessage("btn Save");

        //If initial load, reset pagebuilder page to clean slate.
        if (!IsPostBack && Request.UrlReferrer != null && Request.UrlReferrer.ToString().ToLower().Contains("targetcontentlist.aspx"))
        {
            Session["EkWidgetDirty"] = null;
            Session["EkWidgetBag"] = null;
            (Page as PageBuilder).Pagedata = null;
            (Page as PageBuilder).ClearView();
        }

        _msgHelper = new EkMessageHelper(_contentApi.RequestInformationRef);

        Utilities.ValidateUserLogin();
        if (_contentApi.RequestInformationRef.IsMembershipUser == 1 || (_contentApi.RequestInformationRef.UserId != 999999999 && !_contentApi.IsARoleMember(Ektron.Cms.Common.EkEnumeration.CmsRoleIds.AdminPersonalize)))
        {
            Response.Redirect(_contentApi.ApplicationPath + "reterror.aspx?info=" + _contentApi.EkMsgRef.GetMessage("msg login cms user"), true);
            return;
        }

        txtName.Attributes.Add("onkeypress", "return CheckKeyValue(event, '34,13, 60, 62');");
        //Register CSS
        Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronWorkareaCss);
        Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronWorkareaIeCss);
        Ektron.Cms.API.Css.RegisterCss(this, Ektron.Cms.API.Css.ManagedStyleSheet.EktronFixedPositionToolbarCss);

        string cssFilePath =
            ResolveUrl(String.Format("{0}/{1}", new SiteAPI().SitePath,
                                 "Workarea/csslib/ektron.workarea.personalization.ie.7.css"));

        Ektron.Cms.API.Css.RegisterCss(this, cssFilePath, "ie-targetcontent", Css.BrowserTarget.IE8);

        Ektron.Cms.API.JS.RegisterJS(this, Ektron.Cms.API.JS.ManagedScript.EktronJFunctJS);
        ltrlStyleSheetJS.Text = _styleHelper.GetClientScript();

        //ViewAllToolbar
        txtTitleBar.InnerHtml = _styleHelper.GetTitleBar(_msgHelper.GetMessage("lbl targeted content"));
        lblName.Text = _msgHelper.GetMessage("generic title");
        ltrTitleEmpty.Text = _msgHelper.GetMessage("js: alert title required");
        image_link_100.Attributes.Add("onclick", "verifyTitle(event);");

        PageBuilder pb = this as PageBuilder;

        if (Request["targetcontentid"] != null)
        {
            long.TryParse(Request["targetcontentid"], out _targetContentId);
        }

        //Add the Target Content Widget to Page
        if (pb.Pagedata.Widgets == null || pb.Pagedata.Widgets.Count == 0)
        {
            if (_targetContentId == 0)
            {
                _columnGuid = Guid.NewGuid();
                _targetContentWidgetXml = string.Format(@"<ArrayOfDataStore xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""><dataStore><Property>RulesetNames</Property><TypeName>System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]</TypeName><AssemblyAndType>System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyAndType></dataStore><dataStore><Property>Rulesets</Property><TypeName>System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]</TypeName><AssemblyAndType>System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyAndType></dataStore><dataStore><Property>SelectedZone</Property><Value xsi:type=""xsd:int"">0</Value><TypeName>System.Int32</TypeName><AssemblyAndType>System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyAndType></dataStore><dataStore><Property>TargetConfigurationId</Property><Value xsi:type=""xsd:long"">{0}</Value><TypeName>System.Int64</TypeName><AssemblyAndType>System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyAndType></dataStore><dataStore><Property>TargetedContent</Property><Value xsi:type=""TargetedContentData""><Id>0</Id><IsGlobal>false</IsGlobal><Segments><SegmentData><Id>0</Id><Name>Default</Name><Rules /><IsGlobal>false</IsGlobal></SegmentData></Segments><PageData><IsMasterLayout xmlns=""PB"">false</IsMasterLayout><masterID xmlns=""PB"">0</masterID><pageID xmlns=""PB"">0</pageID><languageID xmlns=""PB"">0</languageID><Zones xmlns=""PB""><DropZoneData><isMasterZone>false</isMasterZone><Columns><ColumnDataSerialize><Guid>{1}</Guid><Display>false</Display><columnID>-1</columnID><width>100</width><unit>percent</unit></ColumnDataSerialize></Columns></DropZoneData></Zones><Widgets xmlns=""PB"" /></PageData></Value><TypeName>Ektron.Cms.Content.Targeting.TargetedContentData</TypeName><AssemblyAndType>Ektron.Cms.Content.Targeting.TargetedContentData, Ektron.Cms.ObjectFactory, Version=8.5.0.297, Culture=neutral, PublicKeyToken=559a2c4fa21e63be</AssemblyAndType></dataStore></ArrayOfDataStore>", "{0}", _columnGuid);
            }

            pb.ClearView(layoutVersion.Staged, false);
            pb.Status = Mode.Editing;
            pb.viewType = layoutVersion.Staged;

            WidgetData targetContentWidget = new WidgetData()
            {
                ID = 999,
                ControlURL = "TargetedContent.ascx",
                ColumnID = 0,
                DropID = "targetContentZone",
                Settings = string.Format(_targetContentWidgetXml, _targetContentId)
            };

            pb.Pagedata.Widgets = new List<WidgetData>();
            pb.Pagedata.Widgets.Add(targetContentWidget);

            //(Page as PageBuilder).View(pb.Pagedata);

            LoadTargetContentConfiguration(targetContentWidget);

            pb.View(pb.Pagedata);
        }

        if (!IsPostBack)
        {
            Bind();
        }
    }
开发者ID:jaytem,项目名称:minGit,代码行数:90,代码来源:TargetContentEdit.aspx.cs


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