private void Monitor_MonitorReceived(object sender, CSRedis.RedisMonitorEventArgs e) { if (this.InvokeRequired) { this.Invoke(new MethodInvoker(() => { switch (tscbSources.SelectedIndex) { case 1: //不显示心跳包 string[] strList = e.Message.ToString().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); if (!strList[strList.Length - 1].Equals("\"PING\"")) { listBox1.Items.Insert(0, e.Message); } break; default: listBox1.Items.Insert(0, e.Message); break; } } )); } else { listBox1.Items.Insert(0, e.Message); } }
private void Monitor_MonitorReceived(object sender, CSRedis.RedisMonitorEventArgs e) { Console.WriteLine(e.Message); }