當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。