private void buttonTree_Click(object sender, RoutedEventArgs e) { mainTable = DecisionTreeService.Group(mainTable); ClearMainDataGrid(); mainDataGrid = DataTableService.InsertDataToGrid(mainTable, mainDataGrid); MessageBox.Show(mainTable.ResultInfo); }
private void buttonGroup_Click(object sender, RoutedEventArgs e) { int sectionCount; if (!Int32.TryParse(textBoxSectionCount.Text, out sectionCount)) { MessageBox.Show("error"); } else { mainTable = KMeansService.Group(mainTable, comboBoxColumn.SelectedIndex, sectionCount); this.Close(); } }
private void buttonImport_Click(object sender, RoutedEventArgs e) { ImportWindow importWindow = new ImportWindow(); if (importWindow.ShowDialog() == false) { if (importWindow.dataWasImported) { if (ValidationService.TableIsValid(importWindow.mainTable)) { mainDataGrid = DataTableService.InsertDataToGrid(importWindow.mainTable, mainDataGrid); mainTable = importWindow.mainTable; } else { MessageBox.Show("W pliku występują braki danych!", "Błąd", MessageBoxButton.OK, MessageBoxImage.Error); } } } }
public KMeansWindow(SWD.Model.Table table) { InitializeComponent(); mainTable = table; comboBoxColumn.ItemsSource = table.Headers.Cells.Select(c => c.Value).ToList(); }