WindowsFormsApp1/calculator.cs

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

//计算器
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class calculator : Form
    {
        public calculator()
        {
            InitializeComponent();
        }

        //计算器
        public double temp = 0;//存储临时数据
        public string operation =null;//判断之前按的是+-*/中的哪个
        public double result = 0;//存储计算结果
        public double number = 0;//存储输入的数字
        public bool flag = true;//判断能否输入第二个数字
        private void calculator_Load(object sender, EventArgs e)
        {

        }

        

        private void textBox2_TextChanged(object sender, EventArgs e)
        {

        }

        private void One_Click(object sender, EventArgs e)
        {
            if (operation != null) 
            {
                if (!flag) 
                {
                    textBox1.Text = ""; 
                    flag = true; 
                }
                
            }
            if(flag)
                textBox1.Text += "1";
        }

        private void Two_Click(object sender, EventArgs e)
        {
            if (operation != null)
            {
                if (!flag)
                {
                    textBox1.Text = "";
后面还有 266 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。