Exemple #1
0
        private void modernButton2_Click(object sender, System.EventArgs e)
        {
            Log($"Test#1 Started @{DateTime.Now.ToString("h:mm:ss tt zz")}.");
            //MessageBox.Show(Application.StartupPath + @"\Web\loading.html");
            //new IntroductionWindow().Show();
            var     rand = new Random();
            float   r    = 0f;
            int     rr   = 0;
            var     st   = new Structure.ScoreTable(new Dictionary <string, ScoreModel>(), new InputDataIndicator());
            var     gw   = new GridWindow("测试成绩数据");
            NameGen ng   = new NameGen();

            for (int i = 1; i <= 100; i++)
            {
                r  = rand.Next(0, 1500) / 10f;
                rr = rand.Next(1, 100);
                st.Add(ng.Rand2(), new ScoreModel(rr, rr, r, r, r, r, r, r, r, r, r, rr, rr, rr, rr, rr, rr, rr, rr, rr, rr, rr, rr, rr, rr, rr, rr, rr, rr));
            }
            //st.Add(5001.ToString(), new ScoreModel(rr,rr,r, r, r, r, r, r, r, r, r, rr, rr, rr, rr, rr, rr, rr, rr, rr));
            r = rand.Next(1, 100);
            //MessageBox.Show($"id:{r},zh:{st.Score[r.ToString()].Zh}", "Finished");
            var ex = st.Export();

            foreach (var i in ex)
            {
                gw.DisplayObjectBindingSource.Add(i);
            }
            gw.Show();

            //st.CalcAverage();
        }