本文整理汇总了C#中MonoTests.System.Web.UI.WebControls.DataGridPoker.DoBubbleEvent方法的典型用法代码示例。如果您正苦于以下问题:C# DataGridPoker.DoBubbleEvent方法的具体用法?C# DataGridPoker.DoBubbleEvent怎么用?C# DataGridPoker.DoBubbleEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MonoTests.System.Web.UI.WebControls.DataGridPoker
的用法示例。
在下文中一共展示了DataGridPoker.DoBubbleEvent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BubblePageCommand
public void BubblePageCommand ()
{
DataGridPoker p = new DataGridPoker ();
DataGridItem item = new DataGridItem (0, 0, ListItemType.Item);
DataGridCommandEventArgs command_args;
//
// Prev
//
ResetEvents ();
command_args = new DataGridCommandEventArgs (item, null,
new CommandEventArgs ("Page", "Prev"));
p.CurrentPageIndex = 10;
p.PageIndexChanged += new DataGridPageChangedEventHandler (PageIndexChangedHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (page_index_changed, "A1");
Assert.AreEqual (new_page_index, 9, "A2");
ResetEvents ();
command_args = new DataGridCommandEventArgs (item, null,
new CommandEventArgs ("page", "prev"));
p.CurrentPageIndex = 10;
p.PageIndexChanged += new DataGridPageChangedEventHandler (PageIndexChangedHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (page_index_changed, "A3");
Assert.AreEqual (new_page_index, 9, "A4");
ResetEvents ();
command_args = new DataGridCommandEventArgs (item, null,
new CommandEventArgs ("PAGE", "PREV"));
p.CurrentPageIndex = 10;
p.PageIndexChanged += new DataGridPageChangedEventHandler (PageIndexChangedHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (page_index_changed, "A5");
Assert.AreEqual (new_page_index, 9, "A6");
//
// Next
//
ResetEvents ();
command_args = new DataGridCommandEventArgs (item, null,
new CommandEventArgs ("Page", "Next"));
p.CurrentPageIndex = 10;
p.PageIndexChanged += new DataGridPageChangedEventHandler (PageIndexChangedHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (page_index_changed, "A5");
Assert.AreEqual (new_page_index, 11, "A6");
ResetEvents ();
command_args = new DataGridCommandEventArgs (item, null,
new CommandEventArgs ("page", "next"));
p.CurrentPageIndex = 10;
p.PageIndexChanged += new DataGridPageChangedEventHandler (PageIndexChangedHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (page_index_changed, "A7");
Assert.AreEqual (new_page_index, 11, "A8");
ResetEvents ();
command_args = new DataGridCommandEventArgs (item, null,
new CommandEventArgs ("PAGE", "NEXT"));
p.CurrentPageIndex = 10;
p.PageIndexChanged += new DataGridPageChangedEventHandler (PageIndexChangedHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (page_index_changed, "A9");
Assert.AreEqual (new_page_index, 11, "A10");
//
// Specific
//
ResetEvents ();
command_args = new DataGridCommandEventArgs (item, null,
new CommandEventArgs ("Page", "25"));
p.CurrentPageIndex = 10;
p.PageIndexChanged += new DataGridPageChangedEventHandler (PageIndexChangedHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (page_index_changed, "A11");
Assert.AreEqual (new_page_index, 24, "A12");
ResetEvents ();
command_args = new DataGridCommandEventArgs (item, null,
new CommandEventArgs ("Page", "0"));
p.CurrentPageIndex = 10;
p.PageIndexChanged += new DataGridPageChangedEventHandler (PageIndexChangedHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (page_index_changed, "A11");
Assert.AreEqual (new_page_index, -1, "A12");
}
示例2: BadBubblePageArg2
public void BadBubblePageArg2 ()
{
DataGridPoker p = new DataGridPoker ();
DataGridItem item = new DataGridItem (0, 0, ListItemType.Item);
DataGridCommandEventArgs command_args;
ResetEvents ();
command_args = new DataGridCommandEventArgs (item, null,
new CommandEventArgs ("Page", new object ()));
p.DoBubbleEvent (this, command_args);
}
示例3: BubbleEvent
public void BubbleEvent ()
{
DataGridPoker p = new DataGridPoker ();
DataGridCommandEventArgs command_args;
//
// Cancel
//
ResetEvents ();
command_args = new DataGridCommandEventArgs (null,
null, new CommandEventArgs ("Cancel", String.Empty));
p.ItemCommand += new DataGridCommandEventHandler (ItemCommandHandler);
p.CancelCommand += new DataGridCommandEventHandler (CancelCommandHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (cancel_command, "A1");
Assert.IsTrue (item_command, "#01");
ResetEvents ();
command_args = new DataGridCommandEventArgs (null,
null, new CommandEventArgs ("cancel", String.Empty));
p.ItemCommand += new DataGridCommandEventHandler (ItemCommandHandler);
p.CancelCommand += new DataGridCommandEventHandler (CancelCommandHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (cancel_command, "A2");
Assert.IsTrue (item_command, "#02");
ResetEvents ();
command_args = new DataGridCommandEventArgs (null,
null, new CommandEventArgs ("CANCEL", String.Empty));
p.ItemCommand += new DataGridCommandEventHandler (ItemCommandHandler);
p.CancelCommand += new DataGridCommandEventHandler (CancelCommandHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (cancel_command, "A3");
Assert.IsTrue (item_command, "#03");
//
// Delete
//
ResetEvents ();
command_args = new DataGridCommandEventArgs (null,
null, new CommandEventArgs ("Delete", String.Empty));
p.ItemCommand += new DataGridCommandEventHandler (ItemCommandHandler);
p.DeleteCommand += new DataGridCommandEventHandler (DeleteCommandHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (delete_command, "A4");
Assert.IsTrue (item_command, "#04");
ResetEvents ();
command_args = new DataGridCommandEventArgs (null,
null, new CommandEventArgs ("delete", String.Empty));
p.ItemCommand += new DataGridCommandEventHandler (ItemCommandHandler);
p.DeleteCommand += new DataGridCommandEventHandler (DeleteCommandHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (delete_command, "A5");
Assert.IsTrue (item_command, "#05");
ResetEvents ();
command_args = new DataGridCommandEventArgs (null,
null, new CommandEventArgs ("DELETE", String.Empty));
p.ItemCommand += new DataGridCommandEventHandler (ItemCommandHandler);
p.DeleteCommand += new DataGridCommandEventHandler (DeleteCommandHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (delete_command, "A6");
Assert.IsTrue (item_command, "#06");
//
// Edit
//
ResetEvents ();
command_args = new DataGridCommandEventArgs (null,
null, new CommandEventArgs ("Edit", String.Empty));
p.ItemCommand += new DataGridCommandEventHandler (ItemCommandHandler);
p.EditCommand += new DataGridCommandEventHandler (EditCommandHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (edit_command, "A7");
Assert.IsTrue (item_command, "#07");
ResetEvents ();
command_args = new DataGridCommandEventArgs (null,
null, new CommandEventArgs ("edit", String.Empty));
p.ItemCommand += new DataGridCommandEventHandler (ItemCommandHandler);
p.EditCommand += new DataGridCommandEventHandler (EditCommandHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (edit_command, "A8");
Assert.IsTrue (item_command, "#08");
ResetEvents ();
command_args = new DataGridCommandEventArgs (null,
null, new CommandEventArgs ("EDIT", String.Empty));
p.ItemCommand += new DataGridCommandEventHandler (ItemCommandHandler);
p.EditCommand += new DataGridCommandEventHandler (EditCommandHandler);
p.DoBubbleEvent (this, command_args);
Assert.IsTrue (edit_command, "A9");
Assert.IsTrue (item_command, "#09");
//
// Item
//
ResetEvents ();
command_args = new DataGridCommandEventArgs (null,
//.........这里部分代码省略.........