aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispenserView.xaml
blob: e0f93df5a61ee14eea40a9b8d04d344427725693 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<UserControl x:Class="Tango.MachineStudio.Dispensers.Views.DispenserView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
             xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
             xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
             xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
             xmlns:vm="clr-namespace:Tango.MachineStudio.Dispensers.ViewModels"
             xmlns:global="clr-namespace:Tango.MachineStudio.Dispensers"
             xmlns:local="clr-namespace:Tango.MachineStudio.Dispensers.Views"
             mc:Ignorable="d" 
             d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">

    <Grid Margin="20">
        <DockPanel>
            <Grid DockPanel.Dock="Top">
                <StackPanel Orientation="Horizontal">
                    <Button Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" Command="{Binding BackToDispensersCommand}">
                        <materialDesign:PackIcon Kind="ArrowLeft" Width="50" Height="50" Foreground="{StaticResource DarkGrayBrush200}" ToolTip="Back to RML list" />
                    </Button>
                    <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="34">
                        <Run>DISPENSER</Run>
                        <Run Text="{Binding ActiveDispenser.SerialNumber}"></Run>
                    </TextBlock>
                </StackPanel>

                <Button HorizontalAlignment="Right" Width="170" Height="45" Margin="0 0 20 0" VerticalAlignment="Center" Command="{Binding SaveCommand}">
                    <StackPanel Orientation="Horizontal">
                        <materialDesign:PackIcon Kind="ContentSaveAll" Width="24" Height="24" />
                        <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">SAVE</TextBlock>
                    </StackPanel>
                </Button>
            </Grid>

            <Grid DockPanel.Dock="Bottom">

            </Grid>

            <Grid Margin="0 20" IsEnabled="{Binding IsFree}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="139*"/>
                    <ColumnDefinition Width="237*"/>
                </Grid.ColumnDefinitions>

                <Border Margin="100 140" CornerRadius="5" Background="{StaticResource TransparentBackgroundBrush600}" Padding="10" BorderBrush="Silver" BorderThickness="1">
                    <controls:TableGrid RowHeight="50" Margin="10">
                        <TextBlock FontWeight="SemiBold">Serial Number:</TextBlock>
                        <TextBox Text="{Binding ActiveDispenser.SerialNumber}"></TextBox>

                        <TextBlock FontWeight="SemiBold">Dispenser Type:</TextBlock>
                        <ComboBox ItemsSource="{Binding DispenserTypes}" SelectedItem="{Binding ActiveDispenser.DispenserType}" DisplayMemberPath="Name" Style="{StaticResource TransparentComboBoxStyle}" ></ComboBox>

                        <TextBlock FontWeight="SemiBold">Nanoliter / Pulse:</TextBlock> 
                        <mahapps:NumericUpDown HorizontalContentAlignment="Left" HasDecimals="True" BorderThickness="0 0 0 1" Background="Transparent" Minimum="0" Maximum="5" Value="{Binding ActiveDispenser.NlPerPulse}"></mahapps:NumericUpDown>

                        <TextBlock FontWeight="SemiBold">Part Number:</TextBlock>
                        <TextBox Text="{Binding ActiveDispenser.PartNumber}"></TextBox>

                        <TextBlock FontWeight="SemiBold">PCB Serial:</TextBlock>
                        <TextBox Text="{Binding ActiveDispenser.PcbSerial}"></TextBox>

                        <TextBlock FontWeight="SemiBold">PCB Version:</TextBlock>
                        <TextBox Text="{Binding ActiveDispenser.PcbVersion}"></TextBox>

                        <TextBlock FontWeight="SemiBold">Production Date:</TextBlock>
                        <DatePicker SelectedDate="{Binding ActiveDispenser.ProductionDate}"></DatePicker>

                        <TextBlock FontWeight="SemiBold">Installed On Machine:</TextBlock>
                        <TextBox IsEnabled="False" Text="{Binding ActiveDispenser.Machine.SerialNumber,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}" IsReadOnly="True"></TextBox>
                    </controls:TableGrid>
                </Border>
            </Grid>
        </DockPanel>
    </Grid>
</UserControl>