public static void LogMessage(Model.BMDevice.LogViewModel Log) { if (LogForm != null) { LogForm.AddMessage(Log); } }
private void AddMessage(Model.BMDevice.LogViewModel Log) { this.Invoke((MethodInvoker) delegate { logViewModelBindingSource.Insert(0, Log); dataGridView1.CurrentCell = dataGridView1[0, 0]; dataGridView1.Refresh(); dataGridView1.Invalidate(); }); }