Wanted neat / experienced coder :)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jg007
    Contributor
    • Mar 2008
    • 283

    Wanted neat / experienced coder :)

    I have a project that I have been playing with and I could really do with somebody who has time to spare to look through my code and suggest how I could have tidied up some of the lengthy code ( mainly if statements )

    the project is nothing major as is supposed to be a little timer that stays topmost on my screen and changes colour according to the closeness of four alarm times and is supposed to help me at work to monitor the closeness of breaks as I easily get lost doing things and miss the breaks

    some things have been changed into functions and are neater but others I could not work out how to tidy up

    unfortunately no monetary prize awaits any volunteers but I will really appreciate any pointers I can get

    example code below -

    Code:
     Public Sub check_enabled()
    
            If alarmisabove(BreakTimeA._sumtime) Then
                BreakTimeA._enabled = True
                Timer1ToolStripMenuItem.Checked = True
            Else
                BreakTimeA._enabled = False
                Timer1ToolStripMenuItem.Checked = False
            End If
    
            If alarmisabove(BreakTimeB._sumtime) Then
                BreakTimeB._enabled = True
                Timer2ToolStripMenuItem.Checked = True
            Else
                BreakTimeB._enabled = False
                Timer2ToolStripMenuItem.Checked = False
            End If
    
            If alarmisabove(breakTimeC._sumtime) Then
                breakTimeC._enabled = True
                Timer3ToolStripMenuItem.Checked = True
            Else
                breakTimeC._enabled = False
                Timer3ToolStripMenuItem.Checked = False
            End If
    
            If alarmisabove(breakTimeD._sumtime) Then
                breakTimeD._enabled = True
                Timer4ToolStripMenuItem.Checked = True
            Else
                breakTimeD._enabled = False
                Timer4ToolStripMenuItem.Checked = False
            End If
    
    
        End Sub
Working...