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


C# Poker.DoOnPreRender方法代码示例

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


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

示例1: FormView_EnsureDataBound

		public void FormView_EnsureDataBound ()
		{
			Poker fv = new Poker ();			
			fv.DataSource = myds;			
			fv.DoOnPreRender (EventArgs.Empty);
			Assert.AreEqual (true, fv.ensureDataBound, "EnsureDataBound");
			
		}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:8,代码来源:FormViewTest.cs

示例2: PageCount

		public void PageCount ()
		{
			ObjectDataSource ds = new ObjectDataSource ();
			ds.ID = "ObjectDataSource1";
			ds.TypeName = "System.Guid";
			ds.SelectMethod = "ToByteArray";
			Page p = new Page ();
			Poker f = new Poker ();
			f.Page = p;
			ds.Page = p;
			p.Controls.Add (f);
			p.Controls.Add (ds);
			f.DataSourceID = "ObjectDataSource1";
			f.DoConfirmInitState ();
			f.DoOnPreRender (EventArgs.Empty);
			f.PageIndex = 1;
			Assert.AreEqual (16, f.PageCount, "#01");
		} 
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:18,代码来源:FormViewTest.cs

示例3: InsertTemplate

		public void InsertTemplate () {
			ObjectDataSource ds = new ObjectDataSource ();
			ds.ID = "ObjectDataSource1";
			ds.TypeName = "System.Collections.ArrayList";
			ds.SelectMethod = "ToArray";
			Page p = new Page ();
			Poker f = new Poker ();
			Template itemTemplate = new Template ();
			Template emptyTemplate = new Template ();
			Template insertTemplate = new Template ();
			f.ItemTemplate = itemTemplate;
			f.EmptyDataTemplate = emptyTemplate;
			f.InsertItemTemplate = insertTemplate;
			f.DefaultMode = FormViewMode.Insert;
			f.Page = p;
			ds.Page = p;
			p.Controls.Add (f);
			p.Controls.Add (ds);
			f.DataSourceID = "ObjectDataSource1";
			f.DoConfirmInitState ();
			f.DoOnPreRender (EventArgs.Empty);
			
			f.AllowPaging = true;
			Assert.IsFalse(itemTemplate.Instantiated, "#01");
			Assert.IsFalse(emptyTemplate.Instantiated, "#02");
			Assert.IsTrue(insertTemplate.Instantiated, "#03");
		}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:27,代码来源:FormViewTest.cs

示例4: PageIndex

		[Category ("NotDotNet")] //TODO
		public void PageIndex ()
		{
			ObjectDataSource ds = new ObjectDataSource ();
			ds.ID = "ObjectDataSource1";
			ds.TypeName = "System.Guid";
			ds.SelectMethod = "ToByteArray";			
			Page p = new Page ();
			Poker f = new Poker ();
			f.Page = p;
			ds.Page = p;
			p.Controls.Add (f);
			p.Controls.Add (ds);
			f.DataSourceID = "ObjectDataSource1";
			f.DoConfirmInitState ();
			f.DoOnPreRender (EventArgs.Empty);
			object cur = f.DataItem;
			f.PageIndex = 1;
			Assert.IsTrue (cur != f.DataItem, "#01");

CommandEventArgs cargs = new CommandEventArgs ("Page", "Prev");
			FormViewCommandEventArgs fvargs = new FormViewCommandEventArgs (f, cargs);
			f.DoOnBubbleEvent (f, fvargs);
			Assert.IsTrue (f.OnPageIndexChangingCalled, "#02");
			Assert.IsTrue (f.OnPageIndexChangedCalled, "#03");
			f.OnPageIndexChangingCalled = false;
			f.OnPageIndexChangedCalled = false;

			f.DoOnBubbleEvent (f, fvargs);
			Assert.IsTrue (f.OnPageIndexChangingCalled, "#04");
			Assert.IsFalse (f.OnPageIndexChangedCalled, "#05");
			f.OnPageIndexChangingCalled = false;
			f.OnPageIndexChangedCalled = false;

			f.PageIndex = f.PageCount - 1;
			cargs = new CommandEventArgs ("Page", "Next");
			fvargs = new FormViewCommandEventArgs (f, cargs);
			f.DoOnBubbleEvent (f, fvargs);
			Assert.IsTrue (f.OnPageIndexChangingCalled, "#06");
			Assert.IsFalse (f.OnPageIndexChangedCalled, "#07");
			f.OnPageIndexChangingCalled = false;
			f.OnPageIndexChangedCalled = false;
		}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:43,代码来源:FormViewTest.cs


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