SECI  1
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
SECI_Errors.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Drawing;
5 using System.Data;
6 using System.Text;
7 using System.Windows.Forms;
8 
9 namespace Sample_Environment_Control_Interface.Dialogs.Messages
10 {
11  public partial class SECI_Errors : UserControl
12  {
13  private delegate void addMessageDelegate(String date, String time, String source, String message);
14 
15  public SECI_Errors()
16  {
17  InitializeComponent();
18  }
19 
20  private void SECI_Errors_Load(object sender, EventArgs e)
21  {
22  //Disable datagrid sorting
23  foreach (DataGridViewColumn i in dataGridView1.Columns)
24  {
25  i.SortMode = DataGridViewColumnSortMode.NotSortable;
26  }
27  }
28 
29  public void addMessage(String date, String time, String source, String message)
30  {
31  Invoke(new addMessageDelegate(addRow),date, time, source, message);
32  }
33 
34  private void addRow(String date, String time, String source, String message)
35  {
36  dataGridView1.Rows.Insert(0, date.Trim(), time.Trim(), source.Trim(), message.Trim());
37  }
38  }
39 }
void addRow(String date, String time, String source, String message)
Definition: SECI_Errors.cs:34
void addMessage(String date, String time, String source, String message)
Definition: SECI_Errors.cs:29