Exemplo n.º 1
0
        public OperateForm()
        {
            InitializeComponent();
            dtFormat.ShortDatePattern = "yyyy-MM-dd HH:mm:ss";

            try
            {
                launch_time = DBTool.getNow();
                Tot_Hit     = DBTool.getHitByTime(launch_time);
                start_time  = Convert.ToDateTime(DBTool.getStartTime(), dtFormat);
                end_time    = Convert.ToDateTime(DBTool.getEndTime(), dtFormat);
                problemCnt  = Math.Min(13, 1 + DBTool.getProblemCnt());
            }
            catch (Exception ex)
            {
                print("网络连接中断!");
                Application.Exit();
            }

            for (int i = 0; i < problemCnt; ++i)
            {
                comboBox1.Items.Add(charMp[i]);
            }
        }