Wednesday, April 28, 2010

Agent Killer - DirectX Game

This is a game I made for my final year of Uni, I'm releasing it cos its hilarious! I'm going to fix the code, make it run with XNA and OpenGL I think.



Download

You'll need a decent card I think to get it running, it *should* work.

Have fun!

Sunday, April 25, 2010

//TODO

Well here is a list of things on my to do list, of things I'm planning on doing or looking at, I will be updating this as I complete them

Books to read


  • Art of Unit Testing

  • DDD

  • Applying DDD with .net

  • Code Complete 2

  • Pragmatic Programmer

  • Working Effectively with Legacy Code

  • Passionate Programmer

  • Mythical Man Month



Things to Do


  • TASM Series

  • Ruby for the C# Programmer Series

  • Dissecting Malware

  • Design Patterns Series

  • Dieting for Programmers!



Projects


  • Finish Website sarkie.webhop.org -27-April-2010

  • Restart the blog-07-April-2010

  • WPF Auto Follow Friday

  • OpenRASTA site checker devserver.webhop.org - 16/05/2010

  • Ruby CD System

  • Virtua Tennis Savegame Editor

  • DirectX Game, rebuild and update

  • XNA Breakout Game

  • OpenGL Breakout Game

  • Abstracted Game using DirectX, XNA and OpenGL

  • UnrealScript Mod

  • Source Engine MOD, USEMP



That's it for now, I'm sure I'm forgetting loads! But that's enough to start me with, anything else I'm missing?

Saturday, April 24, 2010

Links, Precedence, Style-sheets, Oh my.

So I am currently developing my site and I wanted links to be different to my overall colour scheme for links. I therefore added a page style sheet to change them, no matter what I did, the overall one would take precedence instead of the page one.


a:link, a:visited,a:hover, a:active
{

text-decoration:underline;
color:#FFFFFF;
}



So I wanted to change it to just white underlined, this was first too over kill, since it was changing links in the footer. I then made it class based


.projectList a:link
{
text-decoration:underline;
color:#FFFFFF;
}


This still did not work for some reason, firebug showed my Site.css was winning now. (odd)

Thanks to ye-old faithfull W3Schools
I found :link pseudo classes http://www.w3schools.com/css/pr_pseudo_link.asp


This meant I could change it per link basis, (win) I now had.


a.downloadLink:visited
{
color:#FFFFFF;
}

and my link

Download



Now it bloody works!! :)

Friday, April 09, 2010

XML to PDF using NFOP, C# .NET

I was using this

http://www.codelathe.com/blog/index.php/2009/02/28/generate-pdf-from-cnet/

Don't download the 1.0 build version

Get the 2.0 version source

http://sourceforge.net/projects/nfop/files/nfop/nfop-v2.0.0/nfop_fw2-2.0.0.zip/download

and get the .dll out of the build dir, or you will get lots of manifest errors and such

Thursday, April 08, 2010

Chrome User Agent

Since I can't access my banking website with Chrome but I can with safari, this is how you change the User Agent easily

Make a .bat or .cmd file open with notepad and paste



start chrome --user-agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Version/3.1 Safari/525.1"

Wednesday, April 07, 2010

WMV C# Meta Information Update Example

I have recently downloaded all the www.dimecasts.net Videos, I then tried to play them on my Xbox, but they weren't in order, so made it quite hard to follow. I therefore created an App to edit the WMV titles, which the Xbox reads.

This code is "ok", I should really make the code into a wrapper library, but this is just a bit of a proof of concept really.

Firstly, you need to add the WMP.dll to the form using the Toolbox, which should appear as the Windows Media Player Control, it will then add two references

AxWMPLib
WMPLib

Then the main code for getting the Meta Data is



private string GetTitle(string filePath)
{
var mediaPlayer = new WindowsMediaPlayerClass();

IWMPMedia mediaItem = mediaPlayer.add(filePath);

return mediaItem.getItemInfo("Title");

}



I got all the attribute names running code like this



for (int i=0; i<mediaitem.attributeCount; i++) {
Console.WriteLine(mediaitem.getAttributeName(i) + " = " + mediaitem.getItemInfo(mediaitem.getAttributeName(i)) );
}



The code for setting it also very simple




private void SetTitle(string filePath, string title)
{
var mediaPlayer = new WindowsMediaPlayerClass();

IWMPMedia mediaItem = mediaPlayer.add(filePath);


mediaItem.setItemInfo("Title", title);
}




Here is the source code:
http://sarkie.webhop.org/Files/WindowsMediaEditor.zip