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


C# Poker.DoOnItemCreated方法代码示例

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


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

示例1: FormView_Events

		public void FormView_Events ()
		{
			ResetEvents ();
			Poker fv = new Poker ();
			fv.Page = new Page ();
			fv.Init += new EventHandler (fv_Init);
			fv.ItemCommand += new FormViewCommandEventHandler (fv_ItemCommand);
			fv.ItemCreated += new EventHandler (fv_ItemCreated);
			fv.ItemDeleted += new FormViewDeletedEventHandler (fv_ItemDeleted);
			fv.ItemDeleting += new FormViewDeleteEventHandler (fv_ItemDeleting);
			fv.ItemInserted += new FormViewInsertedEventHandler (fv_ItemInserted);
			fv.ItemInserting += new FormViewInsertEventHandler (fv_ItemInserting);
			fv.ItemUpdated += new FormViewUpdatedEventHandler (fv_ItemUpdated);
			fv.ItemUpdating += new FormViewUpdateEventHandler (fv_ItemUpdating);
			fv.ModeChanged += new EventHandler (fv_ModeChanged);
			fv.ModeChanging += new FormViewModeEventHandler (fv_ModeChanging);
			fv.PageIndexChanged += new EventHandler (fv_PageIndexChanged);
			fv.PageIndexChanging += new FormViewPageEventHandler (fv_PageIndexChanging);

			Assert.AreEqual (false, init, "BeforeInit");
			fv.DoOnInit (new EventArgs ());
			Assert.AreEqual (true, init, "AfterInit");
			Assert.AreEqual (false, itemCommand, "BeforeItemCommandEvent");
			Button bt = new Button ();
			fv.DoOnItemCommand (new FormViewCommandEventArgs (bt, new CommandEventArgs ("", null)));
			Assert.AreEqual (true, itemCommand, "AfterItemCommandEvent");
			Assert.AreEqual (false, itemCreated, "BeforeItemCreatedEvent");
			fv.DoOnItemCreated (new EventArgs ());
			Assert.AreEqual (true, itemCreated, "AfterItemCreatedEvent");
			Assert.AreEqual (false, itemDeleted, "BeforeItemDeletedEvent");
			fv.DoOnItemDeleted (new FormViewDeletedEventArgs (3, new Exception ()));
			Assert.AreEqual (true, itemDeleted, "AfterItemDeletedEvent");
			Assert.AreEqual (false, itemDeleting, "BeforeItemDeletingEvent");
			fv.DoOnItemDeleting (new FormViewDeleteEventArgs (1));
			Assert.AreEqual (true, itemDeleting, "AfterItemDeletingEvent");
			Assert.AreEqual (false, itemInserted, "BeforeItemInsertedEvent");
			fv.DoOnItemInserted (new FormViewInsertedEventArgs (2, new Exception ()));
			Assert.AreEqual (true, itemInserted, "AfterItemInsetedEvent");
			Assert.AreEqual (false, itemInserting, "BeforeItemInsertingEvent");
			fv.DoOnItemInserting (new FormViewInsertEventArgs (bt));
			Assert.AreEqual (true, itemInserting, "AfterItemInsetingEvent");
			Assert.AreEqual (false, itemUpdated, "BeforeItemUpdatedEvent");
			fv.DoOnItemUpdated (new FormViewUpdatedEventArgs (1, new Exception ()));
			Assert.AreEqual (true, itemUpdated, "AfterItemUpdatedEvent");
			Assert.AreEqual (false, itemUpdating, "BeforeItemUpdatingEvent");
			fv.DoOnItemUpdating (new FormViewUpdateEventArgs (bt));
			Assert.AreEqual (true, itemUpdating, "AfterItemUpdatingEvent");
			Assert.AreEqual (false, modeChanged, "BeforeModeChangedEvent");
			fv.DoOnModeChanged (new EventArgs ());
			Assert.AreEqual (true, modeChanged, "AfterModeChangedEvent");
			Assert.AreEqual (false, modeChanging, "BeforeModeChangingEvent");
			fv.DoOnModeChanging (new FormViewModeEventArgs (FormViewMode.Edit, true));
			Assert.AreEqual (true, modeChanging, "AfterModeChangingEvent");
			Assert.AreEqual (false, pageIndexChanged, "BeforePageIndexChangedEvent");
			fv.DoOnPageIndexChanged (new EventArgs ());
			Assert.AreEqual (true, pageIndexChanged, "AfterPageIndexChangedEvent");
			Assert.AreEqual (false, pageIndexChanging, "BeforePageIndexChangingEvent");
			fv.DoOnPageIndexChanging (new FormViewPageEventArgs (1));
			Assert.AreEqual (true, pageIndexChanging, "AfterPageIndexChangingEvent");
		}
开发者ID:JokerMisfits,项目名称:linux-packaging-mono,代码行数:60,代码来源:FormViewTest.cs


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