void view_PointSelection(object sender, EventArgs e) { if (m_SingleSplatterDialog != null) { m_SingleSplatterDialog.Refresh(); } m_Views.ForEach(v => v.Refresh()); DataTable view = null; foreach (var series in m_Series.Values) { if (view == null) { var list = series.GetSelectedRows(); if (list.Count() > 0) { view = list.CopyToDataTable(); } } else { series.GetSelectedRows().CopyToDataTable(view, LoadOption.PreserveChanges); } } SelectionTableDialog.SetDataView(view); if (!SelectionTableDialog.Visible) { SelectionTableDialog.Show(); } SelectionTableDialog.BringToFront(); }
private void listView1_DoubleClick(object sender, EventArgs e) { var selected = listView1.SelectedItems[0]; var color = selected.BackColor; colorDialog1.Color = color; var result = colorDialog1.ShowDialog(); if (result == System.Windows.Forms.DialogResult.OK) { selected.BackColor = colorDialog1.Color; if (selected.Name == m_Model.OthersName) { m_Model.SetOTherColor(colorDialog1.Color); } else { m_Series[selected].Color = colorDialog1.Color; } listView1.SelectedItems.Clear(); SingleSplatterDialog.Refresh(); m_Views.ForEach(v => v.Refresh()); } }