aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
Diffstat (limited to 'Software')
-rw-r--r--Software/DB/PPC/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/PPC/Tango_log.ldfbin53673984 -> 53673984 bytes
-rw-r--r--Software/DB/TCC/TCC.mdfbin8388608 -> 8388608 bytes
-rw-r--r--Software/DB/TCC/TCC_log.ldfbin8388608 -> 8388608 bytes
-rw-r--r--Software/Graphics/Mobile/Technician/dispensers.pngbin0 -> 5943 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Controls/DispenserController.xaml94
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Controls/DispenserController.xaml.cs202
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/dispensers.pngbin0 -> 5943 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Models/DispenserController.cs73
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj37
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModelLocator.cs12
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/DispensersViewVM.cs17
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml6
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/DispensersView.xaml41
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/DispensersView.xaml.cs28
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml1
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/app.config14
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/packages.config3
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/App.config80
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest2
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchIconButton.xaml7
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.xaml4
-rw-r--r--Software/Visual_Studio/Tango.Transport/TransporterBase.cs40
23 files changed, 648 insertions, 13 deletions
diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf
index 2e33873fa..c7be9fdc6 100644
--- a/Software/DB/PPC/Tango.mdf
+++ b/Software/DB/PPC/Tango.mdf
Binary files differ
diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf
index f32930dff..099506086 100644
--- a/Software/DB/PPC/Tango_log.ldf
+++ b/Software/DB/PPC/Tango_log.ldf
Binary files differ
diff --git a/Software/DB/TCC/TCC.mdf b/Software/DB/TCC/TCC.mdf
index 9a07550ca..032683b9d 100644
--- a/Software/DB/TCC/TCC.mdf
+++ b/Software/DB/TCC/TCC.mdf
Binary files differ
diff --git a/Software/DB/TCC/TCC_log.ldf b/Software/DB/TCC/TCC_log.ldf
index 6463bbdf7..c016fe931 100644
--- a/Software/DB/TCC/TCC_log.ldf
+++ b/Software/DB/TCC/TCC_log.ldf
Binary files differ
diff --git a/Software/Graphics/Mobile/Technician/dispensers.png b/Software/Graphics/Mobile/Technician/dispensers.png
new file mode 100644
index 000000000..65d59b082
--- /dev/null
+++ b/Software/Graphics/Mobile/Technician/dispensers.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Controls/DispenserController.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Controls/DispenserController.xaml
new file mode 100644
index 000000000..3fc7c607e
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Controls/DispenserController.xaml
@@ -0,0 +1,94 @@
+<UserControl x:Class="Tango.PPC.Technician.Controls.DispenserController"
+ 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:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
+ xmlns:local="clr-namespace:Tango.PPC.Technician.Controls"
+ mc:Ignorable="d"
+ d:DesignHeight="150" d:DesignWidth="800" x:Name="control">
+ <Grid>
+ <Border CornerRadius="5" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderBrush="{StaticResource TangoLightBorderBrush}" BorderThickness="1">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="41*"/>
+ <RowDefinition Height="66*"/>
+ <RowDefinition Height="41*"/>
+ </Grid.RowDefinitions>
+
+ <Border Grid.Row="1">
+ <DockPanel Margin="40 0 0 0">
+ <Grid HorizontalAlignment="Left">
+ <Ellipse Stroke="{StaticResource TangoGrayBrush}" StrokeThickness="3"></Ellipse>
+ <touch:TouchBusyIndicator Minimum="0" Maximum="100" Value="0" IsIndeterminate="{Binding ElementName=control,Path=IsHoming}" Width="Auto" Height="Auto">
+
+ </touch:TouchBusyIndicator>
+ <touch:TouchIconButton x:Name="btnHome" IsEnabled="{Binding ElementName=control,Path=IsJogging,Converter={StaticResource BooleanInverseConverter}}" HorizontalAlignment="Left" Padding="20">
+ <touch:TouchIconButton.Style>
+ <Style TargetType="touch:TouchIconButton" BasedOn="{StaticResource {x:Type touch:TouchIconButton}}">
+ <Setter Property="Icon" Value="Home"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding ElementName=control,Path=IsHoming}" Value="True">
+ <Setter Property="Icon" Value="Stop"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </touch:TouchIconButton.Style>
+ </touch:TouchIconButton>
+ </Grid>
+
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="20 0 0 0" TextElement.FontSize="{StaticResource TangoTitleFontSize}">
+ <TextBlock Width="245">
+ <Run Text="Dispenser:"></Run>
+ <Run FontWeight="SemiBold" Text="{Binding ElementName=control,Path=IdsPack.LiquidType.Name,FallbackValue='Unknown'}"></Run>
+ </TextBlock>
+
+ <TextBlock Margin="40 0 0 0">
+ <Run Text="Index:"></Run>
+ <Run FontWeight="SemiBold" Text="{Binding ElementName=control,Path=IdsPack.PackIndex,FallbackValue='1'}"></Run>
+ </TextBlock>
+
+ <TextBlock Margin="40 0 0 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" FontStyle="Italic">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Setter Property="Text" Value="Ready"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding ElementName=control,Path=IsHoming}" Value="True">
+ <Setter Property="Text" Value="Homing..."></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding ElementName=control,Path=IsJogging}" Value="True">
+ <Setter Property="Text" Value="Jogging..."></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
+ </StackPanel>
+
+
+ <touch:TouchNumericTextBox Foreground="{StaticResource TangoPrimaryAccentBrush}" x:Name="numSpeed" VerticalContentAlignment="Center" Minimum="1" Maximum="10000" Value="1000" HorizontalContentAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" DockPanel.Dock="Right" Width="100" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="20 0 20 0"></touch:TouchNumericTextBox>
+ <Rectangle DockPanel.Dock="Right" HorizontalAlignment="Right" Stroke="{StaticResource TangoDividerBrush}"></Rectangle>
+ </DockPanel>
+ </Border>
+
+ <touch:TouchIconButton x:Name="btnUp" IsEnabled="{Binding ElementName=control,Path=IsHoming,Converter={StaticResource BooleanInverseConverter}}" HorizontalAlignment="Left" Margin="54 0 0 0" Icon="ChevronUpSolid">
+ <touch:TouchIconButton.Style>
+ <Style TargetType="touch:TouchIconButton" BasedOn="{StaticResource {x:Type touch:TouchIconButton}}">
+ <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
+ </Style>
+ </touch:TouchIconButton.Style>
+ </touch:TouchIconButton>
+
+ <touch:TouchIconButton x:Name="btnDown" IsEnabled="{Binding ElementName=control,Path=IsHoming,Converter={StaticResource BooleanInverseConverter}}" Grid.Row="2" HorizontalAlignment="Left" Margin="54 0 0 0" Icon="ChevronDownSolid">
+ <touch:TouchIconButton.Style>
+ <Style TargetType="touch:TouchIconButton" BasedOn="{StaticResource {x:Type touch:TouchIconButton}}">
+ <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
+ </Style>
+ </touch:TouchIconButton.Style>
+ </touch:TouchIconButton>
+ </Grid>
+ </Border>
+ </Grid>
+</UserControl>
+
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Controls/DispenserController.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Controls/DispenserController.xaml.cs
new file mode 100644
index 000000000..98b857fba
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Controls/DispenserController.xaml.cs
@@ -0,0 +1,202 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Tango.BL.Entities;
+using Tango.Core.EventArguments;
+using Tango.Integration.Operation;
+using Tango.PMR.Diagnostics;
+using System.Reactive.Concurrency;
+using System.Reactive;
+
+namespace Tango.PPC.Technician.Controls
+{
+ /// <summary>
+ /// Interaction logic for DispenserController.xaml
+ /// </summary>
+ public partial class DispenserController : UserControl
+ {
+ public IdsPack IdsPack
+ {
+ get { return (IdsPack)GetValue(IdsPackProperty); }
+ set { SetValue(IdsPackProperty, value); }
+ }
+ public static readonly DependencyProperty IdsPackProperty =
+ DependencyProperty.Register("IdsPack", typeof(IdsPack), typeof(DispenserController), new PropertyMetadata(null));
+
+ public IMachineOperator MachineOperator
+ {
+ get { return (IMachineOperator)GetValue(MachineOperatorProperty); }
+ set { SetValue(MachineOperatorProperty, value); }
+ }
+ public static readonly DependencyProperty MachineOperatorProperty =
+ DependencyProperty.Register("MachineOperator", typeof(IMachineOperator), typeof(DispenserController), new PropertyMetadata(null));
+
+ public bool IsHoming
+ {
+ get { return (bool)GetValue(IsHomingProperty); }
+ set { SetValue(IsHomingProperty, value); }
+ }
+ public static readonly DependencyProperty IsHomingProperty =
+ DependencyProperty.Register("IsHoming", typeof(bool), typeof(DispenserController), new PropertyMetadata(false));
+
+ public bool IsJogging
+ {
+ get { return (bool)GetValue(IsJoggingProperty); }
+ set { SetValue(IsJoggingProperty, value); }
+ }
+ public static readonly DependencyProperty IsJoggingProperty =
+ DependencyProperty.Register("IsJogging", typeof(bool), typeof(DispenserController), new PropertyMetadata(false));
+
+ public DispenserController()
+ {
+ InitializeComponent();
+
+ btnHome.Click += BtnHome_Click;
+ btnUp.RegisterForPreviewMouseOrTouchDown(OnUpButtonPressed);
+ btnUp.RegisterForPreviewMouseOrTouchUp(OnUpButtonReleased);
+ btnDown.RegisterForPreviewMouseOrTouchDown(OnDownButtonPressed);
+ btnDown.RegisterForPreviewMouseOrTouchUp(OnDownButtonReleased);
+ }
+
+ #region Home
+
+ private async void BtnHome_Click(object sender, RoutedEventArgs e)
+ {
+ if (!IsHoming)
+ {
+ try
+ {
+ IsHoming = true;
+
+ MachineOperator.StartDispenserHoming(new DispenserHomingRequest()
+ {
+ Index = IdsPack.PackIndex,
+ Speed = numSpeed.Value,
+ Direction = MotorDirection.Forward
+ })
+ .Subscribe((response) =>
+ {
+
+
+
+ }, (ex) =>
+ {
+
+ InvokeUI(() => IsHoming = false);
+
+
+ }, () =>
+ {
+
+ InvokeUI(() => IsHoming = false);
+
+ });
+ }
+ catch
+ {
+ IsHoming = false;
+ }
+ }
+ else
+ {
+ IsHoming = false;
+
+ try
+ {
+ await MachineOperator.StopDispenserHoming(new DispenserAbortHomingRequest()
+ {
+ Index = IdsPack.PackIndex,
+ });
+ }
+ catch { }
+ }
+ }
+
+ #endregion
+
+ #region Up
+
+ private async void OnUpButtonPressed(object sender, MouseOrTouchEventArgs e)
+ {
+ IsJogging = true;
+
+
+ try
+ {
+ await MachineOperator.StartDispenserJogging(new DispenserJoggingRequest()
+ {
+ Index = IdsPack.PackIndex,
+ Direction = MotorDirection.Forward,
+ Speed = numSpeed.Value,
+ });
+ }
+ catch { }
+ }
+
+ private async void OnUpButtonReleased(object sender, MouseOrTouchEventArgs e)
+ {
+ IsJogging = false;
+
+ try
+ {
+ await MachineOperator.StopDispenserJogging(new DispenserAbortJoggingRequest()
+ {
+ Index = IdsPack.PackIndex,
+ });
+ }
+ catch { }
+ }
+
+ #endregion
+
+ #region Down
+
+ private async void OnDownButtonPressed(object sender, MouseOrTouchEventArgs e)
+ {
+ IsJogging = true;
+
+ try
+ {
+ await MachineOperator.StartDispenserJogging(new DispenserJoggingRequest()
+ {
+ Index = IdsPack.PackIndex,
+ Direction = MotorDirection.Backward,
+ Speed = numSpeed.Value,
+ });
+ }
+ catch { }
+ }
+
+ private async void OnDownButtonReleased(object sender, MouseOrTouchEventArgs e)
+ {
+ IsJogging = false;
+
+ try
+ {
+ await MachineOperator.StopDispenserJogging(new DispenserAbortJoggingRequest()
+ {
+ Index = IdsPack.PackIndex,
+ });
+ }
+ catch { }
+ }
+
+ #endregion
+
+ private void InvokeUI(Action action)
+ {
+ Dispatcher.BeginInvoke(action);
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/dispensers.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/dispensers.png
new file mode 100644
index 000000000..65d59b082
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/dispensers.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Models/DispenserController.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Models/DispenserController.cs
new file mode 100644
index 000000000..a3ee9a613
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Models/DispenserController.cs
@@ -0,0 +1,73 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core;
+using Tango.Core.Commands;
+using Tango.Integration.Operation;
+using Tango.PMR.Diagnostics;
+
+namespace Tango.PPC.Technician.Models
+{
+ public class DispenserController : ExtendedObject
+ {
+ private IMachineOperator _operator;
+
+ public String Name { get; set; }
+ public int Index { get; set; }
+
+ private bool _isMovingUp;
+ public bool IsMovingUp
+ {
+ get { return _isMovingUp; }
+ set { _isMovingUp = value; RaisePropertyChangedAuto(); }
+ }
+
+ private bool _isMovingDown;
+ public bool IsMovingDown
+ {
+ get { return _isMovingDown; }
+ set { _isMovingDown = value; RaisePropertyChangedAuto(); }
+ }
+
+
+ private bool _isHoming;
+ public bool IsHoming
+ {
+ get { return _isHoming; }
+ set { _isHoming = value; RaisePropertyChangedAuto(); }
+ }
+
+ public RelayCommand MoveUpCommand { get; set; }
+ public RelayCommand MoveDownCommand { get; set; }
+ public RelayCommand HomeCommand { get; set; }
+
+ public DispenserController(IMachineOperator machineOperator)
+ {
+ _operator = machineOperator;
+ }
+
+ public DispenserController()
+ {
+ MoveUpCommand = new RelayCommand(MoveUp, () => !IsHoming && !IsMovingDown);
+ MoveDownCommand = new RelayCommand(MoveDown, () => !IsHoming && !IsMovingUp);
+ HomeCommand = new RelayCommand(Home, () => !IsMovingUp && !IsMovingDown);
+ }
+
+ private void Home()
+ {
+
+ }
+
+ private void MoveDown()
+ {
+
+ }
+
+ private async void MoveUp()
+ {
+ await _operator.StartDispenserJogging(new DispenserJoggingRequest());
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj
index 5b34c38a1..212ab6f16 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj
@@ -37,9 +37,15 @@
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
+ <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data" />
+ <Reference Include="System.Reactive.Core, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\System.Reactive.Core.3.1.1\lib\net46\System.Reactive.Core.dll</HintPath>
+ </Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
@@ -57,6 +63,10 @@
<Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs">
<Link>GlobalVersionInfo.cs</Link>
</Compile>
+ <Compile Include="Controls\DispenserController.xaml.cs">
+ <DependentUpon>DispenserController.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Models\DispenserController.cs" />
<Compile Include="TechnicianModule.cs" />
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
@@ -73,11 +83,15 @@
</Compile>
<Compile Include="ViewModelLocator.cs" />
<Compile Include="ViewModels\CatalogViewVM.cs" />
+ <Compile Include="ViewModels\DispensersViewVM.cs" />
<Compile Include="ViewModels\LoggingViewVM.cs" />
<Compile Include="ViewModels\MainViewVM.cs" />
<Compile Include="Views\CatalogView.xaml.cs">
<DependentUpon>CatalogView.xaml</DependentUpon>
</Compile>
+ <Compile Include="Views\DispensersView.xaml.cs">
+ <DependentUpon>DispensersView.xaml</DependentUpon>
+ </Compile>
<Compile Include="Views\LoggingView.xaml.cs">
<DependentUpon>LoggingView.xaml</DependentUpon>
</Compile>
@@ -104,10 +118,18 @@
<Project>{A34EE0F0-649D-41C8-8489-B6F1CC6924EE}</Project>
<Name>Tango.Core</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Integration\Tango.Integration.csproj">
+ <Project>{4206ac58-3b57-4699-8835-90bf6db01a61}</Project>
+ <Name>Tango.Integration</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\..\Tango.Logging\Tango.Logging.csproj">
<Project>{BC932DBD-7CDB-488C-99E4-F02CF441F55E}</Project>
<Name>Tango.Logging</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.PMR\Tango.PMR.csproj">
+ <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project>
+ <Name>Tango.PMR</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\..\Tango.SharedUI\Tango.SharedUI.csproj">
<Project>{8491D07B-C1F6-4B62-A412-41B9FD2D6538}</Project>
<Name>Tango.SharedUI</Name>
@@ -116,6 +138,10 @@
<Project>{fd86424c-6e84-491b-8df9-3d0f5c236a2a}</Project>
<Name>Tango.Touch</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Transport\Tango.Transport.csproj">
+ <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project>
+ <Name>Tango.Transport</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\Tango.PPC.Common\Tango.PPC.Common.csproj">
<Project>{0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}</Project>
<Name>Tango.PPC.Common</Name>
@@ -126,10 +152,18 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
+ <Page Include="Controls\DispenserController.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Views\CatalogView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Views\DispensersView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Views\LoggingView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -148,5 +182,8 @@
<ItemGroup>
<Resource Include="Images\system.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\dispensers.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModelLocator.cs
index 3c6f874e0..9460578c8 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModelLocator.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModelLocator.cs
@@ -18,6 +18,7 @@ namespace Tango.PPC.Technician
TangoIOC.Default.Register<MainViewVM>();
TangoIOC.Default.Register<LoggingViewVM>();
TangoIOC.Default.Register<CatalogViewVM>();
+ TangoIOC.Default.Register<DispensersViewVM>();
}
/// <summary>
@@ -52,5 +53,16 @@ namespace Tango.PPC.Technician
return TangoIOC.Default.GetInstance<CatalogViewVM>();
}
}
+
+ /// <summary>
+ /// Gets the dispensers view VM.
+ /// </summary>
+ public static DispensersViewVM DispensersViewVM
+ {
+ get
+ {
+ return TangoIOC.Default.GetInstance<DispensersViewVM>();
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/DispensersViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/DispensersViewVM.cs
new file mode 100644
index 000000000..e72c74009
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/DispensersViewVM.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.PPC.Common;
+
+namespace Tango.PPC.Technician.ViewModels
+{
+ public class DispensersViewVM : PPCViewModel
+ {
+ public override void OnApplicationStarted()
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml
index 79d753474..4571f99de 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml
@@ -39,10 +39,10 @@
</DockPanel>
</touch:TouchButton>
- <touch:TouchButton Margin="0 60 0 0" Width="250" Height="250" Style="{StaticResource TangoHollowButton}" Padding="20">
+ <touch:TouchButton Command="{Binding NavigationCommand}" CommandParameter="DispensersView" Margin="0 60 0 0" Width="250" Height="250" Style="{StaticResource TangoHollowButton}" Padding="20">
<DockPanel>
- <TextBlock Margin="0 10 0 0" DockPanel.Dock="Bottom" HorizontalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Coming soon...</TextBlock>
- <!--<Image Width="128" Source="../Images/system.png" />-->
+ <TextBlock Margin="0 10 0 0" DockPanel.Dock="Bottom" HorizontalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Dispensers</TextBlock>
+ <Image Width="128" Source="../Images/dispensers.png" />
</DockPanel>
</touch:TouchButton>
</UniformGrid>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/DispensersView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/DispensersView.xaml
new file mode 100644
index 000000000..c8fc038f1
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/DispensersView.xaml
@@ -0,0 +1,41 @@
+<UserControl x:Class="Tango.PPC.Technician.Views.DispensersView"
+ 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:local="clr-namespace:Tango.PPC.Technician.Views"
+ xmlns:controls="clr-namespace:Tango.PPC.Technician.Controls"
+ xmlns:sys="clr-namespace:System;assembly=mscorlib"
+ xmlns:vm="clr-namespace:Tango.PPC.Technician.ViewModels"
+ xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
+ xmlns:global="clr-namespace:Tango.PPC.Technician"
+ mc:Ignorable="d"
+ d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:DispensersViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.DispensersViewVM}" x:Name="view">
+ <Grid Background="{StaticResource TangoMidBackgroundBrush}">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+
+ <Border Padding="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}">
+ <Border.Effect>
+ <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" />
+ </Border.Effect>
+ <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Dispensers</TextBlock>
+ </Border>
+
+ <Grid Grid.Row="1">
+ <Grid x:Name="container" Margin="0 20 0 0">
+ <touch:LightTouchScrollViewer>
+ <ItemsControl ItemsSource="{Binding MachineProvider.Machine.Configuration.IdsPacks}">
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <controls:DispenserController Margin="20 10" Height="150" IdsPack="{Binding}" MachineOperator="{Binding ElementName=view,Path=DataContext.MachineProvider.MachineOperator}" />
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </touch:LightTouchScrollViewer>
+ </Grid>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/DispensersView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/DispensersView.xaml.cs
new file mode 100644
index 000000000..bf5b64e8b
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/DispensersView.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Tango.PPC.Technician.Views
+{
+ /// <summary>
+ /// Interaction logic for DispensersView.xaml
+ /// </summary>
+ public partial class DispensersView : UserControl
+ {
+ public DispensersView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml
index 66e16588b..e697696c2 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml
@@ -15,6 +15,7 @@
<controls:NavigationControl TransitionAlwaysFades="True" TransitionType="Zoom" TransitionDuration="00:00:0.2">
<local:CatalogView/>
<local:LoggingView/>
+ <local:DispensersView/>
</controls:NavigationControl>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/app.config b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/app.config
index 154562d23..806bfe66d 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/app.config
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/app.config
@@ -16,7 +16,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
@@ -24,27 +24,27 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/packages.config b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/packages.config
index b3daf0d6c..865851bd7 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/packages.config
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/packages.config
@@ -1,4 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EntityFramework" version="6.2.0" targetFramework="net461" />
+ <package id="Google.Protobuf" version="3.4.1" targetFramework="net461" />
+ <package id="System.Reactive" version="3.1.1" targetFramework="net461" />
+ <package id="System.Reactive.Core" version="3.1.1" targetFramework="net461" />
</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config
index ea49af905..15a7107bd 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config
@@ -11,6 +11,86 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.19.8.16603" newVersion="3.19.8.16603" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-3.19.8.16603" newVersion="3.19.8.16603" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
+ </dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
index d72e75011..efc5f8179 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
@@ -16,7 +16,7 @@
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
- <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
+ <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />-->
</requestedPrivileges>
</security>
</trustInfo>
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchIconButton.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchIconButton.xaml
index 36aad386b..5875b26d0 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchIconButton.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchIconButton.xaml
@@ -23,6 +23,13 @@
</DataTemplate>
</Setter.Value>
</Setter>
+ <Style.Triggers>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="BorderBrush" Value="Transparent"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoDisabledForegroundBrush}"></Setter>
+ </Trigger>
+ </Style.Triggers>
</Style>
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.xaml
index 29be2dd00..b00273cf0 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.xaml
@@ -88,7 +88,7 @@
<Grid>
<!--<components:Ripple RippleBrush="{StaticResource TangoRippleDarkBrush}" RippleFactor="15">
<Grid>-->
- <TextBox VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Foreground="{TemplateBinding Foreground}" Padding="0 0 0 4" CaretBrush="{StaticResource TangoPrimaryAccentBrush}" FocusVisualStyle="{x:Null}" x:Name="PART_TextBox" BorderThickness="0" Background="Transparent">
+ <TextBox FontSize="{TemplateBinding FontSize}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Foreground="{TemplateBinding Foreground}" Padding="0 0 0 4" CaretBrush="{StaticResource TangoPrimaryAccentBrush}" FocusVisualStyle="{x:Null}" x:Name="PART_TextBox" BorderThickness="0" Background="Transparent">
<TextBox.Style>
<Style TargetType="TextBox">
<Setter Property="Opacity" Value="0"></Setter>
@@ -100,7 +100,7 @@
</Style>
</TextBox.Style>
</TextBox>
- <controls:FastTextBlock x:Name="PART_TextDisplay" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" IsHitTestVisible="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Foreground="{TemplateBinding Foreground}" Padding="0 0 0 4" FocusVisualStyle="{x:Null}" Visibility="{Binding ElementName=PART_TextBox,Path=IsFocused,Converter={StaticResource BooleanToVisibilityInverseConverter}}"></controls:FastTextBlock>
+ <controls:FastTextBlock x:Name="PART_TextDisplay" FontSize="{TemplateBinding FontSize}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" IsHitTestVisible="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Foreground="{TemplateBinding Foreground}" Padding="0 0 0 4" FocusVisualStyle="{x:Null}" Visibility="{Binding ElementName=PART_TextBox,Path=IsFocused,Converter={StaticResource BooleanToVisibilityInverseConverter}}"></controls:FastTextBlock>
<!--</Grid>
</components:Ripple>-->
diff --git a/Software/Visual_Studio/Tango.Transport/TransporterBase.cs b/Software/Visual_Studio/Tango.Transport/TransporterBase.cs
index 008c0759a..534d3d05d 100644
--- a/Software/Visual_Studio/Tango.Transport/TransporterBase.cs
+++ b/Software/Visual_Studio/Tango.Transport/TransporterBase.cs
@@ -333,6 +333,11 @@ namespace Tango.Transport
LogManager.Log("Queuing request message: " + requestName + " Token: " + container.Token, LogCategory.Debug);
LogManager.Log("Expected response: " + responseName, LogCategory.Debug);
+ if (State != TransportComponentState.Connected)
+ {
+ throw LogManager.Log(new InvalidOperationException($"Could not send the request while transporter state is {State}."));
+ }
+
TaskCompletionSource<IMessage> source = new TaskCompletionSource<IMessage>();
TransportMessage<IMessage> message = new TransportMessage<IMessage>(container.Token, request, TransportMessageDirection.Request, () => container.ToByteArray(), source);
@@ -407,6 +412,11 @@ namespace Tango.Transport
LogManager.Log("Queuing request message: " + container.Type + " Token: " + container.Token, LogCategory.Debug);
LogManager.Log("Expected response: " + responseName, LogCategory.Debug);
+ if (State != TransportComponentState.Connected)
+ {
+ throw LogManager.Log(new InvalidOperationException($"Could not send the request while transporter state is {State}."));
+ }
+
TaskCompletionSource<MessageContainer> source = new TaskCompletionSource<MessageContainer>();
TransportMessage<MessageContainer> message = new TransportMessage<MessageContainer>(container.Token, container, TransportMessageDirection.Request, () => container.ToByteArray(), source);
@@ -446,6 +456,11 @@ namespace Tango.Transport
PendingResponse pendingResponse = null;
+ if (State != TransportComponentState.Connected)
+ {
+ throw LogManager.Log(new InvalidOperationException($"Could not send the response while transporter state is {State}."));
+ }
+
LogManager.Log("Searching for matching request token: " + token, LogCategory.Debug);
if (_pendingResponses.TryGetValue(token, out pendingResponse))
@@ -495,6 +510,11 @@ namespace Tango.Transport
LogManager.Log("Queuing continuous request message: " + requestName + " Token: " + container.Token, LogCategory.Debug);
+ if (State != TransportComponentState.Connected)
+ {
+ throw LogManager.Log(new InvalidOperationException($"Could not send the request while transporter state is {State}."));
+ }
+
Subject<IMessage> subject = new Subject<IMessage>();
LogManager.Log("Expected response: " + responseName, LogCategory.Debug);
@@ -541,6 +561,11 @@ namespace Tango.Transport
LogManager.Log("Queuing request message: " + typeof(Request).Name + " Token: " + request.Container.Token, LogCategory.Debug);
LogManager.Log("Expected response: " + typeof(Response).Name, LogCategory.Debug);
+ if (State != TransportComponentState.Connected)
+ {
+ throw LogManager.Log(new InvalidOperationException($"Could not send the request while transporter state is {State}."));
+ }
+
request.Container.Timeout = timeout.HasValue ? (UInt32)timeout.Value.TotalMilliseconds : (UInt32)RequestTimeout.TotalMilliseconds;
TaskCompletionSource<TangoMessage<Response>> source = new TaskCompletionSource<TangoMessage<Response>>();
@@ -583,6 +608,11 @@ namespace Tango.Transport
LogManager.Log("Expected response: " + typeof(Response).Name, LogCategory.Debug);
+ if (State != TransportComponentState.Connected)
+ {
+ throw LogManager.Log(new InvalidOperationException($"Could not send the request while transporter state is {State}."));
+ }
+
request.Container.Continuous = true;
request.Container.Completed = false;
@@ -655,6 +685,11 @@ namespace Tango.Transport
LogManager.Log("Queuing continuous request message: " + requestName + " Token: " + container.Token, LogCategory.Debug);
+ if (State != TransportComponentState.Connected)
+ {
+ throw LogManager.Log(new InvalidOperationException($"Could not send the request while transporter state is {State}."));
+ }
+
Subject<MessageContainer> subject = new Subject<MessageContainer>();
LogManager.Log("Expected response: " + responseName, LogCategory.Debug);
@@ -758,6 +793,11 @@ namespace Tango.Transport
LogManager.Log("Queuing response message: " + typeof(Response).Name, LogCategory.Debug);
+ if (State != TransportComponentState.Connected)
+ {
+ throw LogManager.Log(new InvalidOperationException($"Could not send the response while transporter state is {State}."));
+ }
+
PendingResponse pendingResponse = null;
LogManager.Log("Searching for matching request token: " + token, LogCategory.Debug);