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


C# PokerDetailsView.DoOnItemDeleted方法代码示例

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


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

示例1: DetailsView_Events

		public void DetailsView_Events ()
		{
			ResetEvents ();
			PokerDetailsView dv = new PokerDetailsView ();
			Button bt = new Button ();
			Page pg = new Page ();
			dv.Page = pg;
			dv.Init += new EventHandler (dv_Init);
			dv.ItemCommand += new DetailsViewCommandEventHandler (dv_ItemCommand);
			dv.ItemCreated += new EventHandler (dv_ItemCreated);
			dv.ItemDeleted += new DetailsViewDeletedEventHandler (dv_ItemDeleted);
			dv.ItemDeleting += new DetailsViewDeleteEventHandler (dv_ItemDeleting);
			dv.ItemInserted += new DetailsViewInsertedEventHandler (dv_ItemInserted);
			dv.ItemInserting += new DetailsViewInsertEventHandler (dv_ItemInserting);
			dv.ItemUpdated += new DetailsViewUpdatedEventHandler (dv_ItemUpdated);
			dv.ItemUpdating += new DetailsViewUpdateEventHandler (dv_ItemUpdating);
			dv.ModeChanged += new EventHandler (dv_ModeChanged);
			dv.ModeChanging += new DetailsViewModeEventHandler (dv_ModeChanging);
			dv.PageIndexChanged += new EventHandler (dv_PageIndexChanged);
			dv.PageIndexChanging += new DetailsViewPageEventHandler (dv_PageIndexChanging);
			dv.DataBound += new EventHandler (dv_DataBound);
			dv.PreRender += new EventHandler (dv_PreRender);
			dv.Unload += new EventHandler (dv_Unload);			
			Assert.AreEqual (false, init, "BeforeInit");
			dv.DoOnInit (new EventArgs ());
			Assert.AreEqual (true, init, "AfterInit");
			Assert.AreEqual (false, itemCommand, "BeforeItemCommand");
			dv.DoOnItemCommand (new DetailsViewCommandEventArgs (bt,new CommandEventArgs ("",null)));
			Assert.AreEqual (true, itemCommand , "AfterItemCommand");
			Assert.AreEqual (false, itemCreated, "BeforeItemCreated");
			dv.DoOnItemCreated (new EventArgs ());
			Assert.AreEqual (true, itemCreated, "AfterItemCreated");
			Assert.AreEqual (false, itemDeleted, "BeforeItemDeleted");
			dv.DoOnItemDeleted (new DetailsViewDeletedEventArgs (3, new Exception ()));
			Assert.AreEqual (true, itemDeleted, "AfterItemDeleted");
			Assert.AreEqual (false, itemDeleting, "BeforeItemDeleting");
			dv.DoOnItemDeleting(new DetailsViewDeleteEventArgs (2)); 
			Assert.AreEqual (true, itemDeleting, "AfterItemDeleting");
			Assert.AreEqual (false, itemInserted, "BeforeItemInserted");
			dv.DoOnItemInserted (new DetailsViewInsertedEventArgs (3,new Exception()));
			Assert.AreEqual (true, itemInserted, "AfterItemInserted");
			Assert.AreEqual (false, itemInserting, "BeforeItemInserting");
			dv.DoOnItemInserting (new DetailsViewInsertEventArgs (bt));
			Assert.AreEqual (true, itemInserting, "AfterItemInserting");
			Assert.AreEqual (false, itemUpdated, "BeforeItemUpdated");
			dv.DoOnItemUpdated (new DetailsViewUpdatedEventArgs (2,new Exception()));
			Assert.AreEqual (true, itemUpdated, "AfterItemUpdated");
			Assert.AreEqual (false, itemUpdating, "BeforeItemUpdating");
			dv.DoOnItemUpdating (new DetailsViewUpdateEventArgs (bt));
			Assert.AreEqual (true, itemUpdating, "AfterItemUpdating");
			Assert.AreEqual (false, modeChanged, "BeforeModeChanged");
			dv.DoOnModeChanged (new EventArgs ());
			Assert.AreEqual (true, modeChanged, "AfterModeChanged");
			Assert.AreEqual (false, modeChanging, "BeforeModeChanging");
			dv.DoOnModeChanging (new DetailsViewModeEventArgs (DetailsViewMode.Insert ,false));
			Assert.AreEqual (true, modeChanging, "AfterModeChanging");
			Assert.AreEqual (false, pageIndexChanged, "BeforePageIndexChanged");
			dv.DoOnPageIndexChanged (new EventArgs ());
			Assert.AreEqual (true, pageIndexChanged, "AfterPageIndexChanged");
			Assert.AreEqual (false, pageIndexChanging, "BeforePageIndexChanging");
			dv.DoOnPageIndexChanging (new DetailsViewPageEventArgs (2));
			Assert.AreEqual (true, pageIndexChanging, "AfterPageIndexChanging");
			//Assert.AreEqual (false, pagePreLoad, "BeforePagePreLoad");
			//dv.DoOnPagePreLoad (pg, new EventArgs ());
			//Assert.AreEqual (true, pagePreLoad, "AfterPagePreLoad");
			Assert.AreEqual (false, preRender, "BeforePreRender");			
			dv.DoOnPreRender(new EventArgs ());
			Assert.AreEqual (true, preRender, "AfterPreRender");
			Assert.AreEqual (false, unload, "BeforeUnload");
			dv.DoOnUnload (new EventArgs ());
			Assert.AreEqual (true, unload, "AfterUnload");
			//Assert.AreEqual (false, dataSourceViewChanged, "BeforeDataSourceViewChanged");
			//dv.DoOnDataSourceViewChanged (bt, new EventArgs ());
			//Assert.AreEqual (true, dataSourceViewChanged, "AfterDataSourceViewChanged");



			
		}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:79,代码来源:DetailsViewTest.cs


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