This commit is contained in:
Luc 2021-04-28 14:14:12 +02:00
parent f27ed26b20
commit 5ac8a9ae35
4 changed files with 42 additions and 29 deletions

View file

@ -23,8 +23,7 @@ namespace eDosStation
Boolean Inst1 = false, Inst2 = false; Boolean Inst1 = false, Inst2 = false;
private System.Threading.Tasks.Task ReaderTask =null; private System.Threading.Tasks.Task ReaderTask =null;
private DataInterface dataInterface; private DataInterface dataInterface;
public LSWDesfirePublic.CCard dfReader = null;
public static LSWDesfirePublic.CCard dfReader;
//System.Threading.Thread t; //System.Threading.Thread t;
//bool nextCSN = false; //bool nextCSN = false;
//bool nextSite = false; //bool nextSite = false;
@ -36,6 +35,7 @@ namespace eDosStation
DataSet1.GetTaskInfoRow CurTaskRow; DataSet1.GetTaskInfoRow CurTaskRow;
enum eCOE { quiz=1} ; enum eCOE { quiz=1} ;
#if SimulateEPD #if SimulateEPD
public SimulateData simulData = new SimulateData(); public SimulateData simulData = new SimulateData();
@ -384,23 +384,24 @@ namespace eDosStation
} }
public void showBadge(int persID, string csn) public void showBadge(int persID, string csn)
{ {
CSN.Text = csn; CSN.Text = csn;
Site.Text = string.Empty; Site.Text = string.Empty;
Code.Text = persID.ToString(); Code.Text = persID.ToString();
Dispatcher.Invoke(CheckBadge); Dispatcher.Invoke(CheckBadge);
} }
public void endPage() public void endPage()
{ {
dfReader.Dispose(); dfReader.CancelWait();
this.Close(); this.Close();
} }
private void bClose_Click(object sender, RoutedEventArgs e) private void bClose_Click(object sender, RoutedEventArgs e)
{ {
dfReader?.Dispose(); dfReader = null;
this.Close(); this.Close();
} }
private void BClear_Click(object sender, RoutedEventArgs e) private void BClear_Click(object sender, RoutedEventArgs e)
{ {
CSN.Text = string.Empty; CSN.Text = string.Empty;
@ -520,7 +521,6 @@ namespace eDosStation
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{ {
dfReader?.Dispose(); dfReader = null;
ep.Close(); ep.Close();
} }

View file

@ -21,23 +21,33 @@
<RowDefinition /> <RowDefinition />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" /> <ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" /> <ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<CheckBox Grid.Row="0" Grid.Column="0" Content="Issued" IsChecked="False" Name ="isIssued"/> <TextBlock Grid.Row="0" Grid.Column="0" Text="Wearer" />
<TextBlock Grid.Row="0" Grid.Column="1" Name ="Wearer" Text=""/> <TextBlock Grid.Row="0" Grid.Column="1" Name ="Wearer" Text=""/>
<TextBlock Grid.Row="0" Grid.Column="2" Name ="EpdVisit" Text=""/>
<StackPanel Grid.Row="1" Grid.Column="0">
<CheckBox Content="Alarm" Name="cAlarm" HorizontalContentAlignment="Left" />
<StackPanel Name="sAlarm" Margin="50,0,20,0"/>
</StackPanel>
<TextBlock Grid.Row="2" Grid.Column="0" Text="Dose" Margin="5,10,0,0" /> <TextBlock Grid.Row="0" Grid.Column="2" Text ="EpdVisit" />
<StackPanel Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Vertical" Margin="5,10,0,0"> <TextBlock Grid.Row="0" Grid.Column="3" Name ="EpdVisit" Text=""/>
<Line Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="4" Stroke="Black" Width="10" />
<TextBlock Grid.Row="2" Grid.Column="0" Text="is Issued ?" />
<TextBlock Grid.Row="2" Grid.Column="1" Text="no" Name ="isIssued" />
<TextBlock Grid.Row="3" Grid.Column="0" Text="has Alarm ?" />
<TextBlock Grid.Row="3" Grid.Column="1" Text="no" Name ="hasAlarm"/>
<StackPanel Grid.Row="3" Grid.Column="2" Grid.ColumnSpan="2" Name="sAlarm" Margin="50,0,20,0"/>
<TextBlock Grid.Row="4" Grid.Column="0" Text="Dose" Margin="5,10,0,0" />
<StackPanel Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="3" Orientation="Vertical" Margin="5,10,0,0">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Name="HpDose07l" Width="200"/> <TextBlock Name="HpDose07l" Width="200"/>
<TextBlock Name="HpDose07" /> <TextBlock Name="HpDose07" />
@ -48,8 +58,8 @@
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<TextBlock Grid.Row="4" Grid.Column="0" Text="Dose Treshold" /> <TextBlock Grid.Row="6" Grid.Column="0" Text="Dose Treshold" />
<StackPanel Grid.Row="4" Grid.Column="1" Orientation="Vertical" > <StackPanel Grid.Row="6" Grid.Column="1" Orientation="Vertical" >
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Name="HP07AlarmDosel" Width="200" /> <TextBlock Name="HP07AlarmDosel" Width="200" />
<TextBlock Name="HP07AlarmDose" /> <TextBlock Name="HP07AlarmDose" />

View file

@ -37,15 +37,16 @@ namespace eDosStation
{ {
ep.GetStatus(); ep.GetStatus();
isIssued.IsChecked = ep.Issued; isIssued.Text = ep.Issued ? "Yes" : "no";
Wearer.Text = ep.WearerName; Wearer.Text = ep.WearerName;
EpdVisit.Text = $"Visit {ep.WearerID}"; EpdVisit.Text = ep.WearerID.ToString();
if ((ep.otherAlarms & 0x7f)!=0 || ep.alarmStatus>0) if ((ep.otherAlarms & 0x7f)!=0 || ep.alarmStatus>0)
{ {
cAlarm.IsChecked = true; hasAlarm.Text = "Yes";
} else } else
cAlarm.IsChecked = false; hasAlarm.Text = "no";
Decoder.AlarmToTextBox(sAlarm, ep); Decoder.AlarmToTextBox(sAlarm, ep);

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\LSWLib.1.0.8\build\LSWLib.props" Condition="Exists('..\packages\LSWLib.1.0.8\build\LSWLib.props')" />
<Import Project="..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.props" Condition="Exists('..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.props')" /> <Import Project="..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.props" Condition="Exists('..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.props')" />
<Import Project="..\packages\LSWLib.1.0.8\build\LSWLib.props" Condition="Exists('..\packages\LSWLib.1.0.8\build\LSWLib.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -90,7 +90,9 @@
<ManifestTimestampUrl>http://timestamp.digicert.com</ManifestTimestampUrl> <ManifestTimestampUrl>http://timestamp.digicert.com</ManifestTimestampUrl>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System">
<HintPath>..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
@ -301,14 +303,14 @@
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.VisualStudio.SlowCheetah.3.2.26\build\Microsoft.VisualStudio.SlowCheetah.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.VisualStudio.SlowCheetah.3.2.26\build\Microsoft.VisualStudio.SlowCheetah.targets'))" /> <Error Condition="!Exists('..\packages\Microsoft.VisualStudio.SlowCheetah.3.2.26\build\Microsoft.VisualStudio.SlowCheetah.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.VisualStudio.SlowCheetah.3.2.26\build\Microsoft.VisualStudio.SlowCheetah.targets'))" />
<Error Condition="!Exists('..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.props'))" />
<Error Condition="!Exists('..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.targets'))" />
<Error Condition="!Exists('..\packages\LSWLib.1.0.8\build\LSWLib.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWLib.1.0.8\build\LSWLib.props'))" /> <Error Condition="!Exists('..\packages\LSWLib.1.0.8\build\LSWLib.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWLib.1.0.8\build\LSWLib.props'))" />
<Error Condition="!Exists('..\packages\LSWLib.1.0.8\build\LSWLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWLib.1.0.8\build\LSWLib.targets'))" /> <Error Condition="!Exists('..\packages\LSWLib.1.0.8\build\LSWLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWLib.1.0.8\build\LSWLib.targets'))" />
<Error Condition="!Exists('..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.props'))" />
<Error Condition="!Exists('..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.targets'))" />
</Target> </Target>
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>"C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /sha1 857150b64ef7d3e679c8cbde425d2a0b5e58ffaa /fd sha256 /d "Integrity &amp; Authenticity" /tr "http://timestamp.digicert.com" $(TargetPath)</PostBuildEvent> <PostBuildEvent>"C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /sha1 857150b64ef7d3e679c8cbde425d2a0b5e58ffaa /fd sha256 /d "Integrity &amp; Authenticity" /tr "http://timestamp.digicert.com" $(TargetPath)</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<Import Project="..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.targets" Condition="Exists('..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.targets')" />
<Import Project="..\packages\LSWLib.1.0.8\build\LSWLib.targets" Condition="Exists('..\packages\LSWLib.1.0.8\build\LSWLib.targets')" /> <Import Project="..\packages\LSWLib.1.0.8\build\LSWLib.targets" Condition="Exists('..\packages\LSWLib.1.0.8\build\LSWLib.targets')" />
<Import Project="..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.targets" Condition="Exists('..\packages\LSWDesfirePublic.1.3.4\build\LSWDesfirePublic.targets')" />
</Project> </Project>