aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Utils/NullSafeCollection.cs
blob: 8a37c54ae16eb0eec168d8eb5300fee40cd510f1 (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
// 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>
	/// A collection that cannot contain null values.
	/// </summary>
	[Serializable]
	public class NullSafeCollection<T> : Collection<T> where T : class
	{
		/// <inheritdoc/>
		protected override void InsertItem(int index, T item)
		{
			if (item == null)
				throw new ArgumentNullException("item");
			base.InsertItem(index, item);
		}
		
		/// <inheritdoc/>
		protected override void SetItem(int index, T item)
		{
			if (item == null)
				throw new ArgumentNullException("item");
			base.SetItem(index, item);
		}
	}
}
ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<UserControl x:Class="Tango.MachineStudio.UI.Views.ConnectedMachineView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:integration="clr-namespace:Tango.Integration.ExternalBridge;assembly=Tango.Integration"
             xmlns:integ="clr-namespace:Tango.Integration.Operation;assembly=Tango.Integration"
             xmlns:emulations="clr-namespace:Tango.Emulations.ExternalBridge;assembly=Tango.Emulations"
             xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
             xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
             mc:Ignorable="d" 
              d:DesignHeight="300" d:DesignWidth="300" Width="800" Height="540" Background="{StaticResource Dialog.Background}" DataContext="{Binding ConnectedMachineViewVM, Source={StaticResource Locator}}" Foreground="{StaticResource MainWindow.Foreground}">

    <UserControl.Resources>
        <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"></converters:BooleanToVisibilityConverter>
        <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter"></converters:BooleanToVisibilityInverseConverter>
        <converters:BooleanInverseConverter x:Key="BooleanInverseConverter"></converters:BooleanInverseConverter>
        <converters:ByteArrayToFileSizeConverter x:Key="ByteArrayToFileSizeConverter" />
    </UserControl.Resources>

    <Grid>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="80"/>
                <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>

            <Grid>
                <StackPanel Orientation="Horizontal" Margin="10">
                    <ContentControl Content="{Binding ApplicationManager.ConnectedMachine}">
                        <ContentControl.Resources>
                            <DataTemplate DataType="{x:Type integration:ExternalBridgeSignalRClient}">
                                <Image Source="/Images/external-bridge-signalr.png" Width="48" Height="48" RenderOptions.BitmapScalingMode="Fant"></Image>
                            </DataTemplate>

                            <DataTemplate DataType="{x:Type integration:ExternalBridgeTcpClient}">
                                <Image Source="/Images/external-bridge-tcp.png" Width="48" Height="48" RenderOptions.BitmapScalingMode="Fant"></Image>
                            </DataTemplate>

                            <DataTemplate DataType="{x:Type integration:ExternalBridgeUsbClient}">
                                <Image Source="/Images/external-bridge-usb.png" Width="48" Height="48" RenderOptions.BitmapScalingMode="Fant"></Image>
                            </DataTemplate>

                            <DataTemplate DataType="{x:Type emulations:EmulatorExternalBridge}">
                                <Image Source="/Images/external-bridge-emulator.png" Width="48" Height="48" RenderOptions.BitmapScalingMode="Fant"></Image>
                            </DataTemplate>
                        </ContentControl.Resources>
                    </ContentControl>

                    <TextBlock Text="Machine Connection" VerticalAlignment="Center" Margin="10 0 0 0" FontSize="20"></TextBlock>
                </StackPanel>
            </Grid>

            <Grid Grid.Row="1" Margin="10 0 10 10">

                <Grid.RowDefinitions>
                    <RowDefinition Height="1*"></RowDefinition>
                    <RowDefinition Height="Auto"></RowDefinition>
                </Grid.RowDefinitions>

                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>

                <Grid d:DataContext="{d:DesignInstance Type=integ:MachineOperator, IsDesignTimeCreatable=False}">
                    <ContentControl Content="{Binding ApplicationManager.ConnectedMachine}">
                        <ContentControl.Resources>

                            <DataTemplate DataType="{x:Type integration:ExternalBridgeSignalRClient}">
                                <controls:TableGrid RowHeight="22">
                                    <TextBlock FontWeight="SemiBold" Text="Serial Number:" />
                                    <TextBlock Text="{Binding SerialNumber}" />
                                    <TextBlock FontWeight="SemiBold" Text="Name:" />
                                    <TextBlock Text="{Binding Machine.Name}" />
                                    <TextBlock FontWeight="SemiBold" Text="Organization:" />
                                    <TextBlock Text="{Binding Machine.Organization.Name}" />
                                    <TextBlock FontWeight="SemiBold" Text="Total Dye Time:" />
                                    <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TotalMachineWorkTime}" />
                                    <TextBlock FontWeight="SemiBold" Text="Total Dye Meters:" />
                                    <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TotalMachineMeters}" />
                                    <TextBlock FontWeight="SemiBold" Text="Embedded Software Version:" />
                                    <TextBlock Text="{Binding DeviceInformation.Version}" />
                                    <TextBlock FontWeight="SemiBold" Text="Session ID:" />
                                    <TextBlock Text="{Binding Adapter.SessionID}" />
                                    <TextBlock FontWeight="SemiBold" Text="Total Bytes Sent:" />
                                    <TextBlock Text="{Binding Adapter.TotalBytesSent,Converter={StaticResource ByteArrayToFileSizeConverter},Mode=OneWay}" />
                                    <TextBlock FontWeight="SemiBold" Text="Total Bytes Received:" />
                                    <TextBlock Text="{Binding Adapter.TotalBytesReceived,Converter={StaticResource ByteArrayToFileSizeConverter},Mode=OneWay}" />
                                    <TextBlock FontWeight="SemiBold" Text="Transfer Rate:" />
                                    <TextBlock>
                                        <Run Text="{Binding Adapter.TransferRate,Converter={StaticResource ByteArrayToFileSizeConverter},Mode=OneWay}"></Run>
                                        <Run Text="/ sec"></Run>
                                    </TextBlock>
                                    <TextBlock FontWeight="SemiBold" Text="Diagnostics Frame Rate:" />
                                    <TextBlock>
                                        <Run Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.DiagnosticsFrameProvider.FrameRate,Mode=OneWay,IsAsync=True}"></Run>
                                        <Run Text="/ sec"></Run>
                                    </TextBlock>
                                    <TextBlock FontWeight="SemiBold" Text="Enable Diagnostics:" />
                                    <ToggleButton IsChecked="{Binding EnableDiagnostics}" HorizontalAlignment="Left"></ToggleButton>
                                    <TextBlock FontWeight="SemiBold" Text="Enable Embedded Debug Logs:" />
                                    <ToggleButton IsChecked="{Binding EnableEmbeddedDebugging}" HorizontalAlignment="Left"></ToggleButton>
                                    <TextBlock FontWeight="SemiBold" Text="Enable KeepAlive:" />
                                    <ToggleButton IsChecked="{Binding UseKeepAlive}" HorizontalAlignment="Left"></ToggleButton>
                                    <TextBlock FontWeight="SemiBold" Text="Enable Events:" />
                                    <ToggleButton IsChecked="{Binding EnableEventsNotification}" HorizontalAlignment="Left"></ToggleButton>
                                    <TextBlock FontWeight="SemiBold" Text="Enable Application Logs:" />
                                    <ToggleButton IsChecked="{Binding EnableApplicationLogs}" HorizontalAlignment="Left"></ToggleButton>
                                </controls:TableGrid>
                            </DataTemplate>

                            <DataTemplate DataType="{x:Type integration:ExternalBridgeTcpClient}">
                                <controls:TableGrid RowHeight="22">
                                    <TextBlock FontWeight="SemiBold" Text="Serial Number:" />
                                    <TextBlock Text="{Binding SerialNumber}" />
                                    <TextBlock FontWeight="SemiBold" Text="Name:" />
                                    <TextBlock Text="{Binding Machine.Name}" />
                                    <TextBlock FontWeight="SemiBold" Text="Organization:" />
                                    <TextBlock Text="{Binding Machine.Organization.Name}" />
                                    <TextBlock FontWeight="SemiBold" Text="Total Dye Time:" />
                                    <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TotalMachineWorkTime}" />
                                    <TextBlock FontWeight="SemiBold" Text="Total Dye Meters:" />
                                    <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TotalMachineMeters}" />
                                    <TextBlock FontWeight="SemiBold" Text="Embedded Software Version:" />
                                    <TextBlock Text="{Binding DeviceInformation.Version}" />
                                    <TextBlock FontWeight="SemiBold" Text="IP Address:" />
                                    <TextBlock Text="{Binding IPAddress}" />
                                    <TextBlock FontWeight="SemiBold" Text="Total Bytes Sent:" />
                                    <TextBlock Text="{Binding Adapter.TotalBytesSent,Converter={StaticResource ByteArrayToFileSizeConverter},Mode=OneWay}" />
                                    <TextBlock FontWeight="SemiBold" Text="Total Bytes Received:" />
                                    <TextBlock Text="{Binding Adapter.TotalBytesReceived,Converter={StaticResource ByteArrayToFileSizeConverter},Mode=OneWay}" />
                                    <TextBlock FontWeight="SemiBold" Text="Transfer Rate:" />
                                    <TextBlock>
                                        <Run Text="{Binding Adapter.TransferRate,Converter={StaticResource ByteArrayToFileSizeConverter},Mode=OneWay}"></Run>
                                        <Run Text="/ sec"></Run>
                                    </TextBlock>
                                    <TextBlock FontWeight="SemiBold" Text="Diagnostics Frame Rate:" />
                                    <TextBlock>
                                        <Run Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.DiagnosticsFrameProvider.FrameRate,Mode=OneWay,IsAsync=True}"></Run>
                                        <Run Text="/ sec"></Run>
                                    </TextBlock>
                                    <TextBlock FontWeight="SemiBold" Text="Enable Diagnostics:" />
                                    <ToggleButton IsChecked="{Binding EnableDiagnostics}" HorizontalAlignment="Left"></ToggleButton>
                                    <TextBlock FontWeight="SemiBold" Text="Enable Embedded Debug Logs:" />
                                    <ToggleButton IsChecked="{Binding EnableEmbeddedDebugging}" HorizontalAlignment="Left"></ToggleButton>
                                    <TextBlock FontWeight="SemiBold" Text="Enable KeepAlive:" />
                                    <ToggleButton IsChecked="{Binding UseKeepAlive}" HorizontalAlignment="Left"></ToggleButton>
                                    <TextBlock FontWeight="SemiBold" Text="Enable Events:" />
                                    <ToggleButton IsChecked="{Binding EnableEventsNotification}" HorizontalAlignment="Left"></ToggleButton>
                                    <TextBlock FontWeight="SemiBold" Text="Enable Application Logs:" />
                                    <ToggleButton IsChecked="{Binding EnableApplicationLogs}" HorizontalAlignment="Left"></ToggleButton>
                                </controls:TableGrid>
                            </DataTemplate>

                            <DataTemplate DataType="{x:Type integration:ExternalBridgeUsbClient}">
                                <controls:TableGrid RowHeight="22">
                                    <TextBlock FontWeight="SemiBold" Text="Serial Number:" />
                                    <TextBlock Text="{Binding SerialNumber}" />
                                    <TextBlock FontWeight="SemiBold" Text="Name:" />
                                    <TextBlock Text="{Binding Machine.Name}" />
                                    <TextBlock FontWeight="SemiBold" Text="Organization:" />
                                    <TextBlock Text="{Binding Machine.Organization.Name}" />
                                    <TextBlock FontWeight="SemiBold" Text="Total Dye Time:" />
                                    <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TotalMachineWorkTime}" />
                                    <TextBlock FontWeight="SemiBold" Text="Total Dye Meters:" />
                                    <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TotalMachineMeters}" />
                                    <TextBlock FontWeight="SemiBold" Text="Embedded Software Version:" />
                                    <TextBlock Text="{Binding DeviceInformation.Version}" />
                                    <TextBlock FontWeight="SemiBold" Text="FPGA Version:" />
                                    <TextBlock TextTrimming="CharacterEllipsis">
                                        <TextBlock.ToolTip>
                                            <TextBlock>
                                        <Run Text="{Binding DeviceInformation.FPGA1Version}"></Run> •
                                        <Run Text="{Binding DeviceInformation.FPGA2Version}"></Run> •
                                        <Run Text="{Binding DeviceInformation.FPGA3Version}"></Run>
                                            </TextBlock>
                                        </TextBlock.ToolTip>
                                        <Run Text="{Binding DeviceInformation.FPGA1Version}"></Run> •
                                        <Run Text="{Binding DeviceInformation.FPGA2Version}"></Run> •
                                        <Run Text="{Binding DeviceInformation.FPGA3Version}"></Run>
                                    </TextBlock>
                                    <TextBlock FontWeight="SemiBold" Text="COM Port:" />
                                    <TextBlock Text="{Binding ComPort}" />
                                    <TextBlock FontWeight="SemiBold" Text="Device:" />
                                    <TextBlock Text="{Binding Device}" />
                                    <TextBlock FontWeight="SemiBold" Text="Total Bytes Sent:" />
                                    <TextBlock Text="{Binding Adapter.TotalBytesSent,Converter={StaticResource ByteArrayToFileSizeConverter},Mode=OneWay}" />
                                    <TextBlock FontWeight="SemiBold" Text="Total Bytes Received:" />
                                    <TextBlock Text="{Binding Adapter.TotalBytesReceived,Converter={StaticResource ByteArrayToFileSizeConverter},Mode=OneWay}" />
                                    <TextBlock FontWeight="SemiBold" Text="Transfer Rate:" />
                                    <TextBlock>
                                        <Run Text="{Binding Adapter.TransferRate,Converter={StaticResource ByteArrayToFileSizeConverter},Mode=OneWay}"></Run>
                                        <Run Text="/ sec"></Run>
                                    </TextBlock>
                                    <TextBlock FontWeight="SemiBold" Text="Diagnostics Frame Rate:" />
                                    <TextBlock>
                                        <Run Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.DiagnosticsFrameProvider.FrameRate,Mode=OneWay,IsAsync=True}"></Run>
                                        <Run Text="/ sec"></Run>
                                    </TextBlock>
                                    <TextBlock FontWeight="SemiBold" Text="Enable Diagnostics:" />
                                    <ToggleButton IsChecked="{Binding EnableDiagnostics}" HorizontalAlignment="Left"></ToggleButton>
                                    <TextBlock FontWeight="SemiBold" Text="Enable Embedded Debug Logs:" />
                                    <ToggleButton IsChecked="{Binding EnableEmbeddedDebugging}" HorizontalAlignment="Left"></ToggleButton>
                                    <TextBlock FontWeight="SemiBold" Text="Enable KeepAlive:" />
                                    <ToggleButton IsChecked="{Binding UseKeepAlive}" HorizontalAlignment="Left"></ToggleButton>
                                    <TextBlock FontWeight="SemiBold" Text="Enable Events:" />
                                    <ToggleButton IsChecked="{Binding EnableEventsNotification}" HorizontalAlignment="Left"></ToggleButton>
                                </controls:TableGrid>
                            </DataTemplate>

                            <DataTemplate DataType="{x:Type emulations:EmulatorExternalBridge}">
                                <controls:TableGrid RowHeight="22">
                                    <TextBlock FontWeight="SemiBold" Text="Address:" />
                                    <TextBlock Text="{Binding Adapter.Address}" />
                                    <TextBlock FontWeight="SemiBold" Text="Serial Number:" />
                                    <TextBlock Text="{Binding SerialNumber}" />
                                    <TextBlock FontWeight="SemiBold" Text="Name:" />
                                    <TextBlock Text="{Binding Machine.Name}" />
                                    <TextBlock FontWeight="SemiBold" Text="Organization:" />
                                    <TextBlock Text="{Binding Machine.Organization.Name}" />
                                    <TextBlock FontWeight="SemiBold" Text="Total Dye Time:" />
                                    <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TotalMachineWorkTime}" />
                                    <TextBlock FontWeight="SemiBold" Text="Total Dye Meters:" />
                                    <TextBlock Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.TotalMachineMeters}" />
                                    <TextBlock FontWeight="SemiBold" Text="Embedded Software Version:" />
                                    <TextBlock Text="{Binding DeviceInformation.Version}" />
                                    <TextBlock FontWeight="SemiBold" Text="FPGA Version:" />
                                    <TextBlock TextTrimming="CharacterEllipsis">
                                        <TextBlock.ToolTip>
                                            <TextBlock>
                                        <Run Text="{Binding DeviceInformation.FPGA1Version}"></Run> •
                                        <Run Text="{Binding DeviceInformation.FPGA2Version}"></Run> •
                                        <Run Text="{Binding DeviceInformation.FPGA3Version}"></Run>
                                            </TextBlock>
                                        </TextBlock.ToolTip>
                                        <Run Text="{Binding DeviceInformation.FPGA1Version}"></Run> •
                                        <Run Text="{Binding DeviceInformation.FPGA2Version}"></Run> •
                                        <Run Text="{Binding DeviceInformation.FPGA3Version}"></Run>
                                    </TextBlock>
                                    <TextBlock FontWeight="SemiBold" Text="Total Bytes Sent:" />
                                    <TextBlock Text="{Binding Adapter.TotalBytesSent,Converter={StaticResource ByteArrayToFileSizeConverter},Mode=OneWay}" />
                                    <TextBlock FontWeight="SemiBold" Text="Total Bytes Received:" />
                                    <TextBlock Text="{Binding Adapter.TotalBytesReceived,Converter={StaticResource ByteArrayToFileSizeConverter},Mode=OneWay}" />
                                    <TextBlock FontWeight="SemiBold" Text="Transfer Rate:" />
                                    <TextBlock>
                                        <Run Text="{Binding Adapter.TransferRate,Converter={StaticResource ByteArrayToFileSizeConverter},Mode=OneWay}"></Run>
                                        <Run Text="/ sec"></Run>
                                    </TextBlock>
                                    <TextBlock FontWeight="SemiBold" Text="Diagnostics Frame Rate:" />
                                    <TextBlock>
                                        <Run Text="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.DiagnosticsFrameProvider.FrameRate,Mode=OneWay,IsAsync=True}"></Run>
                                        <Run Text="/ sec"></Run>
                                    </TextBlock>
                                    <TextBlock FontWeight="SemiBold" Text="Enable Diagnostics:" />
                                    <ToggleButton IsChecked="{Binding EnableDiagnostics}" HorizontalAlignment="Left"></ToggleButton>
                                    <TextBlock FontWeight="SemiBold" Text="Enable Embedded Debug Logs:" />
                                    <ToggleButton IsChecked="{Binding EnableEmbeddedDebugging}" HorizontalAlignment="Left"></ToggleButton>
                                    <TextBlock FontWeight="SemiBold" Text="Enable KeepAlive:" />
                                    <ToggleButton IsChecked="{Binding UseKeepAlive}" HorizontalAlignment="Left"></ToggleButton>
                                    <TextBlock FontWeight="SemiBold" Text="Enable Events:" />
                                    <ToggleButton IsChecked="{Binding EnableEventsNotification}" HorizontalAlignment="Left"></ToggleButton>
                                </controls:TableGrid>
                            </DataTemplate>
                        </ContentControl.Resources>
                    </ContentControl>
                </Grid>

                <Grid Grid.Row="1" Grid.ColumnSpan="2">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Height="40" VerticalAlignment="Bottom">

                    </StackPanel>
                </Grid>

                <Grid Grid.Row="1" Grid.ColumnSpan="2">
                    <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
                        <Button DockPanel.Dock="Bottom" Height="40" Width="170" Command="{Binding UploadHardwareConfigurationCommand}" ToolTip="Upload the current hardware configuration stored for this machine">UPLOAD HW CONFIG</Button>
                        <Button DockPanel.Dock="Bottom" Height="40" Width="140" Command="{Binding DisconnectCommand}" Margin="10 0 0 0">DISCONNECT</Button>
                    </StackPanel>
                </Grid>

                <Grid Grid.Column="1">
                    <DockPanel>
                        <StackPanel>
                            <Button FontSize="11" Height="40" Width="140" Command="{Binding ResetCommand}" Background="Transparent" BorderBrush="{StaticResource DarkGrayBrush}" Foreground="{StaticResource DarkGrayBrush}" Margin="0 2" ToolTip="Reset the embedded device">RESET</Button>
                            <Button FontSize="11" Height="40" Width="140" Command="{Binding TurnOffHeatersCommand}" Background="Transparent" BorderBrush="{StaticResource DarkGrayBrush}" Foreground="{StaticResource DarkGrayBrush}" Margin="0 2" ToolTip="Resets the current process parameters in the embedded device">
                                <TextBlock TextWrapping="Wrap" TextAlignment="Center">
                                TURN OFF HEATERS
                                </TextBlock>
                            </Button>
                        </StackPanel>
                    </DockPanel>
                </Grid>
            </Grid>
        </Grid>
    </Grid>
</UserControl>