Skip to content

Repository files navigation

🍕 Pizza Project

A sleek, dark-themed Windows Forms desktop app for building and pricing a custom pizza order in real time.


📖 Overview

Pizza Project is a C# Windows Forms application that simulates a pizza ordering counter. Users pick a size, crust type, and toppings, choose whether they're eating in or taking out, and watch the Order Summary panel and total price update instantly as they change their selections. When ready, they confirm the order with a single click, or reset the form to start over.


✨ Features

  • 🍕 Choose a pizza size — Small, Medium, or Large, each with its own price
  • 🧀 Pick toppings — Extra Cheese, Onion, Mushrooms, Olives, Tomatoes, and Green Peppers, each added individually to the total
  • 🥖 Select a crust type — Thin Crust or Thick Crust
  • 🍽 Choose Eat In or Take Out
  • 💲 Live total price calculation as size, toppings, and crust are selected
  • 📋 Real-time Order Summary panel showing the current size, toppings, crust type, and where-to-eat choice
  • Order confirmation flow with a confirmation prompt, a success message, and the form locking once an order is placed
  • 🔄 Reset Form button that restores every selection back to its default state
  • 🎨 Custom dark theme UI with a warm orange accent palette, flat-styled toggle controls, hover highlights, and a pizza image header

🖼 Screenshots

Main Window

Customized Order


🛠 Technologies Used

  • C#
  • .NET Framework 4.8
  • Windows Forms (WinForms)
  • System.Drawing (custom colors, fonts, and owner-drawn accents)

📂 Project Structure

Pizza_Project/
├── Program.cs                  # Application entry point (Main method)
├── Form1.cs                    # Core application logic and event handlers
├── Form1.Designer.cs           # Auto-generated control layout and styling
├── Form1.resx                  # Form resource file (icons, embedded resources)
├── Properties/
│   ├── AssemblyInfo.cs         # Assembly metadata (title, version, GUID)
│   ├── Resources.resx          # Embedded resources (pizza image)
│   ├── Resources.Designer.cs   # Auto-generated strongly-typed resource accessor
│   ├── Settings.settings       # Application settings definition
│   └── Settings.Designer.cs    # Auto-generated settings accessor
├── Resources/
│   └── pizzeria.jpg            # Pizza image displayed in the header
├── App.config                  # Runtime configuration (targets .NET Framework 4.8)
└── Pizza_Project.csproj        # Project file and build configuration

🚀 Getting Started

  1. Install Visual Studio (2019 or later recommended) with the .NET desktop development workload.
  2. Clone or download this repository.
  3. Open Pizza_Project.sln in Visual Studio.
  4. Press F5 (or click Start) to build and run the application.
  5. The Pizza Order window will open, ready to build a pizza.

No external packages or NuGet installs are required — the project only relies on standard .NET Framework libraries.


🎯 Learning Objectives

This project demonstrates core Windows Forms and C# fundamentals, including:

  • Event-driven programming with CheckedChanged and Click event handlers
  • Working with RadioButtons for mutually exclusive choices (size, crust, eat-in/take-out)
  • Working with CheckBoxes for multi-select options (toppings)
  • Grouping related controls with GroupBoxes
  • Displaying dynamic values with Labels
  • Using a PictureBox to display an embedded image resource
  • Reading control metadata via the Tag property to drive calculations
  • Structuring UI update logic into small, single-purpose methods
  • Basic form state management (enabling/disabling controls, resetting to defaults)
  • Light custom UI styling using FlatStyle, FlatAppearance, and the Paint event

💡 Code Highlights

  • Dynamic price calculation — each radio button and checkbox stores its price in its Tag property, which is summed up (GetSelectedSizePrice, CalculateToppingsPrice, GetSelectedCrustPrice) to compute the total in CalculateTotalPrice().
  • Live order summary updates — dedicated methods (UpdateSize, UpdateToppings, UpdateCrust, UpdateWhereToEat) keep the summary labels in sync with the user's current selections.
  • Order confirmation flowbtnOrderPizza_Click shows a confirmation dialog, then a success message, and locks the form's controls once an order is placed.
  • Reset functionalityResetForm() restores every group box, radio button, and checkbox back to its default selection in one call.
  • Custom-styled toggle controls — checkboxes and radio buttons are switched to FlatStyle.Flat at runtime with custom border, hover, and checked colors so they match the app's dark theme.
  • Hover and selection color feedbackMouseEnter/MouseLeave and CheckedChanged handlers change a control's text color to reflect whether it's currently hovered or selected.
  • Owner-drawn accents — a Paint event handler draws a thin accent underline beneath each group box's title for extra visual polish.

📌 Possible Future Improvements

  • Save completed orders to a file or database
  • Support ordering multiple pizzas in a single session
  • Generate and display a printable receipt

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages