public FormWav(Device dev) : this() { this.device = dev; for (int i = 0; i < listChart.Count; i++) { ChartGraph chart = listChart[i]; UltraChart.CurveGroup grp = chart.AddNewGroup(); grp.XAxes.MaxScale = 100000000L; grp.XAxes.MinScale = 100; grp.XAxes.SetScale(100000); grp.XAxes.SetOrgTime(ChartGraph.DateTime2ChartTime(DateTime.Now), 0); grp.CursorType = CurveCursorType.CURSOR_CROSSLINE; grp.XAxes.XAxesMode = XAxesMode.Relative; grp.DrawPointFlagXAxesScale = 500; } }
static void Main(string[] args) { Device dev = new Device(); dev.IniPort("COM21", 57600); byte[] cmd = new byte[] { }; if (dev.WriteChannelInformation(cmd, 3000)) { Console.WriteLine("设置成功"); } else { Console.WriteLine("设置失败"); } AutoResetEvent[] arr=new AutoResetEvent[5]; switch (AutoResetEvent.WaitAny(arr)) { } }