layout tasks

This commit is contained in:
Luc Vandenbroucke 2019-04-03 13:37:48 +02:00
parent 20d2bc44bf
commit 3f5d860602
3 changed files with 40 additions and 48 deletions

View file

@ -16,26 +16,25 @@
</Window.Resources>
<DockPanel>
<TabControl Name="tb">
<TabItem Header="Entry" Name="tbEntry">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<Border Background="AliceBlue" TextBlock.FontSize="24" TextBlock.LineHeight="30px" Padding="20,20,20,20" >
<StackPanel HorizontalAlignment="Center" >
<TextBlock Text="Welcome to eDOS" TextAlignment="Center" />
<TextBlock Text="Entry Process ready !" FontSize="30" TextAlignment="Center" Margin="0,20,0,20"/>
<TextBlock Text="Please scan your badge on the badge reader" TextAlignment="Center"/>
<TabControl Name="tb" TabStripPlacement="Top" >
<TabItem Name="tbEntry" >
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<Border Background="AliceBlue" TextBlock.FontSize="24" TextBlock.LineHeight="30px" Padding="20,20,20,20" >
<StackPanel HorizontalAlignment="Center" >
<TextBlock Text="Welcome to eDOS" TextAlignment="Center" />
<TextBlock Text="Entry Process ready !" FontSize="30" TextAlignment="Center" Margin="0,20,0,20"/>
<TextBlock Text="Please scan your badge on the badge reader" TextAlignment="Center"/>
</StackPanel>
</Border>
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="CSN" />
<TextBlock x:Name="Site" />
<TextBlock x:Name="Code" />
</StackPanel>
</Border>
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="CSN" />
<TextBlock x:Name="Site" />
<TextBlock x:Name="Code" />
</StackPanel>
</StackPanel>
</TabItem>
<TabItem Header="Task" Name="tbTask">
</TabItem>
<TabItem Name="tbTask">
<Grid DataContext="{Binding Mode=OneWay, Source={StaticResource getTaskListViewSource}}" >
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
@ -58,7 +57,7 @@
<StackPanel Orientation="Horizontal" Grid.Column="0">
<telerik:RadToggleButton Name="cbNormal" HorizontalAlignment="Left" Width="150" Content="Normal" TextBlock.FontSize="24" Click="CbNormal_Click" IsChecked="True" CornerRadius="15" />
<telerik:RadToggleButton Name="cbAlara" HorizontalAlignment="Left" Width="150" Content="Alara" TextBlock.FontSize="24" Click="CbAlara_Click" IsChecked="False" CornerRadius="15" />
</StackPanel>
<TextBlock Grid.Column="1" FontSize="36" TextAlignment="Center" Text="Choose a task" />
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Column="3">
@ -67,9 +66,9 @@
</StackPanel>
</Grid>
</Border>
<StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Vertical" HorizontalAlignment="Stretch" >
<ScrollViewer VerticalScrollBarVisibility="Visible" Style="{Binding Mode=OneWay, Source={StaticResource CustomScrollViewer}}" Height="753">
<ListBox ItemsSource="{Binding Mode=OneWay}" SelectedValuePath="ID_Task" SelectionChanged="ListBox_SelectionChanged" >
<StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Stretch" >
<ScrollViewer VerticalScrollBarVisibility="Visible" Style="{Binding Mode=OneWay, Source={StaticResource CustomScrollViewer}}" MaxHeight="753">
<ListBox ItemsSource="{Binding Mode=OneWay}" SelectedValuePath="ID_Task" SelectionChanged="ListBox_SelectionChanged" ScrollViewer.CanContentScroll="False" >
<ListBox.ItemsPanel >
<ItemsPanelTemplate >
<telerik:RadUniformGrid Columns="3" IsItemsHost="True" />
@ -78,7 +77,7 @@
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" TextBlock.FontSize="20" Margin="5,5,5,5" >
<TextBlock Text="{Binding TaskType_CODE}" Width="50" >
<TextBlock Text="{Binding TaskType_CODE}" Width="60" TextWrapping="NoWrap" FontSize="18" >
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
@ -94,7 +93,7 @@
</TextBlock.Style>
</TextBlock>
<TextBlock Text="{Binding Task_Name}" Width="400" FontSize="18" />
<TextBlock Text="{Binding Task_Name}" Width="410" FontSize="17" TextWrapping="Wrap" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
@ -180,25 +179,25 @@
</StackPanel>
</Grid>
</TabItem>
<TabItem Header="EPD" Name="tbEPD">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100" />
<RowDefinition Height="100" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Center" FontSize="25" FontFamily="Comic Sans MS">
<TabItem Name="tbEPD">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100" />
<RowDefinition Height="100" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Center" FontSize="25" FontFamily="Comic Sans MS">
<Run Text="Issuing EPD:" />
<Run Name="statusEPD" Text="" />
<LineBreak/>
</TextBlock>
</TextBlock>
<Image Grid.Row="1" Source="{StaticResource iBG}"/>
<Button Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" Background="LawnGreen" Padding="10,10,10,10" Content="OK" Name="bEpdDone" Visibility="Hidden" Click="bClose_Click" />
</Grid>
</TabItem>
<TabItem Header="Not allowed" Name="tbNotAllowed">
</TabItem>
<TabItem Name="tbNotAllowed">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100" />
@ -212,7 +211,7 @@
</TextBlock>
<Button Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" Background="LawnGreen" Padding="10,10,10,10" Content="OK" Name="bNoAccessDone" Click="bClose_Click">
</Button>
</Grid>
</TabItem>

View file

@ -184,8 +184,7 @@ namespace eDosStation
private void GetEPD()
{
if (_User == null || CurTaskRow == null) return;
//ep = new EpdBaseClr.Epd2(thisStation.ComPort);
int ok = ep.Connect();
if (ep.DeviceCount == 1)
{
@ -202,12 +201,8 @@ namespace eDosStation
dispatcherTimer.Start();
return;
}
}
private void SetFilter(bool isAlara)
{
Inst1 = (cbInst1.IsChecked ==true);
@ -216,7 +211,6 @@ namespace eDosStation
StringBuilder fi = new StringBuilder();
if (!Inst1 && !Inst2)
{
fi.Append(" 1=2 ");
}
else
@ -237,8 +231,6 @@ namespace eDosStation
MessageBox.Show(ex.Message);
}
getTaskListViewSource.View.MoveCurrentToFirst();
}
void AskTask()
{

View file

@ -34,7 +34,7 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border CornerRadius="12"
Background="WhiteSmoke">
Background="Red">
<Border.Style>
<Style TargetType="{x:Type Border}">
<Setter Property="Opacity"
@ -166,13 +166,14 @@
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ScrollContentPresenter Grid.Column="0" />
<ScrollContentPresenter Grid.Column="0" />
<ScrollBar Name="PART_VerticalScrollBar"
Value="{TemplateBinding VerticalOffset}"
Maximum="{TemplateBinding ScrollableHeight}"
ViewportSize="{TemplateBinding ViewportHeight}"
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
Grid.Column="1" />
Grid.Column="1" />
<ScrollBar Name="PART_HorizontalScrollBar"
Orientation="Horizontal"
Grid.Column="0"