A modern, feature-rich desktop weather application delivering real-time weather data and forecasts worldwide.
- Current Temperature - Accurate readings in Celsius with "feels like" temperature
- Weather Conditions - Comprehensive status updates (clear, cloudy, rainy, snowy, etc.)
- Location Intelligence - Search any city worldwide with instant results
- Last Updated - Timestamp showing data freshness
| Metric | Description |
|---|---|
| UV Index | 0-11+ scale with visual indicators for sun safety |
| Humidity | Relative humidity percentage |
| Pressure | Atmospheric pressure (mb) with high/low alerts |
| Wind | Speed (km/h) + direction with storm warnings (≥21 km/h) |
| Precipitation | Rainfall intensity (mm) with heavy rain indicators (≥11 mm) |
| Cloud Cover | Percentage-based coverage with adaptive icons |
Real-time air pollution monitoring with 6-tier classification system:
- ✅ Good - Safe for everyone
- 🟡 Moderate - Acceptable quality
- 🟠 Unhealthy for Sensitive Groups - At-risk individuals should limit exposure
- 🔴 Unhealthy - Everyone may experience effects
- 🟣 Very Unhealthy - Health alert conditions
- ⚫ Hazardous - Emergency conditions
Pollutant Tracking:
- PM 2.5 (fine particles)
- PM 10 (coarse particles)
- Carbon Monoxide (CO)
- Ozone (O₃)
- Daily high/low temperature predictions
- Weather condition outlook
- Dynamic weather icons
- Formatted date display (e.g., "Mon, Jan 15")
- 30+ Weather Icons - Comprehensive icon library covering all conditions
- Day/Night Mode - Automatic icon switching based on local time
- Conditional Alerts - Visual warnings for:
- High/low atmospheric pressure
- Strong winds
- Heavy precipitation
- Extreme UV levels
- Adaptive UI - Icons change based on real-time conditions
- Windows OS (10/11)
- .NET Framework 8+
- Internet connection for API access
- Clone the repository
git clone https://github.com/yourusername/WeatherApp.git- Open in Visual Studio
Open WeatherApp.sln
- Configure API Key
- Get your free API key from WeatherAPI.com
- Add to
Form1.cs:
private const string API_KEY = "your_api_key_here";- Build & Run
- Press
F5or click Start - Enter a city name and explore!
- Press
- C# .NET - Primary programming language
- Windows Forms - GUI framework
- WeatherAPI - Real-time weather data provider
- Newtonsoft.Json - JSON deserialization
- ✅ Async/Await programming for smooth UI
- ✅ RESTful API integration
- ✅ Object-oriented design patterns
- ✅ Event-driven architecture
- ✅ Exception handling & validation
- ✅ Resource management
- ✅ Dictionary-based data mapping
WeatherApp/
├── Form1.cs # Main application UI & logic
├── Root.cs # Weather data models
│ ├── Root
│ ├── Location
│ ├── Current
│ ├── Forecast
│ ├── Forecastday
│ ├── Day
│ ├── Condition
│ └── AirQuality
├── WeatherIcon.cs # Icon management system
└── icons/ # Weather icon assets
├── clear-day.png
├── clear-night.png
├── rain.png
└── ... (30+ icons)
- Non-blocking Operations - Async API calls prevent UI freezing
- Efficient Caching - Smart icon loading and management
- Error Recovery - Graceful handling of network issues
- Quick Search - Enter key support for instant results
- Loading Feedback - Real-time status updates
- Visual Clarity - Color-coded messages and organized layouts
- Intuitive Design - No learning curve required
- Clean, well-documented code
- Separation of concerns
- Reusable components
- Proper resource disposal
http://api.weatherapi.com/v1/forecast.json
| Parameter | Value | Description |
|---|---|---|
key |
API Key | Authentication |
q |
City name | Location query |
days |
5 | Forecast range |
aqi |
yes | Air quality data |
alerts |
yes | Weather alerts |
- WeatherAPI - Reliable weather data provider
- Newtonsoft.Json - JSON framework
- Meteocons - Weather Icons
┌────────────────────────────────────────────┐
│ WEATHER │
│ [ Search Box ] [ Search ] │
├────────────────────────────────────────────┤
│ CURRENT WEATHER │
│ [Icon] City, Country │
│ Temp°C — Sunny │
│ Feels like: Temp │
├────────────────────────────────────────────┤
┌────────────┐ ┌────────────┐ ┌────────────┐
│ Day │ │ Day │ │ Day │
│ [Icon] │ │ [Icon] │ │ [Icon] │
│max/min temp│ │max/min temp│ │max/min temp│
│ Desc │ │ Desc │ │ Desc │
└────────────┘ └────────────┘ └────────────┘
├────────────────────────────────────────────┤
│ UV │ Humidity │
├─────────────────────┼──────────────────────┤
│ Pressure │ Cloud │
├─────────────────────┼──────────────────────┤
│ Wind │ Precip │
├────────────────────────────────────────────┤
│ Air Quality │
├────────────────────────────────────────────┤
│ PM2.5, PM10, CO, O₃ │
└────────────────────────────────────────────┘
⭐ Star this repository if you find it helpful!
Made with ❤️ using C# and Windows Forms
