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

            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
qq1023569223
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
来 自:湖南科技大学
等 级:贵宾
威 望:26
帖 子:2753
专家分:13404
注 册:2010-12-22
得分:0 
没看懂你的意思!

   唯实惟新 至诚致志
2011-08-30 18:20
winners
Rank: 6Rank: 6
来 自:济南
等 级:侠之大者
威 望:1
帖 子:105
专家分:416
注 册:2009-3-20
得分:0 
你的代码就一个textbox,退格那部分不是已经给Textbox赋值了吗?有必要再在dy中赋值吗
2011-08-31 07:30



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




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

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