Overview

This is a budgetting program written in VB2015, that you can use to record, manage, and compare your household expenditure over the course of a year.

Figure 1. Yearly Graph View

Data is input in a PropertyGrid Control. There are five graph views you can analyze, Yearly view, Quarterly view, the three months which make up a quarter, the full twelve months, or an editable Monthly view. The Yearly and Quarterly views are readonly summary views. The GraphFrame Custom Control allows navigation through a ContextMenuStrip, and also (dependent on which view you're currently viewing) doubleclicking will change the graph view.

Figure 2. Quarters View 

Figure 3. One Quarter View 

Figure 4. Twelve Months View 

Figure 5. Editable Monthly View 


Wrapper Classes

When writing this I wanted to dynamically make some of the Properties in the multi-purpose expanded Property Classes readonly, which is a very difficult process that I initially tried using Reflection and Attributes. This had unsatisfactory results, and the eventual solution was wrapping the Classes and exposing their Properties as readonly Properties in the PropertyGrid via Wrapper Classes.

Imports System.ComponentModel
 
<TypeConverter(GetType(ExpandableObjectConverter))> <System.Serializable()>
Public Class TransportWrapper
    Private _instance As Transport
 
    Public Sub New(ByVal c As Transport)
        _instance = c
    End Sub
 
    <DisplayName("Petrol"),
    RefreshProperties(RefreshProperties.All)>
    Public ReadOnly Property petrol() As Decimal
        Get
            Return _instance.petrol
        End Get
    End Property
 
    <DisplayName("Commuting"),
    RefreshProperties(RefreshProperties.All)>
    Public ReadOnly Property commuting() As Decimal
        Get
            Return _instance.commuting
        End Get
    End Property
 
    <DisplayName("Car Costs"),
    RefreshProperties(RefreshProperties.All)>
    Public ReadOnly Property carCosts() As Decimal
        Get
            Return _instance.carCosts
        End Get
    End Property
 
    <ReadOnlyAttribute(True),
    Browsable(False),
    DisplayName("Total Transport Outgoings")>
    Public ReadOnly Property totalTransport() As Decimal
        Get
            Return petrol + commuting + carCosts
        End Get
    End Property
 
    Public Overrides Function ToString() As String
        Return totalTransport.ToString("c2")
    End Function
 
End Class


Other Resources