public static string strWeight = "";

        private void weight()
        {
            while (true)
            {
                Thread.Sleep(10);
                double s3 = 0.0;
                string s223 = paras.parameter.weight;
                if (s223 == null)
                {
                    continue;
                }
                //else
                //{
                //    s3 = getWeight(s223);
                //}
                if (s3 < 0.018)
                {
                    strWeight = "";
                }

                double dd = 0.0;
                int iTime = 0;
                while (true)
                {
                    Thread.Sleep(10);
                    iTime++;
                    if (iTime > 500)
                    {
                        CodeString2 = "";
                        break;
                    }

                    if (dd > 0.01)
                    {
                        Thread.Sleep(180);
                        s223 = paras.parameter.weight;
                        s3 = getWeight(s223);
                        if (Math.Abs(s3 - dd) < 0.01)
                        {
                            //Thread.Sleep(100);
                            //s223 = paras.parameter.weight;
                            //s3 = getWeight(s223);
                            //if (Math.Abs(s3 - dd) < 0.02)
                            {
                                dd = s3;
                                break;
                            }
                            dd = s3;
                        }
                        dd = s3;
                    }
                    else
                    {
                        s223 = paras.parameter.weight;
                        dd = getWeight(s223);
                    }


                    //s222 = 0.06.ToString();
                }

                strWeight = dd.ToString();
                //tbx_weight.Text = strWeight;
                //tbx_weight .Refresh();
            }
        }

 

注:本篇随笔无甚意义,当时为了摸索博客园怎么用随便写的,如果说它有什么意义,那就是它较准确地记录了我开博的起始时间。

posted on 2016-08-02 09:06  xh6300  阅读(584)  评论(2编辑  收藏  举报