91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 475KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-28
  • 語言: C#
  • 標(biāo)簽: c#??

資源簡介

C# 計算器 仿windows計算器,支持小數(shù)點計算,不支持鍵盤輸入

資源截圖

代碼片段和文件信息

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?計算器
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}

????????double?sum?=?0;//上一步運算結(jié)果
????????string?op?=?““?ops?=?““;//選擇的運算符
????????string?old_op?=?““;//換運算符
????????int?op_times=1;//單次計算的運算符按下次數(shù)
????????int?times?=?0;//計算次數(shù)
????????bool?restart?=?false;//按下等于號

????????//輸入數(shù)
????????private?void?button_number(object?sender?EventArgs?e)
????????{
????????????Button?button?=?(Button)sender;

????????????//輸入
????????????if?(ops?==?““?)
????????????{
????????????????if?(label.Text?==?“0“?||?restart)
????????????????{
????????????????????if(button.Text==“.“)
????????????????????{
????????????????????????label.Text?=?“0“+button.Text;
????????????????????}
????????????????????else
????????????????????{
????????????????????????label.Text?=?button.Text;
????????????????????}
????????????????????restart?=?false;
????????????????}
????????????????else
????????????????{
????????????????????label.Text?=?label.Text?+?button.Text;
????????????????}
????????????????
????????????}
????????????else
????????????{
????????????????op?=?ops;
????????????????ops?=?““;
????????????????if?(button.Text?==?“.“)
????????????????{
????????????????????label.Text?=?“0“?+?button.Text;
????????????????}
????????????????else
????????????????{
????????????????????label.Text?=?button.Text;
????????????????}
????????????????op_times?=?1;
????????????????times++;
????????????}


????????????//小數(shù)點無法點擊
????????????if?(label.Text.IndexOf(“.“)?==?-1)
????????????????button19.Enabled?=?true;
????????????else
????????????????button19.Enabled?=?false;
????????}

????????//操作符號
????????private?void?button_op(object?sender?EventArgs?e)
????????{
????????????Button?button?=?(Button)sender;
????????????//運算符
????????????if?(button.Text?!=?“=“)
????????????{
????????????????ops?=?button.Text;
????????????????if(times<1)
????????????????{
????????????????????sum?=?Convert.ToDouble(label.Text);
????????????????}
????????????????//判斷按下符號位時只出現(xiàn)一次
????????????????if(op_times==1)
????????????????{
????????????????????labels.Text?=?labels.Text?+?label.Text?+?ops;
????????????????????old_op?=?ops;
????????????????????op_times?=?0;
????????????????}
????????????????else
????????????????{
????????????????????labels.Text?=?labels.Text.Replace(old_op?ops);
????????????????????old_op?=?ops;
????????????????}
????????????????//運算符計算
????????????????if?(times?>=?1)
????????????????{
????????????????????operation(sum?Convert.ToDouble(label.Text)?op);
????????????????????label.Text?=?Convert.ToString(sum);
????????????????}

????????????}
????????????//等于號
????????????else?if?(button.Text?==?“=“)?
?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-10-29?16:40??計算器\
?????目錄???????????0??2018-10-29?16:40??計算器\.vs\
?????目錄???????????0??2018-10-29?16:40??計算器\.vs\計算器\
?????目錄???????????0??2018-10-29?16:41??計算器\.vs\計算器\v15\
?????文件???????56832??2018-12-12?22:35??計算器\.vs\計算器\v15\.suo
?????目錄???????????0??2018-10-29?16:41??計算器\.vs\計算器\v15\Server\
?????目錄???????????0??2018-10-29?16:41??計算器\.vs\計算器\v15\Server\sqlite3\
?????文件???????????0??2018-10-29?16:41??計算器\.vs\計算器\v15\Server\sqlite3\db.lock
?????文件??????581632??2018-10-30?16:31??計算器\.vs\計算器\v15\Server\sqlite3\storage.ide
?????文件???????32768??2018-12-12?20:10??計算器\.vs\計算器\v15\Server\sqlite3\storage.ide-shm
?????文件?????4128272??2018-11-04?21:10??計算器\.vs\計算器\v15\Server\sqlite3\storage.ide-wal
?????目錄???????????0??2018-12-12?20:08??計算器\計算器\
?????目錄???????????0??2018-11-02?20:40??計算器\計算器\.git\
?????文件??????????23??2018-11-02?20:40??計算器\計算器\.git\HEAD
?????文件?????????190??2018-11-02?20:40??計算器\計算器\.git\config
?????文件??????????73??2018-11-02?20:40??計算器\計算器\.git\description
?????目錄???????????0??2018-11-02?20:40??計算器\計算器\.git\hooks\
?????文件?????????478??2018-11-02?20:40??計算器\計算器\.git\hooks\applypatch-msg.sample
?????文件?????????896??2018-11-02?20:40??計算器\計算器\.git\hooks\commit-msg.sample
?????文件????????3327??2018-11-02?20:40??計算器\計算器\.git\hooks\fsmonitor-watchman.sample
?????文件?????????189??2018-11-02?20:40??計算器\計算器\.git\hooks\post-update.sample
?????文件?????????424??2018-11-02?20:40??計算器\計算器\.git\hooks\pre-applypatch.sample
?????文件????????1638??2018-11-02?20:40??計算器\計算器\.git\hooks\pre-commit.sample
?????文件????????1348??2018-11-02?20:40??計算器\計算器\.git\hooks\pre-push.sample
?????文件????????4898??2018-11-02?20:40??計算器\計算器\.git\hooks\pre-rebase.sample
?????文件?????????544??2018-11-02?20:40??計算器\計算器\.git\hooks\pre-receive.sample
?????文件????????1492??2018-11-02?20:40??計算器\計算器\.git\hooks\prepare-commit-msg.sample
?????文件????????3610??2018-11-02?20:40??計算器\計算器\.git\hooks\update.sample
?????目錄???????????0??2018-11-02?20:40??計算器\計算器\.git\info\
?????文件?????????240??2018-11-02?20:40??計算器\計算器\.git\info\exclude
?????目錄???????????0??2018-11-02?20:40??計算器\計算器\.git\objects\
............此處省略58個文件信息

評論

共有 條評論