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


C# Poker.Render方法代码示例

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


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

示例1: PerformDataBind_PerformSelect

		public void PerformDataBind_PerformSelect ()
		{
			Poker p = new Poker ();
			p.DataBind ();
			string html = p.Render ();
#region #1
			string orig = "<select type=\"MyType\" name=\"MyName\" value=\"MyValue\">\n\t<option selected=\"selected\" value=\"1\">1</option>\n\t<option value=\"2\">2</option>\n\t<option value=\"3\">3</option>\n\n</select>";
#endregion
			HtmlDiff.AssertAreEqual (orig, html, "PerformDataBind");
		}
开发者ID:nobled,项目名称:mono,代码行数:10,代码来源:ListControlTest.cs

示例2: Label_Render

		public void Label_Render ()
		{
			Poker l = new Poker ();
			l.Text = "Hello";
			Assert.AreEqual ("<span>Hello</span>", l.Render (), "R1");
		}
开发者ID:nobled,项目名称:mono,代码行数:6,代码来源:LabelTest.cs

示例3: AddAttributesToRender

		public void AddAttributesToRender ()
		{
			Poker p = new Poker ();
			ListItem foo = new ListItem ("foo");
			ListItem bar = new ListItem ("bar");
			p.Items.Add (foo);
			p.Items.Add (bar);
#region orig
			string orig = "<select type=\"MyType\" name=\"MyName\" value=\"MyValue\">\n\t<option value=\"foo\">foo</option>\n\t<option value=\"bar\">bar</option>\n\n</select>";
#endregion
			string html =  p.Render ();
			HtmlDiff.AssertAreEqual(orig,html,"AddAttributesToRender failed");
		}
开发者ID:nobled,项目名称:mono,代码行数:13,代码来源:ListControlTest.cs

示例4: MultilineRenderEscape

		public void MultilineRenderEscape ()
		{
			Poker t = new Poker ();
			t.TextMode = TextBoxMode.MultiLine;
			t.Text = "</textarea>";
			string exp = "<textarea rows=\"2\" cols=\"20\">\r\n&lt;/textarea&gt;</textarea>";

			HtmlDiff.AssertAreEqual(exp, t.Render (),"MultilineRenderEscape");
		}
开发者ID:Profit0004,项目名称:mono,代码行数:9,代码来源:TextBoxTest.cs

示例5: AssocControlId

		public void AssocControlId ()
		{
			Page p = new Page ();
			Poker l = new Poker ();
			TextBox t = new TextBox ();
			t.ID = "mytxtbox";

			p.Controls.Add (l);
			p.Controls.Add (t);
			
			l.Text = "Hello";
			l.AssociatedControlID = "mytxtbox";
			Assert.AreEqual (@"<label for=""mytxtbox"">Hello</label>", l.Render ());			
		}		
开发者ID:nobled,项目名称:mono,代码行数:14,代码来源:LabelTest.cs

示例6: ValidationRender

		public void ValidationRender ()
		{
			/* test to show that the validation settings
			 * have no effect on downlevel rendering */
			Poker t = new Poker ();

			t.TrackState();

			t.ValidationGroup = "VG";
			t.CausesValidation = true;
			t.TextMode = TextBoxMode.MultiLine;

			string exp = "<textarea rows=\"2\" cols=\"20\"></textarea>";
			HtmlDiff.AssertAreEqual (exp, t.Render (),"ValidationRender");
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:15,代码来源:TextBoxTest.cs

示例7: PerformDataBind_PerformSelect

		public void PerformDataBind_PerformSelect ()
		{
			Poker p = new Poker ();
			p.DataBind ();
			string html = p.Render ();
#region #1
			string orig = @"<select type=""MyType"" name=""MyName"" value=""MyValue"">
					<option selected=""selected"" value=""1"">1</option>
					<option value=""2"">2</option>
					<option value=""3"">3</option>
					</select>";
#endregion
			HtmlDiff.AssertAreEqual (orig, html, "PerformDataBind");
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:14,代码来源:ListControlTest.cs

示例8: DefaultButton_Init

		public static void DefaultButton_Init (Page p)
		{
			Poker pl = new Poker ();
			pl.DefaultButton = "test";
			p.Form.Controls.Add (pl);
			pl.Render ();

		}
开发者ID:kumpera,项目名称:mono,代码行数:8,代码来源:PanelTest.cs

示例9: Direction

		public void Direction ()
		{
			Poker p = new Poker ();
			p.Direction = ContentDirection.LeftToRight;
			string html = p.Render();
			string origHtml = "<div dir=\"ltr\">\n\n</div>";
			HtmlDiff.AssertAreEqual (origHtml, html, "Direction");
		}
开发者ID:kumpera,项目名称:mono,代码行数:8,代码来源:PanelTest.cs

示例10: NoWrap

		public void NoWrap ()
		{
			Poker p = new Poker ();
			p.Wrap = false;
			p.Controls.Add (new LiteralControl ("TEXT"));
#if NET_2_0
			const string html ="<div style=\"white-space:nowrap;\">\n\tTEXT\n</div>";
#elif NET_1_1
			const string html ="<div nowrap=\"nowrap\">\n\tTEXT\n</div>";
#endif
			Assert.AreEqual (html, p.Render ());
		}
开发者ID:kumpera,项目名称:mono,代码行数:12,代码来源:PanelTest.cs

示例11: DefaultButton__Init

		public static void DefaultButton__Init (Page p)
		{
			Poker pl = new Poker ();
			pl.DefaultButton = "MyButton";
			Button b = new Button ();
			b.ID = "MyButton";
			p.Form.Controls.Add (b);
			p.Form.Controls.Add (pl);
			string html = pl.Render ();
			if (html.IndexOf ("onkeypress") == -1)
				Assert.Fail ("Default button script not created #1");
			if (html.IndexOf ("MyButton") == -1)
				Assert.Fail ("Default button script not created #2");
		}
开发者ID:kumpera,项目名称:mono,代码行数:14,代码来源:PanelTest.cs

示例12: Render

		public void Render ()
		{
			Poker l = new Poker ();
			l.Text = "Hello";
			Assert.AreEqual ("<a>Hello</a>", l.Render (), "R1");
		}
开发者ID:nobled,项目名称:mono,代码行数:6,代码来源:LinkButtonTest.cs

示例13: PostBackUrl_Load

		public static void PostBackUrl_Load (Page p)
		{
			Poker b = new Poker ();
			p.Controls.Add (b);
			b.PostBackUrl = "~/MyPostBackUrl.aspx";
			string html = b.Render ();
			if (html.IndexOf ("MyPostBackUrl.aspx") == -1)
				Assert.Fail ("PostBackUrl not created");
		}
开发者ID:nobled,项目名称:mono,代码行数:9,代码来源:LinkButtonTest.cs

示例14: OnClientClick

		public void OnClientClick ()
		{
			Poker b = new Poker ();
			b.OnClientClick = "MyClickMethod";
			string html = b.Render ();
			HtmlDiff.AssertAreEqual ("<a onclick=\"MyClickMethod;\"></a>", html, "OnClientClick Failed");
		}
开发者ID:nobled,项目名称:mono,代码行数:7,代码来源:LinkButtonTest.cs

示例15: Render_2_0

		public void Render_2_0 ()
		{
			Poker c = new Poker();
			c.ErrorMessage = "aw shucks";
			c.Display = ValidatorDisplay.Static;
			c.Enabled = true;
			c.EnableViewState = true;
			string html = c.Render ();
			HtmlDiff.AssertAreEqual ("<span style=\"color:Red;\">aw shucks</span>", html, "Render#1");
		}
开发者ID:nobled,项目名称:mono,代码行数:10,代码来源:CustomValidatorTest.cs


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