Thought for the Dazed

I've had to give up that Distance Learning course as I was having trouble seeing the teacher.

Flickr
www.flickr.com
RobMiles' items Go to RobMiles' photostream
Twitter
C# Yellow Book

Search entire site
Sunday
Aug222010

Best Joke Ever

flowers

I Tweeted this joke last week to riot of tumultuous indifference. I’m putting in the blog now, mainly so that I don’t forget it.

“I got fired from my job at the zoo because in meetings I would always mention the elephant in the room.”

Saturday
Aug212010

The Evil of Block Copy: Volume 99

Tomatoes

Can you tell what is wrong with this code?

if (DrawPosition.Contains(
        (int)location.Position.X,
        (int)location.Position.X) )
{

I can, but it took me a bit of head scratching….

Friday
Aug202010

Windows Phone Jump Start Still Jumping

image 
Ryan, one of our satisfied customers wearing the T-shirt he won on the last jump start. Looking good…

We have had loads of hits on the Windows Phone Jump Start videos.  And we are planning another set of sessions in September, which will be bigger, brighter and bang up to date.  More details soon.

Thursday
Aug192010

Saying Au-Revior to Concorde

Concorde Cockpit

Now, that’s what I call a flight deck.

We went to see Concorde at Filton today. I always feel a bit sad when we go over there. The plane is amazing but it doesn’t deserve to be stuck on the ground. It really should be out there doing what it does best, and what nothing on earth can do any more.

This time the affair was even more poignant because as of later this year the plane will not be open for visitors at all, which is really sad.

Anyway, I took the big camera and a selection of lenses and tried to get a few shots.

Concord Wing

Concorde Nose

Not surprisingly the team at Bristol is very busy at the moment as people take their last chance to see the plane for a while, but if you can get yourself down there you won’t regret the trip.

Thursday
Aug192010

Windows Phone Phone Calls

Hull Universtiy Library

It will come as no surprise to you that your Windows Phone programs are interrupted when the phone rings. However, if you are running an XNA game at the time it will not actually stop. This will probably annoy your game player though, as once they come back from explaining that they don’t want any double glazing just right now they will probably find that all their lives have been lost and the game is over.

To get around this you should make your XNA game drop into pause mode when a call comes in. You can get notification of things like phone calls by binding to the Activated and Deactivated events.

this.Activated += 
                  new EventHandler<EventArgs>(Game1_Activated);
this.Deactivated += 
                  new EventHandler<EventArgs>(Game1_Deactivated);

You can get Visual Studio 2010 to do all the hard work here, just type “this.Activated +=” and then press Tab in response to the magic that happens next.  Then put code into the methods that are generated and away you go.

Note: This is not what happens if the player presses Windows or Back. In those cases your game program is stopped. But that is a subject for another post I think.