private void changeAnomalyDetectorButton_Click(object sender, RoutedEventArgs e) { if (anomalyCsvPath == normalCsvPath) { System.Windows.MessageBox.Show("You need to load normal flight file in the main window, (the normal csv and the anomaly csv need to be different)", "Alert", MessageBoxButton.OK); return; } AnomalyDetectorLoaderWindow anomalyDetectorWin = new AnomalyDetectorLoaderWindow(this.anomalyCsvPath, this.normalCsvPath); anomalyDetectorWin.ShowDialog(); //exeption might be, because the user didnt enter any dll //update the model accordingly if (anomalyDetectorWin.IsAnomalyDetectorInitiated) { fdm.AnomaliesList = anomalyDetectorWin.getAnomalies(); fdm.CorrlativeCircles = anomalyDetectorWin.getCirclesOfAttr(); } anomalyDetectorWin.Close(); }
private void loadAnomalyDet_Click(object sender, RoutedEventArgs e) { try { this.anomalyDetWin = new AnomalyDetectorLoaderWindow(this.anomalyCsvPath, this.normalCsvPath); anomalyDetWin.ShowDialog(); } catch (Exception exp) { return; } //while (anomalyDetWin.) { } //update the anomalies in deshboard window if (this.dw != null) { Anomalies anomalies = new Anomalies(); if (this.anomalyDetWin.IsAnomalyDetectorInitiated) { anomalies.anomaliesList = this.anomalyDetWin.getAnomalies(); anomalies.anomaliesRangeCircles = this.anomalyDetWin.getCirclesOfAttr(); this.dw.Anomalies = anomalies; //update deshboard windows with the anomalies } } this.anomalyDetWin.Close(); }