/// <summary> /// ParamViewer Constructor /// </summary> public void Display(object sender, ChartDirector.WinHotSpotEventArgs e) { // Add the name of the ChartViewer control that is being clicked listView.Items.Add(new ListViewItem(new string[] { "source", ((ChartDirector.WinChartViewer)sender).Name })); // List out the parameters of the hot spot foreach (DictionaryEntry key in e.GetAttrValues()) { listView.Items.Add(new ListViewItem( new string[] { (string)key.Key, (string)key.Value })); } // Display the form ShowDialog(); }
/// <summary> /// ParamViewer Constructor /// </summary> public void Display(object sender, ChartDirector.WinHotSpotEventArgs e) { // Add the name of the ChartViewer control that is being clicked //listView.Items.Add(new ListViewItem(new string[] {"source", // ((ChartDirector.WinChartViewer)sender).Name})); Hashtable entry = e.GetAttrValues(); // List out the parameters of the hot spot foreach (DictionaryEntry key in entry) { if (key.Key.ToString() == "噪声幅度") { listView.Items.Add(new ListViewItem( new string[] { (string)key.Key, (string)key.Value + "%" })); } else if (key.Key.ToString() == "噪声频率") { listView.Items.Add(new ListViewItem( new string[] { (string)key.Key, (string)key.Value + "Hz" })); } else if (key.Key.ToString() == "采集时间") { listView.Items.Add(new ListViewItem( new string[] { (string)key.Key, (string)key.Value })); } else if (key.Key.ToString() == "数据值") { listView.Items.Add(new ListViewItem( new string[] { (string)key.Key, (string)key.Value })); } else if (key.Key.ToString() == "数据序号") { listView.Items.Add(new ListViewItem( new string[] { (string)key.Key, (string)key.Value })); } //else if (key.Key.ToString() == "coords") // listView.Items.Add(new ListViewItem( // new string[] { "鼠标位置", (string)key.Value })); } // Display the form ShowDialog(); }