Easiest way to add short animated images/videos to WPF - c#

I am working on a Kinect project that requires me to prompt the user to perform gestures. I have the gesture recognition completed, but was wanting to do something a bit more fun then having the screen just say "JUMP!".
Is there a fairly painless way to add a short video, gif or something? I would obviously have to create these animations as well, but I am more concerned with adding them to the application once I have the animations.
The animations being played would have to change throughout the program, as I will be prompting the user to perform various gestures.
I am completely open to any ideas or suggestions you guys might have.
Thanks!

Decided to try mediaElement. Seems to be working. If anyone stumbles across this, it can easily be changed in C# by setting the source attribute.

Related

How can I process the pixels of my screen with c# in real time?

I've recently had the idea to create a little app that desaturates your screen (with luminance) when you press a shorcut, and it brings back the screen to the normal colors when you press it again.
I've started learning c# some months ago exclusively in Unity, recently I've tried some shader coding and I can make the desaturation with CGPROGRAM, but I have no idea how to make an app outside of Unity or how to get the pixels of the screen and process them in real time.
I've tried some quick searching on how to do this but didn't found much, is there any resources or tips you can link me to so I can do this?
Thanks!
This normally requires an API close to the operating system.
For Windows, try DirectX.

WPF animation (scaling/translating multiple images at the same time)

I am working on a project in C# using WPF to attempt to make a program much like http://www.scaleofuniverse.com/.
I know it can easily be done in flash but I want to integrate the controls into other platforms (ie the new Leap motion and Kinect). I know I could rig it so that the kinect emulates key presses onto a flash game but i would really like to figure out making this in C#. I completed a few basic tutorials on basic animation and storyboarding but i've found nothing that indicates the project i want to complete can even be done! Am i biting off more than i can chew or am i over-complicating the program somewhere? I am only in the design stage so i do not have any source code for review (still completing tutorials). I really want to know if this project is even plausible before I continue working on it.
It definitely can be done in WPF. Here is an example of a custom zoom control for WPF http://www.ab4d.com/ZoomPanel.aspx.

C# Forms Animation

I'm wanting to create an animation in C# such as what you would see in a slot machine where the pictures spin round. I know I could manually move the location of a PictureBox or something like that but that seems like not a good idea to me.
How would you guys do it? It doesn't actually matter whether its in standard forms or WPF or anything else similar. Possibly using XNA?
I suggest you use WPF.
With Expression Blend you can easily do the animation you need.
I think I've already seen a slot machine WPF sample somewhere on the web.
I'll search for it and post it if I find it again
Edit
Nope it was a silverlight application, but code is almost the same. Here is the link:
http://www.dolittle.com/Silverlight/SlotMachine/SlotMachine.html
Anyway, if you find that approach to difficult I suggest you read a bit about simple WPF programatically driven animations. They're very easy to do, and with a few lines of code you can accomplish your needs.
Best regards

Screen scraping an application window and interacting with the mouse and keyboard

The other day I found myself addicted to a Flash game and frustrated by the thing at the same time. In a moment of frustration with the game I thought I would make a 'bot' to beat it for me. Well, I really wouldn't, but it made me realize: I don't know how to interact with another application in a way to do this. Which brings me to the question, how would one take screenshots of another running application and interact with it with the keyboard and mouse. Ideally the solution would be in a managed language like c#.
When doing the background reading the net was drowning with articles on scraping HTML. There were not many articles on actually screen scraping an application.
I'm looking for a way to interface with another application rather than script/macro another application.
Could something like Xming be used to redirect the interface? http://www.straightrunning.com/XmingNotes/
Perhaps a Terminal Services client?
http://www.codeproject.com/KB/cs/RemoteDesktop_CSharpNET.aspx
Check out Sikuli, it is basically what you are looking for. It is written in Java however.
http://groups.csail.mit.edu/uid/sikuli/
I ended up making the bot which did all this and documented it in a post
http://www.charlesrcook.com/archive/2010/09/05/creating-a-bejeweled-blitz-bot-in-c.aspx
I have used AutoHotKey for application automation.

How can I make a product showcase in Silverlight?

I can place a couple of buttons in Silverlight, but I'm not that experienced with the Silverlight tools and capabilities.
What do you think I should use to create something like this?
The control would have to pull and ID from the database and according to that place an image asociated with the record.
I need it to be animated with some crispy movement.
How can I achieve this?
It's all possible, but you need to break the task down into smaller steps.
Once you've done that you should find that you can solve some of these with your current knowledge, others will resolve themselves with a little more research, but there will be some you need to ask questions about here.
I'd suggest you start that break down and try to solve the little problems. Then if you get stuck come back and ask more specific questions.
Well, with Silverlight and c# you can make the animations needed and such, and you can set a Silverlight Image control with a data bound source, so it loads the images dynamically, but Silverlight can't talk with databases directly, you'll need to use a webservice to interact between Silverlight and the database. Don't know how much you know but to not leave anything out, with Expression Blend you can make the graphical part of you're app fast and easy, and with Visual Studio you'll add the code-behind and functionality.
In this link you can find a example of how to make an image slide show with Silverlight, it may not be exactly what you're looking for, but it should give you a heads start.

Categories

Resources