private void InitializeTrackChart() { trackChart = new TrackChart(); TrackGrid.Children.Add(trackChart); var track = DriverlessTrackManager.GetTrack("Straight"); if (track != null) { trackChart.AddTrackLayout(ConvertChannelDataToPlotData(track.LeftSide), ConvertChannelDataToPlotData(track.RightSide), ConvertChannelDataToPlotData(track.Center)); } else { throw new Exception("Straight track can't be found!"); } }
public MainWindow() { InitializeComponent(); try { ConfigurationManager.LoadConfigurations(Path.Combine(MakeDirectoryPath("configuration_files"), TextManager.ConfigurationFileName)); Title = $"Telemetry {ConfigurationManager.Version}"; } catch (Exception exception) { ShowError.ShowErrorMessage(exception.Message); } try { UnitOfMeasureManager.InitializeUnitOfMeasures(Path.Combine(MakeDirectoryPath("default_files"), TextManager.UnitOfMeasuresFileName)); } catch (Exception exception) { ShowError.ShowErrorMessage(exception.Message); } try { DriverlessTrackManager.LoadTracks(Path.Combine(MakeDirectoryPath("default_files"), TextManager.DriverlessTracksFolderName)); } catch (Exception exception) { ShowError.ShowErrorMessage(exception.Message); } try { GroupManager.InitGroups(Path.Combine(MakeDirectoryPath("default_files"), TextManager.GroupsFileName)); } catch (Exception exception) { ShowError.ShowErrorMessage(exception.Message); } try { DefaultsManager.LoadDefaults(Path.Combine(MakeDirectoryPath("default_files"), TextManager.DefaultFileName)); } catch (Exception exception) { ShowError.ShowErrorMessage(exception.Message); } try { MenuManager.InitMainMenuTabs(MainMenuTabControl); } catch (Exception exception) { ShowError.ShowErrorMessage(exception.Message); } }