huisstijl

This commit is contained in:
Luc 2021-05-10 13:49:16 +02:00
parent 79df1f57d1
commit e948fab111
7 changed files with 140 additions and 135 deletions

View file

@ -17,12 +17,12 @@
<BitmapImage x:Key="iBG" UriSource="Images/EPD-MK2.png" />
<BitmapImage x:Key="iNG" UriSource="Images/EPD-N2.png" />
</Window.Resources>
<DockPanel>
<DockPanel VerticalAlignment="Top">
<StackPanel DockPanel.Dock="Top" HorizontalAlignment="Left">
<Image Source="/Images/logoh120.png" Height="60"/>
</StackPanel>
<StackPanel DockPanel.Dock="Bottom" HorizontalAlignment="Center">
<StaticResource ResourceKey="tbFooter" />
<!--<StaticResource ResourceKey="tbFooter" />-->
</StackPanel>
<TabControl Name="tb" TabStripPlacement="Top" SelectionChanged="tb_SelectionChanged" VerticalAlignment="Center" >
<TabItem Name="tbEntry" VerticalAlignment="Center" >
@ -52,7 +52,7 @@
</StackPanel>
</TabItem>
<TabItem Name="tbUser" >
<TabItem Name="tbUser" VerticalAlignment="Center" >
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical">
<Border Background="AliceBlue" TextBlock.FontSize="20" Padding="20,20,20,20" >
<StackPanel HorizontalAlignment="Center" >
@ -76,7 +76,7 @@
<telerik:RadButton Content="OK" Name="bUserRead" Click="BUserRead_Click" Style="{DynamicResource OkCancelButton}"/>
</StackPanel>
</TabItem>
<TabItem Name="tbTask">
<TabItem Name="tbTask" VerticalAlignment="Top">
<Grid DataContext="{Binding Mode=OneWay, Source={StaticResource getTaskListViewSource}}" >
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
@ -90,7 +90,7 @@
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.ColumnSpan="2" Text="Naam" Name="Naam" HorizontalAlignment="Stretch" TextAlignment="Center" FontWeight="Bold" Background="Azure" FontSize="15" />
<Border Grid.Row="1" Grid.ColumnSpan="2" Background="AliceBlue" HorizontalAlignment="Stretch" CornerRadius="10" >
<Border Grid.Row="1" Grid.ColumnSpan="2" Background="{StaticResource sckbLB}" HorizontalAlignment="Stretch" CornerRadius="10" VerticalAlignment="Top" >
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
@ -118,7 +118,7 @@
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" TextBlock.FontSize="20" Margin="5,5,5,5" >
<StackPanel Orientation="Horizontal" TextBlock.FontSize="20" Margin="5,5,5,5" Height="20" >
<TextBlock Text="{Binding TaskType_CODE}" Width="60" TextWrapping="NoWrap" FontSize="18" >
<TextBlock.Style>
<Style TargetType="TextBlock">
@ -133,13 +133,11 @@
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Text="{Binding Task_Name}" Width="410" FontSize="17" TextWrapping="Wrap" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<!--<telerik:RadMultiColumnComboBox DisplayMemberPath="Task_Name" Width="700" HorizontalAlignment="Stretch" >
<telerik:RadMultiColumnComboBox.ItemsSourceProvider>
@ -149,19 +147,21 @@
</ScrollViewer>
</StackPanel>
<Grid Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3" Margin="10,10,10,10">
<Grid Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3" Margin="10,10,10,10" TextBlock.FontSize="12" TextBlock.LineHeight="12" >
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Image Grid.Row="0" Grid.RowSpan="3" Height="120" VerticalAlignment="Center" >
<Image Grid.Row="0" Grid.RowSpan="5" Height="60" VerticalAlignment="Center" Margin="5,10,50,5" >
<Image.Style>
<Style TargetType="{x:Type Image}">
<Style.Triggers>
@ -175,45 +175,44 @@
</Style>
</Image.Style>
</Image>
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding ID_Task,StringFormat={}Task:{0}}" />
<TextBlock Grid.Row="0" Grid.Column="2" Text="{Binding Hp07Dose,StringFormat={}Hp07Dose: {0:0.00} µSv}" />
<TextBlock Grid.Row="0" Grid.Column="3" >
<TextBlock.Text>
<MultiBinding StringFormat="{}Hp10Dose L: {0} H: {1} µSv">
<Binding Path="Hp10Dose1" />
<Binding Path="Hp10Dose2" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<TextBlock Grid.Row="1" Grid.Column="0" >
<TextBlock.Text>
<MultiBinding StringFormat="{}Hp07Rate Off: {0} On: {1} µSv">
<Binding Path="HP07RateOFF" />
<Binding Path="HP07RateON" />
</MultiBinding>
</TextBlock.Text>
<TextBlock Grid.Row="1" Grid.Column="1" >
<Run FontWeight="Bold" Text="Task: "/>
<Run Text="{Binding ID_Task,Mode=OneWay}" />
</TextBlock>
<TextBlock Grid.Row="1" Grid.Column="2" >
<TextBlock.Text>
<MultiBinding StringFormat="{}Hp10Rate1 Off: {0} On: {1} µSv">
<Binding Path="HP10Rate1OFF" />
<Binding Path="HP10Rate1ON" />
</MultiBinding>
</TextBlock.Text>
<Run FontWeight="Bold" Text="Hp07Dose: "/>
<Run Text="{Binding Hp07Dose,Mode=OneWay,StringFormat={}{0:0.00} µSv}" />
</TextBlock>
<TextBlock Grid.Row="1" Grid.Column="3" >
<TextBlock.Text>
<MultiBinding StringFormat="{}Hp10Rate2 Off: {0} On: {1} µSv">
<Binding Path="HP10Rate2OFF" />
<Binding Path="HP10Rate2ON" />
</MultiBinding>
</TextBlock.Text>
<Run FontWeight="Bold" Text="Hp10Dose L: "/>
<Run Text="{Binding Hp10Dose1,StringFormat={}{0:0.00} µSv}" />
<Run FontWeight="Bold" Text="H: "/>
<Run Text="{Binding Hp10Dose2,StringFormat={}{0:0.00} µSv}" />
</TextBlock>
<TextBlock Grid.Row="2" Grid.Column="1" >
<Run FontWeight="Bold" Text="Hp07Rate Off: "/>
<Run Text="{Binding HP07RateOFF,StringFormat={}{0:0.00} µSv/h}" />
<Run FontWeight="Bold" Text=" On: "/>
<Run Text="{Binding HP07RateON,StringFormat={}{0:0.00} µSv/h}" />
</TextBlock>
<TextBlock Grid.Row="2" Grid.Column="2" >
<Run FontWeight="Bold" Text="Hp10Rate Off: "/>
<Run Text="{Binding HP10RateOFF,StringFormat={}{0:0.00} µSv/h}" />
<Run FontWeight="Bold" Text=" On: "/>
<Run Text="{Binding HP10RateON,StringFormat={}{0:0.00} µSv/h}" />
</TextBlock>
<TextBlock Grid.Row="3" Grid.Column="1" >
<Run FontWeight="Bold" Text="Type : "/>
<Run Text="{Binding EPDRad}" />
</TextBlock>
<TextBlock Grid.Row="3" Grid.Column="2" >
<Run FontWeight="Bold" Text="Gain : "/>
<Run Text="{Binding FNGain_ANGainValue,StringFormat={}{0:0.00}}" />
</TextBlock>
<TextBlock Grid.Row="3" Grid.Column="3" >
<Run FontWeight="Bold" Text="Dose margin : "/>
<Run Text="{Binding MinWorkerDosisMargin,StringFormat={}{0:0.00}}" />
</TextBlock>
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding EPDRad,StringFormat={}Type: {0} }" />
<TextBlock Grid.Row="2" Grid.Column="2" Text="{Binding FNGain_ANGainValue,StringFormat={}Gain: {0:0.00} }" />
<TextBlock Grid.Row="2" Grid.Column="3" Text="{Binding MinWorkerDosisMargin,StringFormat={}Margin: {0:0.00} }" />
</Grid>
<StackPanel Grid.Row="4" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" >
<telerik:RadButton Name="TaskCancel" Content="Cancel" Click="TaskCancel_Click" Width="300" Style="{DynamicResource OkCancelButton}" Margin="20,0,0,0" />
@ -224,12 +223,12 @@
</Grid>
</TabItem>
<TabItem Name="tbEPD" FontSize="25" >
<Grid >
<Grid DataContext="{Binding Mode=OneWay, Source={StaticResource getTaskListViewSource}}" >
<Grid.RowDefinitions>
<RowDefinition Height="100" />
<RowDefinition Height="100" />
<RowDefinition Height="100" />
<RowDefinition Height="100" />
<RowDefinition Height="auto" />
<RowDefinition Height="50" />
<RowDefinition Height="100" />
</Grid.RowDefinitions>
@ -239,7 +238,21 @@
<Run Name="statusEPD" Text="" /><LineBreak/>
</TextBlock>
<Image Grid.Row="2" Source="{StaticResource iBG}"/>
<telerik:RadButton Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center" Background="LawnGreen" Padding="10,10,10,10" Content="OK" Name="bEpdDone" Visibility="Hidden" Click="bClose_Click" Style="{DynamicResource OkCancelButton}" />
<Grid Grid.Row="3" HorizontalAlignment="Center" >
<TextBlock HorizontalAlignment="Center" TextAlignment="Center" FontSize="15" Margin="5,10,5,10">
<Run FontWeight="Bold" Text="Task: "/>
<Run Text="{Binding ID_Task,Mode=OneWay}" /><LineBreak/>
<Run FontWeight="Bold" Text="Hp07Dose: "/>
<Run Text="{Binding Hp07Dose,Mode=OneWay,StringFormat={}{0:0.00} µSv}" /><LineBreak/>
<Run FontWeight="Bold" Text="Hp10Dose L: "/>
<Run Text="{Binding Hp10Dose1,StringFormat={}{0:0.00} µSv}" />
<Run FontWeight="Bold" Text="H: "/>
<Run Text="{Binding Hp10Dose2,StringFormat={}{0:0.00} µSv}" /><LineBreak/>
<Run FontWeight="Bold" Text="Personal Dose margin : "/>
<Run Text="{Binding MinWorkerDosisMargin,StringFormat={}{0:0.00}}" />
</TextBlock>
</Grid>
<telerik:RadButton Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center" Background="LawnGreen" Padding="10,10,10,10" Content="OK" Name="bEpdDone" Visibility="Hidden" Click="bClose_Click" Style="{DynamicResource OkCancelButton}" />
</Grid>
</TabItem>
<TabItem Name="tbNotAllowed">

View file

@ -13,6 +13,7 @@ namespace eDosStation
/// </summary>
public partial class EntryBadge : Window
{
bool taskLoading = false;
const int PageTimeout = 10000;
bool initialising = true;
Station thisStation;
@ -48,6 +49,7 @@ namespace eDosStation
ep = curEP;
thisStation = curStation;
_User = null;
taskLoading = true;
}
private bool LoadDoses()
@ -251,9 +253,11 @@ namespace eDosStation
private void SetFilter(bool isAlara)
{
taskLoading = true;
TaskOK.IsEnabled = false;
Inst1 = (cbInst1.IsChecked == true);
Inst2 = (cbInst2.IsChecked == true);
StringBuilder fi = new StringBuilder();
if (!Inst1 && !Inst2)
{
@ -266,7 +270,6 @@ namespace eDosStation
fi.Append($" {(Inst1 || Inst2 ? "AND" : "") } TaskType_CODE { (isAlara ? ">=" : "<")} '1000' ");
}
System.Windows.Data.CollectionViewSource getTaskListViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("getTaskListViewSource")));
var dv = getTaskListViewSource.View.SourceCollection as DataView;
//if (isAlara) dv.RowFilter = "ID_Task>=1000"; else dv.RowFilter = "ID_Task<1000";
try
@ -276,7 +279,8 @@ namespace eDosStation
{
MessageBox.Show(ex.Message);
}
getTaskListViewSource.View.MoveCurrentToFirst();
getTaskListViewSource.View.MoveCurrentTo(null);
taskLoading = false;
}
public string getCommentUnknown()
@ -455,14 +459,15 @@ namespace eDosStation
}
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (taskLoading) return;
var lb = sender as ListBox;
DataRowView o = null;
if (e.AddedItems.Count > 0)
{
o = e.AddedItems[0] as DataRowView;
TaskOK.IsEnabled = true;
}
bool exceeded = false;
if (o != null)

View file

@ -7,15 +7,13 @@
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable="d"
Title="Exit"
Height="980" Width="1820"
Height="500" Width="1500" SizeToContent="WidthAndHeight" VerticalAlignment="Center"
FontFamily="Segoe UI" FontSize="36"
Loaded="Window_Loaded" WindowStartupLocation="CenterScreen" Closing="Window_Closing">
<DockPanel>
<StatusBar DockPanel.Dock="Bottom" >
<StatusBarItem Name="statusEPD" Content="Epd" />
</StatusBar>
<StackPanel Orientation="Vertical">
<TabControl>
<TabItem Name="Wait" HorizontalAlignment="Center" VerticalAlignment="Center" >
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Orientation="Vertical" >
@ -23,7 +21,7 @@
<telerik:RadButton Name="bCancel" Content="Cancel" Style="{DynamicResource OkCancelButton}" />
</StackPanel>
</TabItem>
<TabItem Name="ok" >
<TabItem Name="ok" VerticalAlignment="Center" >
<Grid TextBlock.FontSize="40" >
<Grid.RowDefinitions >
<RowDefinition Height="auto" />
@ -32,21 +30,24 @@
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Name= "Wearer" Text="persID:" TextBlock.FontSize="20"/>
<TextBlock Grid.Row="0" Grid.Column="1" Name= "EpdVisit" Text="Visit:" TextBlock.FontSize="20"/>
<TextBlock Grid.Row="1" Grid.Column="0" Grid.RowSpan="1" Text="Dose" />
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Vertical" VerticalAlignment="Center" Name="DosePanel">
<TextBlock Grid.Row="0" Grid.Column="0" Text="Pers ID:" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="5,5,20,5" />
<TextBlock Grid.Row="0" Grid.Column="1" Name="Wearer" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="5,5,20,5" />
<TextBlock Grid.Row="0" Grid.Column="2" Text="Visit:" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="5,5,20,5" />
<TextBlock Grid.Row="0" Grid.Column="3" Name= "EpdVisit" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="5,5,20,5" />
<TextBlock Grid.Row="1" Grid.Column="0" Text="Dose" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="5,5,20,5" />
<StackPanel Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="3" Orientation="Vertical" VerticalAlignment="Center" Name="DosePanel" >
<TextBlock Name="HpDose07" />
<TextBlock Name="HpDose10" />
</StackPanel>
<telerik:RadButton Grid.Row="2" Grid.Column="1" Name="bCloseExit" Click="BCloseExit_Click" Content="OK" Width="190" Height="50" CornerRadius="10" TextBlock.FontSize="25" />
<telerik:RadButton Grid.Row="2" Grid.Column="1" Name="bCloseExit" Click="BCloseExit_Click" Content="OK" Width="190" Style="{StaticResource OkCancelButton}" />
</Grid>
</TabItem>
<TabItem Name="Alarm" Height="23" Margin="-2,-2,-1.8,-0.2" VerticalAlignment="Top">
<TabItem Name="Alarm" Height="23" VerticalAlignment="Center">
<StackPanel>
<Border Background="LightYellow" TextBlock.FontSize="22" TextBlock.LineHeight="30px" Padding="20,20,20,20" >
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Center" TextWrapping="Wrap" >
@ -81,8 +82,6 @@
</StackPanel>
</TabItem>
</TabControl>
</StackPanel>
</DockPanel>
</Window>

View file

@ -62,7 +62,6 @@ namespace eDosStation
dispatcherTimer.Stop();
}
dispatcherTimer.Tick += DispatcherTimer_WindowTimeoutAndClose; ;
int rv= ep.GetStatus();
if (rv != 1)
{
@ -116,8 +115,8 @@ namespace eDosStation
MessageBox.Show($"ReadExtraStatus {rv}");
}
Wearer.Text = $"Wearer: {ep.WearerName}";
EpdVisit.Text = $"Visit: {ep.WearerID}";
Wearer.Text = $"{ep.WearerName}";
EpdVisit.Text = $"{ep.WearerID}";
rv = ep.GetDoses();
if (rv != 1)
{
@ -155,19 +154,6 @@ namespace eDosStation
}
if (!NoTimeout) dispatcherTimer.Start(); //Knop hide
//int? EpdVisitID = LocalRemote.LastID();
//if (EpdVisitID.HasValue)
//{
// ep.WearerName = "Hallo";
// ep.WearerID = EpdVisitID.Value.ToString(); ;
// ep.Hp07 = 123;
// ep.Hp10 = 124;
// Wearer.Text = $"Wearer: {ep.WearerName}";
// EpdVisit.Text = $"Visit: {ep.WearerID}";
// HpDose07.Text = $"Hp07: {ep.Hp07:0.00} µSv ";
// HpDose10.Text = $"Hp10: {ep.Hp10:0.00} µSv";
// LocalRemote.VisitExit(EpdVisitID.Value, ep);
//}
return;
}
@ -182,7 +168,6 @@ namespace eDosStation
private void StartScan()
{
EpdFound = false;
//ep = new EpdBaseClr.Epd2(thisStation.ComPort);
int rv = ep.Connect(false);
System.Diagnostics.Debug.WriteLine($"Connect {rv} error {ep.ConnectError}");
if (rv==1 && ep.DeviceCount >0 && ep.b.CurrentDeviceID>0)
@ -206,7 +191,7 @@ namespace eDosStation
{
Wait.IsSelected = true;
EpdFound = false;
Dispatcher.InvokeAsync(StartScan);
Dispatcher.InvokeAsync(StartScan,DispatcherPriority.Background);
}
private void DispatcherTimer_IsEPDFound(object sender, EventArgs e)

View file

@ -37,7 +37,7 @@
<TextBlock Grid.Row="4" Grid.Column="0" Text="Badgelezers" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
<telerik:RadComboBox Grid.Row="4" Grid.Column="1" Name="cbReaders" />
<ComboBox Grid.Row="4" Grid.Column="1" Name="cbReaders" />
<TextBlock Grid.Row="5" Grid.Column="0" Text="Check user status" Height="23" Margin="0,0,0.2,0" VerticalAlignment="Top"></TextBlock>
<CheckBox Grid.Row="5" Grid.ColumnSpan="2" Name="cbCheckUsers" Grid.Column="1" Padding="10,0,10,0" VerticalAlignment="Center" />

View file

@ -66,6 +66,12 @@ namespace eDosStation
private void Window_Loaded(object sender, RoutedEventArgs e)
{
string[] readers = null;
using (var a = new LSWDesfirePublic.CCard())
{
a.GetReaderList();
readers = a.readersList.ToArray();
}
foreach (string cn in System.IO.Ports.SerialPort.GetPortNames())
{
@ -102,10 +108,10 @@ namespace eDosStation
cbCheckUsers.IsChecked= thisStation.checkUser;
bool rv = thisStation.dataInterface.checkCon(false);
var a = new LSWDesfirePublic.CCard();
a.GetReaderList();
cbReaders.Items.Clear();
foreach (string s in a.readersList )
foreach (string s in readers )
{
ComboBoxItem b = new ComboBoxItem();
b.Content = s;
@ -116,8 +122,6 @@ namespace eDosStation
}
cbReaders.Items.Add(b);
}
a.Dispose();
}
}
}

View file

@ -184,13 +184,12 @@ namespace eDosStation
cmd.Parameters.AddWithValue("Inst_CODE2", Inst_CODE2);
cmd.Parameters.AddWithValue("Inst_Name2", Inst_Name2);
}
if (!string.IsNullOrEmpty(TestCSN))
cmd.Parameters.AddWithValue("TestCSN", TestCSN);
//if (!string.IsNullOrEmpty(TestCSN))
// cmd.Parameters.AddWithValue("TestCSN", TestCSN);
if (!string.IsNullOrEmpty(Reader))
cmd.Parameters.AddWithValue("@Reader", Reader);
if (!string.IsNullOrEmpty(Reader))
cmd.Parameters.AddWithValue("@checkUser", checkUser);
try