Weathering is a lightweight and intuitive desktop weather application built using .NET C# (Windows Forms). It connects to an official Weather API to fetch real-time weather conditions and forecast updates, helping users make informed decisions about their day.
- Features
- Screenshots
- Installation
- How It Works
- Tech Stack
- API Integration
- Usage
- Project Structure
- Contributing
- License
- Acknowledgments
- 🌍 Fetch current weather conditions by city name
- 📆 Get future weather forecasts (e.g., 5-day forecast)
- 💡 Displays temperature, humidity, wind speed, pressure, and weather description
- 📈 Visuals for sunny, cloudy, rainy, and other weather states
- 🖥️ Clean Windows Forms UI
- 🔄 Periodic updates with refresh option
- 🚫 Graceful error handling (e.g., city not found, network errors)
Comming Soon...
- Windows 10 or higher
- .NET Framework 4.7.2 or later
- Visual Studio 2019 or later (for development)
- Clone the repository:
git clone https://github.com/shafiamanzoor762/weather_app_.net.git
- Open the solution in Visual Studio:
cd WeatherApp
WeatherApp.sln
-
Install dependencies (NuGet package Newtonsoft.Json is used).
-
Build and run the app (F5 or click
▶️ Run).
- User inputs a city name.
- App sends a request to a public Weather API (OpenWeatherMap).
- JSON response is parsed and displayed in the UI.
- Forecast data is stored for quick display and refreshes periodically.
- Language: C#
- Framework: .NET Windows Forms
- UI: WinForms Controls
- API: OpenWeatherMap
- IDE: Visual Studio 2022 (recommended)
The app uses the OpenWeatherMap API. You need an API key.
- Go to OpenWeatherMap
- Sign up and generate a free API key
- Update your code to include the API key:
string apiKey = "YOUR_API_KEY";
string url = $"https://api.openweathermap.org/data/2.5/weather?q={city}&appid={apiKey}&units=metric";
- Launch the app.
- Enter a city name (e.g., London, New York).
- Click "Get Weather".
- View real-time temperature, condition, forecast, and more.
WeatherAppSourceCode/
├── WeatherApp.sln
├── Weather.cs # Main Windows Form
├── WeatherInfo.cs # Deserialization model for Current Weather JSON response
├── WeatherForcast.cs # Deserialization model for Forcast Weather JSON response
├── Resources/
│ └── weather_icons/ # Weather condition icons
├── App.config # Optional: API key or settings
└── README.md # This file
Contributions are welcome! If you find bugs or want to improve features, follow these steps:
-
Fork the repo
-
Create a feature branch:
git checkout -b feature/YourFeature
-
Commit your changes and push:
git push origin feature/YourFeature
-
Create a Pull Request
This project is licensed under the MIT License.
See LICENSE
for more details.
- OpenWeatherMap API
- Microsoft .NET Framework
- Stack Overflow Community
- Icons from Icons8