aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Utils/Empty.cs
blob: 1f890dd7a83945d0475cc13d2bf6685ad9d3eef5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)

using System;
using System.Collections.ObjectModel;

namespace Tango.Scripting.Editors.Utils
{
	/// <summary>
	/// Provides immutable empty list instances.
	/// </summary>
	static class Empty<T>
	{
		public static readonly T[] Array = new T[0];
		//public static readonly ReadOnlyCollection<T> ReadOnlyCollection = new ReadOnlyCollection<T>(Array);
	}
}
} /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<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="#202020" 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"></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>