Language Notice: View in Arabic (العربية) |
This Windows Forms application implements a 15-digit calculator with a realistic 7-segment display simulation. The calculator supports basic arithmetic operations (addition, subtraction, multiplication, division), decimal values, and includes advanced features like positive/negative toggling and multi-operation chaining.
- 🧮 15-digit precision display with 7-segment LED simulation
- ⚡ Basic operations: Addition, Subtraction, Multiplication, Division
- 🔢 Decimal support with intelligent dot handling
- 🔄 Operation chaining for complex calculations
- ➕/➖ Sign toggle for positive/negative values
- 🔙 Backspace functionality for error correction
- 🧹 Clear button to reset calculations
- 📊 Visual tracking of current operation and previous values
-
Main Form (
frm15DigitScreen):- Manages calculator state and UI interactions
- Handles digit input and operations
- Tracks calculation history
-
7-Segment Display Control (
ctrlLCDScreen):- Custom control that simulates a 15-digit LED display
- Handles value formatting and digit rendering
-
Calculation Logic:
- State machine for operation management
- Double precision arithmetic
- Input validation and error handling
DoOperations()- Executes arithmetic operations based on current state_SetOperation()- Manages operation transitions_GetInput()- Processes digit and special character inputDoCalculation()- Performs chained operationsBackSpace()- Handles digit removal
- .NET Framework 4.7.2 or later
- Visual Studio 2019+ (recommended)
- Clone the repository:
git clone https://github.com/MohmdAliMohmd/15-digit-calculator.git
- Open the solution in Visual Studio
- Build the solution (Ctrl+Shift+B)
- Run the application (F5)
- Enter numbers using the digit buttons
- Use
.for decimal values - Select an operation (+, -, ×, ÷)
- Continue calculations or press
=for results - Use
Cto clear the current calculation - Toggle sign with
+/-button
This project is licensed under the MIT License - see the LICENSE.md file for details.
Contributions are welcome! Please follow these steps:
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a pull request
Note: This project includes a custom 7-segment display control that simulates physical calculator displays. The implementation handles digit limitations (15 digits max) and decimal point constraints intelligently.
