| Neil Bamber's profileFriendMap - Made in Expr...BlogLists | Help |
|
06/08/2006 This is the end.So after a somewhat messy night last night and a grand total of 3 hours sleep I’ve been trying to think about what I can put in my last, 50th, blog post. I don’t really have too much else to say, I’m glad I entered the competition, I’m happy I’ve reached the end and submitted a working product and I’m happy that I’ve learned a lot about C#, .NET and Visual Studio, but most of the people reading this would have probably picked that up from the last 49 entries. So I decided to show you my TODO list which I’ve been working from, adding too and marking off over the last 2 weeks.
TODO:
BUGS:
05/08/2006 Publish.The Publish functionality in Visual C# Express worked a treat; everything is working nicely on all the different computers I’ve tested it on (thanks to Justin, Arron and Gavin). The final package compresses nicely into a RAR at about 500k, I’d put it up for download but I’m not sure if that would violate any rules. The project should be downloadable after it’s submitted anyway.
Using the publish functionality in the Visual C# Express was a breeze. The only problems I had stemmed from my idiocy where I had a hard coded database connection string. Of course I found that out after I had waited for the .NET 2.0 and SQL Server Express to install the 333 MHz Celeron test machine I was trying it on. :)
To publish your project go to the Project menu, and choose ProjectName Properties, where ProjectName is your project name. Click the Publish link on the left and then select where you want to publish the project to, I put it in a temp directory on my hard drive. Click the Options button and then enter the appropriate information about your project, name, language, etc. Once you’ve entered that information uncheck the Automatically increment revision with each publish option. That way when you mess up the first ten times it’s still at 1.0.
Then click the Publish Wizard button to go through a few more options and then your application should be published. The great thing about the Publish functionality is that it checks if the user has .NET 2.0 and SQL Express Server and if it doesn’t fetches and installs them for the user. The installer also adds the program to the Add/Remove programs list in Windows. This makes things so much simpler from my point of view.
The only problem (aside from my silly connection string issue) was the help file not being included in my published application. I fixed this by changing the properties of the help file in my project. I set Copy To Output Directory to Always and changed the Build Action to content. The next time I published the application the help file was included as expected. One other minor issue I had was the installer having problems installing over a previous version but that isn’t exactly rare.
I’d like to use the Auto Update functionality, it looks really simple to implement and for on going projects I imagine it would be hugely useful to developers. To check out the functionality click the Updates button just above the Options button on the Publish page.
Good luck to all contestants that end up submitting their project, I hope you’ve all enjoyed the competition as much as I have. It’s given me a nice timeline to work through and I feel a nice fuzzy feeling deep down inside that all work in the project has been completed by me, no inclusion of anyone else code or work. For now I’m going out to celebrate :) 04/08/2006 More Bug Fixing.So after some more bug fixing I’m nearly there. There isn’t much to blog about because what I’m doing is revising code I’ve talked about before, though I did figure out something handy that others may find useful.
Say you have a form were the user clicks the create button to submit the details on the form. The create button is the form’s AcceptButton property. If you check the details and find the user has entered something incorrectly, or not entered anything at all how can you prevent the form from closing? After thinking about it for a while (and now I’m writing this I probably could have used ErrorProviders and btnCreate.Enable = false, but oh well) the solution I came up with was to have the check function set a property called CloseForm. If the check function returns false the form still tries to exit, however you can fire the FormClosing event and if the CloseForm property is set to false, set e.Cancel = true; in the FormClosing event. This stopped my cancel button from working however, to fix that I simply set CloseForm to true when the cancel button is clicked, simple.
I also tried to clean up the drawing of the FriendMap so lines didn’t visibly intersect circles (so the circles are drawn on top). It looks a little better though it looks a little more confusing too since you notice a friend has 4 lines going into them. To combat this I tried drawing lines from the centre of the circle rather then the right edge, however that didn’t help much so I reduced the line thickness so lines were easier to trace.
Over tonight and tomorrow I’ll look at figuring out how I can distribute my application and get everything ready for submission for Sunday. I’ll also have a few rounds of Street Fighter II over Xbox Live. It seems that there are more good games coming out on Xbox Live Arcade than there are in stores. 03/08/2006 Circles.Last night I sat down and wrote the help file for my application. I wrote the topics in word and then used HTML Help to compile them into the CHM format. HTML Help was a little bit temperamental and didn’t compile a few times due to the paths of the html files. Everything seemed to be fine if you didn’t save and load the project again though so I just did it all at once. I couldn’t figure out how to create sections in the help file but since there aren’t too many pages I didn’t fuss over it. The file loads and displays nicely from within my application and even though HTML Help is a bit archaic I’m glad I went the CHM route.
Writing the help file was (as everyone would expect) boring however it made me use my application and helped me discover a few more bugs, so in that regard it was a worth while process. Now I just need to work on fixing the newly discovered bugs before the project is due.
One bug I did fix today was my line drawing problem when relationships were more than one person deep. I’d thought about this problem for a while but never reached a work able solution, I originally thought of storing the “parent” circle as a property but that idea was shot when I came to implement it due to the way I draw friends using recursion. So the parent would be updated anytime there were children, which would leave me with the same problem.
So after looking at the code and thinking about how I could do it I came up with the idea of moving X number of circles backward, where X is the number of children a parent has. This was pretty easy to do, if the parent circle was on the same line as the child circle (X – (size * childCount)), but when the child circle was on the next line it got a little more complicated. I spent a lot longer (45 minutes) figuring the problem out and implementing it than I would have liked (15 minutes) seeing as the solution ended up being pretty simple. Calculate the number of pixels behind X we are, determine how many circles can fit in that amount of pixels (the number of circles on the new line we need to move back), then determine the new X position by maxCirclesPerLine – previousLineCircles * circleSize.
I expect most of the remaining bugs and features to be fixed or added by tomorrow night and then I’ll spend Saturday figuring out how to distribute my program so people can actually use it. 02/08/2006 Windows Live SpacesOh my, it appears that MSN Spaces has become Windows Live Spaces and the change over hasn’t gone too smoothly for my blog. At least my blog is a little more readable in Firefox now. Hopefully the lay out issues will be fixed up soon, I’d try messing around with it myself but the Spaces backend is temperamental to say the least and I’d probably end up spending a hour making it look worse or at best the same. |
|
||||||||
|
|