Esempio n. 1
0
        private void btnFind_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;

            TimeSpan d = this.dtpEnd.Value - this.dtpStart.Value;

            days = d.Days + 1;
            string fileName = null;

            Lottery lottery = new LotteryFF();
            Tendency <Tendency2Model> tendency    = new Tendency <Tendency2Model>();
            Tendency2Model            maxTendency = null;

            maxTendencys.Clear();
            for (int i = 0; i < days; i++)
            {
                fileName = Param.FileBase + @"分分彩\" + "ffcp" + this.dtpStart.Value.AddDays(i).ToString("yyyyMMdd") + ".txt";
                if (!File.Exists(fileName))
                {
                    continue;
                }
                coreMethod.ReadFile(this.dtpStart.Value.AddDays(i), lottery, fileName);//读取文件
                coreMethod.AnalyzeTendency(lottery, tendency, num1, num2);
                maxTendency       = GetMaxTendency(tendency);
                maxTendency.Dtime = this.dtpStart.Value.AddDays(i).ToString("yyyyMMdd");
                maxTendency.Sno   = this.dtpStart.Value.AddDays(i).DayOfWeek.ToString();
                maxTendencys.Add(maxTendency);
            }

            maxTendency = GetMaxTendency(maxTendencys);

            if (maxTendencys.Count > 0)
            {
                initDgv1(maxTendencys, maxTendency);
            }
            this.Cursor = null;
        }