New C# and the installer tutroial for .Net 4.5 coming soon!

4 03 2014

Since I’ve posted the tutorial on .NET and the installer it has maintained a good following. I believe that this has helped out a lot of you when it comes to personal projects or work questions that you might not have otherwise gotten the answer to without coming here.

Because of this I’m re-writing this tutorial in .NET 4.5 to bring it up to date for those of you struggling to get it work in the newer frameworks. I just wanted to drop a quick note, if you’re having issues getting the current tutorial working just hold up, I’ll have a new one out here soon.

Thanks for the support guys.


XNA Project Update 12-29-2010

29 12 2010

I’ve made a little bit of progress since the last post. I have begun the work on a sky sphere, after doing quite a bit of research on the best way to do things, I’ve decided that no matter the difficulty a gradient sky sphere is going to be the most dynamic for what i would like to do, now i just need to figure it out…

So far i have the sky sphere correctly moving with the camera, now i want to be able to shade this and have it change realistically from day/night and visa-versa. So starting from here, lets see where this will go, wish me luck I’ll need it:

New XNA Project

28 12 2010

Wow, how long has it been since I’ve made a blog post? Seems like its been quite a while, and according to the dashboard i think it has been.

I’ve been working on a new XNA project in my free time lately. The basic idea is to create a terrain rendering system, and a small RPG style game that is fairly sandbox style. It seems as though things are falling into place, things have come pretty easy thus far and i feel like I’ve made good progress. Check out this screenshot:

One Region test

One Region Rendered

This is one successfully rendered region of the terrain, I’m working with one other developer who’s task currently is to generate some sort of neat terrain layouts and come up with those algorithms. I want to keep the project as procedural as possible, with no set “maps”.

We’ll see how it goes and i’ll provide updates as we work. Maybe i’ll even get around to writing some tutorials for you guys as it seems my windows installer tutorial and XNA stuff has taken off pretty good. Stay tuned!

Outlet ORM

30 01 2009

If you’ve ever tried to use an ORM to create a data layer in PHP, then you know its not always as easy as it seems. Not to mention if you actually have to change a relationship, you could be digging through thousands of lines of code for days. Not anymore, a friend of mine has created Outlet ORM, although in its early versions it’s well worth taking the time to learn.

I think that he does a fantastic job of explaining outlet:

“Outlet is an open source object-to-relational mapping tool for PHP.

It differs from other orm solutions for php in that it provides transparent, unobtrusive persistence. It does not require your entity objects to implement any interfaces or extend some sort of base class. It is also very lightweight, only a handful of classes and tools.

It uses an approach similar to hibernate in java, using proxy objects that save the data behind the scenes.”

From my experience so far its a fantastic tool to work with in PHP, it has definitely made my work in PHP quicker and more organized by creating objects for my database calls. It also takes care of saving/updating/deleting items for me in one easy call, EVEN if they relate to something else and need to be deleted. Great tool, check it out at

Excel and C# – Easy

19 09 2008

When i was first presented with this problem, I had no idea how i was going to go about doing it, searching the internet for a little while is always my first step. Even when i get to one solution i usually keep researching to see if there is anything better, that way i at least have a few choices before I go coding in the wrong direction.

In any event, the task was to integrate a Windows Form with excel, to import data easily into another application or a database. There are a few problems with the thought of this, “how do i interact with excel” and “how do i deal with different versions?”

First lets deal with the interaction, this may not work for all version but it does with 2007 and 2003, which i can test from my laptop.

Excel is basically like using a SQL database, there are some differences on how to do things, but its easiest I found if you just import to a data table and work with the data from there, rather than trying to work through excel. (Why do that if you could just open excel anyway?) So to get it started were going to use the System.Data.OledDb assembly, make sure to add that in the “using” statements at the top.

Once we have that we want to create a new OleDbConnection:

private OleDbConnection conn;

Then down a little bit more in the constructor we want to check the version of excel they are using, i just do this by simply making a bool and basing it off of the file extension. “.xls” is 2003 and “.xlsx” is 2007, i just check that and set a string for 2007 or 2004. Once we get that out of the way we can make the connection string:

if(excelVer == "2007") {
     conn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;" + "Data Source=" + file + ";" + "Extended Properties=Excel 12.0;");
else {
     conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + file + ";" +      "Extended Properties=Excel 8.0;");

As you can see above there are two different connection strings for the respective versions of Excel. Based on what file they are using were going to want to change that connection string, so if you allow you user to change the file whenever they want in your application, you need to change this with it!

After that its as simple as SQL. Lets create a OleDbDataAdapter:

OleDbDataAdapter da = new OleDbDataAdapter("SELECT * FROM [" + worksheetName + "$]", conn);

Then we just use da.Fill(dataTable) and we can bind that to a data grid or do whatever with it! Thats it! If you need any help, just leave a comment and i’ll do what i can to get back to you!

ASP.NET 2.0 styles don’t show up in FireFox, fix!

25 08 2008

I was stuck on this problem for the majority of the day today and it was driving my crazy, i figured i would share my particular solution with everyone. Almost every place I looked up for an answer to this question had something to say about how the server is configured wrong, when i reality it had something to do with my master page!

If you cant figure out why your styles just wont show up in Firefox see if this is a fix for you too. Check the master file, make sure that you have your stylesheet linked correctly. If all is well there make sure you do NOT have a content placeholder in your header tags. For some reason if firefox can see that content placeholder in the head it will void the rest of the tags up there except for the title tag.

This just happened to be a fix for me and i hope it can help someone else!

New XNA Goal

12 08 2008

So I’ve been thinking a lot lately about developing a game within the XNA developer studio. I’ve talked with a lot of my friends about it; friends who have also taken XNA classes with me or have been involved in that type of thing. No one seems to really have the time for anything like that at the moment. So I’ve decided to take thing into my own hands, and start a personal XNA project.

With that being said I’m going to start from the beginning, with just the ideas in my head, I’ll begin with all the planning, choosing an idea, writing it out, documents. Then from there I’ll move on to development, and eventually try to get something released.

I think whats important here is ACTUALLY DOING IT. So that’s why I’m going to start small, on hour a day, one time a week. If i get more momentum, then I will increase that. If anyone would like to collaborate with me, please send me an e-mail at: wade -AT- utahairsoft -DOT- com.