Beispiel #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();
                }
            }
        }
Beispiel #2
0
        private void button1vsAll_Click(object sender, EventArgs e)
        {
            var addDialog = new AddTo1vsAllDialog();

            addDialog.Text = "Show one vs rest";
            if (listViewDataFiles.SelectedItems.Count > 0)
            {
                var oneVersusAllDialog = new OneVersusAllDialog();
                var item     = listViewDataFiles.SelectedItems[0];
                var dataFile = m_Files[item];
                oneVersusAllDialog.Text = string.Format("One versus rest({0}): {1}", OneVRestCount++, dataFile.Name);
                addDialog.SetDataFile(dataFile, false);
                var res = addDialog.ShowDialog(this);
                if (res == System.Windows.Forms.DialogResult.OK)
                {
                    var           lists = dataFile.ConvertToOneVsAllDataSeries(addDialog.GroupBy, addDialog.HorizontalDim, addDialog.VerticalDim, 10);
                    OneVsAllModel model = new OneVsAllModel(lists, addDialog.HorizontalDim, addDialog.VerticalDim);
                    oneVersusAllDialog.SetModel(model);
                    oneVersusAllDialog.Show(this);
                    oneVersusAllDialog.BringToFront();
                }
            }
        }