本文整理汇总了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");
}
示例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");
}
示例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");
}
示例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;
}