Project Overview
Timer App
A C# Windows Forms application with stopwatch, lap tracking, configurable countdowns, pause and resume controls, audible completion alerts, and a curious “Chaos” mode.
C#
.NET
Windows Forms
Visual Studio 22


Language
C#

Application
Desktop

Tools
Visual Studio

Status
Complete
From Code to Interface
////Stopwatch Tab Logic////private Stopwatch stopwatch = new Stopwatch();private int lapCount = 0;private void StopwatchTimer_Tick(object sender, EventArgs e){ timeTableGV.Rows[lapCount].Cells["lapEndCol"].Value = stopwatch. Elapsed.ToString(@"hh\:mm\:ss"); currentStopwatchLbl.Text = stopwatch.Elapsed.ToString(@"hh\:mm\:ss");}private void startStopwatchBtn_Click(object sender, EventArgs e){ if (stopwatch.IsRunning != true && stopwatch.ElapsedTicks <= 0) //new stopwatch started { startStopwatchBtn.Text = "&Lap"; stopwatch.Start(); stopwatchTimer.Start(); timeTableGV.Visible = true; ShowNewLap(); } else if (stopwatch.IsRunning != true) //if stopwatch was "stopped" and sstarted back { stopwatch.Start(); stopwatchTimer.Start(); startStopwatchBtn.Text = "&Lap"; } else { //if user wanted to set a lap time lapCount += 1; ShowNewLap(); }}private void stopStopwatchBtn_Click(object sender, EventArgs e){ startStopwatchBtn.Text = "Res&ume"; stopwatch.Stop(); stopwatchTimer.Stop();}private void resetBtn_Click(object sender, EventArgs e){ startStopwatchBtn.Text = "&Start"; timeTableGV.Visible = false; stopwatch.Reset(); stopwatchTimer.Stop(); timeTableGV.Rows.Clear(); lapCount = 0; currentStopwatchLbl.Text = "00:00:00.00";}private void ShowNewLap(){ int rowIndex = timeTableGV.Rows.Add( lapCount + 1, stopwatch.Elapsed.ToString(@"hh\:mm\:ss"), stopwatch.Elapsed.ToString(@"hh\:mm\:ss") ); timeTableGV.ClearSelection(); timeTableGV.Rows[rowIndex].Selected = true; timeTableGV.FirstDisplayedScrollingRowIndex = rowIndex; //Scrolls to current lap time}


Project Capabilities
Key Features

Stopwatch & Laps
Accurate timing with lap tracking and a detailed lap table.

Configurable Countdown
Set hours, minutes, and seconds for customized countdowns.

Pause & Resume
Easily pause and resume countdowns without losing time.

Audible Alerts
Plays an audible alert when the countdown reaches zero.
Implementation
Inside the Timer

Stopwatch
Accurate elapsed-time measurement using System.Diagnostics.

TimeSpan
Calculates and formats time values (hh:mm:ss.ff).

SoundPlayer
Plays looping completion audio(repeat until acknowledged).

Timer App
Small Pieces
Big Results

WinForms Timer
Refreshes the display every 10 ms for smooth updates.

DataGridView
Displays lap count, start, and lap/end values.

CancellationTokenSource
Stops the repeating beep task safely when needed.
Technical Deep Dive
Challenges, Solutions, & Design Decisions

Challenges & Solutions
Timing drift → Measure elapsed time with System.Diagnostics.Stopwatch.
Lap Synchronization → Update the selected DataGridView row during each refresh.
Duplicate alerts → Guard the alert sequence with a message box state flag.

Design Decisions
Compact always-on-top form → Keeps the timer visible during other work.
Tab separation → Gives Stopwatch, Countdown, and Settings focused spaces.
Color-coded controls → Green starts, red stops or cancels, and orange pauses.
Screenshots
Timer App in Action



Stopwatch Mode
Countdown Mode
Chaos?
Project Reflection
Growth, Lessons & Next Steps

What I Learned
Strengthened my understanding of event-driven programming, state management, and creating responsive WinForms interfaces. Gained experience working with TimeSpan, timers, and keeping the UI In sync with application state.

Future Improvements
Add project logging integration to save and review timer sessions, including lab history. Introduce presets for commonly used countdown times and additional customization options.