private void SetChart(Chart chart)
 {
     chart.Series[0].XValueType = ChartValueType.DateTime;
     chart.ChartAreas[0].AxisX.LabelStyle.Format = "dd/MM/yyyy" +
                                                   System.Environment.NewLine + "hh:mm:ss";
     chart.DataSource = PerformanceAccess.GetAll();
 }
예제 #2
0
        private static void OnTimedEvent(Object source, ElapsedEventArgs eventsArgs)
        {
            //var tableAdapter = new DataCollectedTableAdapter();
            //tableAdapter.InsertNewRecord(GetCpuValue(), GetMemValue(), DateTime.Now);

            PerformanceAccess.Save(Common.Utils.GetCpuValue(),
                                   Common.Utils.GetMemValue(), DateTime.Now);
        }
        private void MonitorEngineForm_Load(object sender, EventArgs e)
        {
            dataGridViewPerformance.DataSource = PerformanceAccess.GetAll();
            dataGridViewLogs.DataSource        = AuditLogAccess.GetAll();


            SetChart(chart1);
            SetChart(chart2);

            SetUpPerformanceDataGridView();
            SetUpLogsDataGridView();
        }
 private static void OnTimedEvent(Object source, ElapsedEventArgs eventsArgs)
 {
     PerformanceAccess.Save(Common.Utils.GetCpuValue(),
                            Common.Utils.GetMemValue(), DateTime.Now);
 }