private void buttonSplatter_Click(object sender, EventArgs e) { var dialog = new AddTo1vsAllDialog(); dialog.Text = "Show single splatterplot"; if (listViewDataFiles.SelectedItems.Count > 0) { var item = listViewDataFiles.SelectedItems[0]; var dataFile = m_Files[item]; dialog.SetDataFile(dataFile, true); var res = dialog.ShowDialog(this); if (res == System.Windows.Forms.DialogResult.OK) { var schema = new DataFileSchema(dataFile); schema.GroupBy = dialog.GroupBy; var list = dataFile.ConvertToDataSeries(schema, -1); SplatterModel model = new SplatterModel(list, dialog.HorizontalDim, dialog.VerticalDim, true); var splatterDialog = new SingleSplatterDialog(); splatterDialog.Text = string.Format("Splatterplot ({0}): {1}", SplatterCount++, dataFile.Name); splatterDialog.SetModel(model); splatterDialog.Show(); splatterDialog.BringToFront(); } } }
void view_DoubleClick(object sender, EventArgs e) { var view = sender as SplatterView; if (view != null) { SingleSplatterDialog.SetModel(view.Model); SingleSplatterDialog.Show(); SingleSplatterDialog.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()); } }