本文整理汇总了C#中Picture.AddAction方法的典型用法代码示例。如果您正苦于以下问题:C# Picture.AddAction方法的具体用法?C# Picture.AddAction怎么用?C# Picture.AddAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Picture
的用法示例。
在下文中一共展示了Picture.AddAction方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddActionsToObjects
private static void AddActionsToObjects(Picture correctPic, Picture incorrectPic, Text text)
{
//leftPic actions: hide all current elements and show correct "slide"
correctPic.AddAction(new ChangeObjectVisibility(EventType.onClick, false, correctPic.ObjectId, correctPic.ObjectId));
correctPic.AddAction(new ChangeObjectVisibility(EventType.onClick, false, correctPic.ObjectId, incorrectPic.ObjectId));
correctPic.AddAction(new ChangeObjectVisibility(EventType.onClick, false, correctPic.ObjectId, text.ObjectId));
correctPic.AddAction(new ChangeObjectVisibility(EventType.onClick, true, correctPic.ObjectId, CorrectPic.ObjectId));
correctPic.AddAction(new ChangeObjectVisibility(EventType.onClick, true, correctPic.ObjectId, CorrectText.ObjectId));
correctPic.AddAction(new PlaySound(EventType.onClick, correctPic.ObjectId, CorrectSound.ObjectId));
//incorrectPic actions: hide all current elements and show incorrect "slide"
incorrectPic.AddAction(new ChangeObjectVisibility(EventType.onClick, false, incorrectPic.ObjectId, correctPic.ObjectId));
incorrectPic.AddAction(new ChangeObjectVisibility(EventType.onClick, false, incorrectPic.ObjectId, incorrectPic.ObjectId));
incorrectPic.AddAction(new ChangeObjectVisibility(EventType.onClick, false, incorrectPic.ObjectId, text.ObjectId));
incorrectPic.AddAction(new ChangeObjectVisibility(EventType.onClick, true, incorrectPic.ObjectId, IncorrectPic.ObjectId));
incorrectPic.AddAction(new ChangeObjectVisibility(EventType.onClick, true, incorrectPic.ObjectId, IncorrectText.ObjectId));
incorrectPic.AddAction(new PlaySound(EventType.onClick, incorrectPic.ObjectId, IncorrectSound.ObjectId));
//IncorrectPic and IncorrectText actions: hide incorrect "slide" and back to start
IncorrectPic.AddAction(new ChangeObjectVisibility(EventType.onClick, false, IncorrectPic.ObjectId, IncorrectPic.ObjectId));
IncorrectPic.AddAction(new ChangeObjectVisibility(EventType.onClick, false, IncorrectPic.ObjectId, IncorrectText.ObjectId));
IncorrectPic.AddAction(new ChangeObjectVisibility(EventType.onClick, true, IncorrectPic.ObjectId, correctPic.ObjectId));
IncorrectPic.AddAction(new ChangeObjectVisibility(EventType.onClick, true, IncorrectPic.ObjectId, incorrectPic.ObjectId));
IncorrectPic.AddAction(new ChangeObjectVisibility(EventType.onClick, true, IncorrectPic.ObjectId, text.ObjectId));
IncorrectText.AddAction(new ChangeObjectVisibility(EventType.onClick, false, IncorrectText.ObjectId, IncorrectPic.ObjectId));
IncorrectText.AddAction(new ChangeObjectVisibility(EventType.onClick, false, IncorrectText.ObjectId, IncorrectText.ObjectId));
IncorrectText.AddAction(new ChangeObjectVisibility(EventType.onClick, true, IncorrectText.ObjectId, correctPic.ObjectId));
IncorrectText.AddAction(new ChangeObjectVisibility(EventType.onClick, true, IncorrectText.ObjectId, incorrectPic.ObjectId));
IncorrectText.AddAction(new ChangeObjectVisibility(EventType.onClick, true, IncorrectText.ObjectId, text.ObjectId));
}