// Initialize Objects and add notify events private FlightModel() { netClient = new FlightNetClient(); fileIterator = new FlightDataIterator(); dataParser = new XMLParser(); dataAnalyzer = new DataAnalyzer(); libLoader = new LibraryLoader(); anomalyAnalyzer = new AnomalyAnalyzer(libLoader); selectedPlot = new MonitorGraph(dataAnalyzer, fileIterator); correlatedPlot = new MonitorGraph(dataAnalyzer, fileIterator); anomalyPlot = new AnomalyGraph(dataAnalyzer, fileIterator, anomalyAnalyzer); simPlayer = new FlightSimPlayer(netClient, fileIterator); joystick = new FlightJoystick(fileIterator, dataAnalyzer); dashboard = new FlightDashboard(fileIterator, dataAnalyzer); // add notify events simPlayer.PropertyChanged += PropertyChangedFunction; joystick.PropertyChanged += PropertyChangedFunction; dashboard.PropertyChanged += PropertyChangedFunction; }
public AnomalyGraph(DataAnalyzer dataAnalyzer, IFileIterator fileIterator, AnomalyAnalyzer anomalyAnalyzer) : base(dataAnalyzer, fileIterator) { // use an anomaly analyzer to handle anomaly related functions this.anomalyAnalyzer = anomalyAnalyzer; // initialize lineseries for recent points and anomaly points // style with LineStyle=None const int MARKER_SIZE = 3; pointSeries = new LineSeries { Title = "recent data samples", LineStyle = LineStyle.None, MarkerType = MarkerType.Circle, MarkerSize = MARKER_SIZE, Color = OxyColors.SlateGray, MarkerFill = OxyColors.SlateGray, }; plotModel.Series.Add(pointSeries); anomalySeries = new LineSeries { Title = "anomalies", LineStyle = LineStyle.None, MarkerType = MarkerType.Circle, MarkerSize = MARKER_SIZE, Color = OxyColor.FromRgb(255, 128, 128), MarkerFill = OxyColor.FromRgb(255, 128, 128), }; plotModel.Series.Add(anomalySeries); // initialize the axes // y axis plotModel.Axes[0].TextColor = OxyColors.White; plotModel.Axes[0].LabelFormatter = null; // x axis plotModel.Axes[1].TextColor = OxyColors.White; plotModel.Axes[1].LabelFormatter = null; }