public TestDataWindow(string username, int birthYear, int weight, bool isMan, int maxIntervals, bool hasSteadyState, double vo2) { InitializeComponent(); this.username = username; this.birthYear = birthYear; this.weight = weight; this.isMan = isMan; this.hasSteadyState = hasSteadyState; this.vo2 = vo2; this.testData = new ÄstrandTest(); this.maxIntervals = maxIntervals; con_TestData.Header = $"Cliënt data [{username}]"; this.heartrateChart = new LiveChartControl("Hartslag", "", "sl/pm", 40, 400, 200, this.maxIntervals, LiveChart.BlueGreenDarkTheme, true, true, true, true, false, true, true); this.distanceChart = new LiveChartControl("Afstand", "", "meters", 40, 400, 200, this.maxIntervals, LiveChart.BlueGreenDarkTheme, true, true, true, true, false, true, true); this.speedChart = new LiveChartControl("Snelheid", "", "m/s", 40, 400, 200, this.maxIntervals, LiveChart.BlueGreenDarkTheme, true, true, true, true, false, true, true); this.cycleRhythmChart = new LiveChartControl("Rotaties per minuut", "", "rpm", 40, 400, 200, this.maxIntervals, LiveChart.BlueGreenDarkTheme, true, true, true, true, false, true, true); grd_Grid.Children.Add(this.heartrateChart); grd_Grid.Children.Add(this.distanceChart); grd_Grid.Children.Add(this.speedChart); grd_Grid.Children.Add(this.cycleRhythmChart); Grid.SetColumn(this.heartrateChart, 0); Grid.SetColumn(this.distanceChart, 1); Grid.SetColumn(this.speedChart, 0); Grid.SetColumn(this.cycleRhythmChart, 1); Grid.SetRow(this.heartrateChart, 0); Grid.SetRow(this.distanceChart, 0); Grid.SetRow(this.speedChart, 1); Grid.SetRow(this.cycleRhythmChart, 1); lbl_Username.Content = username; lbl_BirthYear.Content = birthYear; lbl_Weight.Content = weight; lbl_Gender.Content = (isMan) ? "Man" : "Vrouw"; lbl_SteadyState.Content = (hasSteadyState) ? "JA" : "NEE"; lbl_VO2.Content = vo2; if (!hasSteadyState) { lbl_SteadyStateNotification.Content = "Er was geen steady state behaald, VO2max waarde is niet betrouwbaar!"; } }
public MainWindow(ÄstrandClient astrandClient) { InitializeComponent(); this.astrandClient = astrandClient; this.astrandClient.SetConnector(this); this.dataManager = new DataManager(this.astrandClient, this); this.liveChartControl = new LiveChartControl("Hartslag", "", "sl/pm", 40, 250, 180, 20, LiveChart.BlueGreenDarkTheme, true, true, true, true, false, true, true); Grid.SetColumn(this.liveChartControl, 1); grd_DataGrid.Children.Add(this.liveChartControl); this.bikeIsConnected = false; this.testInProgress = false; this.Closed += MainWindow_Closed; this.KeyUp += MainWindow_KeyUp; }
public TestDataControl() { this.DataContext = this; this.grid = new Grid(); ColumnDefinition detailsColumn = new ColumnDefinition(); detailsColumn.Width = new GridLength(200); this.grid.ColumnDefinitions.Add(detailsColumn); this.grid.ColumnDefinitions.Add(new ColumnDefinition()); this.grid.RowDefinitions.Add(new RowDefinition()); SetupLabels(); this.detailsPanel = new StackPanel(); this.detailsPanel.Children.Add(this.heartrateLabel); this.detailsPanel.Children.Add(this.heartrateDisplay); this.detailsPanel.Children.Add(this.distanceLabel); this.detailsPanel.Children.Add(this.distanceDisplay); this.detailsPanel.Children.Add(this.speedLabel); this.detailsPanel.Children.Add(this.speedDisplay); this.detailsPanel.Children.Add(this.cycleRhythmLabel); this.detailsPanel.Children.Add(this.cycleRhythmDisplay); this.liveChartControl = new LiveChartControl("Hartslag", "", "", 40, 400, 200, 20, LiveChart.BlueGreenDarkTheme, true, true, true, true, false, false, true); this.grid.Children.Add(this.detailsPanel); this.grid.Children.Add(this.liveChartControl); BindingOperations.SetBinding(this.heartrateDisplay, Label.ContentProperty, new Binding("Heartrate")); BindingOperations.SetBinding(this.distanceDisplay, Label.ContentProperty, new Binding("Distance")); BindingOperations.SetBinding(this.speedDisplay, Label.ContentProperty, new Binding("Speed")); BindingOperations.SetBinding(this.cycleRhythmDisplay, Label.ContentProperty, new Binding("CycleRhythm")); Grid.SetColumn(this.detailsPanel, 0); Grid.SetColumn(this.liveChartControl, 1); Grid.SetRow(this.detailsPanel, 0); Grid.SetRow(this.liveChartControl, 0); this.Content = this.grid; }
public ClientWindow(HealthCareClient healthCareClient) { InitializeComponent(); this.vrClient = new Client("145.48.6.10", 6666, this, null); this.vrClient.Connect(); this.healthCareClient = healthCareClient; this.healthCareClient.SetReciever(this); this.dataManager = new DataManager(this.healthCareClient, this); GetCurrentSessions(); this.liveChartControl = new LiveChartControl("Hartslag", "", "", 40, 250, 180, 20, LiveChart.BlueGreenDarkTheme, true, true, true, true, false, false, true); Grid.SetColumn(this.liveChartControl, 1); grd_DataGrid.Children.Add(this.liveChartControl); this.Closed += ClientWindow_Closed; this.sessionInProgress = false; this.bikeIsConnected = false; this.lastChatMessage = ""; this.KeyUp += ClientWindow_KeyUp; }