Dim ct1 As IntegerAs for the Clear button...
Dim ct2 As Double
Dim wordCt As Integer
Dim daysWorked As Integer
Dim avgWordCtPerDay As Double
Dim extra As Double
Dim temp As Integer
Const AVG_WORD_COUNT As Double = (50000 / 365)
wordCt = Integer.Parse(Me.txtDailyWordCount.Text)
daysWorked = Integer.Parse(Me.txtDaysWorked.Text)
avgWordCtPerDay = wordCt / daysWorked
extra = avgWordCtPerDay / AVG_WORD_COUNT
While ct2 < 365
ct1 = ct1 + 1
ct2 = ct2 + extra
End While
Me.lstResults.Items.Add("Days Total: " + temp.ToString(ct1))
Me.lstResults.Items.Add("Days Saved: " + temp.ToString(365 - ct1))
Me.lstResults.Items.Add("Days Left: " + temp.ToString(ct1 - daysWorked))
Me.lstResults.Items.Clear()And this is the GUI
As long as I remember how many days I have been at a particular novel, I can gauge if I am falling behind or speeding up on each day's writing count. It is nice to know that after almost three years of not programming, I still got it.
No comments:
Post a Comment