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


C# PokerGridView.DoOnBubbleEvent方法代码示例

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


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

示例1: GridView_BubbleEvent

		public void GridView_BubbleEvent ()
		{
			PokerGridView gv = new PokerGridView ();
			Page page = new Page ();
			LinkButton lb = new LinkButton ();
			gv.AllowPaging = true;
			page.Controls.Add (gv);
			gv.DataSource = myds;
			gv.DataBind ();
			gv.EditIndex = 0;
			// 
			gv.RowDeleting += new GridViewDeleteEventHandler (gv_RowDeleting);
			gv.RowUpdating += new GridViewUpdateEventHandler (gv_RowUpdating);
			gv.RowEditing += new GridViewEditEventHandler (gv_RowEditing);
			gv.Sorting += new GridViewSortEventHandler (gv_Sorting);
			gv.RowCancelingEdit += new GridViewCancelEditEventHandler (gv_RowCancelingEdit);
			gv.SelectedIndexChanging+=new GridViewSelectEventHandler(gv_SelectedIndexChanging);
			gv.PageIndexChanging+=new GridViewPageEventHandler(gv_PageIndexChanging);
			// Delete
			GridViewCommandEventArgs com1 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Delete", "0"));
			Assert.AreEqual (false, bubbledeleterow, "BeforeBubbleEventDeleteRow");
			gv.DoOnBubbleEvent (gv, com1);
			Assert.AreEqual (true, bubbledeleterow, "AfterBubbleEventDeleteRow");
			// Update
			GridViewCommandEventArgs com2 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Update", "0"));
			Assert.AreEqual (false, bubbleupdaterow, "BeforeBubbleEventUpdateRow");
			gv.DoOnBubbleEvent (gv, com2);
			Assert.AreEqual (true, bubbleupdaterow, "AfterBubbleEventUpdateRow");
			// Edit
			GridViewCommandEventArgs com3 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Edit", "0"));
			Assert.AreEqual (false, bubbleeditingrow, "BeforeBubbleEventEditingRow");
			gv.DoOnBubbleEvent (gv, com3);
			Assert.AreEqual (true, bubbleeditingrow, "AfterBubbleEventEditingRow");
			// Sort
			gv.AllowSorting = true;
			GridViewCommandEventArgs com4 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Sort", null));
			Assert.AreEqual (false, bubblesortint, "BeforeBubbleEventSortingRow");
			gv.DoOnBubbleEvent (gv, com4);
			Assert.AreEqual (true, bubblesortint, "AfterBubbleEventSortingRow");
			// Canceling Edit
			GridViewCommandEventArgs com5 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Cancel", null));
			Assert.AreEqual (false, bubblecanceling, "BeforeBubbleEventcancelingEdit");
			gv.DoOnBubbleEvent (gv, com5);
			Assert.AreEqual (true, bubblecanceling, "AfterBubbleEventcancelingEdit");
			// Select
			GridViewCommandEventArgs com6 = new GridViewCommandEventArgs (gv.SelectedRow, lb, new CommandEventArgs ("Select", "2"));
			Assert.AreEqual (false, bubbleselect, "BeforeBubbleEventSelect");
			gv.DoOnBubbleEvent (gv, com6);
			Assert.AreEqual (true, bubbleselect, "AfterBubbleEventSelect");
			//Next Page
			GridViewCommandEventArgs com7 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Page", "Next"));
			Assert.AreEqual (false, bubblepage, "BeforeBubbleEventNextPage");
			gv.DoOnBubbleEvent (gv, com7);
			Assert.AreEqual (true, bubblepage, "AfterBubbleEventNextPage");
			Assert.AreEqual (1, newPageIndex, "NextPage");
			// Prev Page
			ResetEvents ();
			GridViewCommandEventArgs com8 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Page", "Prev"));
			Assert.AreEqual (false, bubblepage, "BeforeBubbleEventPrevPage");
			gv.DoOnBubbleEvent (gv, com8);
			Assert.AreEqual (true, bubblepage, "AfterBubbleEventPrevPage");
			Assert.AreEqual (-1, newPageIndex, "PrevPage");
			ResetEvents ();
			GridViewCommandEventArgs com9 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Page", "Last"));
			Assert.AreEqual (false, bubblepage, "BeforeBubbleEventLastPage");
			gv.DoOnBubbleEvent (gv, com9);
			Assert.AreEqual (true, bubblepage, "AfterBubbleEventLastPage");
			ResetEvents ();
			GridViewCommandEventArgs com10 = new GridViewCommandEventArgs (lb, new CommandEventArgs ("Page", "First"));
			Assert.AreEqual (false, bubblepage, "BeforeBubbleEventFirstPage");
			gv.DoOnBubbleEvent (gv, com10);
			Assert.AreEqual (true, bubblepage, "AfterBubbleEventFirstPage");
			Assert.AreEqual (0, newPageIndex, "FirstPage");
		}	
开发者ID:nobled,项目名称:mono,代码行数:74,代码来源:GridViewTest.cs


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