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.

Language

Application

Tools

Status

MainFormUI.cs
////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

Accurate timing with lap tracking and a detailed lap table.

Set hours, minutes, and seconds for customized countdowns.

Easily pause and resume countdowns without losing time.

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

Design Decisions

Project Reflection


Growth, Lessons & Next Steps

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.

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