Exemplo n.º 1
0
        public double[] getRadarChartLineValues(string f)
        {
            double[] res = new double[OperateForm.problemCnt];
            try
            {
                for (int i = 0; i < OperateForm.problemCnt; ++i)
                {
                    if (f == "AC")
                    {
                        res[i] = double.Parse(DBTool.getDISTINCTACByNum(i).ToString());
                    }
                    else
                    {
                        res[i] = double.Parse(DBTool.getTotSubmitByNum(i).ToString());
                    }
                }
            }
            catch (Exception e)
            {
                print("网络连接中断!");
                Application.Exit();
            }
            double Max = 1;

            foreach (double it in res)
            {
                Max = Math.Max(Max, it * 1.2);
            }
            for (int i = 0; i < OperateForm.problemCnt; ++i)
            {
                res[i] = res[i] / Max * 100;
            }
            return(res);
        }