Here’s another take on using a database with C# .NET. THis is a small bill-pay program that’s used to keep track of expenses and payments. There’s a lot going on here so bear with me on the screenshots. I’ll try to explain each one as best as I can. If you prefer to skip it and go ahead to view the code or source then go on ahead. Also take note that I added a context menu not shown in the screenshots. This menu gives you the ability to do various tasks in each form.
This is my first stab at using C# .NET to access a simple database. The database is a simple Microsoft Access database. However this has showed me what you can do when a program can store information in a database. Really cool stuff!!! I’ve included 3 screenshots this time. Along with the Class Designer and Interface screenshots, there’s an overview if the dataset tables. Each dataset is doing simple SELECT and FROM queries from the main database. I’m also using the default binding navigator to scroll thru, delete, and save the changed data. And I also enabled a drag and drop feature on the picture box to upload a picture. Also if you laugh at the sample employees and where they come from kudos. You share my sense of humor. Now onto the code. Or you can download the source for yourself.
The following program is called an Iggy Lating translator. You’ve heard of Pig Latin right? Well think of this as an off-shoot of Pig Latin. Basically you’re adding the following “ig”, “ggy”, “iggi”, “t”, or “tt” to either the beginning of the word or the end depending on if the word has a vowel or consonant. The letter replacement is done 3 different ways for string manipulation. The 1st way is a regular string method, the 2nd way is using the StringBuilder method, and the 3rd way is using a Regular Expression to add the characters. Call me crazy I actually had more fun messing with the Regular Expressions. I can see how you can use this to make sure only certain information is entered into a WPF form. You will also notice that I used a static class for the conversions. This way I don’t don’t have to create and instance of the class. I can just call the class directly. Now onto the code. Or you can download the source.
Here is another counting game that makes the use of generics along with some class inheritance built in. Like I said before I’m starting to like working with collections more and more because of the simplicity of dealing with them. It makes for some cleaner code. I also wanted to work in the class inheritance. Granted, yes, this is on a simple scale. However, I think it demonstrates the power of what inheritance can do. My idea for this program was a visualization of adding items to fish tank. Don’t laugh at the graphics aspect of this program. It was all in my head and I wanted to base the interface off my last post. Also note that I’m only going to include code for one of the rock objects. The other are pretty much the same so if you want to see them download the source and take a look.