aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy.mail.net@gmail.com>2023-07-20 15:20:40 +0300
committerRoy Ben-Shabat <Roy.mail.net@gmail.com>2023-07-20 15:20:40 +0300
commitbbd13dd113d27c1c07c349716cb9e63f6b6361cd (patch)
treecb736683f53962e13e9850a491b717e166ee6406 /Software/Visual_Studio
parent9b6c2a3d1bc63d2b61ef4e8e15e87482731d68c7 (diff)
parentb85112b0931a41924fa6e6d2bf262b56314c0734 (diff)
downloadTango-bbd13dd113d27c1c07c349716cb9e63f6b6361cd.tar.gz
Tango-bbd13dd113d27c1c07c349716cb9e63f6b6361cd.zip
Merge branch 'eureka' of https://twinetfs.visualstudio.com/Tango/_git/Tango into eureka
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj9
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MainViewVM.cs7
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs226
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/EurekaMaintenanceView.xaml250
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/EurekaMaintenanceView.xaml.cs28
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml3
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs5
-rw-r--r--Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs10
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs2
10 files changed, 534 insertions, 10 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj
index 43a850289..12597323e 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj
@@ -96,6 +96,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Views\EurekaMaintenanceView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
<Page Include="Views\GeneralGuideView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -161,6 +165,9 @@
<Compile Include="ViewModels\GeneralGuideViewVM.cs" />
<Compile Include="ViewModels\MaintenanceViewVM.cs" />
<Compile Include="ViewModels\MainViewVM.cs" />
+ <Compile Include="Views\EurekaMaintenanceView.xaml.cs">
+ <DependentUpon>EurekaMaintenanceView.xaml</DependentUpon>
+ </Compile>
<Compile Include="Views\GeneralGuideView.xaml.cs">
<DependentUpon>GeneralGuideView.xaml</DependentUpon>
</Compile>
@@ -318,7 +325,7 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MainViewVM.cs
index a614f7be2..0f3dad397 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MainViewVM.cs
@@ -25,7 +25,12 @@ namespace Tango.PPC.Maintenance.ViewModels
public override void OnNavigatedTo()
{
base.OnNavigatedTo();
- NavigationManager.NavigateTo<MaintenanceModule>(nameof(MaintenanceView), false);
+ if(BuildProvider.IsEureka)
+ {
+ NavigationManager.NavigateTo<MaintenanceModule>(nameof(EurekaMaintenanceView), false);
+ }
+ else
+ NavigationManager.NavigateTo<MaintenanceModule>(nameof(MaintenanceView), false);
}
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs
index cd646ce02..4dbd26fdc 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs
@@ -2,11 +2,14 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.ComponentModel;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL;
+using Tango.BL.Builders;
+using Tango.BL.Entities;
using Tango.Core;
using Tango.Core.Commands;
using Tango.Explorer;
@@ -15,6 +18,7 @@ using Tango.Logging;
using Tango.PMR.Diagnostics;
using Tango.PMR.IFS;
using Tango.PMR.MachineStatus;
+using Tango.PMR.ThreadLoading;
using Tango.PPC.Common;
using Tango.PPC.Maintenance.Commands;
using Tango.PPC.Maintenance.Dialogs;
@@ -27,8 +31,34 @@ namespace Tango.PPC.Maintenance.ViewModels
{
public class MaintenanceViewVM : PPCViewModel
{
+ public enum Boards
+ {
+ [Description("Main")]
+ Main = 1,
+ [Description("Dryer")]
+ Dryer = 2,
+ [Description("Heads")]
+ Heads = 3,
+ [Description("Midtanks")]
+ Midtanks = 4,
+ [Description("Lubricant")]
+ Lubricant = 5,
+ [Description("Dispensers")]
+ Dispensers = 6,
+ [Description("Winders")]
+ Winders = 7
+ }
public class WasteStateModel : ExtendedObject
{
+ public class RMLDisplayModel
+ {
+ public String Name { get; set; }
+
+ public String Guid { get; set; }
+
+ public String FinalName { get; set; }
+ }
+
private CartridgeState _state;
public CartridgeState State
{
@@ -99,6 +129,76 @@ namespace Tango.PPC.Maintenance.ViewModels
set { _isInkAutoFillingEnabled = value; RaisePropertyChangedAuto(); OnInkAutoFillingChanged(); }
}
+ public List<Boards> ListBoards { get { return typeof(Boards).GetEnumValues().Cast<Boards>().ToList(); } }
+
+ private Boards _selectedBoard;
+
+ public Boards SelecteadBoard
+ {
+ get { return _selectedBoard; }
+ set { _selectedBoard = value;
+ RaisePropertyChangedAuto();
+ }
+ }
+ public List<Rml> Rmls { get; set; }
+
+ private ObservableCollection<WasteStateModel.RMLDisplayModel> _RMLDisplayList;
+
+ public ObservableCollection<WasteStateModel.RMLDisplayModel> RMLDisplayList
+ {
+ get { return _RMLDisplayList; }
+ set { _RMLDisplayList = value;
+ RaisePropertyChangedAuto();}
+ }
+
+
+ private WasteStateModel.RMLDisplayModel _selectedRML;
+ public WasteStateModel.RMLDisplayModel SelectedRML
+ {
+ get { return _selectedRML; }
+ set
+ {
+ if (_selectedRML != value)
+ {
+ _selectedRML = value;
+ RaisePropertyChangedAuto();
+ }
+ }
+ }
+
+ private String _threadLoadingStatus;
+
+ public String ThreadLoadingStatus
+ {
+ get { return _threadLoadingStatus; }
+ set {
+ _threadLoadingStatus = value;
+ RaisePropertyChangedAuto();
+ }
+ }
+
+ private bool _readyForLoading;
+
+ public bool ReadyForLoading
+ {
+ get { return _readyForLoading; }
+ set { _readyForLoading = value;
+ RaisePropertyChangedAuto();}
+ }
+
+ private bool _startedDryerWinding;
+
+ public bool StartedDryerWinding
+ {
+ get { return _startedDryerWinding; }
+ set
+ {
+ _startedDryerWinding = value;
+ RaisePropertyChangedAuto();
+ }
+ }
+
+
public RelayCommand ExportLogsCommand { get; set; }
public OpenCloseDyeingHeadCommand OpenCloseDyeingHeadCommand { get; set; }
@@ -119,6 +219,12 @@ namespace Tango.PPC.Maintenance.ViewModels
public RelayCommand ViewBitResultsCommand { get; set; }
+ public RelayCommand ResetBoardCommand { get; set; }
+
+ public RelayCommand MoveToLoadPositionCommand { get; set; }
+
+ public RelayCommand StartDryerWindingCommand { get; set; }
+
public MaintenanceViewVM()
{
Guides = new ObservableCollection<GuideBase>(GuideHelper.CreateAllGuides());
@@ -135,19 +241,30 @@ namespace Tango.PPC.Maintenance.ViewModels
StartThreadLoadingCommand = new RelayCommand(StartThreadLoadingWizard, () => MachineProvider.MachineOperator.CanPrint);
StartThreadBreakCommand = new RelayCommand(StartThreadBreakWizard, () => MachineProvider.MachineOperator.CanPrint);
ViewBitResultsCommand = new RelayCommand(ViewBitResult, () => MachineProvider.MachineOperator.IsConnected);
+
+
+ ResetBoardCommand = new RelayCommand(RunReset, () => MachineProvider.MachineOperator.IsConnected);
+
+ MoveToLoadPositionCommand = new RelayCommand( MoveToLoadPosition, () => { return MachineProvider.MachineOperator.IsConnected && MachineProvider.MachineOperator.CanPrint && false == StartedDryerWinding; });
+ StartDryerWindingCommand = new RelayCommand(StartDryerWinding, () => ReadyForLoading);
WasteStates = new List<WasteStateModel>()
{
new WasteStateModel() { Slot = CartridgeSlot.WasteMiddle, State = CartridgeState.Absent },
new WasteStateModel() { Slot = CartridgeSlot.WasteLower, State = CartridgeState.Absent }
};
+
+ SelecteadBoard = Boards.Dryer;
+ ReadyForLoading = false;
}
+
public override void OnApplicationStarted()
{
MachineProvider.MachineOperator.InkFillingStatusChanged += MachineOperator_InkFillingStatusChanged;
MachineProvider.MachineOperator.MachineStatusChanged += MachineOperator_MachineStatusChanged;
MachineProvider.MachineOperator.MachineEventsStateProvider.EventsChanged += MachineEventsStateProvider_EventsChanged;
+ MachineProvider.MachineOperator.ThreadLoadingStatusChanged += MachineOperator_ThreadLoadingStatusChanged;
DispenseCleanerLiquidCommand = new RelayCommand(DispenseCleanerLiquid, () =>
{
@@ -163,6 +280,19 @@ namespace Tango.PPC.Maintenance.ViewModels
RaisePropertyChanged(nameof(DispenseCleanerLiquidCommand));
}
+
+ public async void CresteRMLS()
+ {
+ using (ObservablesContext db = ObservablesContext.CreateDefault())
+ {
+ LogManager.Log("Loading RMLS...");
+ Rmls = (await new RmlsCollectionBuilder(db).SetAll().WithActiveParametersGroup().ForHeadType(MachineProvider.Machine.MachineHeadType).ForSite(MachineProvider.Machine.SiteGuid).BuildAsync()).OrderBy(x => x.FinalName).ToList();
+
+ //Rmls = (await new RmlsCollectionBuilder(db).SetAll().WithActiveParametersGroup().BuildAsync()).OrderBy(x => x.FinalName).ToList();
+ RMLDisplayList = Rmls.Select(p => new WasteStateModel.RMLDisplayModel { Guid = p.Guid, Name = p.Name, FinalName = p.FinalName }).OrderBy(x => x.FinalName).ToObservableCollection();
+ SelectedRML = RMLDisplayList.FirstOrDefault();
+ }
+ }
public override void OnApplicationReady()
{
@@ -173,6 +303,9 @@ namespace Tango.PPC.Maintenance.ViewModels
Max = MachineOperator.MAX_MIDTANK_LITERS,
IDSPack = x,
}).OrderBy(y => y.IDSPack.LiquidType.Code).ToList();
+
+ if (Rmls == null)
+ CresteRMLS();
}
private void MachineEventsStateProvider_EventsChanged(object sender, IEnumerable<BL.Entities.MachinesEvent> e)
@@ -208,6 +341,60 @@ namespace Tango.PPC.Maintenance.ViewModels
}
}
+ private void MachineOperator_ThreadLoadingStatusChanged(object sender, StartThreadLoadingResponse e)
+ {
+ if( e != null)
+ {
+ var State = e.State;
+ switch (e.State)
+ {
+ case ThreadLoadingState.Preparing:
+ {
+ ThreadLoadingStatus = "Moving to load position";
+ break;
+ }
+ case ThreadLoadingState.ReadyForLoading:
+ {
+ ReadyForLoading = true;
+ ThreadLoadingStatus = "Ready for thread loading.";
+ break;
+ }
+ case ThreadLoadingState.PreparationError:
+ {
+ ThreadLoadingStatus = "Failed to move. Please inspect and try again.";
+ break;
+ }
+ case ThreadLoadingState.Finalizing:
+ {
+ ThreadLoadingStatus = "Thread loading is running.";
+ ReadyForLoading = false;
+ break;
+ }
+ case ThreadLoadingState.FinalizationError:
+ {
+ ThreadLoadingStatus = $"Thread loading failed.{e.ErrorReason}";
+ ReadyForLoading = false;
+ StartedDryerWinding = false;
+ break;
+ }
+ case ThreadLoadingState.Completed:
+ {
+ ReadyForLoading = false;
+ StartedDryerWinding = false;
+ ThreadLoadingStatus = "Thread loading completed successfully.";
+ break;
+ }
+ default:
+ {
+ ThreadLoadingStatus = "";
+ StartedDryerWinding = false;
+ return;
+ }
+
+ };
+ }
+ }
+
public async void OpenGuide(GuideBase guide)
{
await NavigationManager.NavigateWithObject<MaintenanceModule, GeneralGuideView, GuideBase>(guide);
@@ -385,5 +572,44 @@ namespace Tango.PPC.Maintenance.ViewModels
{
await BitManager.ShowBitResultsDialog();
}
+
+ private async void RunReset()
+ {
+ try
+ {
+ await MachineProvider.MachineOperator.ResetCard(SelecteadBoard.ToInt32());
+ await NotificationProvider.ShowInfo($"The {SelecteadBoard.ToDescription()} was reset successfully!");
+ }
+ catch (Exception ex)
+ {
+ await NotificationProvider.ShowError($"We could not reset the {SelecteadBoard.ToDescription()}.\n{ex.FlattenMessage()}");
+ }
+ }
+
+ private void MoveToLoadPosition(object obj)
+ {
+ MachineProvider.MachineOperator.StartThreadLoading();
+ }
+
+ private void StartDryerWinding(object obj)
+ {
+ try
+ {
+ var rml = Rmls.Where( x=> x.Guid == SelectedRML.Guid).FirstOrDefault();
+ if(rml != null && rml.GetActiveProcessGroup()!= null)
+ {
+ var processParametersTable = rml.GetActiveProcessGroup().ProcessParametersTables.FirstOrDefault();
+ if(processParametersTable != null)
+ {
+ StartedDryerWinding = true;
+ MachineProvider.MachineOperator.ContinueThreadLoading(processParametersTable.Clone());
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ StartedDryerWinding = false;
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/EurekaMaintenanceView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/EurekaMaintenanceView.xaml
new file mode 100644
index 000000000..f418361e6
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/EurekaMaintenanceView.xaml
@@ -0,0 +1,250 @@
+<UserControl x:Class="Tango.PPC.Maintenance.Views.EurekaMaintenanceView"
+ 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:vm="clr-namespace:Tango.PPC.Maintenance.ViewModels"
+ xmlns:global="clr-namespace:Tango.PPC.Maintenance"
+ xmlns:ifs="clr-namespace:Tango.PMR.IFS;assembly=Tango.PMR"
+ xmlns:local="clr-namespace:Tango.PPC.Maintenance.Views"
+ xmlns:localConverters="clr-namespace:Tango.PPC.Maintenance.Converters"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:localControls="clr-namespace:Tango.PPC.Maintenance.Controls"
+ xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
+ mc:Ignorable="d"
+ d:DesignHeight="1800" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MaintenanceViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MaintenanceViewVM}">
+ <UserControl.Resources>
+
+ <converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
+ <localConverters:StringToFirstLetterConverter x:Key="StringToFirstLetterConverter" />
+ <localConverters:MidTankLevelToElementHeightConverter x:Key="MidTankLevelToElementHeightConverter" />
+ <localConverters:LiquidTypeToBrushConverter x:Key="LiquidTypeToBrushConverter" />
+ <localConverters:LiquidTypeToShortNameConverter x:Key="LiquidTypeToShortNameConverter"/>
+
+ <Style TargetType="FrameworkElement" x:Key="Level1Container">
+ <Setter Property="Margin" Value="20 15 60 15"></Setter>
+ </Style>
+ <Style TargetType="FrameworkElement" x:Key="Level2Container">
+ <Setter Property="Margin" Value="80 30 60 0"></Setter>
+ </Style>
+ <Style TargetType="FrameworkElement" x:Key="Level2ContainerExtraMargin">
+ <Setter Property="Margin" Value="80 40 60 0"></Setter>
+ </Style>
+
+ <DataTemplate x:Key="LiquidBox">
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top" Text="{Binding IDSPack.LiquidType.ShortName}" HorizontalAlignment="Center"></TextBlock>
+ <Grid MaxWidth="20" Margin="1 0">
+ <touch:TouchIcon Icon="MapMarkerSolid" Width="20" Height="20" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 0 0 10" Foreground ="{Binding Path=IDSPack.LiquidType, Converter={StaticResource LiquidTypeToBrushConverter}}">
+ <touch:TouchIcon.Style>
+ <Style TargetType="touch:TouchIcon">
+ <Setter Property="Visibility" Value="Hidden"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsLow}" Value="True">
+ <Setter Property="Visibility" Value="Visible"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IsEmpty}" Value="True">
+ <DataTrigger.EnterActions>
+ <BeginStoryboard Name="blinkDrop">
+ <Storyboard>
+ <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Duration="00:00:01" RepeatBehavior="Forever">
+ <DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="1" />
+ <DiscreteDoubleKeyFrame KeyTime="00:00:0.5" Value="0" />
+ </DoubleAnimationUsingKeyFrames>
+ </Storyboard>
+ </BeginStoryboard>
+ </DataTrigger.EnterActions>
+ <DataTrigger.ExitActions>
+ <RemoveStoryboard BeginStoryboardName="blinkDrop" />
+ </DataTrigger.ExitActions>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </touch:TouchIcon.Style>
+ </touch:TouchIcon>
+ <Border BorderThickness="1" BorderBrush="{StaticResource TangoLightBorderBrush}" CornerRadius="3" ClipToBounds="True" x:Name="pathBorder">
+ <Canvas Width="30" >
+ <Path Panel.ZIndex="1" VerticalAlignment="Bottom" ClipToBounds="True" MinHeight="2" Data="M0,0 C2,0 8.9,-1.1705073 11.3,-4.6 14.5,-7.7 15.5,-8 18.7,-10.8 21.7,-13.16 23.3,-14.5 28,-15.6 28,-13.7 28,80 28,100 L0,100 z" Height="90" Width="29" Stretch="Fill"
+ Canvas.Left="0" Fill="{Binding Path=IDSPack.LiquidType, Converter={StaticResource LiquidTypeToBrushConverter}}" Margin="0 -14 0 0" >
+
+ <Path.Style>
+ <Style>
+ <Setter Property="Canvas.Top" >
+ <Setter.Value>
+ <MultiBinding Converter="{StaticResource MidTankLevelToElementHeightConverter}">
+ <Binding ElementName="pathBorder" Path="ActualHeight" />
+ <Binding Path="Level" />
+ </MultiBinding>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ </Path.Style>
+ </Path>
+ </Canvas>
+ </Border>
+ </Grid>
+ </DockPanel>
+ </DataTemplate>
+ </UserControl.Resources>
+
+ <Grid Background="{StaticResource TangoMidBackgroundBrush}" IsEnabled="{Binding IsFree}">
+ <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">Maintenance</TextBlock>
+ </Border>-->
+
+ <Grid Grid.Row="1">
+ <touch:LightTouchScrollViewer>
+ <StackPanel Margin="10 20 10 0">
+ <!--ACTIONS-->
+ <touch:TouchDropShadowBorder Margin="0 0 0 0" Padding="0 0 0 0" MinHeight="330">
+ <StackPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
+ <Image Source="../Images/action.png" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Actions</TextBlock>
+ </StackPanel>
+ <Grid >
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition Width="1*"/>
+ </Grid.ColumnDefinitions>
+ <Grid >
+ <StackPanel Orientation="Vertical" Margin="80 0 0 0" Width="300" >
+ <touch:TouchButton Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding HeadCleaningCommand}">RUN HEAD CLEANING</touch:TouchButton>
+
+ <touch:TouchButton Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding ViewBitResultsCommand}">VIEW BIT RESULTS</touch:TouchButton>
+ </StackPanel>
+ </Grid>
+
+ </Grid>
+ <!--</StackPanel>-->
+
+ <!--</touch:TouchDropShadowBorder>-->
+
+ <touch:TouchDropShadowBorder Margin="0 0 0 0" Padding="0" MinHeight="116">
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="30 0 30 0" Height="116">
+ <TextBox VerticalAlignment="Center" Text="Reset Specific Boards:" FontSize="{StaticResource TangoExpanderHeaderFontSize}"></TextBox>
+ <Border Margin="49 0 0 0" BorderThickness="1" Height="50" CornerRadius="22" BorderBrush="{StaticResource TangoMidAccentBrush}">
+ <touch:TouchComboBox Margin="20 0 10 0" ItemsSource="{Binding ListBoards}" SelectedItem="{Binding SelecteadBoard,Mode=TwoWay}" Focusable="False" KeyboardNavigation.TabNavigation ="None" Width="260">
+ <touch:TouchComboBox.ItemTemplate>
+ <DataTemplate>
+ <TextBlock Margin="20 10 10 10" TextTrimming="CharacterEllipsis" FontSize="{StaticResource TangoDialogFontSize}" Text="{Binding Converter={StaticResource EnumToDescriptionConverter}}"/>
+
+ </DataTemplate>
+ </touch:TouchComboBox.ItemTemplate>
+ <touch:TouchComboBox.SelectedItemTemplate>
+ <DataTemplate>
+ <TextBlock Margin="0 0 0 5" FontSize="{StaticResource TangoDialogFontSize}" Text="{Binding Converter={StaticResource EnumToDescriptionConverter}}" VerticalAlignment="Center"></TextBlock>
+ </DataTemplate>
+ </touch:TouchComboBox.SelectedItemTemplate>
+ </touch:TouchComboBox>
+ </Border>
+ <touch:TouchButton Margin="30 0 0 0" Width="120" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding ResetBoardCommand}">RUN</touch:TouchButton>
+
+ </StackPanel>
+ </touch:TouchDropShadowBorder>
+ </StackPanel>
+ </touch:TouchDropShadowBorder>
+ <!--THREAD LOADING-->
+ <touch:TouchDropShadowBorder Margin="0 10 0 0" Padding="0 0 0 50" MinHeight="330">
+ <StackPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
+ <Image Source="../Images/thread_loading.png" Width="48" RenderOptions.BitmapScalingMode="Fant" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Thread Loading</TextBlock>
+ </StackPanel>
+
+ <StackPanel Margin="80 40 30 0">
+ <UniformGrid Columns="1" Margin="0" HorizontalAlignment="Left">
+ <DockPanel HorizontalAlignment="Stretch" >
+ <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Text="Thread" FontWeight="Medium" FontSize="{StaticResource TangoDialogFontSize}" Width="110"/>
+ <Border Margin="20 0 0 0" BorderThickness="1" Height="44" CornerRadius="22" BorderBrush="{StaticResource TangoMidAccentBrush}">
+ <touch:TouchComboBox Margin="20 0 10 10" ItemsSource="{Binding RMLDisplayList}" SelectedItem="{Binding SelectedRML,Mode=TwoWay}" Focusable="False" KeyboardNavigation.TabNavigation ="None">
+ <touch:TouchComboBox.ItemTemplate>
+ <DataTemplate>
+ <TextBlock Margin="20 10 10 10" TextTrimming="CharacterEllipsis" FontSize="{StaticResource TangoDialogFontSize}" Text="{Binding FinalName}">
+
+ </TextBlock>
+ </DataTemplate>
+ </touch:TouchComboBox.ItemTemplate>
+ <touch:TouchComboBox.SelectedItemTemplate>
+ <DataTemplate>
+ <TextBlock Margin="0 0 0 0" FontSize="{StaticResource TangoDialogFontSize}" Text="{Binding FinalName}" VerticalAlignment="Center" ></TextBlock>
+ </DataTemplate>
+ </touch:TouchComboBox.SelectedItemTemplate>
+ </touch:TouchComboBox>
+ </Border>
+ </DockPanel>
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchButton Width="280" HorizontalAlignment="Left" Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding MoveToLoadPositionCommand}">MOVE TO LOAD POSITION</touch:TouchButton>
+
+ <TextBlock Width="340" VerticalAlignment="Center" Margin="10 0 0 0" TextAlignment="Left" FontSize="{StaticResource TangoSmallFontSize}" FontWeight="Normal" Text="Press when the Thread Loading Jig is installed on the Thread Traveler, and is holding the incoming thread." TextWrapping="Wrap"/>
+
+ </StackPanel>
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchButton Width="280" HorizontalAlignment="Left" Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}" Command="{Binding StartDryerWindingCommand}">START DRYER WINDING</touch:TouchButton>
+ <TextBlock Width="340" VerticalAlignment="Center" Margin="10 0 0 0" TextAlignment="Left" FontSize="{StaticResource TangoSmallFontSize}" FontWeight="Normal"
+ Text="Press only when:&#10;1. The Thread Traveler reached the dryer load position &#10;2. The Thread Loading Jig is installed on the Dryer &#10;3. The Loading Comb is released"/>
+
+ </StackPanel>
+ <DockPanel HorizontalAlignment="Stretch" LastChildFill="True">
+ <Border HorizontalAlignment="Stretch" Margin="10 20 0 10" CornerRadius="5" BorderBrush="{StaticResource TangoPrimaryAccentBrush}" BorderThickness="0.8">
+ <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" TextAlignment="Left" FontStyle="Italic" FontSize="18" FontWeight="Light" Text="{Binding ThreadLoadingStatus}" TextWrapping="Wrap" />
+ </Border>
+ </DockPanel>
+ </UniformGrid>
+ </StackPanel>
+ </StackPanel>
+ </touch:TouchDropShadowBorder>
+
+ <!--GUIDES-->
+ <!--<touch:TouchDropShadowBorder Margin="0 20 0 0" Padding="0 0 0 50">
+ <StackPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
+ <Image Source="../Images/guides.png" />
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Guides</TextBlock>
+ </StackPanel>
+
+ <StackPanel Margin="65 10 0 0">
+ <ItemsControl ItemsSource="{Binding Guides}">
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <UniformGrid Columns="2" IsItemsHost="True" />
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <touch:TouchButton Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.OpenGuideCommand}" CommandParameter="{Binding}" Padding="20" FontSize="{StaticResource TangoTitleFontSize}" Style="{StaticResource TangoLinkButton}" HorizontalAlignment="Left">
+ <TextBlock Text="{Binding Name}"></TextBlock>
+ </touch:TouchButton>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
+ </ItemsControl>
+ </StackPanel>
+ </StackPanel>
+ </touch:TouchDropShadowBorder>-->
+
+ <!--JOB RUNS-->
+ <!--<StackPanel Margin="0 20 0 20" TextElement.FontSize="{StaticResource TangoTitleFontSize}" TextElement.Foreground="{StaticResource TangoGrayTextBrush}">
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
+ <TextBlock FontWeight="SemiBold">Total Dyeing Time:</TextBlock>
+ <TextBlock Margin="10 0 0 0" Text="{Binding TotalDyeTime,Mode=OneWay,FallbackValue=0}"></TextBlock>
+ </StackPanel>
+
+ <StackPanel Orientation="Horizontal" Margin="0 10 0 0" HorizontalAlignment="Center">
+ <TextBlock FontWeight="SemiBold">Total Dyed Length:</TextBlock>
+ <TextBlock Margin="10 0 0 0" Text="{Binding TotalDyeMeters,Mode=OneWay,FallbackValue=0}"></TextBlock>
+ </StackPanel>
+ </StackPanel>-->
+
+ </StackPanel>
+ </touch:LightTouchScrollViewer>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/EurekaMaintenanceView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/EurekaMaintenanceView.xaml.cs
new file mode 100644
index 000000000..8161f1fcb
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/EurekaMaintenanceView.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.Maintenance.Views
+{
+ /// <summary>
+ /// Interaction logic for EurikaMaintenanceView.xaml
+ /// </summary>
+ public partial class EurekaMaintenanceView : UserControl
+ {
+ public EurekaMaintenanceView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml
index be6161952..15c01f4e0 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MainView.xaml
@@ -14,7 +14,8 @@
<Grid>
<controls:NavigationControl TransitionType="Slide" TransitionDuration="00:00:0.2" KeepElementsAttached="True">
- <views:MaintenanceView/>
+ <views:MaintenanceView Visibility="{Binding BuildProvider.IsEureka,Converter={StaticResource BooleanToVisibilityInverseConverter}}"/>
+ <views:EurekaMaintenanceView Visibility="{Binding BuildProvider.IsEureka,Converter={StaticResource BooleanToVisibilityConverter}}"/>
<views:GeneralGuideView/>
</controls:NavigationControl>
</Grid>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
index 9e15abbe0..7f67a4444 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
@@ -396,6 +396,10 @@ namespace Tango.PPC.Common.Connection
machineOperator.EnableJobLiquidQuantityValidation = false;
machineOperator.EnablePowerUpSequence = false;
+#if Eureka
+ machineOperator.MachineType = BL.Enumerations.MachineTypes.Eureka;
+#endif
+
LogManager.Default.Log("Starting machine connection procedure...");
var settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs
index a6479da63..4d6a848d3 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ThreadLoading/DefaultThreadLoadingService.cs
@@ -3,7 +3,9 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Tango.Core.DI;
using Tango.Integration.Operation;
+using Tango.PPC.Common.Build;
using Tango.PPC.Common.Connection;
using Tango.PPC.Common.Notifications;
using Tango.PPC.Common.Threading;
@@ -24,7 +26,8 @@ namespace Tango.PPC.UI.ThreadLoading
_notificationsProvider = notificationsProvider;
_machineProvider = machineProvider;
_dispatcher = dispatcher;
- _machineProvider.MachineOperator.ThreadLoadingStatusChanged += MachineOperator_ThreadLoadingStatusChanged;
+ if(false == TangoIOC.Default.GetInstance<IBuildProvider>().IsEureka)
+ _machineProvider.MachineOperator.ThreadLoadingStatusChanged += MachineOperator_ThreadLoadingStatusChanged;
}
private void MachineOperator_ThreadLoadingStatusChanged(object sender, PMR.ThreadLoading.StartThreadLoadingResponse e)
diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
index a081efb25..e589d5970 100644
--- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
+++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs
@@ -1946,11 +1946,11 @@ namespace Tango.Emulations.Emulators
await Transporter.SendResponse<StartThreadLoadingResponse>(new StartThreadLoadingResponse() { State = ThreadLoadingState.Preparing }, _threadLoadingToken);
await Task.Delay(8000);
- if (_rnd.Next(0, 100) > 50)
- {
- await Transporter.SendResponse<StartThreadLoadingResponse>(new StartThreadLoadingResponse() { State = ThreadLoadingState.PreparationError, ErrorReason = "Emulator preparation random error." }, _threadLoadingToken);
- }
- else
+ //if (_rnd.Next(0, 100) > 50)
+ //{
+ // await Transporter.SendResponse<StartThreadLoadingResponse>(new StartThreadLoadingResponse() { State = ThreadLoadingState.PreparationError, ErrorReason = "Emulator preparation random error." }, _threadLoadingToken);
+ //}
+ //else
{
await Transporter.SendResponse<StartThreadLoadingResponse>(new StartThreadLoadingResponse() { State = ThreadLoadingState.ReadyForLoading }, _threadLoadingToken);
}
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index d312f0066..7b4ce4abc 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -4654,7 +4654,7 @@ namespace Tango.Integration.Operation
/// <returns></returns>
public Task ResetCard(int cardID)
{
- return SendRequest<ResetCardRequest, ResetCardResponse>(new ResetCardRequest() { }, new TransportRequestConfig() { Timeout = TimeSpan.FromSeconds(10) });
+ return SendRequest<ResetCardRequest, ResetCardResponse>(new ResetCardRequest() { }, new TransportRequestConfig() { Timeout = TimeSpan.FromSeconds(3) });
}
#endregion