當前位置: 首頁>>代碼示例>>C#>>正文


C# DataGridPoker.DoBubbleEvent方法代碼示例

本文整理匯總了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");
		}
開發者ID:JokerMisfits,項目名稱:linux-packaging-mono,代碼行數:90,代碼來源:DataGridTest.cs

示例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);
		}
開發者ID:JokerMisfits,項目名稱:linux-packaging-mono,代碼行數:12,代碼來源:DataGridTest.cs

示例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,
//.........這裏部分代碼省略.........
開發者ID:JokerMisfits,項目名稱:linux-packaging-mono,代碼行數:101,代碼來源:DataGridTest.cs


注:本文中的MonoTests.System.Web.UI.WebControls.DataGridPoker.DoBubbleEvent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。