• 大小: 0.16M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-02-25
  • 语言: C#
  • 标签: 数字  计算机  计算  

资源简介

c# 实现简单四则运算

资源截图

代码片段和文件信息

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 Calculator
{
    public partial class Form1 : Form
    {
        Double value = 0;
        string operation = ““;
        bool operation_pressed = false;
        public Form1()
        {
            InitializeComponent();
        }

        private void button_Click(object sender EventArgs e)
        {
            if ((result.Text == “0“)||(operation_pressed))
                result.Clear();

            operation_pressed = false;
            Button b = (Button)sender;
            result.Text = result.Text + b.Text;
        }

        private void button14_Click(object sender EventArgs e)
        {
            result.Text = “0“;
        }

        private void operator_Click(object sender EventArgs e)
        {
            

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.     49664  2016-04-12 14:15  Calculator\.vs\Calculator\v14\.suo

     文件     363566  2016-04-11 12:08  Calculator\Calculator\135.ico

     文件        189  2016-04-11 10:09  Calculator\Calculator\App.config

     文件     378368  2016-04-11 12:25  Calculator\Calculator\bin\Debug\Calculator.exe

     文件        189  2016-04-11 10:09  Calculator\Calculator\bin\Debug\Calculator.exe.config

     文件      22016  2016-04-11 12:25  Calculator\Calculator\bin\Debug\Calculator.pdb

     文件      22696  2016-04-11 12:25  Calculator\Calculator\bin\Debug\Calculator.vshost.exe

     文件        189  2016-04-11 10:09  Calculator\Calculator\bin\Debug\Calculator.vshost.exe.config

     文件        189  2016-04-11 10:09  Calculator\Calculator\bin\Release\Calculator.exe.config

     文件      22016  2016-04-11 12:24  Calculator\Calculator\bin\Release\Calculator.pdb

     文件      22696  2016-04-11 12:06  Calculator\Calculator\bin\Release\Calculator.vshost.exe

     文件        189  2016-04-11 10:09  Calculator\Calculator\bin\Release\Calculator.vshost.exe.config

     文件        490  2015-10-30 15:19  Calculator\Calculator\bin\Release\Calculator.vshost.exe.manifest

     文件       4071  2016-04-11 12:09  Calculator\Calculator\Calculator.csproj

     文件       2205  2016-04-11 12:24  Calculator\Calculator\Form1.cs

     文件      17155  2016-04-11 12:06  Calculator\Calculator\Form1.Designer.cs

     文件       5817  2016-04-11 12:06  Calculator\Calculator\Form1.resx

     文件        504  2016-04-11 12:25  Calculator\Calculator\obj\Debug\Calculator.csproj.FileListAbsolute.txt

     文件       1012  2016-04-11 12:25  Calculator\Calculator\obj\Debug\Calculator.csproj.GenerateResource.Cache

     文件     378368  2016-04-11 12:25  Calculator\Calculator\obj\Debug\Calculator.exe

     文件        180  2016-04-11 12:25  Calculator\Calculator\obj\Debug\Calculator.Form1.resources

     文件      22016  2016-04-11 12:25  Calculator\Calculator\obj\Debug\Calculator.pdb

     文件        180  2016-04-11 12:25  Calculator\Calculator\obj\Debug\Calculator.Properties.Resources.resources

     文件        868  2016-04-11 10:09  Calculator\Calculator\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       7149  2016-04-11 12:25  Calculator\Calculator\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件          0  2016-04-11 10:09  Calculator\Calculator\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs

     文件          0  2016-04-11 10:09  Calculator\Calculator\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs

     文件          0  2016-04-11 10:09  Calculator\Calculator\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs

     文件        520  2016-04-11 12:24  Calculator\Calculator\obj\Release\Calculator.csproj.FileListAbsolute.txt

     文件       1012  2016-04-11 12:24  Calculator\Calculator\obj\Release\Calculator.csproj.GenerateResource.Cache

............此处省略31个文件信息

评论

共有 条评论