This commit is contained in:
shinichi
2020-10-29 17:01:14 +01:00
parent da9d3184a1
commit 6d599cfcd2
6 changed files with 82 additions and 26 deletions

View File

@@ -41,6 +41,8 @@ namespace DoctorApp.ViewModels
public ICommand SetResistance { get; set; }
public ICommand SaveHistoricData { get; set; }
public MainWindowViewModel MainWindowViewModel { get; set; }
private Client client;
@@ -81,13 +83,18 @@ namespace DoctorApp.ViewModels
PatientInfo.Resistance = float.Parse(((TextBox)parameter).Text);
});
this.SaveHistoricData = new RelayCommand<object>((parameter) =>
{
this.client.sendMessage(DataParser.GetGetFileMessage(PatientInfo.Username, DateTime.Now));
});
}
public void BPMData(byte [] bytes)
public void BPMData(byte[] bytes)
{
//TODO
//Parsen van de data you fuck
if(bytes[0] == 0x00)
if (bytes[0] == 0x00)
{
}
@@ -95,13 +102,13 @@ namespace DoctorApp.ViewModels
{
PatientInfo.BPM = bytes[1];
if (MySelectedItem == "BPM")
{
{
Chart.NewValue(PatientInfo.BPM);
}
}
}
public void BikeData(byte[] bytes)

View File

@@ -18,16 +18,20 @@
<RowDefinition Height="180*"/>
<RowDefinition Height="180*"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Grid.RowSpan="2" Margin="0,0,0,22">
<StackPanel.Resources>
<Style TargetType="{x:Type Label}">
<Setter Property="Margin" Value="0,0,20,0"/>
</Style>
</StackPanel.Resources>
<Label Content="{Binding Path=PatientInfo.Username}"/>
<Label Content="{Binding Path=PatientInfo.Status}"/>
</StackPanel>
<StackPanel Margin="0,10,0,0" Grid.RowSpan="2" Grid.Row="1">
<Grid Grid.RowSpan="2" Margin="0,0,0,22">
<StackPanel Orientation="Horizontal" >
<StackPanel.Resources>
<Style TargetType="{x:Type Label}">
<Setter Property="Margin" Value="0,0,20,0"/>
</Style>
</StackPanel.Resources>
<Label Content="{Binding Path=PatientInfo.Username}"/>
<Label Content="{Binding Path=PatientInfo.Status}"/>
</StackPanel>
<Button Content="Save Historic Data" HorizontalAlignment="Right" VerticalAlignment="Center" Padding="5" Command="{Binding SaveHistoricData}"/>
</Grid>
<StackPanel Margin="0,10,0,0" Grid.Row="2">
<StackPanel.Resources>
<Style TargetType="{x:Type DockPanel}">
<Setter Property="Margin" Value="0,20,0,0"/>

View File

@@ -10,7 +10,7 @@
AllowsTransparency="True"
MinHeight="{Binding MinimumHeight}"
MinWidth="{Binding MinimumWidth}"
Title="MainWindow" Height="500" Width="900">
Title="MainWindow" Height="800" Width="1500">
<Window.Resources>
<Style TargetType="{x:Type local:MainWindow}">
<Setter Property="Template">