public void changeWaveChart() { int Now_Hit = 0; try { Now_Hit = DBTool.getHitByTime(OperateForm.launch_time); } catch (Exception ex) { print("网络连接中断!"); Application.Exit(); } int Gap = Now_Hit - OperateForm.Tot_Hit; this.ucWaveChartSubmit.AddSource(Gap.ToString(), Gap); OperateForm.Tot_Hit = Now_Hit; }
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]); } }