Task select ok
This commit is contained in:
parent
81a78dd1b1
commit
44f4acfbde
8 changed files with 1929 additions and 20 deletions
|
|
@ -4,6 +4,11 @@
|
|||
xmlns:local="clr-namespace:eDosStation"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="eDosDict.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
|
|
|||
1408
eDosStation/DataSet1.Designer.cs
generated
1408
eDosStation/DataSet1.Designer.cs
generated
File diff suppressed because it is too large
Load diff
11
eDosStation/DataSet1.cs
Normal file
11
eDosStation/DataSet1.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
namespace eDosStation
|
||||
{
|
||||
|
||||
|
||||
partial class DataSet1
|
||||
{
|
||||
partial class GetTaskListDataTable
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -28,6 +28,45 @@
|
|||
</Mappings>
|
||||
<Sources />
|
||||
</TableAdapter>
|
||||
<TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="GetTaskInfoTableAdapter" GeneratorDataComponentClassName="GetTaskInfoTableAdapter" Name="GetTaskInfo" UserDataComponentName="GetTaskInfoTableAdapter">
|
||||
<MainSource>
|
||||
<DbSource ConnectionRef="RemoteSQL (Settings)" DbObjectName="HPH_REMS_new.dbo.GetTaskInfo" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="false" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
|
||||
<SelectCommand>
|
||||
<DbCommand CommandType="StoredProcedure" ModifiedByUser="false">
|
||||
<CommandText>dbo.GetTaskInfo</CommandText>
|
||||
<Parameters>
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="ReturnValue" ParameterName="@RETURN_VALUE" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
<Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@ID_Task" Precision="10" ProviderType="Int" Scale="0" Size="4" SourceColumnNullMapping="false" SourceVersion="Current" />
|
||||
</Parameters>
|
||||
</DbCommand>
|
||||
</SelectCommand>
|
||||
</DbSource>
|
||||
</MainSource>
|
||||
<Mappings>
|
||||
<Mapping SourceColumn="ID_Task" DataSetColumn="ID_Task" />
|
||||
<Mapping SourceColumn="Task_Name" DataSetColumn="Task_Name" />
|
||||
<Mapping SourceColumn="TaskDescription" DataSetColumn="TaskDescription" />
|
||||
<Mapping SourceColumn="EPDRad" DataSetColumn="EPDRad" />
|
||||
<Mapping SourceColumn="ID_AlarmEPD" DataSetColumn="ID_AlarmEPD" />
|
||||
<Mapping SourceColumn="TaskDateStart" DataSetColumn="TaskDateStart" />
|
||||
<Mapping SourceColumn="TaskDateEnd" DataSetColumn="TaskDateEnd" />
|
||||
<Mapping SourceColumn="TaskEnable" DataSetColumn="TaskEnable" />
|
||||
<Mapping SourceColumn="ID_FNGainANGain" DataSetColumn="ID_FNGainANGain" />
|
||||
<Mapping SourceColumn="Hp10Dose1" DataSetColumn="Hp10Dose1" />
|
||||
<Mapping SourceColumn="Hp10Dose2" DataSetColumn="Hp10Dose2" />
|
||||
<Mapping SourceColumn="Hp07Dose" DataSetColumn="Hp07Dose" />
|
||||
<Mapping SourceColumn="HP10Rate1ON" DataSetColumn="HP10Rate1ON" />
|
||||
<Mapping SourceColumn="HP10Rate1OFF" DataSetColumn="HP10Rate1OFF" />
|
||||
<Mapping SourceColumn="HP10Rate2ON" DataSetColumn="HP10Rate2ON" />
|
||||
<Mapping SourceColumn="HP10Rate2OFF" DataSetColumn="HP10Rate2OFF" />
|
||||
<Mapping SourceColumn="HP07RateON" DataSetColumn="HP07RateON" />
|
||||
<Mapping SourceColumn="HP07RateOFF" DataSetColumn="HP07RateOFF" />
|
||||
<Mapping SourceColumn="FNGain_ANGainValue" DataSetColumn="FNGain_ANGainValue" />
|
||||
<Mapping SourceColumn="InstallationActivity" DataSetColumn="InstallationActivity" />
|
||||
<Mapping SourceColumn="Description" DataSetColumn="Description" />
|
||||
</Mappings>
|
||||
<Sources />
|
||||
</TableAdapter>
|
||||
</Tables>
|
||||
<Sources />
|
||||
</DataSource>
|
||||
|
|
@ -36,7 +75,7 @@
|
|||
<xs:element name="DataSet1" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DataSet1" msprop:Generator_UserDSName="DataSet1">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="GetTaskList" msprop:Generator_TableClassName="GetTaskListDataTable" msprop:Generator_TableVarName="tableGetTaskList" msprop:Generator_TablePropName="GetTaskList" msprop:Generator_RowDeletingName="GetTaskListRowDeleting" msprop:Generator_RowChangingName="GetTaskListRowChanging" msprop:Generator_RowEvHandlerName="GetTaskListRowChangeEventHandler" msprop:Generator_RowDeletedName="GetTaskListRowDeleted" msprop:Generator_UserTableName="GetTaskList" msprop:Generator_RowChangedName="GetTaskListRowChanged" msprop:Generator_RowEvArgName="GetTaskListRowChangeEvent" msprop:Generator_RowClassName="GetTaskListRow">
|
||||
<xs:element name="GetTaskList" msprop:Generator_TableClassName="GetTaskListDataTable" msprop:Generator_TableVarName="tableGetTaskList" msprop:Generator_RowChangedName="GetTaskListRowChanged" msprop:Generator_TablePropName="GetTaskList" msprop:Generator_RowDeletingName="GetTaskListRowDeleting" msprop:Generator_RowChangingName="GetTaskListRowChanging" msprop:Generator_RowEvHandlerName="GetTaskListRowChangeEventHandler" msprop:Generator_RowDeletedName="GetTaskListRowDeleted" msprop:Generator_RowClassName="GetTaskListRow" msprop:Generator_UserTableName="GetTaskList" msprop:Generator_RowEvArgName="GetTaskListRowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ID_Task" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnID_Task" msprop:Generator_ColumnPropNameInRow="ID_Task" msprop:Generator_ColumnPropNameInTable="ID_TaskColumn" msprop:Generator_UserColumnName="ID_Task" type="xs:int" />
|
||||
|
|
@ -64,11 +103,72 @@
|
|||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="GetTaskInfo" msprop:Generator_TableClassName="GetTaskInfoDataTable" msprop:Generator_TableVarName="tableGetTaskInfo" msprop:Generator_TablePropName="GetTaskInfo" msprop:Generator_RowDeletingName="GetTaskInfoRowDeleting" msprop:Generator_RowChangingName="GetTaskInfoRowChanging" msprop:Generator_RowEvHandlerName="GetTaskInfoRowChangeEventHandler" msprop:Generator_RowDeletedName="GetTaskInfoRowDeleted" msprop:Generator_UserTableName="GetTaskInfo" msprop:Generator_RowChangedName="GetTaskInfoRowChanged" msprop:Generator_RowEvArgName="GetTaskInfoRowChangeEvent" msprop:Generator_RowClassName="GetTaskInfoRow">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ID_Task" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnID_Task" msprop:Generator_ColumnPropNameInRow="ID_Task" msprop:Generator_ColumnPropNameInTable="ID_TaskColumn" msprop:Generator_UserColumnName="ID_Task" type="xs:int" />
|
||||
<xs:element name="Task_Name" msprop:Generator_ColumnVarNameInTable="columnTask_Name" msprop:Generator_ColumnPropNameInRow="Task_Name" msprop:Generator_ColumnPropNameInTable="Task_NameColumn" msprop:Generator_UserColumnName="Task_Name" minOccurs="0">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="2147483647" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TaskDescription" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnTaskDescription" msprop:Generator_ColumnPropNameInRow="TaskDescription" msprop:Generator_ColumnPropNameInTable="TaskDescriptionColumn" msprop:Generator_UserColumnName="TaskDescription" minOccurs="0">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="50" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="EPDRad" msprop:Generator_ColumnVarNameInTable="columnEPDRad" msprop:Generator_ColumnPropNameInRow="EPDRad" msprop:Generator_ColumnPropNameInTable="EPDRadColumn" msprop:Generator_UserColumnName="EPDRad">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="2" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="ID_AlarmEPD" msprop:Generator_ColumnVarNameInTable="columnID_AlarmEPD" msprop:Generator_ColumnPropNameInRow="ID_AlarmEPD" msprop:Generator_ColumnPropNameInTable="ID_AlarmEPDColumn" msprop:Generator_UserColumnName="ID_AlarmEPD" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="TaskDateStart" msprop:Generator_ColumnVarNameInTable="columnTaskDateStart" msprop:Generator_ColumnPropNameInRow="TaskDateStart" msprop:Generator_ColumnPropNameInTable="TaskDateStartColumn" msprop:Generator_UserColumnName="TaskDateStart" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="TaskDateEnd" msprop:Generator_ColumnVarNameInTable="columnTaskDateEnd" msprop:Generator_ColumnPropNameInRow="TaskDateEnd" msprop:Generator_ColumnPropNameInTable="TaskDateEndColumn" msprop:Generator_UserColumnName="TaskDateEnd" type="xs:dateTime" minOccurs="0" />
|
||||
<xs:element name="TaskEnable" msprop:Generator_ColumnVarNameInTable="columnTaskEnable" msprop:Generator_ColumnPropNameInRow="TaskEnable" msprop:Generator_ColumnPropNameInTable="TaskEnableColumn" msprop:Generator_UserColumnName="TaskEnable" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="ID_FNGainANGain" msprop:Generator_ColumnVarNameInTable="columnID_FNGainANGain" msprop:Generator_ColumnPropNameInRow="ID_FNGainANGain" msprop:Generator_ColumnPropNameInTable="ID_FNGainANGainColumn" msprop:Generator_UserColumnName="ID_FNGainANGain" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="Hp10Dose1" msprop:Generator_ColumnVarNameInTable="columnHp10Dose1" msprop:Generator_ColumnPropNameInRow="Hp10Dose1" msprop:Generator_ColumnPropNameInTable="Hp10Dose1Column" msprop:Generator_UserColumnName="Hp10Dose1" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp10Dose2" msprop:Generator_ColumnVarNameInTable="columnHp10Dose2" msprop:Generator_ColumnPropNameInRow="Hp10Dose2" msprop:Generator_ColumnPropNameInTable="Hp10Dose2Column" msprop:Generator_UserColumnName="Hp10Dose2" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="Hp07Dose" msprop:Generator_ColumnVarNameInTable="columnHp07Dose" msprop:Generator_ColumnPropNameInRow="Hp07Dose" msprop:Generator_ColumnPropNameInTable="Hp07DoseColumn" msprop:Generator_UserColumnName="Hp07Dose" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="HP10Rate1ON" msprop:Generator_ColumnVarNameInTable="columnHP10Rate1ON" msprop:Generator_ColumnPropNameInRow="HP10Rate1ON" msprop:Generator_ColumnPropNameInTable="HP10Rate1ONColumn" msprop:Generator_UserColumnName="HP10Rate1ON" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="HP10Rate1OFF" msprop:Generator_ColumnVarNameInTable="columnHP10Rate1OFF" msprop:Generator_ColumnPropNameInRow="HP10Rate1OFF" msprop:Generator_ColumnPropNameInTable="HP10Rate1OFFColumn" msprop:Generator_UserColumnName="HP10Rate1OFF" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="HP10Rate2ON" msprop:Generator_ColumnVarNameInTable="columnHP10Rate2ON" msprop:Generator_ColumnPropNameInRow="HP10Rate2ON" msprop:Generator_ColumnPropNameInTable="HP10Rate2ONColumn" msprop:Generator_UserColumnName="HP10Rate2ON" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="HP10Rate2OFF" msprop:Generator_ColumnVarNameInTable="columnHP10Rate2OFF" msprop:Generator_ColumnPropNameInRow="HP10Rate2OFF" msprop:Generator_ColumnPropNameInTable="HP10Rate2OFFColumn" msprop:Generator_UserColumnName="HP10Rate2OFF" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="HP07RateON" msprop:Generator_ColumnVarNameInTable="columnHP07RateON" msprop:Generator_ColumnPropNameInRow="HP07RateON" msprop:Generator_ColumnPropNameInTable="HP07RateONColumn" msprop:Generator_UserColumnName="HP07RateON" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="HP07RateOFF" msprop:Generator_ColumnVarNameInTable="columnHP07RateOFF" msprop:Generator_ColumnPropNameInRow="HP07RateOFF" msprop:Generator_ColumnPropNameInTable="HP07RateOFFColumn" msprop:Generator_UserColumnName="HP07RateOFF" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="FNGain_ANGainValue" msprop:Generator_ColumnVarNameInTable="columnFNGain_ANGainValue" msprop:Generator_ColumnPropNameInRow="FNGain_ANGainValue" msprop:Generator_ColumnPropNameInTable="FNGain_ANGainValueColumn" msprop:Generator_UserColumnName="FNGain_ANGainValue" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="InstallationActivity" msprop:Generator_ColumnVarNameInTable="columnInstallationActivity" msprop:Generator_ColumnPropNameInRow="InstallationActivity" msprop:Generator_ColumnPropNameInTable="InstallationActivityColumn" msprop:Generator_UserColumnName="InstallationActivity" minOccurs="0">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="100" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Description" msprop:Generator_ColumnVarNameInTable="columnDescription" msprop:Generator_ColumnPropNameInRow="Description" msprop:Generator_ColumnPropNameInTable="DescriptionColumn" msprop:Generator_UserColumnName="Description" minOccurs="0">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="500" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
<xs:unique name="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:GetTaskList" />
|
||||
<xs:field xpath="mstns:ID_Task" />
|
||||
</xs:unique>
|
||||
<xs:unique name="GetTaskInfo_Constraint1" msdata:ConstraintName="Constraint1" msdata:PrimaryKey="true">
|
||||
<xs:selector xpath=".//mstns:GetTaskInfo" />
|
||||
<xs:field xpath="mstns:ID_Task" />
|
||||
</xs:unique>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
Title="EntryBadge" Height="450" Width="800" Loaded="Window_Loaded">
|
||||
<Window.Resources>
|
||||
<local:DataSet1 x:Key="dataSet1"/>
|
||||
<CollectionViewSource x:Key="getTaskListViewSource" Source="{Binding GetTaskList, Source={StaticResource dataSet1}}"/>
|
||||
<CollectionViewSource x:Key="getTaskListViewSource" Source="{Binding GetTaskInfo, Source={StaticResource dataSet1}}"/>
|
||||
</Window.Resources>
|
||||
<TabControl Name="tb">
|
||||
<TabItem Header="Entry" Name="tbEntry">
|
||||
|
|
@ -30,24 +30,117 @@
|
|||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem Header="Task" Name="tbTask">
|
||||
<DockPanel DataContext="{StaticResource getTaskListViewSource}">
|
||||
<Border DockPanel.Dock="Top" Background="AliceBlue">
|
||||
<StackPanel>
|
||||
<TextBlock Text="Choose a task" FontSize="36" TextAlignment="Center" />
|
||||
</StackPanel>
|
||||
<Grid DataContext="{Binding Mode=OneWay, Source={StaticResource getTaskListViewSource}}" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="*" />
|
||||
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Row="0" Background="AliceBlue" HorizontalAlignment="Stretch" CornerRadius="10" >
|
||||
<TextBlock FontSize="36" TextAlignment="Center" Text="Select the Task" />
|
||||
</Border>
|
||||
<StackPanel >
|
||||
<telerik:RadMultiColumnComboBox DisplayMemberPath="Task_Name" Width="700" >
|
||||
<StackPanel Grid.Row="1" Orientation="Vertical" HorizontalAlignment="Stretch" >
|
||||
<ScrollViewer VerticalScrollBarVisibility="Visible" Style="{Binding Mode=OneWay, Source={StaticResource CustomScrollViewer}}" >
|
||||
<ListBox ItemsSource="{Binding Mode=OneWay}"
|
||||
MinHeight="100"
|
||||
SelectedValuePath="ID_Task" SelectionChanged="ListBox_SelectionChanged"
|
||||
>
|
||||
<ListBox.ItemsPanel >
|
||||
<ItemsPanelTemplate >
|
||||
<WrapPanel IsItemsHost="True" Orientation="Vertical" MaxHeight="200" MaxWidth="800" >
|
||||
|
||||
</WrapPanel>
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Horizontal" TextBlock.FontSize="24" Margin="5,5,5,5" >
|
||||
<TextBlock Text="{Binding ID_Task}" Width="50" />
|
||||
<TextBlock Text="{Binding Task_Name}" Width="300" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
|
||||
</ListBox>
|
||||
<!--<telerik:RadMultiColumnComboBox DisplayMemberPath="Task_Name" Width="700" HorizontalAlignment="Stretch" >
|
||||
<telerik:RadMultiColumnComboBox.ItemsSourceProvider>
|
||||
<telerik:GridViewItemsSourceProvider ItemsSource="{Binding}" />
|
||||
</telerik:RadMultiColumnComboBox.ItemsSourceProvider>
|
||||
</telerik:RadMultiColumnComboBox>
|
||||
</telerik:RadMultiColumnComboBox>-->
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
<StackPanel>
|
||||
<Button DockPanel.Dock="Bottom" Name="TaskOK" Content="OK" Click="TaskOK_Click" Width="300" Height="50" />
|
||||
<Grid Grid.Row="2" Margin="10,10,10,10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding ID_Task,StringFormat={}Task:{0}}" />
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Hp07Dose,StringFormat={}Hp07Dose: {0:0.00} µSv}" />
|
||||
<TextBlock Grid.Row="0" Grid.Column="2" >
|
||||
<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>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" >
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}Hp10Rate1 Off: {0} On: {1} µSv">
|
||||
<Binding Path="HP10Rate1OFF" />
|
||||
<Binding Path="HP10Rate1ON" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Row="1" Grid.Column="2" >
|
||||
<TextBlock.Text>
|
||||
<MultiBinding StringFormat="{}Hp10Rate2 Off: {0} On: {1} µSv">
|
||||
<Binding Path="HP10Rate2OFF" />
|
||||
<Binding Path="HP10Rate2ON" />
|
||||
</MultiBinding>
|
||||
</TextBlock.Text>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="{Binding EPDRad,StringFormat={}Type: {0} }" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding FNGain_ANGainValue,StringFormat={}Gain: {0:0.00} }" />
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
<StackPanel Grid.Row="3" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" >
|
||||
<telerik:RadButton Name="TaskOK" Content="OK" Click="TaskOK_Click" Width="300" Height="50" CornerRadius="10" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="EPD" Name="tbEPD">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0">
|
||||
<Run Text="EPD:" />
|
||||
<Run Name="statusEPD" Text="" />
|
||||
</TextBlock>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
</Window>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
|
@ -12,14 +13,22 @@ using System.Windows.Input;
|
|||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using System.Windows.Threading;
|
||||
|
||||
namespace eDosStation
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Interaction logic for EntryBadge.xaml
|
||||
/// </summary>
|
||||
public partial class EntryBadge : Window
|
||||
{
|
||||
EpdBaseClr.Epd2 ep;
|
||||
bool EpdFound = false;
|
||||
DispatcherTimer dispatcherTimer;
|
||||
int Search;
|
||||
|
||||
public static OkReadBadge.Badging a;
|
||||
System.Threading.Thread t;
|
||||
bool nextCSN = false;
|
||||
|
|
@ -35,6 +44,66 @@ namespace eDosStation
|
|||
_User = null;
|
||||
}
|
||||
|
||||
private void LoadDoses()
|
||||
{
|
||||
ep.GetStatus();
|
||||
|
||||
if (ep.Issued)
|
||||
{
|
||||
MessageBox.Show("EPD is currently issued\nPlease take an other", "EDP", MessageBoxButton.OK, MessageBoxImage.Hand, MessageBoxResult.OK, MessageBoxOptions.ServiceNotification);
|
||||
this.Close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void DispatcherTimer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
dispatcherTimer.Stop();
|
||||
ep.Connect();
|
||||
if (ep.DiscRV == 1 && ep.b.CurrentDeviceID > 0)
|
||||
{
|
||||
EpdFound = true;
|
||||
statusEPD.Text = $"EPD: {ep.b.CurrentDeviceID}";
|
||||
LoadDoses();
|
||||
}
|
||||
if (!EpdFound)
|
||||
{
|
||||
Search--;
|
||||
if (Search > 0)
|
||||
{
|
||||
statusEPD.Text = $"Search {Search}";
|
||||
dispatcherTimer.Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
statusEPD.Text = $"Search Timeout";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void GetEPD()
|
||||
{
|
||||
ep = new EpdBaseClr.Epd2(Properties.Settings.Default.comport);
|
||||
ep.Connect();
|
||||
if (ep.DiscRV == 1 && ep.b.CurrentDeviceID > 0)
|
||||
{
|
||||
EpdFound = true;
|
||||
statusEPD.Text= $"EPD: {ep.b.CurrentDeviceID}";
|
||||
LoadDoses();
|
||||
}
|
||||
if (!EpdFound)
|
||||
{
|
||||
statusEPD.Text= $"EPD: Wait ";
|
||||
Search = 100;
|
||||
dispatcherTimer = new DispatcherTimer();
|
||||
dispatcherTimer.Tick += DispatcherTimer_Tick;
|
||||
dispatcherTimer.Interval = new TimeSpan(0, 0, 2);
|
||||
dispatcherTimer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
void AskTask()
|
||||
{
|
||||
|
|
@ -112,7 +181,18 @@ namespace eDosStation
|
|||
|
||||
private void TaskOK_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
tbEPD.IsSelected = true;
|
||||
GetEPD();
|
||||
}
|
||||
|
||||
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
var lb = sender as ListBox;
|
||||
DataRowView o;
|
||||
if (e.AddedItems.Count > 0)
|
||||
{
|
||||
o = e.AddedItems[0] as DataRowView;
|
||||
}
|
||||
}
|
||||
|
||||
private void Starter()
|
||||
|
|
@ -122,16 +202,30 @@ namespace eDosStation
|
|||
}
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
t = new System.Threading.Thread(() => Starter());
|
||||
t.Start();
|
||||
|
||||
eDosStation.DataSet1 dataSet1 = ((eDosStation.DataSet1)(this.FindResource("dataSet1")));
|
||||
using (eDosStation.DataSet1TableAdapters.GetTaskListTableAdapter dataSet1GetTaskListTableAdapter = new eDosStation.DataSet1TableAdapters.GetTaskListTableAdapter())
|
||||
using (eDosStation.DataSet1TableAdapters.GetTaskListTableAdapter dataSet1GetTaskListTableAdapter = new eDosStation.DataSet1TableAdapters.GetTaskListTableAdapter())
|
||||
{
|
||||
dataSet1GetTaskListTableAdapter.Fill(dataSet1.GetTaskList);
|
||||
}
|
||||
using (var dataSet1GetTaskInfoTableAdapter = new eDosStation.DataSet1TableAdapters.GetTaskInfoTableAdapter())
|
||||
{
|
||||
dataSet1GetTaskInfoTableAdapter.Fill(dataSet1.GetTaskInfo,null);
|
||||
}
|
||||
|
||||
System.Windows.Data.CollectionViewSource getTaskListViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("getTaskListViewSource")));
|
||||
|
||||
|
||||
System.Windows.Data.CollectionViewSource getTaskListViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("getTaskListViewSource")));
|
||||
getTaskListViewSource.View.MoveCurrentToFirst();
|
||||
|
||||
|
||||
//Real
|
||||
//t = new System.Threading.Thread(() => Starter());
|
||||
//t.Start();
|
||||
|
||||
|
||||
//Debug
|
||||
Dispatcher.Invoke(AskTask);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
188
eDosStation/eDosDict.xaml
Normal file
188
eDosStation/eDosDict.xaml
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:eDosStation">
|
||||
<Style x:Key="ScrollBarPageButton"
|
||||
TargetType="{x:Type RepeatButton}">
|
||||
<Setter Property="SnapsToDevicePixels"
|
||||
Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle"
|
||||
Value="true" />
|
||||
<Setter Property="IsTabStop"
|
||||
Value="false" />
|
||||
<Setter Property="Focusable"
|
||||
Value="false" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RepeatButton}">
|
||||
<Border Background="Transparent" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ScrollBarThumb"
|
||||
TargetType="{x:Type Thumb}">
|
||||
<Setter Property="SnapsToDevicePixels"
|
||||
Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle"
|
||||
Value="true" />
|
||||
<Setter Property="IsTabStop"
|
||||
Value="false" />
|
||||
<Setter Property="Focusable"
|
||||
Value="false" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Thumb}">
|
||||
<Border CornerRadius="12"
|
||||
Background="WhiteSmoke">
|
||||
<Border.Style>
|
||||
<Style TargetType="{x:Type Border}">
|
||||
<Setter Property="Opacity"
|
||||
Value="0.7" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver"
|
||||
Value="True">
|
||||
<Setter Property="Opacity"
|
||||
Value="0.3" />
|
||||
</Trigger>
|
||||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Thumb}, Path=IsDragging}"
|
||||
Value="True">
|
||||
<Setter Property="Opacity"
|
||||
Value="0.3" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</Border.Style>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<ControlTemplate x:Key="VerticalScrollBar"
|
||||
TargetType="{x:Type ScrollBar}">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.00001*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.RowSpan="3"
|
||||
CornerRadius="12"
|
||||
Background="Gray"
|
||||
Opacity="0.2" />
|
||||
<Track Name="PART_Track"
|
||||
Grid.Row="1"
|
||||
IsDirectionReversed="true">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageUpCommand" />
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb Style="{StaticResource ScrollBarThumb}"
|
||||
Margin="1,0,1,0"
|
||||
Background="Transparent" />
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageDownCommand" />
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="HorizontalScrollBar"
|
||||
TargetType="{x:Type ScrollBar}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MaxWidth="18" />
|
||||
<ColumnDefinition Width="0.00001*" />
|
||||
<ColumnDefinition MaxWidth="18" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.ColumnSpan="3"
|
||||
CornerRadius="2"
|
||||
Background="#F0F0F0" />
|
||||
<Track Name="PART_Track"
|
||||
Grid.Column="1"
|
||||
IsDirectionReversed="False">
|
||||
<Track.DecreaseRepeatButton>
|
||||
<RepeatButton Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageLeftCommand" />
|
||||
</Track.DecreaseRepeatButton>
|
||||
<Track.Thumb>
|
||||
<Thumb Style="{StaticResource ScrollBarThumb}"
|
||||
Margin="0,1,0,1"
|
||||
Background="Transparent" />
|
||||
</Track.Thumb>
|
||||
<Track.IncreaseRepeatButton>
|
||||
<RepeatButton Style="{StaticResource ScrollBarPageButton}"
|
||||
Command="ScrollBar.PageRightCommand" />
|
||||
</Track.IncreaseRepeatButton>
|
||||
</Track>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style x:Key="{x:Type ScrollBar}"
|
||||
TargetType="{x:Type ScrollBar}">
|
||||
<Setter Property="SnapsToDevicePixels"
|
||||
Value="True" />
|
||||
<Setter Property="OverridesDefaultStyle"
|
||||
Value="true" />
|
||||
<Style.Triggers>
|
||||
<Trigger Property="Orientation"
|
||||
Value="Horizontal">
|
||||
<Setter Property="Width"
|
||||
Value="Auto" />
|
||||
<Setter Property="Height"
|
||||
Value="30" />
|
||||
<Setter Property="Template"
|
||||
Value="{StaticResource HorizontalScrollBar}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Orientation"
|
||||
Value="Vertical">
|
||||
<Setter Property="Width"
|
||||
Value="30" />
|
||||
<Setter Property="Height"
|
||||
Value="Auto" />
|
||||
<Setter Property="Margin"
|
||||
Value="0,2,0,2" />
|
||||
<Setter Property="Template"
|
||||
Value="{StaticResource VerticalScrollBar}" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CustomScrollViewer"
|
||||
TargetType="{x:Type ScrollViewer}">
|
||||
<Setter Property="OverridesDefaultStyle"
|
||||
Value="True" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<ScrollContentPresenter Grid.Column="0" />
|
||||
<ScrollBar Name="PART_VerticalScrollBar"
|
||||
Value="{TemplateBinding VerticalOffset}"
|
||||
Maximum="{TemplateBinding ScrollableHeight}"
|
||||
ViewportSize="{TemplateBinding ViewportHeight}"
|
||||
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
|
||||
Grid.Column="1" />
|
||||
<ScrollBar Name="PART_HorizontalScrollBar"
|
||||
Orientation="Horizontal"
|
||||
Grid.Column="0"
|
||||
Value="{TemplateBinding HorizontalOffset}"
|
||||
Maximum="{TemplateBinding ScrollableWidth}"
|
||||
ViewportSize="{TemplateBinding ViewportWidth}"
|
||||
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
|
|
@ -55,7 +55,10 @@
|
|||
<HintPath>..\lib\RCWPF\2019.1.116.45\Telerik.Windows.Controls.Data.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Telerik.Windows.Controls.GridView, Version=2019.1.116.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
|
||||
<Reference Include="Telerik.Windows.Controls.GridView, Version=2019.1.116.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
|
||||
<HintPath>..\lib\RCWPF\2019.1.116.45\Telerik.Windows.Controls.GridView.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Telerik.Windows.Controls.Input, Version=2019.1.116.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
|
||||
<HintPath>..\lib\RCWPF\2019.1.116.45\Telerik.Windows.Controls.Input.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
|
@ -75,6 +78,9 @@
|
|||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="DataSet1.cs">
|
||||
<DependentUpon>DataSet1.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DataSet1.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
|
|
@ -93,6 +99,10 @@
|
|||
<DependentUpon>ShowEPDDose.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="User.cs" />
|
||||
<Page Include="eDosDict.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EntryBadge.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue