示例#1
0
        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();
            }
        }