我用C# 语言写得计算器不能连续的加减,谁能帮我看一下问题出在什么地方吗?

来源:百度知道 编辑:UC知道 时间:2024/05/30 15:15:33
namespace WinJsq
{
public partial class 计算器 : Form
{
string FsNumber = ""; //第一个数
string SyNumber = ""; //第二个数
string operation = "";

private............ //等于按钮
{
if (operation != "")
{
if (SyNumber != "")
{
switch (operation)
{
case "+":
FsNumber = Convert.ToString(Convert.ToDouble(FsNumber) + Convert.ToDouble(SyNumber));
textBox1.Text = FsNumber;
SyNumber = "";
break;
case "-":
.......
case "*":

public partial class Form1 : Form
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;

/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region Windows 窗体设计器生成的代码

/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button(