标题:计算机代码 退格的问题!!!?!要疯了 求高手解决
取消只看楼主
W139307
Rank: 1
来 自:大连东软信息学院
等 级:新手上路
帖 子:7
专家分:0
注 册:2011-4-7
结帖率:100%
 问题点数:0 回复次数:1 
计算机代码 退格的问题!!!?!要疯了 求高手解决

            String kk = "";
            String Fh = "";
            double a, b, c;
            long s = 1;
            public Form1()
            {
                InitializeComponent();
            }
            public void dy(double i)
            {
                if (Fh.Equals(""))
                {
                    if (s == 1)
                    {
                        a = a * 10 + i;
                    }
                    else
                    {
                        a = a + i / s;
                        s = s * 10;
                    }
                    textBox1.Text = a.ToString();
                    
                }
                else
                {
                    if (!(c == 0)) { b = 0; c = 0; }
                    if (s == 1)
                    {
                        b = b * 10 + i;
                    }
                    else
                    {
                        if (i == 0)
                        {
                            s = s * 10;
                        }
                        else
                        {
                            b = b + i / s;
                            s = s * 10;
                        }
                    }
                    
                    textBox1.Text = b.ToString();
                    
                        
                }
            }
            public void tuige()
            {
                if (textBox1.Text.Length > 1)
                {
                    if (Fh.Equals(""))
                    {
                        
                        textBox1.Text = textBox1.Text.Substring(0, textBox1.Text.Length - 1);
                        kk = textBox1.Text;
                        double a = Convert.ToDouble(kk);
                        textBox1.Text = a.ToString();                        
                    }
                    else
                    {   
                        textBox1.Text = textBox1.Text.Substring(0, textBox1.Text.Length - 1);
                        kk = textBox1.Text;
                        double b = Convert.ToDouble(kk);
                        textBox1.Text = b.ToString();
                        
                    }

                }

            }怎么让dy中的 textBox1.Text 显示退格后的textBox1.Text 值  我日想了半天了  还没想出来  求高手指点  只是截取了一部分代码
      
搜索更多相关主题的帖子: 计算机 public double 
2011-08-30 10:57
W139307
Rank: 1
来 自:大连东软信息学院
等 级:新手上路
帖 子:7
专家分:0
注 册:2011-4-7
得分:0 
为什么有的时候行 有的时候不行  机子有问题吗
2011-08-30 11:11



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-348689-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.042173 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved