| Neil Bamber's profileFriendMap - Made in Expr...BlogLists | Help |
|
|
8/6/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:
8/4/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. 8/2/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. Help! Part 2.Yesterday I talked about how create a CHM file but I didn’t mention how to include into your project and have it display when a user wants it. I’ve toyed around with Visual C# and this is the method that I’ve used. Now all I need to do is write some help and everyone will be happy.
To include the file in your project load Visual C# and load your project, then find the Solution Explorer. Right click on the solution and mouse over the Add menu and then select Existing Item this displays a standard dialog box you should be familiar with. Navigate to where your Compiled HTML help file is and select it. The file should now appear in the project along with your forms and code. Right click on the file and choose properties, then set the Copy to Output Directory property to Copy Always or Copy if Newer. This allows you to easily reference the help file with out worrying about file paths later on.
To get your help file displaying in your application is a relatively easy process once you know how. I wasn’t too sure until I saw the HelpProvider control. Drag the control on to your form and rename it to something meaningful if you feel inclined. Now we need to change the HelpNamespace property of the HelpProvider to the name of the CHM that was added to the project, in my case FriendMapHelp.chm.
Once the HelpProvider is on your form and has been set up we need to create some events that will utilise it, for example the user clicking Index in the Help menu. In the Click event that has just been created add the following line.
System.Windows.Forms.Help.ShowHelp(this, hlpFriendMap.HelpNamespace);
Where this is the parent control (in my case, the main form of my application), hlpFriendMap is the HelpProvider control that was added and it’s property HelpNamespace is the name of this Compiled HTML help file. After compiling and running the application and clicking on the help button you should be shown your help file.
Now all I have to do is write the help file for my application. 8/1/2006 Help!So like most of the other active contestants I’m currently implementing a help file for my application. As said writing help is the most boring part for a developer (for me at least) and to be honest, I don’t think developers can write help files. Well, a developer who has been working on the project from day one anyway. We just know how to do things, we know what to do and what not to do so trying to explain it to someone who hasn’t is difficult because something you take for granted is something a user might not know.
But I digress. Until tonight I had no idea how I’d implement a help file for my application. The help file wouldn’t be too large, but I’d the user to be able to see a list of topics and search for keywords. These requirements, unless I wanted to spend a significant time writing code, limited me to using the compiled HTML format or CHM. How can I implement CHM help in my application though?
After a bit of searching I discovered that Microsoft have an application available for the creation of CHM files, this application (aptly named HTML Help) can be found here. HTML Help looks very Windows 98, I’m somewhat surprised Microsoft haven’t implemented updated version within Visual Studio, maybe they have in the fuller versions? I’m not sure.
To create a CHM file a user must choose the New option from the File menu and select Project from the dialog box that is displayed. This will begin a wizard running the user through creating a new project, allowing them to convert from previous help files and add existing files to the project. Once the project has been created (assuming no content has been added) the user must create the content so the help file is actually helpful.
To add content click on the Contents tab and follow the prompts to create a new contents file. This is what the user will see when they first load the help file. There won’t be anything in there yet because it has just been created. To add some content add a HTML file to the project from the File, New menu and enter a heading for the page. Now content can be added to this html file, a user can create as many files as they want. Once the user is done adding content to the help file HTML files can be added to the project by clicking the Insert a page link on the left of the window. When finished adding files the user can go to the File menu and choose Compile…. This will result in a compiled CHM that can be viewed by the user, either directly through Windows or from your application.
So there is a very elementary crash course on how to create a CHM file for use in your application. Hopefully a few people will find this step by step process useful. I’ll look into how to actually get the CHM displaying from within an application tomorrow and blog about that, but for now it’s time for bed. 7/28/2006 9 Days Left.Since I was not the mood for programming when I got home last night I went through my application and made a list of everything that needs doing before the 6th of August. Unfortunately the list is a lot bigger than I’d like it to be so some things will have to be cut and others made not as fully featured as I’d like them to be. The list has about 20 entries, pretty much 50/50 between TODOs and BUGs, of course I’m looking forward to the TODOs introducing more bugs. My weekend is looking somewhat busy with activities tonight and tomorrow night, so I’ll have to make the best of Saturday during the day and Sunday, only 9 more days until the project is due. I’m glad it’s due on a Sunday giving me a weekend to work on it.
In other news I discovered (via the CodeProject forums) that Microsoft have the MSDN library available as a stand alone download, it’s pretty huge if you get the whole package but useful to have. I often find my self developing with out Internet access and I want to know something about the object I’m working on in more detail than Intellisense provides, so having the MSDN library available on my computer will fix that problem.
The library can downloaded from http://www.microsoft.com/downloads/details.aspx?FamilyId=373930CB-A3D7-4EA5-B421-DD6818DC7C41&displaylang=en 7/25/2006 Back.Unfortunately I’m back in the land of work after a nice break. I read up on graph theory and I’ve decided that trying to implement a planar graph in such a small window of time for my application is a bad idea and that the time would be better spent adding polish and fixing as many bugs as possible. Once the application has been submitted I’ll implement the planar graph, just so I can say I’ve done it.
I did a little bit of work while I was away (aside from reading up graph theory) but nothing too major. I finally added the ability for some one to create a new owner; it was just something I never got around to doing until now. I also changed a few areas that were still using DataSets and therefore not updating when rows were added to the database. Hopefully I don’t lose too many points for that.
I’ll get back into it proper tomorrow and start work on fixing a few more issues (my contacts list box has stopped drawing itself for some reason) but for now I’m still on Holiday. 7/13/2006 Misc Part 2.Following up yesterdays post about a couple of problems I had with SQL Server 2005 and Visual C# 2005 Express Editions I thought today I’d make a post about a few features that I really like and what could be done to further improve them. Keep in mind what I suggest may already be there and I don’t know it, if that’s the case I’d appreciate people commenting on my ignorance. :)
One of the features of the C# language and Visual C# 2005 that is somewhat insignificant compared to other more grand features is regions. Regions allow you group sections of code together and then collapse them in Visual C# with a tag for the collapsed region. So for example in my application the manage events and manage friends form are some what large code wise. To make navigating through the code easier I’ve grouped the code into tab sections (like the forms) and collapsed parts that I’m not concerned with at the moment. For example,
#region Links Tab Code private bool LinkFieldCheck() { if (cmbLinkPerson.SelectedValue != null && cmbLinkRelationship.SelectedValue != null) return true; else return false; } #endregion
would be displayed as “Links Tab Code”. Obviously there is more code in the region in my application, but you get the idea. While using regions and moving code into them I thought of two changes that could be made in Visual C# to make them even more effective.
If you have a large file with many lines of code, that don’t have any particular order and you want to move the functions into appropriate regions you have to scroll up and down cutting and pasting code. Or if you have a few rather large regions open and you want to move between them, again, a lot of scrolling. One way to alleviate this would be to assign keyboard shorts to a region. It would allow people who are familiar with keyboard short cuts (as most developers are in their IDE of choice) to quickly move between regions that are thousands of lines apart.
Another region improvement could be the automatic grouping of code on a form. For example if I’ve created a form and want to clean it up a little bit and I have three or four different GroupBoxes, if I could press a button and have it group by those GroupBoxes that would be handy.
One other improvement I thought of while creating all the custom controls relates to the Solution Explorer window. In my project I’m starting to get a lot of forms and controls in the Window and I can’t imagine what it would be like for a large project. Having a filter or allowing a user to add folders to store things in would improve the readability of the Solution Explorer and allow people to find what they were looking for more quickly. These folders or groups could also be displayed in the tab strip drop down menu (on the right, left of the x button) that is just below the ToolBars in Visual C# 2005.
This ends my two part series on problems and features I like about the Express suite of products. Tomorrow I'll be getting back into real development and will hopefully have a working search form to show off. 6/23/2006 Nearly Better.So I'm nearly better, though still no where near 100%. I've spent most of the week reading and playing 360, not on Live though. My ADSL has been down since Tuesday and still is. Í'm writing this on dial up, ouch.
Progress has been pretty much non-existent, I've dropped some controls on forms but that is about it. I'd show some screen shots but they are wholly uninteresting and I don't want to even think about how long they would take to upload. I'll be putting some significant time in over the next week to catch up so expect plenty of blog entries filled with frustration due to me having never written an application by myself in .NET.
I'll be DJing at Geisha in Northbridge Tomorrow (Saturday) from 8pm - 11pm, so if anyone reading wants to come say Hi then you are more than welcome to. 6/18/2006 Sick.I came down with a rather nasty cold last week. I've spent Thursday, Friday, Saturday and today coughing, sneezing and generally doing nothing. Hopefully I'm on the mend and I should be able to accomplish something this week, I'll post a few screen shots of the interface toward the end of the week though there will be a huge gap where the main control will be so they won't be too interesting.
Of interesting note is the release of Windows Vista Beta 2 and the renaming of WinFX to .NET 3.0. Depending on how I progress in my application if I’ve got some time left before the deadline I’ll try vistafying my application. If I’m cutting it close I’ll work on it after the competition closes. I’m somewhat keen to see the differences in .NET 3.0 and 2.0. Maybe list controls are easier to sort now? :)
On the upside I've been able to get some xbox 360 time in playing Rockstar's Table Tennis. I'm having trouble beating the 3rd tournament though. At least playing it on live is fun. My gamer tag is nbamber if anyone wants to add me. 5/31/2006 Busy and LazySo I've been a combination of busy and lazy lately, I haven't done any coding since Sunday. I have been thinking about the design (interface wise, database structure wise I've figured out) of my application while reading through the Designing Interfaces book from O'Reilly. The book isn't really telling me anything (yet) that I've not seen or experienced before but reading it I've had a few moments where I've thought of a particular aspect of the design (sometimes related to the current topic, sometimes not) and scribbled it down. I think that is the beauty of the book, while reading it you are thinking about design in general and how it applies to what you are currently working on rather than thinking about the design of your application, I could see my self reading through the book when ever I start a new project.
In the coming week as I finalise the design I'll scan some of my sketches and notes so people can see what the application looks like in my head. Once I've laid it out in Visual C# Express I'll post some screenshots. That is a fair way away yet however. 5/25/2006 Futurestock.Now that the sleek, dazzling, veneer of the go-go eighties is gone and played out brushed metal of the late nineties is in I'll begin blogging the develosphere about my entry in the Made in Express contest.
My name is Neil Bamber and I'm a Software Developer from Perth, Western Australia. I've entered the made in express contest to expand my skills and move into .NET development with C#. Primarily I program in PHP for web front ends and back ends using Postgres/MySQL. My experience so far with C# is pretty limited having only wrote something that processes a report and outputs information through the console.
That is why I'm reading the Windows Forms In Action book at the moment; it's a great introduction to Windows forms and will give me a solid base to work from. I'm nine chapters in at the moment and have given my self 2 weeks to finish working through it and start writing my application for the contest. In the mean time I will be designing the database structure of my application and finalising the features that I want to include.
The application that I'll be creating for the contest is tentatively called FriendMap at the moment, though hopefully I'll think of a better name before the contest closes :). The idea is that you will be able to track interactions between friends and business partners to determine the current value and strength of the relationship. Along with mapping relationships between you and others (as well as linking people your friends know to your friends and therefore to you) you will be able to store any information you see fit about any person in the map.
If anyone has any features that they would like to see added to the FriendMap application feel free to send me an email and I'll see if I can add it. I plan to develop this application well after the competition is finished to make it into something that people want to use.
I'm not sure what the content of this blog will be, I'll more than likely post mock ups of the interface as I design it and give (hopefully to some) interesting insights into the development of the project and the tools I will be using. Naturally the application will be written in Visual C# 2005 Express and the database will run on SQL Server 2005 Express. |
|
|