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


C# Source.AddCloudRoot方法代码示例

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


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

示例1: DisplayChapterOverall


//.........这里部分代码省略.........
            if (hdNextCourseUrl.Value.Contains("/") == false && (dt.Rows[0]["nextChapterUrl"].ToObjectString() != ""))
            {
                hdNextCourseUrl.Value = dt.Rows[0]["nextChapterUrl"].ToObjectString();  // First section of Next Chapter
            }
            
            if (hdNextCourseUrl.Value.Contains("/"))                                    // Assign next section to hyperlink.
            {
                Debug.Write("\nhdNextCourseUrl.Value: " + hdNextCourseUrl.Value);
                NextLargeUp.Text = (
                    "<a id='NextLargeUp' runat='server' href='" + hdNextCourseUrl.Value + "' onclick='Next_Clicked' title='" + dt.Rows[0]["nextChapterSEO"].ToObjectString() + "' class='incorrect-class-25'>" +
                        "<div class='large-up large-3 xlarge-2 columns'>" +
                            "Next<i class='material-icons vertical-align-middle padding-bottom-2'>&#xE5CC;</i>" +
                        "</div>" +
                    "</a>"
                );

                NextMediumDown.Text = (
                    "<a id='NextMediumDown' runat='server' href='" + hdNextCourseUrl.Value + "' onclick='Next_Clicked' title='" + dt.Rows[0]["nextChapterSEO"].ToObjectString() + "' class='squirrel'>" +
                        "<div class='padding-bottom-17'>" +
                            "Next<i class='material-icons vertical-align-middle padding-bottom-2'>&#xE5CC;</i>" +
                        "</div>" +
                    "</a>"
                );
            }

            if (Convert.ToBoolean(dt.Rows[0]["currIsVideo"].ToString())) //If it is a video section, always display section list.
            {
                lbDisplayVideo.Visible = true;
                continuousPlayDiv.Visible = true;       //pnPlayControl.Visible = true;
                lbDisplayOther.Visible = false;
                pnContentList.Visible = true;

                string strVideoCd = dt.Rows[0]["currVideoCd"].ToObjectString();

                // CssClass Pattern source: http://stackoverflow.com/questions/3742010/add-css-class-to-a-div-in-code-behind
                continuousPlayDiv.CssClass="orange";
                continuousPlayDiv.CssClass = strVideoCd + ' h000 ';
                continuousPlayDiv.CssClass = " margin-top-10 margin-bottom-72 ";

                // .Attributes.Add("class", ...) cases
                BtnventCss.Attributes.Add("class", "pink");
                BtnventCss.Attributes.Add(
                    "class",
                    "xsmall-only"
                );
                BtnventCss.Attributes.Add( "class", strVideoCd + ' height-12 ' );
                BtnventCss.Attributes.Add("class"," width-100p inline ");

                if (strVideoCd != "Coming Soon")
                {
                    lbDisplayVideo.Text = (
                        // Test inline comment.
                        // "<div class='flex-video widescreen vimeo margin-bottom-0'>" +

                            // Contrived string concatenation NOT HANDLED
                            "<iframe class='" + "vimeo xlarge-only" + "' id='player1' src='//player.vimeo.com/video/"


                                + strVideoCd
                                + "?api=1&player_id=player1&autoplay="
                                + strAutoPlay
                                + "' frameborder='0' webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>" +
                        "</div>"
                    );
                }
                else
                {
                /*  Test block comment
                    lbDisplayVideo.Text = (
                        "<div class='flex-video widescreen vimeo'><div class='margin-top-20 b'><div class='font-size-20 bold'>Coming Soon</div><img src='"
                        + Source.CloudRoot + dt.Rows[0]["bannerFile"].ToObjectString()
                        + "' /></div></div>"
                    );
                */
                }
                //ltrSectionDescription.Text = dt.Rows[0]["currSectionDescription"].ToObjectString();
            }
            else if (dt.Rows[0]["relatedSectionNum"].ToString() == "1") //If it is a non-video section and only one section under this chapter, hide section list.
            {
                lbDisplayVideo.Visible = false;
                continuousPlayDiv.Visible = false;  //pnPlayControl.Visible = false;
                lbDisplayOther.Visible = true;
                Source source = new Source();
                lbDisplayOther.Text = source.AddCloudRoot(dt.Rows[0]["currDisplayContent"].ToObjectString());
                pnContentList.Visible = false;
            }
            else //If it is a non-video section but there are more than one section under this chapter, display section list.
            {
                lbDisplayVideo.Visible = false;
                lbDisplayOther.Visible = true;
                lbDisplayOther.Text = dt.Rows[0]["currDisplayContent"].ToObjectString();
                pnContentList.Visible = true;
            }
        }

        lbTableContent1.PostBackUrl = "/courses/contents/" + hdCourseId.Value + "/" + hdCourseUrl.Value;
        //lbTableContent2.PostBackUrl = lbTableContent1.PostBackUrl;


    }
开发者ID:nueverest,项目名称:blowdrycss,代码行数:101,代码来源:test.aspx.cs


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