diff options
| author | Roy <Roy.mail.net@gmail.com> | 2023-05-23 10:42:21 +0300 |
|---|---|---|
| committer | Roy <Roy.mail.net@gmail.com> | 2023-05-23 10:42:21 +0300 |
| commit | 304735006580cb2f6728bedeb3393dbefc2e14f5 (patch) | |
| tree | 8650d4baeb0b4db1f68b0fae3a0a8ddb7e66bdc0 | |
| parent | 79cc4b56962ca4a508be501f7f2fb42938a3a073 (diff) | |
| parent | b981d43669a2cdcd9f7971e897ded9f1422f5b31 (diff) | |
| download | Tango-304735006580cb2f6728bedeb3393dbefc2e14f5.tar.gz Tango-304735006580cb2f6728bedeb3393dbefc2e14f5.zip | |
Merge branch 'eureka' of https://twinetfs.visualstudio.com/Tango/_git/Tango into eureka
39 files changed, 2130 insertions, 887 deletions
diff --git a/Software/Visual_Studio/Advanced Installer Projects/Eureka Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/Eureka Installer.aip index c3a8d6868..c1ff02c34 100644 --- a/Software/Visual_Studio/Advanced Installer Projects/Eureka Installer.aip +++ b/Software/Visual_Studio/Advanced Installer Projects/Eureka Installer.aip @@ -15,10 +15,10 @@ <ROW Property="CTRLS" Value="2"/> <ROW Property="ExtractFilesFirst" Value="1"/> <ROW Property="Manufacturer" Value="Twine Solutions LTD"/> - <ROW Property="ProductCode" Value="1033:{1F5BA036-DCA1-46C2-9871-B075E1B3A078} " Type="16"/> + <ROW Property="ProductCode" Value="1033:{F8FA8ADD-EE53-487E-894A-5F57E2036781} " Type="16"/> <ROW Property="ProductLanguage" Value="1033"/> <ROW Property="ProductName" Value="Twine X4"/> - <ROW Property="ProductVersion" Value="2.0.2.0" Type="32" TargetFile="Tango.PPC.UI.exe"/> + <ROW Property="ProductVersion" Value="2.0.4.0" Type="32" TargetFile="Tango.PPC.UI.exe"/> <ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/> <ROW Property="UpgradeCode" Value="{4D8FDA03-F63E-4002-9A96-4BDE65B04355}"/> <ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/> @@ -47,8 +47,11 @@ <ROW Component="ColorMine.dll" ComponentId="{9B139184-3E64-4BB9-955B-58583A266459}" Directory_="APPDIR" Attributes="0" KeyPath="ColorMine.dll"/> <ROW Component="CommandLine.dll" ComponentId="{B36C45CA-B159-4968-A2D5-0BBA85EDBB64}" Directory_="APPDIR" Attributes="0" KeyPath="CommandLine.dll"/> <ROW Component="ControlzEx.dll" ComponentId="{531AF187-B39C-48E6-9136-6238854A1C75}" Directory_="APPDIR" Attributes="0" KeyPath="ControlzEx.dll"/> + <ROW Component="DirectShowLib2005.dll" ComponentId="{15923B8D-71FF-46B0-B1E0-2753A5765F7E}" Directory_="APPDIR" Attributes="0" KeyPath="DirectShowLib2005.dll"/> <ROW Component="DocumentFormat.OpenXml.dll" ComponentId="{4EB39E8C-3B91-49E5-AA7A-281583E66544}" Directory_="APPDIR" Attributes="0" KeyPath="DocumentFormat.OpenXml.dll"/> <ROW Component="EFCache.dll" ComponentId="{3BFE31B3-158C-47AA-80A9-9FE8E6EB67F5}" Directory_="APPDIR" Attributes="0" KeyPath="EFCache.dll"/> + <ROW Component="EVRPresenter32.dll" ComponentId="{DC63912F-BBFC-432B-862E-622B00F54C32}" Directory_="APPDIR" Attributes="0" KeyPath="EVRPresenter32.dll"/> + <ROW Component="EVRPresenter64.dll" ComponentId="{4171532E-2880-4310-AF72-67D4F28BF5FB}" Directory_="APPDIR" Attributes="256" KeyPath="EVRPresenter64.dll"/> <ROW Component="EntityFramework.SqlServer.dll" ComponentId="{728B6CE9-DD44-42CA-8884-95BD5A3466AA}" Directory_="APPDIR" Attributes="0" KeyPath="EntityFramework.SqlServer.dll"/> <ROW Component="EntityFramework.dll" ComponentId="{67C07F0F-D157-4DA1-B657-991509D43F57}" Directory_="APPDIR" Attributes="0" KeyPath="EntityFramework.dll"/> <ROW Component="FluentFTP.dll" ComponentId="{C3DD16E3-01F3-4EA6-8BAE-C76FE5BEB694}" Directory_="APPDIR" Attributes="0" KeyPath="FluentFTP.dll"/> @@ -196,6 +199,7 @@ <ROW Component="Tango.Web.dll" ComponentId="{D3043D33-4676-48B4-B122-2F2B57BB20D2}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.Web.dll"/> <ROW Component="Tango.WebRTC.dll" ComponentId="{6FC621F5-A14A-4BBB-A3E5-774B982C3527}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.WebRTC.dll"/> <ROW Component="Tango.WiFi.dll" ComponentId="{BE79796A-C78B-4F03-B9E1-14DB08A8AE34}" Directory_="APPDIR" Attributes="0" KeyPath="Tango.WiFi.dll"/> + <ROW Component="WPFMediaKit.dll" ComponentId="{682E3B5C-3A2E-4EBE-A62C-48EC158A8E40}" Directory_="APPDIR" Attributes="0" KeyPath="WPFMediaKit.dll"/> <ROW Component="WebRtc.NET.dll" ComponentId="{937B957F-326D-44FF-AFA4-E863A10C31D3}" Directory_="APPDIR" Attributes="0" KeyPath="WebRtc.NET.dll"/> <ROW Component="WindowsInput.dll" ComponentId="{0B5BB534-35DF-4C8E-9EA9-343A0A313518}" Directory_="APPDIR" Attributes="0" KeyPath="WindowsInput.dll"/> <ROW Component="mscoree.dll" ComponentId="{AA32C32C-5143-4899-AD35-96FC51E521B0}" Directory_="APPDIR" Attributes="0" KeyPath="mscoree.dll"/> @@ -465,6 +469,11 @@ <ROW File="System.Spatial.dll" Component_="System.Spatial.dll" FileName="SYSTE~15.DLL|System.Spatial.dll" Attributes="0" SourcePath="..\Build\PPC\Eureka\System.Spatial.dll" SelfReg="false"/> <ROW File="Tango.DataStore.Lite.dll" Component_="Tango.DataStore.Lite.dll" FileName="TANGOD~7.DLL|Tango.DataStore.Lite.dll" Attributes="0" SourcePath="..\Build\PPC\Eureka\Tango.DataStore.Lite.dll" SelfReg="false"/> <ROW File="Tango.DataStore.Lite.pdb" Component_="Tango.DataStore.Lite.dll" FileName="TANGOD~7.PDB|Tango.DataStore.Lite.pdb" Attributes="0" SourcePath="..\Build\PPC\Eureka\Tango.DataStore.Lite.pdb" SelfReg="false"/> + <ROW File="Intro.wmv" Component_="GetVersionTag.bat" FileName="Intro.wmv" Attributes="0" SourcePath="..\Build\PPC\Eureka\Intro.wmv" SelfReg="false"/> + <ROW File="WPFMediaKit.dll" Component_="WPFMediaKit.dll" FileName="WPFMED~1.DLL|WPFMediaKit.dll" Attributes="0" SourcePath="..\Build\PPC\Eureka\WPFMediaKit.dll" SelfReg="false"/> + <ROW File="DirectShowLib2005.dll" Component_="DirectShowLib2005.dll" FileName="DIRECT~1.DLL|DirectShowLib-2005.dll" Attributes="0" SourcePath="..\Build\PPC\Eureka\DirectShowLib-2005.dll" SelfReg="false"/> + <ROW File="EVRPresenter32.dll" Component_="EVRPresenter32.dll" FileName="EVRPRE~1.DLL|EVRPresenter32.dll" Attributes="0" SourcePath="..\Build\PPC\Eureka\EVRPresenter32.dll" SelfReg="false"/> + <ROW File="EVRPresenter64.dll" Component_="EVRPresenter64.dll" FileName="EVRPRE~2.DLL|EVRPresenter64.dll" Attributes="0" SourcePath="..\Build\PPC\Eureka\EVRPresenter64.dll" SelfReg="false"/> </COMPONENT> <COMPONENT cid="caphyon.advinst.msicomp.BootstrOptComponent"> <ROW BootstrOptKey="GlobalOptions" DownloadFolder="[AppDataFolder][|Manufacturer]\[|ProductName]\prerequisites" Options="2"/> @@ -473,7 +482,7 @@ <ROW Action="AI_DetectSoftware" Sequence="101"/> </COMPONENT> <COMPONENT cid="caphyon.advinst.msicomp.BuildComponent"> - <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFolder="..\Build\Installers\Eureka" PackageFileName="TwineX4 Installer_v2.0.2" Languages="en" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" ExtUI="true" UseLargeSchema="true" ExeName="TwineX4 Installer_v2.0.2"/> + <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFolder="..\Build\Installers\Eureka" PackageFileName="TwineX4 Installer_v2.0.4" Languages="en" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" ExtUI="true" UseLargeSchema="true" ExeName="TwineX4 Installer_v2.0.4"/> </COMPONENT> <COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent"> <ROW Path="<AI_DICTS>ui.ail"/> @@ -743,6 +752,10 @@ <ROW Feature_="MainFeature" Component_="System.IO.Compression.FileSystem.dll"/> <ROW Feature_="MainFeature" Component_="System.Spatial.dll"/> <ROW Feature_="MainFeature" Component_="Tango.DataStore.Lite.dll"/> + <ROW Feature_="MainFeature" Component_="WPFMediaKit.dll"/> + <ROW Feature_="MainFeature" Component_="DirectShowLib2005.dll"/> + <ROW Feature_="MainFeature" Component_="EVRPresenter32.dll"/> + <ROW Feature_="MainFeature" Component_="EVRPresenter64.dll"/> </COMPONENT> <COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent"> <ROW Name="Tango.PPC.UI.exe" SourcePath="..\Build\PPC\Eureka\Tango.PPC.UI.exe" Index="0"/> diff --git a/Software/Visual_Studio/Advanced Installer Projects/FSE Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/FSE Installer.aip index 5442fc1bc..a18abd6ac 100644 --- a/Software/Visual_Studio/Advanced Installer Projects/FSE Installer.aip +++ b/Software/Visual_Studio/Advanced Installer Projects/FSE Installer.aip @@ -29,10 +29,10 @@ <ROW Property="ExtractFilesFirst" Value="1"/> <ROW Property="LogoIcon" Value="externalui.ico" MultiBuildValue="DefaultBuild:machine_full_0UZ_icon.ico_1" Type="1" MsiKey="LogoIcon"/> <ROW Property="Manufacturer" Value="Twine Solutions LTD"/> - <ROW Property="ProductCode" Value="1033:{4A937594-0A91-4D4E-BD23-597CAA447AE3} " Type="16"/> + <ROW Property="ProductCode" Value="1033:{D08B5A85-0EAD-4425-9148-DC6F6539AA76} " Type="16"/> <ROW Property="ProductLanguage" Value="1033"/> <ROW Property="ProductName" Value="Tango FSE"/> - <ROW Property="ProductVersion" Value="2.0.0.0" Type="32"/> + <ROW Property="ProductVersion" Value="2.0.1.0" Type="32"/> <ROW Property="RUNAPPLICATION" Value="1" Type="4"/> <ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/> <ROW Property="UpgradeCode" Value="{0E13CB0D-89F7-465E-9F56-F1CBD6773E6E}"/> @@ -1201,7 +1201,7 @@ <ROW Action="AI_DetectSoftware" Sequence="101"/> </COMPONENT> <COMPONENT cid="caphyon.advinst.msicomp.BuildComponent"> - <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFolder="..\Build\Installers\FSE\Release" PackageFileName="Tango FSE v2.0.0" Languages="en" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" ExtUI="true" UseLargeSchema="true" ExeName="Tango FSE v2.0.0"/> + <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFolder="..\Build\Installers\FSE\Release" PackageFileName="Tango FSE v2.0.1" Languages="en" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" ExtUI="true" UseLargeSchema="true" ExeName="Tango FSE v2.0.1"/> </COMPONENT> <COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent"> <ROW Path="<AI_DICTS>ui.ail"/> diff --git a/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip index 53e1c79b1..6cae10041 100644 --- a/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip +++ b/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Installer.aip @@ -16,10 +16,10 @@ <ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]." ValueLocId="*"/> <ROW Property="ARPNOREPAIR" MultiBuildValue="DefaultBuild:1"/> <ROW Property="Manufacturer" Value="Twine"/> - <ROW Property="ProductCode" Value="1033:{6FCAB80B-BBF0-4624-AC15-C38B625FC397} " Type="16"/> + <ROW Property="ProductCode" Value="1033:{C77E9217-B890-4C86-8A64-B664EEF4E98F} " Type="16"/> <ROW Property="ProductLanguage" Value="1033"/> <ROW Property="ProductName" Value="Machine Studio"/> - <ROW Property="ProductVersion" Value="5.7.0.0" Type="32"/> + <ROW Property="ProductVersion" Value="5.8.0.0" Type="32"/> <ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/> <ROW Property="UpgradeCode" Value="{CBEE5CAE-7C5A-4280-98DE-AA98113764E4}"/> <ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/> @@ -845,7 +845,7 @@ <ROW Action="AI_DetectSoftware" Sequence="101"/> </COMPONENT> <COMPONENT cid="caphyon.advinst.msicomp.BuildComponent"> - <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFolder="..\Build\Installers\Machine Studio\Release" PackageFileName="Machine Studio Installer_v5.7.0" Languages="en" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" ExtUI="true" UseLargeSchema="true" ExeName="Machine Studio Installer_v5.7.0"/> + <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFolder="..\Build\Installers\Machine Studio\Release" PackageFileName="Machine Studio Installer_v5.8.0" Languages="en" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" ExtUI="true" UseLargeSchema="true" ExeName="Machine Studio Installer_v5.8.0"/> </COMPONENT> <COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent"> <ROW Path="<AI_DICTS>ui.ail"/> diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures.Documentation/Help/proc-doc.chm b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures.Documentation/Help/proc-doc.chm Binary files differindex 62f67be57..32466caf1 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures.Documentation/Help/proc-doc.chm +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Procedures.Documentation/Help/proc-doc.chm diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Models/StopModel.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Models/StopModel.cs index 24ddc80bf..3d616f957 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Models/StopModel.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Models/StopModel.cs @@ -29,6 +29,7 @@ namespace Tango.FSE.Statistics.Models public JobRunExtendedInfo ExtendedInfo { get; set; } public bool IsAdvancedMode { get; set; } public VectorFineTuningRunModel FineTuningModel { get; set; } + public bool IsEureka { get; set; } public bool IsFineTuning { @@ -163,7 +164,18 @@ namespace Tango.FSE.Statistics.Models public String LogicalLength { - get { return JobRun.NumberOfUnits > 1 ? $"{JobRun.JobLogicalLength} x{JobRun.NumberOfUnits}" : JobRun.JobLogicalLength.ToString(); } + get { var length = IsEureka ? JobRun.JobLogicalLength * 4 : JobRun.JobLogicalLength; + return JobRun.NumberOfUnits > 1 ? $"{length} x{JobRun.NumberOfUnits}" : length.ToString(); } + } + + public double JobLength + { + get { return IsEureka ? JobRun.JobLength * 4 : JobRun.JobLength; } + } + + public double EndPosition + { + get { return IsEureka ? JobRun.EndPosition * 4 : JobRun.EndPosition; } } public String FineTuningMeasured diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs index d77b0b5a1..ae4444f06 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/ViewModels/MainViewVM.cs @@ -422,6 +422,7 @@ namespace Tango.FSE.Statistics.ViewModels stop.ThreadName = rmlName; stop.IsAdvancedMode = !BuildProvider.IsTwineRSM && CurrentUser.HasRole(Roles.FSEAdvancedTechnician); stop.FineTuningModel = fineTuningModel; + stop.IsEureka = MachineProvider.MachineOperator.MachineType == MachineTypes.Eureka; if (fineTuningModel != null) { @@ -735,11 +736,11 @@ namespace Tango.FSE.Statistics.ViewModels model.JobName = stop.JobRun.JobName; model.JobKind = ((JobDesignations)stop.JobRun.JobDesignation).ToDescription(); model.Thread = stop.ThreadName; - model.Length = ((int)stop.JobRun.JobLogicalLength).ToString(); + model.Length = stop.LogicalLength; model.NumberOfUnits = stop.JobRun.NumberOfUnits.ToString(); model.StartTime = stop.JobRun.StartDate.ToLocalTime().ToString(); model.Duration = stop.Duration.ToStringUnlimitedHours(); - model.EndPosition = stop.JobRun.EndPosition.ToString(); + model.EndPosition = stop.EndPosition.ToString(); model.Status = ((JobRunStatus)stop.JobRun.Status).ToString(); model.SegmentIndex = stop.SegmentIndex.ToString(); model.Offset = stop.StartMeters.ToString(); diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml index 5f0ceaa5a..88b460ab1 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Statistics/Views/MainView.xaml @@ -138,13 +138,13 @@ <TextBlock> <Run>Actual Length:</Run> <LineBreak/> - <Run Text="{Binding Items[0].Items[0].JobRun.JobLength}"></Run> + <Run Text="{Binding Items[0].Items[0].JobLength, Mode=OneWay}"></Run> </TextBlock> </TextBlock.ToolTip> </TextBlock> <TextBlock Text="{Binding Items[0].Items[0].JobRun.StartDate,Converter={StaticResource DateTimeUTCToShortDateTimeConverter}}" VerticalAlignment="Center" Width="120"></TextBlock> <TextBlock Text="{Binding Items[0].Items[0].Duration,Mode=OneWay,Converter={StaticResource TotalDyeTimeConverter}}" VerticalAlignment="Center" Width="100"></TextBlock> - <TextBlock Text="{Binding Items[0].Items[0].JobRun.EndPosition,StringFormat=N1}" VerticalAlignment="Center" Width="80"></TextBlock> + <TextBlock Text="{Binding Items[0].Items[0].EndPosition,StringFormat=N1}" VerticalAlignment="Center" Width="80"></TextBlock> </StackPanel> <Grid Visibility="{Binding IsAdvancedMode,Converter={StaticResource BooleanToVisibilityConverter}}" DataContext="{Binding Items[0].Items[0]}" Width="250" Margin="0 0 50 5" HorizontalAlignment="Right" VerticalAlignment="Bottom"> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobRingProgress.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobRingProgress.xaml index d0121afa5..b683ae0d2 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobRingProgress.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobRingProgress.xaml @@ -5,9 +5,14 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:behaviors="clr-namespace:Tango.FSE.Common.Behaviors" xmlns:local="clr-namespace:Tango.FSE.Common.Controls" + xmlns:localConverters="clr-namespace:Tango.FSE.Common.Converters" xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="450" x:Name="control"> + <UserControl.Resources> + <localConverters:ProgressLengthSpoolConverter x:Key="ProgressLengthSpoolConverter"/> + </UserControl.Resources> + <Grid Opacity="0.7"> <Viewbox> <Grid> @@ -50,10 +55,31 @@ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center">Completed</TextBlock> </StackPanel> - <TextBlock FontWeight="Light" FontSize="25" Margin="0 10 0 0" HorizontalAlignment="Center"> + <TextBlock FontWeight="Light" FontSize="25" Margin="0 10 0 0" HorizontalAlignment="Center" Visibility="Collapsed"> <Run Text="{Binding ElementName=control,Path=RunningJobStatus.ProgressMinusSettingUp,StringFormat=0,FallbackValue=0}"></Run><Run Text="/" /><Run Text="{Binding RunningJobStatus.TotalProgressMinusSettingUp,StringFormat=0,FallbackValue=0}"/> <Run FontSize="16">m</Run> </TextBlock> + <StackPanel Orientation="Horizontal" Margin="0 10 0 0" HorizontalAlignment="Center" Visibility="Visible"> + <TextBlock FontWeight="Light" FontSize="25" VerticalAlignment="Center" > + <TextBlock.Text> + <MultiBinding Converter="{StaticResource ProgressLengthSpoolConverter}" StringFormat="0.#" TargetNullValue='-' FallbackValue='0' Mode="OneWay"> + <Binding Path="RunningJobStatus.TotalProgressMinusSettingUp" /> + <Binding Path="IsEureka"/> + <Binding Path="RunningJobStatus.ProgressMinusSettingUp" /> + </MultiBinding> + </TextBlock.Text> + </TextBlock> + <TextBlock FontWeight="Light" FontSize="25" VerticalAlignment="Center" Text="/"></TextBlock> + <TextBlock FontWeight="Light" FontSize="25" VerticalAlignment="Center" > + <TextBlock.Text> + <MultiBinding Converter="{StaticResource ProgressLengthSpoolConverter}" StringFormat="0" TargetNullValue='-' FallbackValue='0' Mode="OneWay"> + <Binding Path="RunningJobStatus.TotalProgressMinusSettingUp"/> + <Binding Path="IsEureka"/> + </MultiBinding> + </TextBlock.Text> + </TextBlock> + <TextBlock FontWeight="Light" FontSize="25" VerticalAlignment="Center" Text=" m"></TextBlock> + </StackPanel> </StackPanel> <StackPanel Height="90" Visibility="{Binding ElementName=control,Path=RunningJobStatus.IsSettingUp,Converter={StaticResource BooleanToVisibilityConverter}}"> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobRingProgress.xaml.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobRingProgress.xaml.cs index 5e0f28419..d8374573c 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobRingProgress.xaml.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobRingProgress.xaml.cs @@ -40,8 +40,15 @@ namespace Tango.FSE.Common.Controls public static readonly DependencyProperty IsRunningProperty = DependencyProperty.Register("IsRunning", typeof(bool), typeof(RunningJobRingProgress), new PropertyMetadata(false)); + public bool IsEureka + { + get { return (bool)GetValue(IsEurekaProperty); } + set { SetValue(IsEurekaProperty, value); } + } + public static readonly DependencyProperty IsEurekaProperty = + DependencyProperty.Register("IsEureka", typeof(bool), typeof(RunningJobRingProgress), new PropertyMetadata(false)); - + public RunningJobRingProgress() { InitializeComponent(); diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobViewer.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobViewer.xaml index 2cd4fa7ad..faf5e072f 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobViewer.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobViewer.xaml @@ -6,9 +6,14 @@ xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL" xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:local="clr-namespace:Tango.FSE.Common.Controls" + xmlns:localConverters="clr-namespace:Tango.FSE.Common.Converters" mc:Ignorable="d" d:DesignHeight="120" d:DesignWidth="800"> + <UserControl.Resources> + <localConverters:ProgressLengthSpoolConverter x:Key="ProgressLengthSpoolConverter"/> + </UserControl.Resources> + <DockPanel> <Canvas Height="50" Margin="0" DockPanel.Dock="Top"> <StackPanel> @@ -132,7 +137,15 @@ </Style.Triggers> </Style> </TextBlock.Style> - <Run Text="{Binding LengthWithFactor,Mode=OneWay,StringFormat=N0}"></Run><Run Text="m"></Run> + <Run > + <Run.Text> + <MultiBinding Converter="{StaticResource ProgressLengthSpoolConverter}" StringFormat="N0" TargetNullValue=' ' FallbackValue='0' Mode="OneWay"> + <Binding Path="LengthWithFactor"/> + <Binding RelativeSource="{RelativeSource AncestorType=UserControl}" Path="IsEureka"/> + </MultiBinding> + </Run.Text> + </Run> + <Run Text="m"></Run> </TextBlock> </Grid> </DataTemplate> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobViewer.xaml.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobViewer.xaml.cs index 4a970ffda..459728264 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobViewer.xaml.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/RunningJobViewer.xaml.cs @@ -55,6 +55,14 @@ namespace Tango.FSE.Common.Controls public static readonly DependencyProperty JobProperty = DependencyProperty.Register("Job", typeof(Job), typeof(RunningJobViewer), new PropertyMetadata(null)); + public bool IsEureka + { + get { return (bool)GetValue(IsEurekaProperty); } + set { SetValue(IsEurekaProperty, value); } + } + public static readonly DependencyProperty IsEurekaProperty = + DependencyProperty.Register("IsEureka", typeof(bool), typeof(RunningJobViewer), new PropertyMetadata(false)); + /// <summary> /// Gets or sets the running job status. /// </summary> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Converters/ProgressLengthSpoolConverter.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Converters/ProgressLengthSpoolConverter.cs new file mode 100644 index 000000000..10c20c171 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Converters/ProgressLengthSpoolConverter.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Data; +using Tango.BL.Entities; + +namespace Tango.FSE.Common.Converters +{ + public class ProgressLengthSpoolConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + if (values.Count() == 2) + { + double length = System.Convert.ToDouble(values[0]); + bool isEureka = System.Convert.ToBoolean(values[1]); + int jobSpools = 1; + if (isEureka) + jobSpools = 4; + var totalBy4Spools = (double)length * jobSpools;// spools 4; + return totalBy4Spools; + + } + if (values.Count() == 3) + { + double length = System.Convert.ToDouble(values[0]); + var segment = values[1] as Segment; + bool isEureka = System.Convert.ToBoolean(values[1]); + int jobSpools = 1; + if (isEureka) + jobSpools = 4; + double currentProgresslength = System.Convert.ToDouble(values[2]); + + var totalBySpools = (double)length * jobSpools; + var currentProgressBySpools = (double)currentProgresslength * jobSpools; + + int coeff = (int)currentProgressBySpools / (int)totalBySpools; + var progressCurrent = (coeff == 0 || coeff == 1) ? currentProgressBySpools : currentProgressBySpools % (coeff * totalBySpools);//show for progress + + return progressCurrent; + } + return "-"; + } + catch + { + return "-"; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj index 82d62ff14..8ef3551d5 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj @@ -220,6 +220,7 @@ <Compile Include="Converters\LiquidTypeToShortNameConverter.cs" /> <Compile Include="Converters\NanolitersToLitersConverter.cs" /> <Compile Include="Converters\ObjectToJsonConverter.cs" /> + <Compile Include="Converters\ProgressLengthSpoolConverter.cs" /> <Compile Include="Converters\TimeSpanHumanizeConverter.cs" /> <Compile Include="Converters\TotalDyeTimeConverter.cs" /> <Compile Include="Converters\TotalMetersConverter.cs" /> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Properties/AssemblyInfo.cs index afe4677be..cd4408202 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Properties/AssemblyInfo.cs @@ -8,4 +8,4 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango FSE")] -[assembly: AssemblyVersion("2.0.0.0")] +[assembly: AssemblyVersion("2.0.1.0")] diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobProgressRingTileView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobProgressRingTileView.xaml index 62e7c4798..c021b0a15 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobProgressRingTileView.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobProgressRingTileView.xaml @@ -9,6 +9,6 @@ mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:RemoteJobProgressRingTile, IsDesignTimeCreatable=False}"> <Grid Margin="30"> - <controls:RunningJobRingProgress RunningJobStatus="{Binding RunningJobStatus}" IsRunning="{Binding IsRunning}" /> + <controls:RunningJobRingProgress RunningJobStatus="{Binding RunningJobStatus}" IsRunning="{Binding IsRunning}" IsEureka ="{Binding IsEureka}" /> </Grid> </UserControl> diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTile.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTile.cs index 650818c22..453a0892e 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTile.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTile.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using System.Windows; using System.Windows.Media; using Tango.BL.Entities; +using Tango.BL.Enumerations; using Tango.FSE.Common; using Tango.Integration.Operation; using Tango.PPC.Shared.Jobs; @@ -42,6 +43,15 @@ namespace Tango.FSE.UI.Tiles.RemoteJob set { _isRunning = value; RaisePropertyChangedAuto(); } } + private bool _isEureka; + + public bool IsEureka + { + get { return _isEureka; } + set { _isEureka = value; RaisePropertyChangedAuto(); } + } + + public RemoteJobTile() { Name = "Remote Job"; @@ -113,6 +123,7 @@ namespace Tango.FSE.UI.Tiles.RemoteJob Handler.StatusChanged += Handler_StatusChanged; Job = e.JobHandler.Job; IsRunning = true; + IsEureka = MachineProvider.MachineOperator.MachineType == MachineTypes.Eureka; } private void Handler_StatusChanged(object sender, RunningJobStatus status) diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTileView.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTileView.xaml index ee05314ce..1323c9298 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTileView.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tiles/RemoteJob/RemoteJobTileView.xaml @@ -10,7 +10,7 @@ <Grid TextElement.Foreground="{StaticResource FSE_PrimaryAccentBrush}"> <Viewbox Width="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=ActualWidth}"> <Border Background="#292929" CornerRadius="10" VerticalAlignment="Bottom" Padding="20 0" Width="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=ActualWidth}"> - <controls:RunningJobViewer IsRunning="{Binding IsRunning}" Job="{Binding Job}" RunningJobStatus="{Binding RunningJobStatus}" IsActive="True" Margin="30 10" Height="90" /> + <controls:RunningJobViewer IsRunning="{Binding IsRunning}" Job="{Binding Job}" RunningJobStatus="{Binding RunningJobStatus}" IsEureka="{Binding IsEureka}" IsActive="True" Margin="30 10" Height="90" /> </Border> </Viewbox> </Grid> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs index e1e952af9..0bbe0ae7a 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs @@ -4,5 +4,5 @@ using System.Runtime.InteropServices; [assembly: System.Windows.ThemeInfo(System.Windows.ResourceDictionaryLocation.None, System.Windows.ResourceDictionaryLocation.SourceAssembly)] [assembly: AssemblyTitle("Tango - Machine Studio")] -[assembly: AssemblyVersion("5.7.0.0")] +[assembly: AssemblyVersion("5.8.0.0")] [assembly: ComVisible(false)]
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs index 00dcf6f8b..8267fd3aa 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs @@ -390,7 +390,7 @@ namespace Tango.PPC.Jobs.Models int coeff = (int)(value + NumberSpools - 1) / NumberSpools; _copies = coeff * NumberSpools; } - NumberOfUnits = (int)value / NumberSpools; + NumberOfUnits = (int)_copies / NumberSpools; RaisePropertyChanged(nameof(LengthIncludingNumberOfUnits)); RaisePropertyChanged(nameof(LengthIncludingNumberOfUnitsAndSpools)); } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/SystemViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/SystemViewVM.cs index 452907366..e3f695514 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/SystemViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/SystemViewVM.cs @@ -15,6 +15,7 @@ using Tango.PPC.Common.OS; using Tango.Settings; using System.Data.Entity; using Tango.PPC.Common.UWF; +using Tango.BL.Entities; namespace Tango.PPC.Technician.ViewModels { @@ -74,6 +75,14 @@ namespace Tango.PPC.Technician.ViewModels set { _totalDyeMeters = value; RaisePropertyChangedAuto(); } } + public Site CurrentSite { get; set; } + + public String SiteName + { + get { return CurrentSite == null? "" : CurrentSite.Name; } + } + + public RelayCommand ResetDeviceCommand { get; set; } public RelayCommand RestartCommand { get; set; } @@ -181,6 +190,8 @@ namespace Tango.PPC.Technician.ViewModels _statsTimer.Interval = 2000; _statsTimer.Elapsed += _statsTimer_Elapsed; _statsTimer.Start(); + + InitSite(); } private void _statsTimer_Elapsed(object sender, ElapsedEventArgs e) @@ -299,5 +310,22 @@ namespace Tango.PPC.Technician.ViewModels TotalDyeMeters = "error!"; } } + + public async void InitSite() + { + if (CurrentSite == null) + { + var machine = MachineProvider.Machine; + if (machine != null && !String.IsNullOrEmpty(machine.SiteGuid)) + { + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + var site = (await db.Sites.Where(x => x.Guid == machine.SiteGuid).ToListAsync()).FirstOrDefault(); + CurrentSite = site; + RaisePropertyChanged( nameof(SiteName)); + } + } + } + } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml index fc0f734ff..8ef29bb7e 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/SystemView.xaml @@ -110,7 +110,7 @@ </touch:TouchButton> </StackPanel> - <FlowDocumentScrollViewer VerticalScrollBarVisibility="Disabled"> + <FlowDocumentScrollViewer VerticalScrollBarVisibility="Disabled" Visibility="{Binding BuildProvider.IsEureka, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <FlowDocument> <Table CellSpacing="0" FontFamily="{StaticResource TangoFlexoFontFamily}"> <Table.Resources> @@ -174,7 +174,7 @@ </TableCell> </TableRow> - <TableRow> + <TableRow > <TableCell> <Paragraph> <TextBlock>FPGA 1:</TextBlock> @@ -320,6 +320,188 @@ </Table> </FlowDocument> </FlowDocumentScrollViewer> + <FlowDocumentScrollViewer VerticalScrollBarVisibility="Disabled" Visibility="{Binding BuildProvider.IsEureka, Converter={StaticResource BooleanToVisibilityConverter}}"> + <FlowDocument> + <Table CellSpacing="0" FontFamily="{StaticResource TangoFlexoFontFamily}"> + <Table.Resources> + <Style TargetType="{x:Type TableRowGroup}"> + <Setter Property="FontSize" Value="{StaticResource TangoDefaultFontSize}"/> + </Style> + + <Style TargetType="TableCell"> + <Setter Property="BorderThickness" Value="0 0 0 1"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource TangoGrayBrush}"></Setter> + <Setter Property="Padding" Value="5"></Setter> + </Style> + </Table.Resources> + <Table.Columns> + <TableColumn Width="160" /> + <TableColumn /> + <TableColumn /> + </Table.Columns> + + <TableRowGroup> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Environment:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding Settings.DeploymentSlot,Converter={StaticResource EnumToDescriptionConverter},Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Application Version:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding ApplicationManager.VersionAndTag,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Site:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding SiteName,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Machine S/N:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding MachineProvider.Machine.SerialNumber,Mode=OneWay,IsAsync=True,FallbackValue='0000'}"/> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Firmware Version:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding MachineProvider.MachineOperator.DeviceInformation.Version,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>CPU:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock> + <Run Text="{Binding CPU,Mode=OneWay,StringFormat='0',FallbackValue=0}"></Run> + <Run>%</Run> + </TextBlock> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>RAM:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding RAM,Mode=OneWay,FallbackValue=0,Converter={StaticResource ByteArrayToFileSizeConverter},StringFormat='0'}"></TextBlock> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Up Time:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding UpTime,Mode=OneWay,StringFormat=hh\\:mm\\:ss,FallbackValue='00:00:00'}"></TextBlock> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>IP Address:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding IPAddress,Mode=OneWay,FallbackValue=0}"></TextBlock> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Total Dye Time:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding TotalDyeTime,Mode=OneWay,FallbackValue=0}"></TextBlock> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Total Dye Meters:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding TotalDyeMeters,Mode=OneWay,FallbackValue=0}"></TextBlock> + </Paragraph> + </TableCell> + </TableRow> + </TableRowGroup> + </Table> + </FlowDocument> + </FlowDocumentScrollViewer> </DockPanel> </touch:LightTouchScrollViewer> </Grid> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/JobOutlineControl.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/JobOutlineControl.cs new file mode 100644 index 000000000..a22afe3ea --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/JobOutlineControl.cs @@ -0,0 +1,327 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using System.Windows.Shapes; +using Tango.PMR.Printing; +using Tango.Touch.Controls; + +namespace Tango.PPC.UI.Controls +{ + public class JobOutlineControl : Control + { + + #region Members + + private Size _sizeControl = new Size(0, 0); + ScrollViewer _parentScrollViewer = null; + public struct LevelOffset + { + public const double level_0 = 0.0; + public const double level_1 = 10.0; + public const double level_2 = 20.0; + public const double level_3 = 37.0; + public const double level_4 = 50.0; + public const double level_5 = 60.0; + public const double level_6 = 77.0; + public const double level_7 = 90.0; + public const double level_8 = 100.0; + } + private double _verticalOffset = 0; + private double _viewportHeight = 0; + private const double HEADER_FONT_HEIGHT = 35; + private const double TITLE_FONT_HEIGHT = 22; + private const double SUB_TITLE_FONT_HEIGHT = 19; + private const double NORMAL_FONT_HEIGHT = 17; + private const double WIDTH = 330; + + #endregion members + + public JobOutlineControl() : base() + { + DataContextChanged += JobOutlineControl_DataContextChanged; + Width = WIDTH; + } + + private void JobOutlineControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) + { + if (DataContext == null) + { + return; + } + + if (_parentScrollViewer != null) + { + _parentScrollViewer.ScrollToTop(); + } + + InvalidateVisual(); + } + + #region events + + private void ScrollViewer_ScrollChanged(object sender, ScrollChangedEventArgs e) + { + if (e.VerticalChange == 0.0) + return; + + _verticalOffset = _parentScrollViewer.VerticalOffset; + _viewportHeight = _parentScrollViewer.ViewportHeight; + InvalidateVisual(); + } + #endregion events + + #region render + protected override void OnRender(DrawingContext drawingContext) + { + base.OnRender(drawingContext); + + if (!(DataContext is JobTicket job)) return; + if (_parentScrollViewer == null) + { + _parentScrollViewer = this.FindAncestor<ScrollViewer>(); + _parentScrollViewer.ScrollChanged -= ScrollViewer_ScrollChanged; + _parentScrollViewer.ScrollChanged += ScrollViewer_ScrollChanged; + } + else if (_viewportHeight == 0) + { + _viewportHeight = _parentScrollViewer.ActualHeight; + } + _sizeControl = new Size(); + _sizeControl.Height += 10; + DrawHeaderText(drawingContext, "JOB OUTLINE", 30, LevelOffset.level_0); + _sizeControl.Height += HEADER_FONT_HEIGHT; + + _sizeControl.Height += 20; + DrawHeaderText(drawingContext, "BASIC", 17, LevelOffset.level_0); + _sizeControl.Height += TITLE_FONT_HEIGHT; + _sizeControl.Height += 5.0; + var basicProps = GetNameValueList(job); + foreach (var prop in basicProps) + { + DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Pencil); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + } + //JobTicket.Spool + if (job.Spool != null) + { + _sizeControl.Height += 20; + DrawHeaderText(drawingContext, "SPOOL", 17, LevelOffset.level_0); + _sizeControl.Height += TITLE_FONT_HEIGHT; + _sizeControl.Height += 5.0; + basicProps = GetNameValueList(job.Spool); + foreach (var prop in basicProps) + { + DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Pencil); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + } + } + //JobTicket.ProcessParameters + if (job.ProcessParameters != null) + { + _sizeControl.Height += 20; + DrawHeaderText(drawingContext, "PROCESS PARAMETERS", 17, LevelOffset.level_0); + _sizeControl.Height += TITLE_FONT_HEIGHT; + _sizeControl.Height += 5.0; + basicProps = GetNameValueList(job.ProcessParameters); + foreach (var prop in basicProps) + { + DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Settings); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + } + } + //JobTicket.ThreadParameters + if (job.ThreadParameters != null) + { + _sizeControl.Height += 20; + DrawHeaderText(drawingContext, "THREAD PARAMETERS", 17, LevelOffset.level_0); + _sizeControl.Height += TITLE_FONT_HEIGHT; + _sizeControl.Height += 5.0; + basicProps = GetNameValueList(job.ThreadParameters); + foreach (var prop in basicProps) + { + DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Settings); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + } + } + //JobTicket.HeadCleaningParameters + if (job.HeadCleaningParameters != null) + { + _sizeControl.Height += 20; + DrawHeaderText(drawingContext, "HEAD CLEANING PARAMETERS", 17, LevelOffset.level_0); + _sizeControl.Height += TITLE_FONT_HEIGHT; + _sizeControl.Height += 5.0; + basicProps = GetNameValueList(job.HeadCleaningParameters); + foreach (var prop in basicProps) + { + DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Settings); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + } + } + //JobTicket.BtsrParameters + if (job.BtsrParameters != null) + { + _sizeControl.Height += 20; + DrawHeaderText(drawingContext, "BTSR PARAMETERS", 17, LevelOffset.level_0); + _sizeControl.Height += TITLE_FONT_HEIGHT; + _sizeControl.Height += 5.0; + basicProps = GetNameValueList(job.BtsrParameters); + foreach (var prop in basicProps) + { + DrawNameValueText(drawingContext, prop, LevelOffset.level_1, TouchIconKind.Settings); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + } + } + //JobTicket.Segments + if (job.Segments != null) + { + _sizeControl.Height += 20; + DrawHeaderText(drawingContext, "SEGMENTS", 17, LevelOffset.level_0); + _sizeControl.Height += TITLE_FONT_HEIGHT; + _sizeControl.Height += 10.0; + int index = 0; + foreach (JobSegment seg in job.Segments) + { + DrawHeaderText(drawingContext, string.Format("#{0} SEGMENT", ++index), 14, LevelOffset.level_1); + _sizeControl.Height += SUB_TITLE_FONT_HEIGHT; + basicProps = GetNameValueList(seg); + foreach (var prop in basicProps) + { + DrawNameValueText(drawingContext, prop, LevelOffset.level_2, TouchIconKind.Pencil); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + } + //BrushStops + DrawHeaderText(drawingContext, "BRUSH STOPS", 12, LevelOffset.level_3); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + int indexBrush = 0; + foreach (JobBrushStop brushstop in seg.BrushStops) + { + _sizeControl.Height += 5.0; + DrawHeaderText(drawingContext, string.Format("#{0} STOP", ++indexBrush), 11, LevelOffset.level_4); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + var brushStops = GetNameValueList(brushstop); + foreach (var brushstopprop in brushStops) + { + DrawNameValueText(drawingContext, brushstopprop, LevelOffset.level_5, TouchIconKind.Pencil); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + } + DrawHeaderText(drawingContext, "DISPENSERS", 12, LevelOffset.level_6); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + _sizeControl.Height += 5.0; + int indexDispenser = 0; + foreach (JobDispenser disp in brushstop.Dispensers) + { + DrawHeaderText(drawingContext, string.Format("#{0} DISPENSER", ++indexDispenser), 11, LevelOffset.level_6); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + var dispProperties = GetNameValueList(disp); + foreach (var dispprop in dispProperties) + { + DrawNameValueText(drawingContext, dispprop, LevelOffset.level_7, TouchIconKind.ArrowRightBoldCircle); + _sizeControl.Height += NORMAL_FONT_HEIGHT; + } + } + } + } + } + + if (Height != _sizeControl.Height) + { + Height = _sizeControl.Height; + } + } + public IEnumerable<Tuple<String, String>> GetNameValueList(object value) + { + if (value != null) + { + var properties = value.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(x => (!x.PropertyType.IsClass && !typeof(IEnumerable).IsAssignableFrom(x.PropertyType)) || x.PropertyType == typeof(String)).ToList(); + return properties.Select(x => new Tuple<string, string>(x.Name, x.GetValue(value).ToString())); + } + else + { + return null; + } + } + #endregion render + + #region drawing + protected void DrawNameValueText(DrawingContext drawingContext, Tuple<string, string> text, double levelOfOffset, TouchIconKind? icon) + { + if (IsInViewPort()) + { + FormattedText formattedName = new FormattedText(text.Item1 + ": ", System.Globalization.CultureInfo.InvariantCulture, System.Windows.FlowDirection.LeftToRight, new Typeface(this.FontFamily, FontStyles.Normal, FontWeights.Normal, FontStretches.Normal), + 12, Foreground); + DrawIconTextIfVisible(drawingContext, levelOfOffset, formattedName, icon); + double widthOfNameText = formattedName.WidthIncludingTrailingWhitespace + 17 + levelOfOffset;//17 pix for draw icon before text + + FormattedText formattedValue = new FormattedText(text.Item2, System.Globalization.CultureInfo.InvariantCulture, System.Windows.FlowDirection.LeftToRight, new Typeface(this.FontFamily, FontStyles.Normal, FontWeights.SemiBold, FontStretches.Normal), + 12, Foreground); + DrawIconTextIfVisible(drawingContext, widthOfNameText, formattedValue); + _sizeControl.Width = Math.Max(_sizeControl.Width, (widthOfNameText + formattedValue.WidthIncludingTrailingWhitespace)); + } + } + + private bool IsInViewPort() + { + return (_sizeControl.Height >= _verticalOffset && _sizeControl.Height <= (_verticalOffset + _viewportHeight + 5)); + } + + protected void DrawHeaderText(DrawingContext drawingContext, string text, int fontSize, double levelOfOffset) + { + if (IsInViewPort()) + { + FormattedText formattedtext = new FormattedText(text, System.Globalization.CultureInfo.InvariantCulture, System.Windows.FlowDirection.LeftToRight, new Typeface(this.FontFamily, FontStyles.Normal, FontWeights.SemiBold, FontStretches.Normal), + fontSize, Foreground); + DrawIconTextIfVisible(drawingContext, levelOfOffset, formattedtext); + _sizeControl.Width = Math.Max(_sizeControl.Width, (formattedtext.Width + levelOfOffset)); + } + } + + private void DrawIconTextIfVisible(DrawingContext drawingContext, double levelOfOffset, FormattedText formattedText, TouchIconKind? icon = null) + { + if (icon is TouchIconKind) + { + DrawIcon(drawingContext, (TouchIconKind)icon, new Point(levelOfOffset, _sizeControl.Height)); + levelOfOffset += 17; + } + drawingContext.DrawText(formattedText, new Point(levelOfOffset, _sizeControl.Height)); + } + private void DrawIcon(DrawingContext drawingContext, TouchIconKind kind, Point point) + { + GeometryGroup group = GetGeometryByIcon(kind); + SetGeometryPosition(group, point); + drawingContext.DrawGeometry(Foreground, new Pen(Brushes.White, 1), group); + + } + private GeometryGroup GetGeometryByIcon(TouchIconKind kind) + { + Geometry geometry = Geometry.Parse(TouchIcon.Icons[kind]); + GeometryGroup group = new GeometryGroup(); + group.Children.Add(geometry); + + TransformGroup tg = new TransformGroup(); + tg.Children.Add(new ScaleTransform() + { + ScaleX = 10d / geometry.Bounds.Width, + ScaleY = 10d / geometry.Bounds.Height, + }); + tg.Children.Add(new TranslateTransform() { }); + + group.Transform = tg; + return group; + } + private void SetGeometryPosition(GeometryGroup group, Point point) + { + TransformGroup tg = group.Transform as TransformGroup; + (tg.Children[1] as TranslateTransform).X = point.X; + (tg.Children[1] as TranslateTransform).Y = point.Y + 1; + } + #endregion drawing + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/LiquidTypeToBrushConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/LiquidTypeToBrushConverter.cs index f9ced3719..75846431f 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/LiquidTypeToBrushConverter.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/LiquidTypeToBrushConverter.cs @@ -24,13 +24,7 @@ namespace Tango.PPC.UI.Converters } case BL.Enumerations.LiquidTypes.Cleaner: { - ImageBrush cleanerBrush = new ImageBrush() { Stretch = Stretch.None, TileMode = TileMode.Tile, ViewportUnits = BrushMappingMode.Absolute }; - BitmapSource bit_source = ResourceHelper.GetImageFromResources(@"Images/cl-full.png"); - var targetBitmap = new WriteableBitmap(new TransformedBitmap(bit_source, new ScaleTransform(0.3, 0.3))); - - cleanerBrush.ImageSource = targetBitmap; - cleanerBrush.Viewport = new System.Windows.Rect(0, 0, targetBitmap.Width, targetBitmap.Height); - return cleanerBrush; + return Application.Current.Resources["TangoCleanerBrush"] as Brush; } case BL.Enumerations.LiquidTypes.Yellow: return Application.Current.Resources["TangoYellowInkBrush"] as Brush; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/MidTankLevelToElementRectConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/MidTankLevelToElementRectConverter.cs index 2f0e73e2f..93576a8fb 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/MidTankLevelToElementRectConverter.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/MidTankLevelToElementRectConverter.cs @@ -20,7 +20,7 @@ namespace Tango.PPC.UI.Converters double maxLiters = (double)values[3]; double midTankLevel = Math.Min((double)values[2], maxLiters); - var offset = (midTankLevel / maxLiters) * actualHeight; + var offset = actualHeight - (midTankLevel / maxLiters) * actualHeight; return new System.Windows.Rect(1, offset, actualWidth, actualHeight); } catch diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressLengthSpoolConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressLengthSpoolConverter.cs index 3be7a8818..377d02d81 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressLengthSpoolConverter.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressLengthSpoolConverter.cs @@ -37,7 +37,7 @@ namespace Tango.PPC.UI.Converters var currentProgressBy4Spools = (double)currentProgresslength * 4 ; int coeff = (int)currentProgressBy4Spools / (int)totalBy4Spools; - var progressCurrent = coeff == 0 ? currentProgressBy4Spools : currentProgressBy4Spools % (coeff * totalBy4Spools);//show for progress + var progressCurrent = (coeff == 0 || coeff == 1) ? currentProgressBy4Spools : currentProgressBy4Spools % (coeff * totalBy4Spools);//show for progress if (forOneSpool) { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressUnitSpoolConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressUnitSpoolConverter.cs new file mode 100644 index 000000000..054ccd3df --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressUnitSpoolConverter.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace Tango.PPC.UI.Converters +{ + public class ProgressUnitSpoolConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + if (values.Count() == 1)//may be added count of spools + { + int CurrentUnit = System.Convert.ToInt16(values[0]); + CurrentUnit +=1; + var totalBy4Spools = (double)CurrentUnit * 4;// spools ; + + return totalBy4Spools.ToString(); + + } + + return "-"; + } + catch + { + return "-"; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationView.xaml new file mode 100644 index 000000000..8ae0f4354 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationView.xaml @@ -0,0 +1,176 @@ +<UserControl x:Class="Tango.PPC.UI.Dialogs.GeneralInformationView" + 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.UI.Dialogs" + mc:Ignorable="d" + Background="{StaticResource TangoPrimaryBackgroundBrush}" Width="750" Height="700" d:DataContext="{d:DesignInstance Type=local:GeneralInformationViewVM, IsDesignTimeCreatable=False}"> + <Grid Margin="20"> + <DockPanel> + + <Grid DockPanel.Dock="Bottom" Margin="0 20 0 0"> + <touch:TouchButton HorizontalAlignment="Center" CornerRadius="25" Command="{Binding CloseCommand}" Style="{StaticResource TangoHollowButton}" Width="180" Height="50" VerticalAlignment="Bottom">CLOSE</touch:TouchButton> + </Grid> + + <StackPanel DockPanel.Dock="Top" HorizontalAlignment="Center"> + <Image Source="../Images/logo.png" RenderOptions.BitmapScalingMode="Fant" Width="157" Height="51" Stretch="Uniform" HorizontalAlignment="Center" Margin="0 10 0 10"/> + <TextBlock VerticalAlignment="Center" Margin="0 30 0 0" FontSize="{StaticResource TangoHeaderFontSize}">General Information</TextBlock> + </StackPanel> + + <Grid Margin="0 30 0 0"> + <FlowDocumentScrollViewer VerticalScrollBarVisibility="Disabled" > + <FlowDocument> + <Table CellSpacing="0" FontFamily="{StaticResource TangoFlexoFontFamily}"> + <Table.Resources> + <Style TargetType="{x:Type TableRowGroup}"> + <Setter Property="FontSize" Value="{StaticResource TangoDefaultFontSize}"/> + </Style> + + <Style TargetType="TableCell"> + <Setter Property="BorderThickness" Value="0 0 0 1"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource TangoGrayBrush}"></Setter> + <Setter Property="Padding" Value="5"></Setter> + </Style> + </Table.Resources> + <Table.Columns> + <TableColumn Width="160" /> + <TableColumn /> + <TableColumn /> + </Table.Columns> + + <TableRowGroup> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Environment:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding Settings.DeploymentSlot,Converter={StaticResource EnumToDescriptionConverter},Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Application Version:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding ApplicationManager.VersionAndTag,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Site:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding SiteName,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Machine S/N:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding MachineProvider.Machine.SerialNumber,Mode=OneWay,IsAsync=True,FallbackValue='0000'}"/> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Firmware Version:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding MachineProvider.MachineOperator.DeviceInformation.Version,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/> + </Paragraph> + </TableCell> + </TableRow> + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Up Time:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding UpTime,Mode=OneWay,StringFormat=hh\\:mm\\:ss,FallbackValue='00:00:00'}"></TextBlock> + </Paragraph> + </TableCell> + </TableRow> + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>IP Address:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding IPAddress,Mode=OneWay,FallbackValue=0}"></TextBlock> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Total Dye Time:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding TotalDyeTime,Mode=OneWay,FallbackValue=0}"></TextBlock> + </Paragraph> + </TableCell> + </TableRow> + + <TableRow> + <TableCell> + <Paragraph> + <TextBlock>Total Dye Meters:</TextBlock> + </Paragraph> + </TableCell> + + <TableCell> + <Paragraph> + <TextBlock Text="{Binding TotalDyeMeters,Mode=OneWay,FallbackValue=0}"></TextBlock> + </Paragraph> + </TableCell> + </TableRow> + + </TableRowGroup> + </Table> + </FlowDocument> + </FlowDocumentScrollViewer> + </Grid> + </DockPanel> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationView.xaml.cs new file mode 100644 index 000000000..3e01d9b93 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationView.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.UI.Dialogs +{ + /// <summary> + /// Interaction logic for GeneralInformationView.xaml + /// </summary> + public partial class GeneralInformationView : UserControl + { + public GeneralInformationView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationViewVM.cs new file mode 100644 index 000000000..7f810b2f3 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationViewVM.cs @@ -0,0 +1,162 @@ +using System; +using System.Data.Entity; +using System.Linq; +using Tango.BL; +using Tango.BL.Entities; +using Tango.Core.DI; +using Tango.Integration.Operation; +using Tango.PMR.Diagnostics; +using Tango.PPC.Common; +using Tango.PPC.Common.Application; +using Tango.PPC.Common.Connection; +using Tango.PPC.Common.Notifications; +using Tango.Settings; +using Tango.SharedUI; +using Tango.PPC.Common.UWF; +using Tango.Core.Commands; +using Tango.PPC.Common.OS; +using System.Collections.Generic; +using System.Diagnostics; +using System.Management; +using System.Net; +using System.Net.Sockets; +using System.Text; +using System.Threading.Tasks; +using System.Timers; + + +namespace Tango.PPC.UI.Dialogs +{ + public class GeneralInformationViewVM : DialogViewVM + { + [TangoInject] + public IMachineProvider MachineProvider { get; set; } + + [TangoInject] + public IPPCApplicationManager ApplicationManager { get; set; } + + private PPCSettings _settings; + /// <summary> + /// Gets the main PPC settings. + /// </summary> + public PPCSettings Settings + { + get + { + if (_settings == null) + { + _settings = SettingsManager.Default.GetOrCreate<PPCSettings>(); + } + + return _settings; + } + private set { _settings = value; } + } + + public Site CurrentSite { get; set; } + + public String SiteName + { + get { return CurrentSite == null ? "" : CurrentSite.Name; } + } + + private String _ipAddress; + public String IPAddress + { + get { return _ipAddress; } + set { _ipAddress = value; RaisePropertyChangedAuto(); } + } + + private String _totalDyeTime; + public String TotalDyeTime + { + get { return _totalDyeTime; } + set { _totalDyeTime = value; RaisePropertyChangedAuto(); } + } + + private String _totalDyeMeters; + public String TotalDyeMeters + { + get { return _totalDyeMeters; } + set { _totalDyeMeters = value; RaisePropertyChangedAuto(); } + } + + private TimeSpan _upTime; + public TimeSpan UpTime + { + get { return _upTime; } + set { _upTime = value; RaisePropertyChangedAuto(); } + } + + public GeneralInformationViewVM( IMachineProvider provider, IPPCApplicationManager appManager) + { + MachineProvider = provider; + ApplicationManager = appManager; + InitSite(); + + IPAddress = GetIpv4Address(); + InitTotalDyeProp(); + UpTime = DateTime.Now - ApplicationManager.StartUpDate; + } + + public async void InitSite() + { + if (CurrentSite == null) + { + var machine = MachineProvider.Machine; + if (machine != null && !String.IsNullOrEmpty(machine.SiteGuid)) + { + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + var site = (await db.Sites.Where(x => x.Guid == machine.SiteGuid).ToListAsync()).FirstOrDefault(); + CurrentSite = site; + RaisePropertyChanged(nameof(SiteName)); + } + } + } + } + + public String GetIpv4Address() + { + try + { + var host = Dns.GetHostEntry(Dns.GetHostName()); + foreach (var ip in host.AddressList) + { + if (ip.AddressFamily == AddressFamily.InterNetwork) + { + return ip.ToString(); + } + } + return "N/A"; + } + catch (Exception ex) + { + return "N/A"; + } + } + + public async void InitTotalDyeProp() + { + try + { + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + var jobRuns = await db.JobRuns.Select(x => new { x.StartDate, x.EndDate, x.EndPosition }).ToListAsync(); + + TotalDyeTime = TimeSpan.FromHours(jobRuns.Select(x => x.EndDate - x.StartDate).Sum(x => x.TotalHours)).ToStringUnlimitedHours(); + + int meters = (int)jobRuns.Select(x => x.EndPosition).Sum(); + TotalDyeMeters = $"{meters.ToString("N0")} meters"; + } + } + catch (Exception ex) + { + LogManager.Log(ex, "Error loading machine counters."); + TotalDyeTime = "error!"; + TotalDyeMeters = "error!"; + } + } + } +} + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs index d5d8407b7..bd34122c6 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs @@ -14,6 +14,8 @@ namespace Tango.PPC.UI.Models { public class MachineOverviewModel : ExtendedObject { + public static double DryerAirMaxValue = 120.0; + public MachineOverviewItem DryerZone3 { get; set; } public MachineOverviewItem DryerAir { get; set; } public MachineOverviewItem Tunnel { get; set; } @@ -42,7 +44,7 @@ namespace Tango.PPC.UI.Models { DryerZone3 = new MachineOverviewItem(); DryerAir = new MachineOverviewItem(); - DryerAir.MaxValue =140; + DryerAir.MaxValue = DryerAirMaxValue; Tunnel = new MachineOverviewItem(); PumpsPressure = new MachineOverviewItem(); PumpsPressure.MaxValue = 6; @@ -84,7 +86,9 @@ namespace Tango.PPC.UI.Models if (state != null) { - if (state.IsRampingUp) + if (state.IsRampingUp && + (state.SetPoint != 0 + && (state.CurrentValue <= (state.SetPoint - 10)))) { item.Status = "Heating Up"; item.Color = Colors.Orange; @@ -92,15 +96,7 @@ namespace Tango.PPC.UI.Models item.MaxValue = state.SetPoint; item.Value = state.CurrentValue; } - else if (state.CurrentValue > state.SetPoint) - { - item.Status = "Over-temperature"; - item.Color = Colors.Red; - item.DisplayValue = $"{state.CurrentValue} / {state.SetPoint}"; - item.MaxValue = state.SetPoint; - item.Value = state.CurrentValue; - } - else if (state.IsInSetPoint) + else if (state.SetPoint == 0 || (state.CurrentValue >= (state.SetPoint - 10) || state.CurrentValue <= (state.SetPoint + 10))) { item.Status = "Operational"; item.Color = Colors.Green; @@ -108,6 +104,14 @@ namespace Tango.PPC.UI.Models item.MaxValue = state.SetPoint; item.Value = state.CurrentValue; } + else if (!state.IsRampingUp && (state.CurrentValue < (state.SetPoint - 10) || state.CurrentValue > (state.SetPoint + 10))) + { + item.Status = "Over-temperature"; + item.Color = Colors.Red; + item.DisplayValue = $"{state.CurrentValue} / {state.SetPoint}"; + item.MaxValue = state.SetPoint; + item.Value = state.CurrentValue > state.SetPoint? state.SetPoint : state.CurrentValue; + } else { item.Color = Colors.Gray; @@ -119,13 +123,13 @@ namespace Tango.PPC.UI.Models private void UpdateDryerAirItem(double currentvalue) { - if (currentvalue < 140) + if (currentvalue < DryerAirMaxValue) { DryerAir.Status = "Heating Up"; DryerAir.Color = Colors.Orange; DryerAir.DisplayValue = $"{currentvalue}"; } - else if (currentvalue >= 140) + else if (currentvalue >= DryerAirMaxValue) { DryerAir.Status = "Operational"; DryerAir.Color = Colors.Green; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs index 642a5b02f..4940201f0 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs @@ -8,4 +8,4 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango PPC Application")] -[assembly: AssemblyVersion("2.0.2.0")] +[assembly: AssemblyVersion("2.0.4.0")] diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index 120001ea3..51600b0e8 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -158,6 +158,7 @@ <DependentUpon>WiFiAuthenticationView.xaml</DependentUpon> </Compile> <Compile Include="Connectivity\WiFiAuthenticationViewVM.cs" /> + <Compile Include="Controls\JobOutlineControl.cs" /> <Compile Include="Controls\MachineStatusControl.xaml.cs"> <DependentUpon>MachineStatusControl.xaml</DependentUpon> </Compile> @@ -173,6 +174,7 @@ <Compile Include="Converters\LiquidTypeToBrushConverter.cs" /> <Compile Include="Converters\MidTankLevelToElementRectConverter.cs" /> <Compile Include="Converters\ProgressLengthSpoolConverter.cs" /> + <Compile Include="Converters\ProgressUnitSpoolConverter.cs" /> <Compile Include="Converters\ProgressWeightSpoolConverter.cs" /> <Compile Include="Dialogs\BitResultsView.xaml.cs"> <DependentUpon>BitResultsView.xaml</DependentUpon> @@ -181,6 +183,10 @@ <Compile Include="Dialogs\CartridgeValidationView.xaml.cs"> <DependentUpon>CartridgeValidationView.xaml</DependentUpon> </Compile> + <Compile Include="Dialogs\GeneralInformationView.xaml.cs"> + <DependentUpon>GeneralInformationView.xaml</DependentUpon> + </Compile> + <Compile Include="Dialogs\GeneralInformationViewVM.cs" /> <Compile Include="Dialogs\InsufficientLiquidQuantityView.xaml.cs"> <DependentUpon>InsufficientLiquidQuantityView.xaml</DependentUpon> </Compile> @@ -349,6 +355,10 @@ <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> + <Page Include="Dialogs\GeneralInformationView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Dialogs\InsufficientLiquidQuantityView.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> @@ -952,7 +962,7 @@ if $(ConfigurationName) == Eureka copy /Y "$(ProjectDir)Intro.wmv" "$(TargetDir) </PropertyGroup> <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> <Import Project="..\..\packages\WPFMediaKit.2.2.0\build\WPFMediaKit.targets" Condition="Exists('..\..\packages\WPFMediaKit.2.2.0\build\WPFMediaKit.targets')" /> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs index 95eb22d7a..f40a89f42 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs @@ -293,6 +293,10 @@ namespace Tango.PPC.UI.ViewModels /// Gets or sets the stand by command. /// </summary> public RelayCommand StandByCommand { get; set; } + /// <summary> + /// Gets or sets the open general information dialog command. + /// </summary> + public RelayCommand OpenGeneralinformationCommand { get; set; } #endregion @@ -317,6 +321,7 @@ namespace Tango.PPC.UI.ViewModels PowerOffCommand = new RelayCommand(PowerOffMachine, () => MachineProvider.MachineOperator.Status != MachineStatuses.Disconnected); ResetCommand = new RelayCommand(ResetMachine, () => MachineProvider.MachineOperator.Status != MachineStatuses.Disconnected); StandByCommand = new RelayCommand(StandBy, () => MachineProvider.MachineOperator.CanPrint); + OpenGeneralinformationCommand = new RelayCommand(OpenGeneralinformationDlg); _date_timer = new DispatcherTimer(); _date_timer.Interval = TimeSpan.FromSeconds(1); @@ -527,6 +532,13 @@ namespace Tango.PPC.UI.ViewModels IsMenuOpened = false; } + private async void OpenGeneralinformationDlg() + { + GeneralInformationViewVM vm = new GeneralInformationViewVM(MachineProvider, ApplicationManager); + vm = await NotificationProvider.ShowDialog<GeneralInformationViewVM>(vm); + + } + #endregion #region Override Methods diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs index a47b68a4f..828047ccf 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -187,6 +187,26 @@ namespace Tango.PPC.UI.ViewModels public MachineOverviewModel OverviewModel { get; set; } + private bool _isDisplayJobOutline; + /// <summary> + /// Gets or sets a value indicating whether to display the job outline. + /// </summary> + public bool IsDisplayJobOutline + { + get { return _isDisplayJobOutline; } + set { _isDisplayJobOutline = value; RaisePropertyChangedAuto(); } + } + + private JobTicket _jobOutlineTicket; + /// <summary> + /// Gets or sets the job outline ticket. + /// </summary> + public JobTicket JobOutlineTicket + { + get { return _jobOutlineTicket; } + set { _jobOutlineTicket = value; RaisePropertyChangedAuto(); } + } + #endregion #region Commands @@ -209,6 +229,10 @@ namespace Tango.PPC.UI.ViewModels public RelayCommand ClearAllNotificationsCommand { get; set; } + public RelayCommand DisplayJobOutlineCommand { get; set; } + + public RelayCommand HideJobOutlineCommand { get; set; } + #endregion public MachineStatusViewVM() @@ -221,6 +245,8 @@ namespace Tango.PPC.UI.ViewModels JobStatusViewCommand = new RelayCommand(JobStatusView); OverviewViewCommand = new RelayCommand(OverviewView); ClearAllNotificationsCommand = new RelayCommand(ClearAllNotifications); + DisplayJobOutlineCommand = new RelayCommand(DisplayJobOutline); + HideJobOutlineCommand = new RelayCommand(HideJobOutline); IsJobStatusViewEnable = true; IsEnabledStopButton = false; @@ -267,6 +293,57 @@ namespace Tango.PPC.UI.ViewModels model.MidTankRefillPumpActive = item.MidTankRefillPumpActive; model.RemainingTimeoutError = TimeSpan.FromSeconds(item.TimerRemainingSeconds); } + //TEST + //if (model != null) + //{ + // var Li = model.IDSPack.LiquidType.Type; + // var Mid = model.IDSPack.MidTankType.Type; + // model.Level = 0.0; + //model.JerricanPresent = false; + //model.FillingTimeoutError = false; + //model.MidTankEmpty = true; + //model.MidTankRefillPumpActive = false; + //model.RemainingTimeoutError = TimeSpan.FromSeconds(300); + + //if (item.Index == 1) + //{ + // model.Level = 1.0; + //} + //if (item.Index == 2) + //{ + // model.Level = 2.0; + //} + //if (item.Index == 3) + //{ + // model.Level = 3.0; + //} + //if (item.Index == 4)//TI + //{ + // model.Level = 7.0; + //} + //if (item.Index == 5)//LC + //{ + // model.Level = 7.0; + //} + //if (item.Index == 6)//LM + //{ + // model.Level = 3.5; + //} + //if (item.Index == 7)//LY + //{ + // model.Level = 2.5; + //} + // if (item.Index == 8)//Lub + // { + // model.Level = 1.5; + // } + // if (item.Index ==9) + // { + // model.Level = 4.99; + // } + + //} + ////////////////////////////// } } } @@ -454,6 +531,20 @@ namespace Tango.PPC.UI.ViewModels RaisePropertyChanged(nameof(BlackOutput)); } + private void HideJobOutline() + { + IsDisplayJobOutline = false; + } + + private void DisplayJobOutline() + { + if(_handler != null && _handler.JobTicket != null) + { + JobOutlineTicket = _handler.JobTicket; + IsDisplayJobOutline = true; + } + } + #endregion } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml index acaf14f15..84d1108f2 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml @@ -47,11 +47,13 @@ <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" /> </Border.Effect>--> <!--</Border>--> - <StackPanel > - <DockPanel Background="{StaticResource TangoMenuPanelDarkBrush}"> - <Image Source="/Images/logo.png" Stretch="Uniform" HorizontalAlignment="Center" Margin="0 10 10 10" Width="157" Height="51"></Image> - </DockPanel> - </StackPanel> + <touch:TouchButton Padding="0 0" Command="{Binding OpenGeneralinformationCommand}" Style="{StaticResource TangoFlatButton}" Background="Transparent"> + <StackPanel > + <DockPanel Background="{StaticResource TangoMenuPanelDarkBrush}"> + <Image Source="/Images/logo.png" Stretch="Uniform" HorizontalAlignment="Center" Margin="0 10 10 10" Width="157" Height="51"></Image> + </DockPanel> + </StackPanel> + </touch:TouchButton> </Grid> </Border> <touch:TouchButton Command="{Binding MenuOrBackCommand}" Padding="8" Style="{StaticResource TangoFlatButton}" Width="164" Height="32" IsHitTestVisible="{Binding NavigationManager.IsNavigating,Converter={StaticResource BooleanInverseConverter}}" @@ -59,7 +61,7 @@ Foreground="{StaticResource TangoLightForegroundBrush}" Background="{StaticResource TangoMidAccentBrush}" CornerRadius="18" Margin="0 8 0 8"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"> - <touch:TouchIcon Icon="ArrowLeft" Background="Transparent" Width="30" BorderThickness="0" > + <touch:TouchIcon Icon="ArrowLeft" Background="Transparent" Width="30" BorderThickness="0"> <touch:TouchIcon.Style> <Style TargetType="touch:TouchIcon" BasedOn="{StaticResource {x:Type touch:TouchIcon}}"> <Style.Triggers> @@ -70,7 +72,7 @@ </Style> </touch:TouchIcon.Style> </touch:TouchIcon> - <TextBox BorderThickness="0" Background="Transparent" Height="32" FontSize="{StaticResource TangoComboBoxItemFontSize}" VerticalAlignment="Center" Foreground="{StaticResource TangoLightForegroundBrush}" Margin="0 0 0 0" VerticalContentAlignment="Center" >Back</TextBox> + <TextBlock Background="Transparent" FontSize="{StaticResource TangoComboBoxItemFontSize}" VerticalAlignment="Center" Foreground="{StaticResource TangoLightForegroundBrush}" Margin="0 0 0 0" >Back</TextBlock> </StackPanel> </touch:TouchButton> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml index 44be63ffe..666fffe72 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -24,6 +24,7 @@ <localConverters:ProgressWeightSpoolConverter x:Key="ProgressWeightSpoolConverter"/> <localConverters:LiquidTypeToBrushConverter x:Key="LiquidTypeToBrushConverter"/> <localConverters:MidTankLevelToElementRectConverter x:Key="MidTankLevelToElementRectConverter"/> + <localConverters:ProgressUnitSpoolConverter x:Key="ProgressUnitSpoolConverter"/> <Style x:Key="LinkRoundButtonStyle" TargetType="{x:Type touch:TouchButton}"> <Setter Property="Background" Value="{StaticResource TangoMidAccentBrush}"></Setter> @@ -214,7 +215,7 @@ </CombinedGeometry.Geometry1> <CombinedGeometry.Geometry2> - <RectangleGeometry Rect="1,30 30,88"> + <RectangleGeometry Rect="1,0,30,88"> <!--<RectangleGeometry.Rect> <MultiBinding Converter="{StaticResource MidTankLevelToElementRectConverter}"> <Binding Source="{StaticResource RectHeight}"/> @@ -241,364 +242,371 @@ </UserControl.Resources> <Grid Width="960" Height="1080"> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="28"></ColumnDefinition> - <ColumnDefinition Width="1*"></ColumnDefinition> - </Grid.ColumnDefinitions> - <Border> - <Border.Background> - <LinearGradientBrush StartPoint="0,0" EndPoint="1,0" > - <GradientStop Color="Gainsboro" Offset="0" /> - <GradientStop Color="{StaticResource TangoMidBackgroundColor}" Offset="1.0" /> - </LinearGradientBrush> - </Border.Background> - </Border> - <Grid Grid.Column="1" Background="{StaticResource TangoMidBackgroundBrush}" Margin="0 0 0 0" > - <Grid Margin="0 18 0 0"> - <Grid.RowDefinitions> - <RowDefinition Height="56"></RowDefinition> - <RowDefinition Height="1*"></RowDefinition> - </Grid.RowDefinitions> + <Grid > + <Grid.ColumnDefinitions> + <ColumnDefinition Width="28"></ColumnDefinition> + <ColumnDefinition Width="1*"></ColumnDefinition> + </Grid.ColumnDefinitions> + <Border> + <Border.Background> + <LinearGradientBrush StartPoint="0,0" EndPoint="1,0" > + <GradientStop Color="Gainsboro" Offset="0" /> + <GradientStop Color="{StaticResource TangoMidBackgroundColor}" Offset="1.0" /> + </LinearGradientBrush> + </Border.Background> + </Border> + <Grid Grid.Column="1" Background="{StaticResource TangoMidBackgroundBrush}" Margin="0 0 0 0" > + <Grid Margin="0 18 0 0"> + <Grid.RowDefinitions> + <RowDefinition Height="56"></RowDefinition> + <RowDefinition Height="1*"></RowDefinition> + </Grid.RowDefinitions> - <touch:TouchToggleSlider Style="{StaticResource TouchToggleButtonSlider}" Background="Transparent" CheckedBackground="{StaticResource TangoMidBackgroundBrush}" UncheckedBackground="{StaticResource TangoMidBackgroundBrush}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 0 0 0" CornerRadius="25" Height="50" Width="335" ThumbWidth="168" LeftText="Job Status" RightText="Overview" ThumbCornerRadius="18" IsChecked="{Binding IsJobStatusViewEnable, Converter={StaticResource BooleanInverseConverter}}"></touch:TouchToggleSlider> + <touch:TouchToggleSlider Style="{StaticResource TouchToggleButtonSlider}" Background="Transparent" CheckedBackground="{StaticResource TangoMidBackgroundBrush}" UncheckedBackground="{StaticResource TangoMidBackgroundBrush}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 0 0 0" CornerRadius="25" Height="50" Width="335" ThumbWidth="168" LeftText="Job Status" RightText="Overview" ThumbCornerRadius="18" IsChecked="{Binding IsJobStatusViewEnable, Converter={StaticResource BooleanInverseConverter}}"></touch:TouchToggleSlider> - <Canvas Width="300" VerticalAlignment="Top" HorizontalAlignment="Right" Height="56" Margin="0 -30 -60 0"> - <Grid Panel.ZIndex="100" DockPanel.Dock="Top" Height="117" Background="Transparent"> - <Grid HorizontalAlignment="Right" Margin="0 0 0 0"> - <StackPanel Orientation="Horizontal"> - <Grid> - <StackPanel x:Name="techPressElement" VerticalAlignment="Center" Background="Transparent" Orientation="Horizontal"> - <TextBlock Margin="0 10 20 0" FontSize="{StaticResource TangoComboBoxItemFontSize}" Text="{Binding MachineProvider.MachineOperator.Status,Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock> - <locaControls:MachineStatusControl HorizontalAlignment="Center" DataContext="{Binding MachineProvider.MachineOperator}" /> - - </StackPanel> + <Canvas Width="300" VerticalAlignment="Top" HorizontalAlignment="Right" Height="56" Margin="0 -30 -60 0"> + <Grid Panel.ZIndex="100" DockPanel.Dock="Top" Height="117" Background="Transparent"> + <Grid HorizontalAlignment="Right" Margin="0 0 0 0"> + <StackPanel Orientation="Horizontal"> + <Grid> + <StackPanel x:Name="techPressElement" VerticalAlignment="Center" Background="Transparent" Orientation="Horizontal"> + <TextBlock Margin="0 10 20 0" FontSize="{StaticResource TangoComboBoxItemFontSize}" Text="{Binding MachineProvider.MachineOperator.Status,Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock> + <locaControls:MachineStatusControl HorizontalAlignment="Center" DataContext="{Binding MachineProvider.MachineOperator}" /> - <Grid IsHitTestVisible="False" HorizontalAlignment="Center"> - <Grid.Style> - <Style TargetType="Grid"> - <Setter Property="Visibility" Value="Hidden"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding MachineProvider.MachineOperator.MachineStatus.AutoInkFillingEnabled}" Value="True"> - <Setter Property="Visibility" Value="Visible"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding MachineProvider.MachineOperator.IsConnected}" Value="False"> + </StackPanel> + + <Grid IsHitTestVisible="False" HorizontalAlignment="Center"> + <Grid.Style> + <Style TargetType="Grid"> <Setter Property="Visibility" Value="Hidden"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </Grid.Style> - </Grid> + <Style.Triggers> + <DataTrigger Binding="{Binding MachineProvider.MachineOperator.MachineStatus.AutoInkFillingEnabled}" Value="True"> + <Setter Property="Visibility" Value="Visible"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding MachineProvider.MachineOperator.IsConnected}" Value="False"> + <Setter Property="Visibility" Value="Hidden"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </Grid.Style> + </Grid> + </Grid> + </StackPanel> </Grid> - </StackPanel> - </Grid> - </Grid> - </Canvas> - <Grid x:Name="JobStatus" Margin="32 18 60 0" Grid.Row="1" Visibility="{Binding IsJobStatusViewEnable, Converter={StaticResource BooleanToVisibilityConverter}}"> - <Grid.RowDefinitions> - <RowDefinition Height="78"></RowDefinition> - <RowDefinition Height="Auto"></RowDefinition> - <RowDefinition Height="Auto"></RowDefinition> - <RowDefinition Height="Auto"></RowDefinition> - <RowDefinition Height="100"></RowDefinition> + </Grid> + </Canvas> + <Grid x:Name="JobStatus" Margin="32 18 60 0" Grid.Row="1" Visibility="{Binding IsJobStatusViewEnable, Converter={StaticResource BooleanToVisibilityConverter}}"> + <Grid.RowDefinitions> + <RowDefinition Height="78"></RowDefinition> + <RowDefinition Height="Auto"></RowDefinition> + <RowDefinition Height="Auto"></RowDefinition> + <RowDefinition Height="Auto"></RowDefinition> + <RowDefinition Height="100"></RowDefinition> - </Grid.RowDefinitions> - <Grid Margin=" 0 0 0 20"> - <DockPanel> - <touch:TouchButton Command="{Binding GoToJobCommand}" DockPanel.Dock="Right" VerticalAlignment="Top" Style="{StaticResource TangoLinkButton}" Foreground="{StaticResource TangoPrimaryAccentBrush}"> - <StackPanel Orientation="Vertical"> - <TextBlock Margin="5 0 0 0" FontSize="{StaticResource TangoButtonFontSize}" VerticalAlignment="Bottom">Go To Job</TextBlock> - <Rectangle Height="3" Fill="{StaticResource TangoPrimaryAccentBrush}" VerticalAlignment="Bottom" Margin="0 2 0 0"></Rectangle> - </StackPanel> - </touch:TouchButton> - <TextBlock DockPanel.Dock="Left" FontSize="{StaticResource TangoLargeHeaderFontSize}" Text="{Binding Job.Name, TargetNullValue='-', FallbackValue='-'}"> </TextBlock> - </DockPanel> - <Border Height="2" Background="{StaticResource TangoLightBorderBrush}" VerticalAlignment="Bottom" Margin="0 2 0 0" CornerRadius="2"></Border> - </Grid> + </Grid.RowDefinitions> + <Grid Margin=" 0 0 0 20"> + <DockPanel> + <touch:TouchButton Command="{Binding GoToJobCommand}" DockPanel.Dock="Right" VerticalAlignment="Top" Style="{StaticResource TangoLinkButton}" Foreground="{StaticResource TangoPrimaryAccentBrush}"> + <StackPanel Orientation="Vertical"> + <TextBlock Margin="5 0 0 0" FontSize="{StaticResource TangoButtonFontSize}" VerticalAlignment="Bottom">Go To Job</TextBlock> + <Rectangle Height="3" Fill="{StaticResource TangoPrimaryAccentBrush}" VerticalAlignment="Bottom" Margin="0 2 0 0"></Rectangle> + </StackPanel> + </touch:TouchButton> + <touch:TouchButton DockPanel.Dock="Right" Visibility="{Binding ApplicationManager.IsInTechnicianMode,Converter={StaticResource BooleanToVisibilityConverter}}" VerticalAlignment="Top" Margin="0 0 20 0" Command="{Binding DisplayJobOutlineCommand}" Style="{StaticResource TangoLinkButton}" FontSize="{StaticResource TangoTitleFontSize}"> + <StackPanel Orientation="Vertical"> + <TextBlock Margin="5 0 0 0" FontSize="{StaticResource TangoButtonFontSize}" VerticalAlignment="Bottom">Display Job Outline</TextBlock> + <Rectangle Height="3" Fill="{StaticResource TangoPrimaryAccentBrush}" VerticalAlignment="Bottom" Margin="0 2 0 0"></Rectangle> + </StackPanel> + </touch:TouchButton> + <TextBlock DockPanel.Dock="Left" FontSize="{StaticResource TangoLargeHeaderFontSize}" Text="{Binding Job.Name, TargetNullValue='-', FallbackValue='-'}"></TextBlock> + </DockPanel> + <Border Height="2" Background="{StaticResource TangoLightBorderBrush}" VerticalAlignment="Bottom" Margin="0 2 0 0" CornerRadius="2"></Border> + </Grid> - <DockPanel Grid.Row="1" Margin="0 11 0 0"> - <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" VerticalAlignment="Top" Width="200" MinHeight="30" HorizontalAlignment="Right" Margin="0 0 0 0"> - <StackPanel Orientation="Vertical"> - <touch:TouchToggleSlider Style="{StaticResource TouchToggleButtonSlider}" Background="{StaticResource TangoMidBackgroundBrush}" CheckedBackground="{StaticResource TangoMidBackgroundBrush}" UncheckedBackground="{StaticResource TangoMidBackgroundBrush}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="20 0 20 0" CornerRadius="17" Height="38" Width="164" ThumbWidth="80" LeftText="1 Set" RightText="1 Spool" ThumbCornerRadius="13" IsChecked="{Binding IsSpoolView}" FontSize="{StaticResource TangoDefaultFontSize}"></touch:TouchToggleSlider> - <touch:TouchToggleSlider Style="{StaticResource TouchToggleButtonSlider}" Background="{StaticResource TangoMidBackgroundBrush}" CheckedBackground="{StaticResource TangoMidBackgroundBrush}" UncheckedBackground="{StaticResource TangoMidBackgroundBrush}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="20 18 20 0" CornerRadius="17" Height="38" Width="164" ThumbWidth="80" LeftText="Length" RightText="Weight" ThumbCornerRadius="13" IsChecked="{Binding IsWeghtView}" FontSize="{StaticResource TangoDefaultFontSize}"></touch:TouchToggleSlider> + <DockPanel Grid.Row="1" Margin="0 11 0 0"> + <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" VerticalAlignment="Top" Width="200" MinHeight="30" HorizontalAlignment="Right" Margin="0 0 0 0"> + <StackPanel Orientation="Vertical"> + <touch:TouchToggleSlider Style="{StaticResource TouchToggleButtonSlider}" Background="{StaticResource TangoMidBackgroundBrush}" CheckedBackground="{StaticResource TangoMidBackgroundBrush}" UncheckedBackground="{StaticResource TangoMidBackgroundBrush}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="20 0 20 0" CornerRadius="17" Height="38" Width="164" ThumbWidth="80" LeftText="1 Set" RightText="1 Spool" ThumbCornerRadius="13" IsChecked="{Binding IsSpoolView}" FontSize="{StaticResource TangoDefaultFontSize}"></touch:TouchToggleSlider> + <touch:TouchToggleSlider Style="{StaticResource TouchToggleButtonSlider}" Background="{StaticResource TangoMidBackgroundBrush}" CheckedBackground="{StaticResource TangoMidBackgroundBrush}" UncheckedBackground="{StaticResource TangoMidBackgroundBrush}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="20 18 20 0" CornerRadius="17" Height="38" Width="164" ThumbWidth="80" LeftText="Length" RightText="Weight" ThumbCornerRadius="13" IsChecked="{Binding IsWeghtView}" FontSize="{StaticResource TangoDefaultFontSize}"></touch:TouchToggleSlider> + </StackPanel> </StackPanel> - </StackPanel> - <UniformGrid DockPanel.Dock="Left" Columns="1" Rows="5" HorizontalAlignment="Left" Margin="0 0 0 0" Height="326" VerticalAlignment="Top"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/Job Issues/thread_type.png" Stretch="None" VerticalAlignment="Top"/> - <StackPanel Orientation="Vertical" Margin="15 0 0 0"> - <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Thread Type</TextBlock> - <TextBlock Text="{Binding Job.Rml.Name, TargetNullValue='-', FallbackValue='-'}" FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"></TextBlock> - </StackPanel> - </StackPanel> + <UniformGrid DockPanel.Dock="Left" Columns="1" Rows="5" HorizontalAlignment="Left" Margin="0 0 0 0" Height="326" VerticalAlignment="Top"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <Image Source="../Images/Job Issues/thread_type.png" Stretch="None" VerticalAlignment="Top"/> + <StackPanel Orientation="Vertical" Margin="15 0 0 0"> + <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Thread Type</TextBlock> + <TextBlock Text="{Binding Job.Rml.Name, TargetNullValue='-', FallbackValue='-'}" FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"></TextBlock> + </StackPanel> + </StackPanel> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/Job Issues/job_length.png" Stretch="None" VerticalAlignment="Top" HorizontalAlignment="Left"/> - <StackPanel Orientation="Vertical" Margin="15 0 0 0"> - <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Job Length</TextBlock> - <TextBlock FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"> - <TextBlock.Style> - <Style TargetType="{x:Type TextBlock}"> - <Setter Property="Text" Value="{Binding Job.LengthIncludingNumberOfUnitsAndSpools, TargetNullValue='-', FallbackValue='-', StringFormat=0.##}" /> - <Style.Triggers> - <DataTrigger Binding="{Binding IsSpoolView}" Value="True"> - <Setter Property="Text" Value="{Binding Job.LengthIncludingNumberOfUnits, TargetNullValue='-', FallbackValue='-', StringFormat=0.##}" /> - </DataTrigger> - </Style.Triggers> - </Style> - </TextBlock.Style> - </TextBlock> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <Image Source="../Images/Job Issues/job_length.png" Stretch="None" VerticalAlignment="Top" HorizontalAlignment="Left"/> + <StackPanel Orientation="Vertical" Margin="15 0 0 0"> + <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Job Length</TextBlock> + <TextBlock FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"> + <TextBlock.Style> + <Style TargetType="{x:Type TextBlock}"> + <Setter Property="Text" Value="{Binding Job.LengthIncludingNumberOfUnitsAndSpools, TargetNullValue='-', FallbackValue='-', StringFormat=0.##}" /> + <Style.Triggers> + <DataTrigger Binding="{Binding IsSpoolView}" Value="True"> + <Setter Property="Text" Value="{Binding Job.LengthIncludingNumberOfUnits, TargetNullValue='-', FallbackValue='-', StringFormat=0.##}" /> + </DataTrigger> + </Style.Triggers> + </Style> + </TextBlock.Style> + </TextBlock> + </StackPanel> </StackPanel> - </StackPanel> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/Job Issues/job_weight.png" Stretch="None" VerticalAlignment="Top"/> - <StackPanel Orientation="Vertical" Margin="15 0 0 0"> - <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Job Weight</TextBlock> - <TextBlock FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"> - <TextBlock.Style> - <Style TargetType="{x:Type TextBlock}"> - <Setter Property="Text" Value="{Binding Job.WeightIncludingNumberOfUnitsAndSpools, TargetNullValue='-', FallbackValue='-', StringFormat=0.##}" /> - <Style.Triggers> - <DataTrigger Binding="{Binding IsSpoolView}" Value="True"> - <Setter Property="Text" Value="{Binding Job.WeightIncludingNumberOfUnits, TargetNullValue='-', FallbackValue='-', StringFormat=0.##}" /> - </DataTrigger> - </Style.Triggers> - </Style> - </TextBlock.Style> - </TextBlock> - </StackPanel> - </StackPanel> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/Job Issues/job_copies.png" Stretch="None" VerticalAlignment="Top"/> - <StackPanel Orientation="Vertical" Margin="15 0 0 0"> - <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Copies</TextBlock> - <TextBlock FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"> - <TextBlock.Style> - <Style TargetType="{x:Type TextBlock}"> - <Setter Property="Text" Value="{Binding Job.NumberOfUnitsMultipliedBySpools, TargetNullValue='-', FallbackValue='-', StringFormat=0.##}" /> - <Style.Triggers> - <DataTrigger Binding="{Binding IsSpoolView}" Value="True"> - <Setter Property="Text" Value="{Binding Job.NumberOfUnits, TargetNullValue='-', FallbackValue='-', StringFormat=0.##}" /> - </DataTrigger> - </Style.Triggers> - </Style> - </TextBlock.Style> - </TextBlock> - </StackPanel> - </StackPanel> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/Job Issues/spools.png" Stretch="None" VerticalAlignment="Top"/> - <StackPanel Orientation="Vertical" Margin="15 0 0 0"> - <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Spools</TextBlock> - <TextBlock Text="{Binding Job.Spools, TargetNullValue='-', FallbackValue='-'}" FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"></TextBlock> - </StackPanel> - </StackPanel> - </UniformGrid> - <Grid x:Name="StatusCicle" Background="{StaticResource TangoMidBackgroundBrush}" VerticalAlignment="Top"> - <StackPanel VerticalAlignment="Center"> - <Grid> - <touch:TouchRingProgress Width="364" Height="364" RingThickness="10"> - <touch:TouchRingProgress.Style> - <Style TargetType="touch:TouchRingProgress"> - <Setter Property="Visibility" Value="Visible"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter> - <Setter Property="Maximum" Value="{Binding RunningJobStatus.TotalProgressMinusSettingUp}"></Setter> - <Setter Property="Value" Value="{Binding RunningJobStatus.ProgressMinusSettingUp}"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding RunningJobStatus.IsSettingUp}" Value="False"> - <Setter Property="Visibility" Value="Visible"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding RunningJobStatus.IsCompleted}" Value="True"> - <Setter Property="Maximum" Value="100"></Setter> - <Setter Property="Value" Value="99.9999999"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding RunningJobStatus.IsCanceled}" Value="True"> - <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding RunningJobStatus.IsFailed}" Value="True"> - <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </touch:TouchRingProgress.Style> - </touch:TouchRingProgress> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <Image Source="../Images/Job Issues/job_weight.png" Stretch="None" VerticalAlignment="Top"/> + <StackPanel Orientation="Vertical" Margin="15 0 0 0"> + <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Job Weight</TextBlock> + <TextBlock FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"> + <TextBlock.Style> + <Style TargetType="{x:Type TextBlock}"> + <Setter Property="Text" Value="{Binding Job.WeightIncludingNumberOfUnitsAndSpools, TargetNullValue='-', FallbackValue='-', StringFormat=0.##}" /> + <Style.Triggers> + <DataTrigger Binding="{Binding IsSpoolView}" Value="True"> + <Setter Property="Text" Value="{Binding Job.WeightIncludingNumberOfUnits, TargetNullValue='-', FallbackValue='-', StringFormat=0.##}" /> + </DataTrigger> + </Style.Triggers> + </Style> + </TextBlock.Style> + </TextBlock> + </StackPanel> + </StackPanel> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <Image Source="../Images/Job Issues/job_copies.png" Stretch="None" VerticalAlignment="Top"/> + <StackPanel Orientation="Vertical" Margin="15 0 0 0"> + <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Copies</TextBlock> + <TextBlock FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"> + <TextBlock.Style> + <Style TargetType="{x:Type TextBlock}"> + <Setter Property="Text" Value="{Binding Job.NumberOfUnitsMultipliedBySpools, TargetNullValue='-', FallbackValue='-', StringFormat=0.##}" /> + <Style.Triggers> + <DataTrigger Binding="{Binding IsSpoolView}" Value="True"> + <Setter Property="Text" Value="{Binding Job.NumberOfUnits, TargetNullValue='-', FallbackValue='-', StringFormat=0.##}" /> + </DataTrigger> + </Style.Triggers> + </Style> + </TextBlock.Style> + </TextBlock> + </StackPanel> + </StackPanel> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <Image Source="../Images/Job Issues/spools.png" Stretch="None" VerticalAlignment="Top"/> + <StackPanel Orientation="Vertical" Margin="15 0 0 0"> + <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Spools</TextBlock> + <TextBlock Text="{Binding Job.Spools, TargetNullValue='-', FallbackValue='-'}" FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"></TextBlock> + </StackPanel> + </StackPanel> + </UniformGrid> + <Grid x:Name="StatusCicle" Background="{StaticResource TangoMidBackgroundBrush}" VerticalAlignment="Top"> + <StackPanel VerticalAlignment="Center"> + <Grid> + <touch:TouchRingProgress Width="364" Height="364" RingThickness="10"> + <touch:TouchRingProgress.Style> + <Style TargetType="touch:TouchRingProgress"> + <Setter Property="Visibility" Value="Visible"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter> + <Setter Property="Maximum" Value="{Binding RunningJobStatus.TotalProgressMinusSettingUp}"></Setter> + <Setter Property="Value" Value="{Binding RunningJobStatus.ProgressMinusSettingUp}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RunningJobStatus.IsSettingUp}" Value="False"> + <Setter Property="Visibility" Value="Visible"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding RunningJobStatus.IsCompleted}" Value="True"> + <Setter Property="Maximum" Value="100"></Setter> + <Setter Property="Value" Value="99.9999999"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding RunningJobStatus.IsCanceled}" Value="True"> + <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding RunningJobStatus.IsFailed}" Value="True"> + <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </touch:TouchRingProgress.Style> + </touch:TouchRingProgress> - <touch:TouchBusyIndicator Width="360" Height="360" StrokeThickness="10" Maximum="100" Visibility="{Binding RunningJobStatus.IsSettingUp,Converter={StaticResource BooleanToVisibilityConverter}}"> - <touch:TouchBusyIndicator.Style> - <Style TargetType="touch:TouchBusyIndicator"> - <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter> - <Setter Property="Value" Value="0"></Setter> - <Setter Property="IsIndeterminate" Value="False"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding RunningJobStatus.IsSettingUp}" Value="True"> - <Setter Property="Visibility" Value="Visible"></Setter> - <Setter Property="Value" Value="0"></Setter> - <Setter Property="IsIndeterminate" Value="True"></Setter> - <Setter Property="Foreground"> - <Setter.Value> - <LinearGradientBrush StartPoint="0, 0" EndPoint="1, 1"> - <GradientStop Offset="0.2" Color="{StaticResource TangoValidationErrorColor}"/> - <GradientStop Offset="0.5" Color="Yellow"/> - <GradientStop Offset="0.8" Color="{StaticResource TangoPrimaryAccentColor}"/> - </LinearGradientBrush> - </Setter.Value> - </Setter> - </DataTrigger> - <DataTrigger Binding="{Binding RunningJobStatus.IsCompleted}" Value="True"> - <Setter Property="IsIndeterminate" Value="False"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding RunningJobStatus.IsCanceled}" Value="True"> - <Setter Property="Value" Value="99.9999999"></Setter> - <Setter Property="IsIndeterminate" Value="False"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding RunningJobStatus.IsFailed}" Value="True"> - <Setter Property="Value" Value="99.9999999"></Setter> - <Setter Property="IsIndeterminate" Value="False"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </touch:TouchBusyIndicator.Style> - </touch:TouchBusyIndicator> + <touch:TouchBusyIndicator Width="360" Height="360" StrokeThickness="10" Maximum="100" Visibility="{Binding RunningJobStatus.IsSettingUp,Converter={StaticResource BooleanToVisibilityConverter}}"> + <touch:TouchBusyIndicator.Style> + <Style TargetType="touch:TouchBusyIndicator"> + <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter> + <Setter Property="Value" Value="0"></Setter> + <Setter Property="IsIndeterminate" Value="False"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RunningJobStatus.IsSettingUp}" Value="True"> + <Setter Property="Visibility" Value="Visible"></Setter> + <Setter Property="Value" Value="0"></Setter> + <Setter Property="IsIndeterminate" Value="True"></Setter> + <Setter Property="Foreground"> + <Setter.Value> + <LinearGradientBrush StartPoint="0, 0" EndPoint="1, 1"> + <GradientStop Offset="0.2" Color="{StaticResource TangoValidationErrorColor}"/> + <GradientStop Offset="0.5" Color="Yellow"/> + <GradientStop Offset="0.8" Color="{StaticResource TangoPrimaryAccentColor}"/> + </LinearGradientBrush> + </Setter.Value> + </Setter> + </DataTrigger> + <DataTrigger Binding="{Binding RunningJobStatus.IsCompleted}" Value="True"> + <Setter Property="IsIndeterminate" Value="False"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding RunningJobStatus.IsCanceled}" Value="True"> + <Setter Property="Value" Value="99.9999999"></Setter> + <Setter Property="IsIndeterminate" Value="False"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding RunningJobStatus.IsFailed}" Value="True"> + <Setter Property="Value" Value="99.9999999"></Setter> + <Setter Property="IsIndeterminate" Value="False"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </touch:TouchBusyIndicator.Style> + </touch:TouchBusyIndicator> - <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> + <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center"> - <StackPanel Visibility="{Binding RunningJobStatus.IsSettingUp, TargetNullValue=true, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> - <Image Source="../Images/JobProgressView/drop.png" Stretch="None" VerticalAlignment="Center" /> + <StackPanel Visibility="{Binding RunningJobStatus.IsSettingUp, TargetNullValue=true, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> - <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}">Completed /</TextBlock> - <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" Visibility="{Binding IsWeghtView, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> Length</TextBlock> - <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" Visibility="{Binding IsWeghtView, Converter={StaticResource BooleanToVisibilityConverter}}"> Weight</TextBlock> + <Image Source="../Images/JobProgressView/drop.png" Stretch="None" VerticalAlignment="Center" /> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}">Completed /</TextBlock> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" Visibility="{Binding IsWeghtView, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> Length</TextBlock> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" Visibility="{Binding IsWeghtView, Converter={StaticResource BooleanToVisibilityConverter}}"> Weight</TextBlock> + </StackPanel> </StackPanel> - </StackPanel> - <StackPanel Orientation="Horizontal" Margin="0 15 0 0" HorizontalAlignment="Center" Visibility="{Binding IsWeghtView, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> - <TextBlock FontSize="{StaticResource TangoLargeInfoFontSize}" VerticalAlignment="Center"> - <TextBlock.Text> - <MultiBinding Converter="{StaticResource ProgressLengthSpoolConverter}" StringFormat="0.#" TargetNullValue='-' FallbackValue='0' Mode="OneWay"> - <Binding Path="RunningJobStatus.TotalProgressMinusSettingUp" /> - <Binding Path="IsSpoolView"/> - <Binding Path="RunningJobStatus.ProgressMinusSettingUp" /> - </MultiBinding> - </TextBlock.Text> - </TextBlock> - <TextBlock FontSize="{StaticResource TangoLargeInfoFontSize}" VerticalAlignment="Center" Text="/"></TextBlock> - <TextBlock FontSize="{StaticResource TangoTitleFontSize}" VerticalAlignment="Center"> - <TextBlock.Text> - <MultiBinding Converter="{StaticResource ProgressLengthSpoolConverter}" StringFormat="0" TargetNullValue='-' FallbackValue='0' Mode="OneWay"> - <Binding Path="RunningJobStatus.TotalProgressMinusSettingUp"/> - <Binding Path="IsSpoolView"/> - </MultiBinding> - </TextBlock.Text> - </TextBlock> - <TextBlock FontSize="{StaticResource TangoTitleFontSize}" VerticalAlignment="Center" Text=" m"></TextBlock> - </StackPanel> + <StackPanel Orientation="Horizontal" Margin="0 15 0 0" HorizontalAlignment="Center" Visibility="{Binding IsWeghtView, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <TextBlock FontSize="{StaticResource TangoLargeInfoFontSize}" VerticalAlignment="Center"> + <TextBlock.Text> + <MultiBinding Converter="{StaticResource ProgressLengthSpoolConverter}" StringFormat="0.#" TargetNullValue='-' FallbackValue='0' Mode="OneWay"> + <Binding Path="RunningJobStatus.TotalProgressMinusSettingUp" /> + <Binding Path="IsSpoolView"/> + <Binding Path="RunningJobStatus.ProgressMinusSettingUp" /> + </MultiBinding> + </TextBlock.Text> + </TextBlock> + <TextBlock FontSize="{StaticResource TangoLargeInfoFontSize}" VerticalAlignment="Center" Text="/"></TextBlock> + <TextBlock FontSize="{StaticResource TangoTitleFontSize}" VerticalAlignment="Center"> + <TextBlock.Text> + <MultiBinding Converter="{StaticResource ProgressLengthSpoolConverter}" StringFormat="0" TargetNullValue='-' FallbackValue='0' Mode="OneWay"> + <Binding Path="RunningJobStatus.TotalProgressMinusSettingUp"/> + <Binding Path="IsSpoolView"/> + </MultiBinding> + </TextBlock.Text> + </TextBlock> + <TextBlock FontSize="{StaticResource TangoTitleFontSize}" VerticalAlignment="Center" Text=" m"></TextBlock> + </StackPanel> - <StackPanel Orientation="Horizontal" Margin="0 10 0 0" HorizontalAlignment="Center" Visibility="{Binding IsWeghtView, Converter={StaticResource BooleanToVisibilityConverter}}"> - <TextBlock FontSize="{StaticResource TangoLargeInfoFontSize}" VerticalAlignment="Center"> - <TextBlock.Text> - <MultiBinding Converter="{StaticResource ProgressWeightSpoolConverter}" StringFormat="0.##" TargetNullValue='-' FallbackValue='0'> - <Binding Path="RunningJobStatus.TotalProgressMinusSettingUp" /> - <Binding Path="IsSpoolView"/> - <Binding Path="RunningJobStatus.ProgressMinusSettingUp" /> - <Binding Path="Job.GramPerLength" Mode="OneWay"/> - </MultiBinding> - </TextBlock.Text> - </TextBlock> - <TextBlock FontSize="{StaticResource TangoLargeInfoFontSize}" VerticalAlignment="Center" Text="/"></TextBlock> - <TextBlock FontSize="{StaticResource TangoTitleFontSize}" VerticalAlignment="Center"> - <TextBlock.Text> - <MultiBinding Converter="{StaticResource ProgressWeightSpoolConverter}" StringFormat="0.#" TargetNullValue='-' FallbackValue='0' > - <Binding Path="RunningJobStatus.TotalProgressMinusSettingUp"/> - <Binding Path="IsSpoolView"/> - <Binding Path="Job.GramPerLength" Mode="OneWay"/> - </MultiBinding> - </TextBlock.Text> - </TextBlock> - <TextBlock FontSize="{StaticResource TangoTitleFontSize}" VerticalAlignment="Center" Text=" g"></TextBlock> + <StackPanel Orientation="Horizontal" Margin="0 10 0 0" HorizontalAlignment="Center" Visibility="{Binding IsWeghtView, Converter={StaticResource BooleanToVisibilityConverter}}"> + <TextBlock FontSize="{StaticResource TangoLargeInfoFontSize}" VerticalAlignment="Center"> + <TextBlock.Text> + <MultiBinding Converter="{StaticResource ProgressWeightSpoolConverter}" StringFormat="0.##" TargetNullValue='-' FallbackValue='0'> + <Binding Path="RunningJobStatus.TotalProgressMinusSettingUp" /> + <Binding Path="IsSpoolView"/> + <Binding Path="RunningJobStatus.ProgressMinusSettingUp" /> + <Binding Path="Job.GramPerLength" Mode="OneWay"/> + </MultiBinding> + </TextBlock.Text> + </TextBlock> + <TextBlock FontSize="{StaticResource TangoLargeInfoFontSize}" VerticalAlignment="Center" Text="/"></TextBlock> + <TextBlock FontSize="{StaticResource TangoTitleFontSize}" VerticalAlignment="Center"> + <TextBlock.Text> + <MultiBinding Converter="{StaticResource ProgressWeightSpoolConverter}" StringFormat="0.#" TargetNullValue='-' FallbackValue='0' > + <Binding Path="RunningJobStatus.TotalProgressMinusSettingUp"/> + <Binding Path="IsSpoolView"/> + <Binding Path="Job.GramPerLength" Mode="OneWay"/> + </MultiBinding> + </TextBlock.Text> + </TextBlock> + <TextBlock FontSize="{StaticResource TangoTitleFontSize}" VerticalAlignment="Center" Text=" g"></TextBlock> + </StackPanel> </StackPanel> - </StackPanel> - <StackPanel Height="90" Visibility="{Binding RunningJobStatus.IsSettingUp, FallbackValue=collapsed, Converter={StaticResource BooleanToVisibilityConverter}}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> - <Image Source="../Images/JobProgressView/drop.png" Stretch="None" /> - <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Getting Ready...</TextBlock> + <StackPanel Height="90" Visibility="{Binding RunningJobStatus.IsSettingUp, FallbackValue=collapsed, Converter={StaticResource BooleanToVisibilityConverter}}"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> + <Image Source="../Images/JobProgressView/drop.png" Stretch="None" /> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Getting Ready...</TextBlock> + </StackPanel> </StackPanel> - </StackPanel> - <Rectangle Margin="0 10 0 0" Width="250" Stroke="{StaticResource TangoDividerBrush}" /> + <Rectangle Margin="0 10 0 0" Width="250" Stroke="{StaticResource TangoDividerBrush}" /> + + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0 15 0 0"> + <Image Source="../Images/JobProgressView/clock.png" Stretch="None" VerticalAlignment="Center" /> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}">Time Left</TextBlock> + </StackPanel> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0 15 0 0"> - <Image Source="../Images/JobProgressView/clock.png" Stretch="None" VerticalAlignment="Center" /> - <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}">Time Left</TextBlock> + <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoLargeInfoFontSize}" Margin="0 10 0 0" HorizontalAlignment="Center"> + <Run Text="{Binding RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToTwoDigitsTimeConverter},FallbackValue=-}"></Run> + <Run FontSize="{StaticResource TangoComboBoxItemFontSize}" Text="{Binding RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToLabelConverter},FallbackValue=min}"></Run> + </TextBlock> </StackPanel> + </Grid> - <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoLargeInfoFontSize}" Margin="0 10 0 0" HorizontalAlignment="Center"> - <Run Text="{Binding RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToTwoDigitsTimeConverter},FallbackValue=-}"></Run> - <Run FontSize="{StaticResource TangoComboBoxItemFontSize}" Text="{Binding RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToLabelConverter},FallbackValue=min}"></Run> - </TextBlock> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> + <touch:TouchButton Visibility="Collapsed" Content="Abort" Margin="0 20 0 0" Height="50" Width="164" CornerRadius="30" Command="{Binding AbortCommand}" IsEnabled="true" BorderThickness="1" BorderBrush="{StaticResource TangoPrimaryAccentBrush}" EnableDropShadow="False"> + <touch:TouchButton.Style > + <Style TargetType="touch:TouchButton" > + <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter> + <Setter Property="Background" Value="Transparent"/> + <Style.Triggers> + <Trigger Property="IsEnabled" Value="False"> + <Setter Property="Foreground" Value="{StaticResource TangoDisabledForegroundBrush}"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource TangoDisabledBackgroundBrush}"></Setter> + </Trigger> + </Style.Triggers> + </Style> + </touch:TouchButton.Style> + </touch:TouchButton> + <touch:TouchButton Content="Stop" Margin="0 20 0 0" Height="50" Width="164" CornerRadius="30" Command="{Binding StopCommand}" IsEnabled="{Binding MachineProvider.MachineOperator.IsPrinting}" EnableDropShadow="False"> + <touch:TouchButton.Style > + <Style TargetType="touch:TouchButton" > + <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}"></Setter> + <Setter Property="Background" Value="{StaticResource TangoPrimaryAccentBrush}"/> + <Style.Triggers> + <Trigger Property="IsEnabled" Value="False"> + <Setter Property="Foreground" Value="{StaticResource TangoDisabledForegroundBrush}"></Setter> + <Setter Property="Background" Value="{StaticResource TangoDisabledBackgroundBrush}"></Setter> + </Trigger> + </Style.Triggers> + </Style> + </touch:TouchButton.Style> + </touch:TouchButton> </StackPanel> - </Grid> - - <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> - <touch:TouchButton Visibility="Collapsed" Content="Abort" Margin="0 20 0 0" Height="50" Width="164" CornerRadius="30" Command="{Binding AbortCommand}" IsEnabled="true" BorderThickness="1" BorderBrush="{StaticResource TangoPrimaryAccentBrush}" EnableDropShadow="False"> - <touch:TouchButton.Style > - <Style TargetType="touch:TouchButton" > - <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter> - <Setter Property="Background" Value="Transparent"/> - <Style.Triggers> - <Trigger Property="IsEnabled" Value="False"> - <Setter Property="Foreground" Value="{StaticResource TangoDisabledForegroundBrush}"></Setter> - <Setter Property="BorderBrush" Value="{StaticResource TangoDisabledBackgroundBrush}"></Setter> - </Trigger> - </Style.Triggers> - </Style> - </touch:TouchButton.Style> - </touch:TouchButton> - <touch:TouchButton Content="Stop" Margin="0 20 0 0" Height="50" Width="164" CornerRadius="30" Command="{Binding StopCommand}" IsEnabled="{Binding MachineProvider.MachineOperator.IsPrinting}" EnableDropShadow="False"> - <touch:TouchButton.Style > - <Style TargetType="touch:TouchButton" > - <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}"></Setter> - <Setter Property="Background" Value="{StaticResource TangoPrimaryAccentBrush}"/> - <Style.Triggers> - <Trigger Property="IsEnabled" Value="False"> - <Setter Property="Foreground" Value="{StaticResource TangoDisabledForegroundBrush}"></Setter> - <Setter Property="Background" Value="{StaticResource TangoDisabledBackgroundBrush}"></Setter> - </Trigger> - </Style.Triggers> - </Style> - </touch:TouchButton.Style> - </touch:TouchButton> </StackPanel> + </Grid> + </DockPanel> + <StackPanel x:Name="Job_Progress" Grid.Row="2" Margin="0 12 0 0" Orientation="Vertical"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <Image Source="../Images/Job Issues/Thread.png" Stretch="None" VerticalAlignment="Top"/> + <TextBlock Text="Total Job Progress" FontWeight="DemiBold" Margin="15 10 0 0" FontSize="{StaticResource TangoComboBoxItemFontSize}" VerticalAlignment="Top"></TextBlock> + <Rectangle Height="2" Fill="{StaticResource TangoLightBorderBrush}" Width="1010" VerticalAlignment="Top" Margin="15 20 0 0"></Rectangle> </StackPanel> - </Grid> - </DockPanel> - <StackPanel x:Name="Job_Progress" Grid.Row="2" Margin="0 12 0 0" Orientation="Vertical"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/Job Issues/Thread.png" Stretch="None" VerticalAlignment="Top"/> - <TextBlock Text="Total Job Progress" FontWeight="DemiBold" Margin="15 10 0 0" FontSize="{StaticResource TangoComboBoxItemFontSize}" VerticalAlignment="Top"></TextBlock> - <Rectangle Height="2" Fill="{StaticResource TangoLightBorderBrush}" Width="1010" VerticalAlignment="Top" Margin="15 20 0 0"></Rectangle> - </StackPanel> - <Grid Margin="0 22 0 0"> - <locaControls:RunningJobViewerEureka ThumbHeight="16" HeightSlider="14" DisplayMarkers="False" IsActive="True" Job="{Binding Job}" - RunningJobStatus="{Binding RunningJobStatus}" - MaximumValue="{Binding RunningJobStatus.TotalProgressMinusSettingUp, FallbackValue=100,TargetNullValue=100}" - MinimumValue="0" - SliderValue="{Binding RunningJobStatus.ProgressMinusSettingUp, TargetNullValue=0, FallbackValue=0}"/> + <Grid Margin="0 22 0 0"> + <locaControls:RunningJobViewerEureka ThumbHeight="16" HeightSlider="14" DisplayMarkers="False" IsActive="True" Job="{Binding Job}" + RunningJobStatus="{Binding RunningJobStatus}" + MaximumValue="{Binding RunningJobStatus.TotalProgressMinusSettingUp, FallbackValue=100,TargetNullValue=100}" + MinimumValue="0" + SliderValue="{Binding RunningJobStatus.ProgressMinusSettingUp, TargetNullValue=0, FallbackValue=0}"/> - <!--<TextBlock Margin="0 0 -50 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" HorizontalAlignment="Right"> - <Run Text="x"></Run><Run Text="{Binding RunningJobStatus.RemainingUnits}"></Run> - </TextBlock>--> - </Grid> - <UniformGrid DockPanel.Dock="Bottom" Columns="4" Rows="1" HorizontalAlignment="Left" Margin="0 10 0 0" Height="Auto" VerticalAlignment="Top" Width="840"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/Job Issues/job_length.png" Stretch="None" VerticalAlignment="Top" HorizontalAlignment="Left"/> - <StackPanel Orientation="Vertical" Margin="15 0 0 0"> - <TextBlock x:Name="ProgressLength" VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Job Length</TextBlock> + <!--<TextBlock Margin="0 0 -50 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" HorizontalAlignment="Right"> + <Run Text="x"></Run><Run Text="{Binding RunningJobStatus.RemainingUnits}"></Run> + </TextBlock>--> + </Grid> + <UniformGrid DockPanel.Dock="Bottom" Columns="4" Rows="1" HorizontalAlignment="Left" Margin="0 10 0 0" Height="Auto" VerticalAlignment="Top" Width="840"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <Image Source="../Images/Job Issues/job_length.png" Stretch="None" VerticalAlignment="Top" HorizontalAlignment="Left"/> + <StackPanel Orientation="Vertical" Margin="15 0 0 0"> + <TextBlock x:Name="ProgressLength" VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Job Length</TextBlock> <TextBlock FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"> <TextBlock.Text> <MultiBinding Converter="{StaticResource LengthWithSpoolsConverter}" StringFormat="0.##" TargetNullValue='-' FallbackValue='-' Mode="OneWay"> @@ -607,12 +615,12 @@ </MultiBinding> </TextBlock.Text> </TextBlock> + </StackPanel> </StackPanel> - </StackPanel> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/Job Issues/job_weight.png" Stretch="None" VerticalAlignment="Top"/> - <StackPanel Orientation="Vertical" Margin="15 0 0 0"> - <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Job Weight</TextBlock> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <Image Source="../Images/Job Issues/job_weight.png" Stretch="None" VerticalAlignment="Top"/> + <StackPanel Orientation="Vertical" Margin="15 0 0 0"> + <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Job Weight</TextBlock> <TextBlock FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"> <TextBlock.Text> <MultiBinding Converter="{StaticResource LengthToWeightConverter}" StringFormat="0.##" TargetNullValue='-' FallbackValue='-' Mode="OneWay"> @@ -622,189 +630,195 @@ </MultiBinding> </TextBlock.Text> </TextBlock> + </StackPanel> </StackPanel> - </StackPanel> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/Job Issues/job_copies.png" Stretch="None" VerticalAlignment="Top"/> - <StackPanel Orientation="Vertical" Margin="15 0 0 0"> - <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Copies</TextBlock> - <TextBlock Text="{Binding RunningJobStatus.CurrentUnit,TargetNullValue='-', FallbackValue='-'}" FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"></TextBlock> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <Image Source="../Images/Job Issues/job_copies.png" Stretch="None" VerticalAlignment="Top"/> + <StackPanel Orientation="Vertical" Margin="15 0 0 0"> + <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Copies</TextBlock> + <TextBlock FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"> + <TextBlock.Text> + <MultiBinding Converter="{StaticResource ProgressUnitSpoolConverter}" TargetNullValue='-' FallbackValue='-' > + <Binding Path="RunningJobStatus.CurrentUnit" Mode="OneWay"/> + </MultiBinding> + </TextBlock.Text> + </TextBlock> + </StackPanel> </StackPanel> - </StackPanel> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="../Images/Job Issues/ttime_left.png" Stretch="None" VerticalAlignment="Top"/> - <StackPanel Orientation="Vertical" Margin="15 0 0 0"> - <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Time Left</TextBlock> - <TextBlock FontWeight="Light" FontSize="{StaticResource TangoComboBoxItemFontSize}" Margin="0 0 0 0" HorizontalAlignment="Center"> - <Run Text="{Binding RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToTwoDigitsTimeConverter},FallbackValue=5}"></Run> - <Run FontSize="16" Text="{Binding RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToLabelConverter},FallbackValue=min}"></Run> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> + <Image Source="../Images/Job Issues/ttime_left.png" Stretch="None" VerticalAlignment="Top"/> + <StackPanel Orientation="Vertical" Margin="15 0 0 0"> + <TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Time Left</TextBlock> + <TextBlock FontWeight="Light" FontSize="{StaticResource TangoComboBoxItemFontSize}" Margin="0 0 0 0" HorizontalAlignment="Center"> + <Run Text="{Binding RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToTwoDigitsTimeConverter},FallbackValue=5}"></Run> + <Run FontSize="16" Text="{Binding RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToLabelConverter},FallbackValue=min}"></Run> - <!--<Run FontSize="16">m</Run>--> - </TextBlock> + <!--<Run FontSize="16">m</Run>--> + </TextBlock> + </StackPanel> </StackPanel> - </StackPanel> - </UniformGrid> + </UniformGrid> - </StackPanel> - <Grid Grid.Row="3" Margin="0 15 0 0" > + </StackPanel> + <Grid Grid.Row="3" Margin="0 15 0 0" > - <Rectangle Fill="{StaticResource TangoLightBorderBrush}" Height="2" VerticalAlignment="Top"></Rectangle> - <Grid Margin="0 30 0 0"> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="1*"/> - <ColumnDefinition Width="2*"/> - </Grid.ColumnDefinitions> - <StackPanel Orientation="Vertical"> - <StackPanel Orientation="Horizontal"> - <Image Source="../Images/Job Issues/input.png" Stretch="None" VerticalAlignment="Top" HorizontalAlignment="Left"/> - <TextBlock VerticalAlignment="Center" Margin="15 0 0 0" FontSize="{StaticResource TangoDefaultFontSize}">Input</TextBlock> - </StackPanel> - <UniformGrid Margin="0 20 0 0" Rows="1" Columns="3" Height="Auto" MinWidth="180" HorizontalAlignment="Left" Visibility="{Binding IsDyeingProcess,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> - <StackPanel Orientation="Vertical"> - <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> - <TextBlock Margin="0 10 0 0 " Text="L" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> - <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> - - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left" Margin="5 0 0 0"> - <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> - <TextBlock Margin="0 10 0 0 " Text="a" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> - <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Margin="10 0 0 0" Width="50"> - <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> - <TextBlock Margin="0 10 0 0 " Text="b" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> - <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> - </StackPanel> - </UniformGrid> - <Grid Visibility="{Binding IsDyeingProcess,Converter={StaticResource BooleanToVisibilityConverter}}"> - <ContentControl x:Name="leftBrushValues" HorizontalAlignment="Left" Content="{Binding CurrentBrushStop}" Width="Auto" Height="Auto" Margin="0 20 0 0"> - <ContentControl.Style> - <Style TargetType="ContentControl"> - <Setter Property="ContentTemplate"> - <Setter.Value> - <DataTemplate/> - </Setter.Value> - </Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding CurrentBrushStop.ColorSpace.Name, Converter={StaticResource EnumToDescriptionConverter}}" Value="RGB"> - <Setter Property="ContentTemplate" Value="{StaticResource RGB_Template}" /> - </DataTrigger> - <DataTrigger Binding="{Binding CurrentBrushStop.ColorSpace.Name, Converter={StaticResource EnumToDescriptionConverter}}" Value="Volume"> - <Setter Property="ContentTemplate" Value="{StaticResource CMYK_Template}" /> - </DataTrigger> - <DataTrigger Binding="{Binding CurrentBrushStop.ColorSpace.Name}" Value="LAB"> - <Setter Property="ContentTemplate" Value="{StaticResource LAB_Template}" /> - </DataTrigger> - <DataTrigger Binding="{Binding CurrentBrushStop.ColorSpace.Name, Converter={StaticResource EnumToDescriptionConverter}}" Value="Catalog"> - <Setter Property="ContentTemplate" Value="{StaticResource CATALOG_Template}" /> - </DataTrigger> - </Style.Triggers> - </Style> - </ContentControl.Style> - </ContentControl> - </Grid> - </StackPanel> - <StackPanel Orientation="Vertical" Grid.Column="1" Margin="60 0 0 0"> - <StackPanel Orientation="Horizontal"> - <Image Source="../Images/Job Issues/output.png" Stretch="None" VerticalAlignment="Top" HorizontalAlignment="Left" Height="Auto"/> - <TextBlock VerticalAlignment="Center" Margin="15 0 0 0" FontSize="{StaticResource TangoDefaultFontSize}" >Output</TextBlock> - </StackPanel> - <UniformGrid Margin="0 20 0 0" Rows="1" Columns="7" Height="Auto" Width="435" HorizontalAlignment="Left" Visibility="{Binding IsDyeingProcess,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> - <StackPanel Orientation="Vertical"> - <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> - <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> - <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> - </StackPanel> - <StackPanel Orientation="Vertical"> - <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> - <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> - <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> - </StackPanel> - <StackPanel Orientation="Vertical"> - <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> - <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> - <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> - </StackPanel> - <StackPanel Orientation="Vertical"> - <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> - <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> - <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> - </StackPanel> - <StackPanel Orientation="Vertical"> - <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> - <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> - <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> - </StackPanel> - <StackPanel Orientation="Vertical"> - <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> - <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> - <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> - </StackPanel> - <StackPanel Orientation="Vertical"> - <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> - <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> - <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> - </StackPanel> - </UniformGrid> - <UniformGrid Columns="7" Rows="1" Margin="0 20 0 0" Width="440" HorizontalAlignment="Left" Visibility="{Binding IsDyeingProcess,Converter={StaticResource BooleanToVisibilityConverter}}"> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="Cyan" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">C</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding CyanOutput}"></TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="LightCyan" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">LC</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding LightCyanOutput}"></TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="Magenta" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">M</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding MagentaOutput}"></TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="LightPink" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">LM</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding LightMagentaOutput}"></TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="Yellow" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">Y</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding YellowOutput}"></TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="LightYellow" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">LY</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding LightYellowOutput}"></TextBlock> + <Rectangle Fill="{StaticResource TangoLightBorderBrush}" Height="2" VerticalAlignment="Top"></Rectangle> + <Grid Margin="0 30 0 0"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*"/> + <ColumnDefinition Width="2*"/> + </Grid.ColumnDefinitions> + <StackPanel Orientation="Vertical"> + <StackPanel Orientation="Horizontal"> + <Image Source="../Images/Job Issues/input.png" Stretch="None" VerticalAlignment="Top" HorizontalAlignment="Left"/> + <TextBlock VerticalAlignment="Center" Margin="15 0 0 0" FontSize="{StaticResource TangoDefaultFontSize}">Input</TextBlock> </StackPanel> - <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> - <Border Width="50" Height="50" Background="Black" CornerRadius="16" HorizontalAlignment="Left"></Border> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">K</TextBlock> - <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding BlackOutput}"></TextBlock> + <UniformGrid Margin="0 20 0 0" Rows="1" Columns="3" Height="Auto" MinWidth="180" HorizontalAlignment="Left" Visibility="{Binding IsDyeingProcess,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <StackPanel Orientation="Vertical"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Text="L" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + + </StackPanel> + <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left" Margin="5 0 0 0"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Text="a" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + </StackPanel> + <StackPanel Orientation="Vertical" Margin="10 0 0 0" Width="50"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Text="b" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + </StackPanel> + </UniformGrid> + <Grid Visibility="{Binding IsDyeingProcess,Converter={StaticResource BooleanToVisibilityConverter}}"> + <ContentControl x:Name="leftBrushValues" HorizontalAlignment="Left" Content="{Binding CurrentBrushStop}" Width="Auto" Height="Auto" Margin="0 20 0 0"> + <ContentControl.Style> + <Style TargetType="ContentControl"> + <Setter Property="ContentTemplate"> + <Setter.Value> + <DataTemplate/> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding CurrentBrushStop.ColorSpace.Name, Converter={StaticResource EnumToDescriptionConverter}}" Value="RGB"> + <Setter Property="ContentTemplate" Value="{StaticResource RGB_Template}" /> + </DataTrigger> + <DataTrigger Binding="{Binding CurrentBrushStop.ColorSpace.Name, Converter={StaticResource EnumToDescriptionConverter}}" Value="Volume"> + <Setter Property="ContentTemplate" Value="{StaticResource CMYK_Template}" /> + </DataTrigger> + <DataTrigger Binding="{Binding CurrentBrushStop.ColorSpace.Name}" Value="LAB"> + <Setter Property="ContentTemplate" Value="{StaticResource LAB_Template}" /> + </DataTrigger> + <DataTrigger Binding="{Binding CurrentBrushStop.ColorSpace.Name, Converter={StaticResource EnumToDescriptionConverter}}" Value="Catalog"> + <Setter Property="ContentTemplate" Value="{StaticResource CATALOG_Template}" /> + </DataTrigger> + </Style.Triggers> + </Style> + </ContentControl.Style> + </ContentControl> + </Grid> + </StackPanel> + <StackPanel Orientation="Vertical" Grid.Column="1" Margin="60 0 0 0"> + <StackPanel Orientation="Horizontal"> + <Image Source="../Images/Job Issues/output.png" Stretch="None" VerticalAlignment="Top" HorizontalAlignment="Left" Height="Auto"/> + <TextBlock VerticalAlignment="Center" Margin="15 0 0 0" FontSize="{StaticResource TangoDefaultFontSize}" >Output</TextBlock> </StackPanel> - </UniformGrid> - </StackPanel> + <UniformGrid Margin="0 20 0 0" Rows="1" Columns="7" Height="Auto" Width="435" HorizontalAlignment="Left" Visibility="{Binding IsDyeingProcess,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <StackPanel Orientation="Vertical"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + </StackPanel> + <StackPanel Orientation="Vertical"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + </StackPanel> + <StackPanel Orientation="Vertical"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + </StackPanel> + <StackPanel Orientation="Vertical"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + </StackPanel> + <StackPanel Orientation="Vertical"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + </StackPanel> + <StackPanel Orientation="Vertical"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + </StackPanel> + <StackPanel Orientation="Vertical"> + <Border Width="50" Height="50" Background="Transparent" CornerRadius="16" HorizontalAlignment="Left" BorderBrush="{StaticResource TangoDisabledForegroundBrush}" BorderThickness="1"></Border> + <TextBlock Margin="0 10 0 0 " Style="{StaticResource SliderGreyTextStyle}" Text="-" ></TextBlock> + <TextBlock Margin="0 10 0 0 " Text="0%" FontSize="{StaticResource TangoSmallFontSize}" HorizontalAlignment="Center"/> + </StackPanel> + </UniformGrid> + <UniformGrid Columns="7" Rows="1" Margin="0 20 0 0" Width="440" HorizontalAlignment="Left" Visibility="{Binding IsDyeingProcess,Converter={StaticResource BooleanToVisibilityConverter}}"> + <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> + <Border Width="50" Height="50" Background="Cyan" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">C</TextBlock> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding CyanOutput}"></TextBlock> + </StackPanel> + <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> + <Border Width="50" Height="50" Background="LightCyan" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">LC</TextBlock> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding LightCyanOutput}"></TextBlock> + </StackPanel> + <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> + <Border Width="50" Height="50" Background="Magenta" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">M</TextBlock> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding MagentaOutput}"></TextBlock> + </StackPanel> + <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> + <Border Width="50" Height="50" Background="LightPink" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">LM</TextBlock> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding LightMagentaOutput}"></TextBlock> + </StackPanel> + <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> + <Border Width="50" Height="50" Background="Yellow" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">Y</TextBlock> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding YellowOutput}"></TextBlock> + </StackPanel> + <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> + <Border Width="50" Height="50" Background="LightYellow" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">LY</TextBlock> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding LightYellowOutput}"></TextBlock> + </StackPanel> + <StackPanel Orientation="Vertical" Width="50" HorizontalAlignment="Left"> + <Border Width="50" Height="50" Background="Black" CornerRadius="16" HorizontalAlignment="Left"></Border> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center">K</TextBlock> + <TextBlock Margin="0 10 0 0 " HorizontalAlignment="Center" Text="{Binding BlackOutput}"></TextBlock> + </StackPanel> + </UniformGrid> + </StackPanel> + </Grid> + </Grid> </Grid> - </Grid> - </Grid> - <Grid x:Name="Overview" Margin="32 18 60 0" Grid.Row="1" Visibility="{Binding IsJobStatusViewEnable, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> - <Grid.RowDefinitions> - <RowDefinition Height="74"></RowDefinition> - <RowDefinition Height="Auto"></RowDefinition> - <RowDefinition Height="Auto"></RowDefinition> - <RowDefinition Height="Auto"></RowDefinition> - <RowDefinition Height="100"></RowDefinition> - </Grid.RowDefinitions> - <Grid Margin="0 10 0 0"> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="1*"/> - <ColumnDefinition Width="400"/> - <ColumnDefinition Width="Auto"/> - </Grid.ColumnDefinitions> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" > + <Grid x:Name="Overview" Margin="32 18 60 0" Grid.Row="1" Visibility="{Binding IsJobStatusViewEnable, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <Grid.RowDefinitions> + <RowDefinition Height="74"></RowDefinition> + <RowDefinition Height="Auto"></RowDefinition> + <RowDefinition Height="Auto"></RowDefinition> + <RowDefinition Height="Auto"></RowDefinition> + <RowDefinition Height="100"></RowDefinition> + </Grid.RowDefinitions> + <Grid Margin="0 10 0 0"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*"/> + <ColumnDefinition Width="400"/> + <ColumnDefinition Width="Auto"/> + </Grid.ColumnDefinitions> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" > <Image Margin="0 2 0 0" Source="../Images/Job Issues/job_length.png" Stretch="Uniform" VerticalAlignment="Top" HorizontalAlignment="Left" Width="Auto" Height="32" /> <TextBlock Margin="20 10 0 0" Width="50" FontWeight="SemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}" > <TextBlock.Text> @@ -814,21 +828,21 @@ </MultiBinding> </TextBlock.Text> </TextBlock> - </StackPanel> - <!--<Grid Grid.Column="1" Margin="20 8 20 0" VerticalAlignment="Top" Height="20">--> - <locaControls:RunningJobViewerEureka Grid.Column="1" Margin="20 12 20 0" VerticalAlignment="Top" ThumbHeight="16" Height="14" HeightSlider="14" DisplayMarkers="False" IsActive="True" Job="{Binding Job}" - RunningJobStatus="{Binding RunningJobStatus}" - MaximumValue="{Binding RunningJobStatus.TotalProgressMinusSettingUp, FallbackValue=100,TargetNullValue=100}" - MinimumValue="0" - SliderValue="{Binding RunningJobStatus.ProgressMinusSettingUp, TargetNullValue=0, FallbackValue=0, Delay=100}"/> + </StackPanel> + <!--<Grid Grid.Column="1" Margin="20 8 20 0" VerticalAlignment="Top" Height="20">--> + <locaControls:RunningJobViewerEureka Grid.Column="1" Margin="20 12 20 0" VerticalAlignment="Top" ThumbHeight="16" Height="14" HeightSlider="14" DisplayMarkers="False" IsActive="True" Job="{Binding Job}" + RunningJobStatus="{Binding RunningJobStatus}" + MaximumValue="{Binding RunningJobStatus.TotalProgressMinusSettingUp, FallbackValue=100,TargetNullValue=100}" + MinimumValue="0" + SliderValue="{Binding RunningJobStatus.ProgressMinusSettingUp, TargetNullValue=0, FallbackValue=0, Delay=100}"/> + + <!--</Grid>--> - <!--</Grid>--> - - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Grid.Column="2" Margin="0 0 0 0"> - <Image Margin="0 2 0 0" Source="../Images/Job Issues/ttime_left.png" Stretch="Uniform" VerticalAlignment="Top" Height="32"/> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Grid.Column="2" Margin="0 0 0 0"> + <Image Margin="0 2 0 0" Source="../Images/Job Issues/ttime_left.png" Stretch="Uniform" VerticalAlignment="Top" Height="32"/> <TextBlock Margin="15 10 0 0" FontWeight="Light" FontSize="{StaticResource TangoComboBoxItemFontSize}" HorizontalAlignment="Center"> - <Run Text="{Binding RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToTwoDigitsTimeConverter},FallbackValue=5}"></Run> - <Run FontSize="16" Text="{Binding RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToLabelConverter},FallbackValue=min}"></Run> + <Run Text="{Binding RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToTwoDigitsTimeConverter},FallbackValue=5}"></Run> + <Run FontSize="16" Text="{Binding RunningJobStatus.RemainingTime,Converter={StaticResource TimeSpanToLabelConverter},FallbackValue=min}"></Run> </TextBlock> <touch:TouchButton Content="Stop" Height="50" Width="164" CornerRadius="30" Command="{Binding StopCommand}" IsEnabled="true" BorderThickness="0" BorderBrush="{StaticResource TangoPrimaryAccentBrush}" EnableDropShadow="False" VerticalAlignment="Top" Margin="20 -5 0 0"> @@ -847,328 +861,342 @@ </touch:TouchButton> </StackPanel> - - <Border Height="2" Grid.ColumnSpan="012" Background="{StaticResource TangoLightBorderBrush}" VerticalAlignment="Bottom" Margin="0 2 0 0" CornerRadius="2"></Border> - </Grid> - <Grid Grid.Row="1" Margin="0 28 0 0"> - <StackPanel Orientation="Vertical"> - <StackPanel Orientation="Horizontal" > - <Image Source="../Images/Overview Icons/Sensors.png" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32" Height="32"/> - <TextBlock Margin="12 0 0 0 " VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}">Sensors</TextBlock> - </StackPanel> - <UniformGrid Columns="5" Rows="1" Height="120" Margin="40 11 40 0" DataContext="{Binding OverviewModel}"> - <StackPanel Orientation="Vertical"> - <Grid> - <touch:TouchArcProgress RingThickness="8" Value="{Binding DryerZone3.Value}" Maximum="{Binding DryerZone3.MaxValue}" Minimum="0" Width="100" Height="100"> - <touch:TouchArcProgress.Foreground> - <SolidColorBrush Color="{Binding DryerZone3.Color}"/> - </touch:TouchArcProgress.Foreground> - </touch:TouchArcProgress> - <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="Bold" Text="{Binding DryerZone3.DisplayValue}"> - <TextBlock.Foreground> - <SolidColorBrush Color="{Binding DryerZone3.Color}"/> - </TextBlock.Foreground> - </TextBlock> - <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" >ºC</TextBlock> - </Grid> - <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dryer Zone 3</TextBlock> - </StackPanel> - - <StackPanel Orientation="Vertical"> - <Grid> - <touch:TouchArcProgress RingThickness="8" Value="{Binding DryerAir.Value}" Maximum="{Binding DryerAir.MaxValue}" Minimum="0" Width="100" Height="100"> - <touch:TouchArcProgress.Foreground> - <SolidColorBrush Color="{Binding DryerAir.Color}"/> - </touch:TouchArcProgress.Foreground> - </touch:TouchArcProgress> - <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding DryerAir.DisplayValue}"> - <TextBlock.Foreground> - <SolidColorBrush Color="{Binding DryerAir.Color}"/> - </TextBlock.Foreground> - </TextBlock> - <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="ºC" > - </TextBlock> - </Grid> - <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dryer Air</TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical"> - <Grid> - <touch:TouchArcProgress RingThickness="8" Value="{Binding Tunnel.Value}" Maximum="{Binding Tunnel.MaxValue}" Minimum="0" Width="100" Height="100"> - <touch:TouchArcProgress.Foreground> - <SolidColorBrush Color="{Binding Tunnel.Color}"/> - </touch:TouchArcProgress.Foreground> - </touch:TouchArcProgress> - <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding Tunnel.DisplayValue}"> - <TextBlock.Foreground> - <SolidColorBrush Color="{Binding Tunnel.Color}"/> - </TextBlock.Foreground> - </TextBlock> - <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="ºC"></TextBlock> - - </Grid> - <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Tunnel</TextBlock> + <Border Height="2" Grid.ColumnSpan="012" Background="{StaticResource TangoLightBorderBrush}" VerticalAlignment="Bottom" Margin="0 2 0 0" CornerRadius="2"></Border> + </Grid> + <Grid Grid.Row="1" Margin="0 28 0 0"> + <StackPanel Orientation="Vertical"> + <StackPanel Orientation="Horizontal" > + <Image Source="../Images/Overview Icons/Sensors.png" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32" Height="32"/> + <TextBlock Margin="12 0 0 0 " VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}">Sensors</TextBlock> </StackPanel> - <StackPanel Orientation="Vertical"> - <Grid> - <touch:TouchArcProgress RingThickness="8" Value="{Binding PumpsPressure.Value}" Maximum="{Binding PumpsPressure.MaxValue}" Minimum="0" Width="100" Height="100"> - <touch:TouchArcProgress.Foreground> - <SolidColorBrush Color="{Binding PumpsPressure.Color}"/> - </touch:TouchArcProgress.Foreground> - </touch:TouchArcProgress> - <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding PumpsPressure.DisplayValue}"> - <TextBlock.Foreground> - <SolidColorBrush Color="{Binding PumpsPressure.Color}"/> - </TextBlock.Foreground> - </TextBlock> - <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="Bar"></TextBlock> + <UniformGrid Columns="5" Rows="1" Height="120" Margin="40 11 40 0" DataContext="{Binding OverviewModel}"> + <StackPanel Orientation="Vertical"> + <Grid> + <touch:TouchArcProgress RingThickness="8" Value="{Binding DryerZone3.Value}" Maximum="{Binding DryerZone3.MaxValue}" Minimum="0" Width="100" Height="100"> + <touch:TouchArcProgress.Foreground> + <SolidColorBrush Color="{Binding DryerZone3.Color}"/> + </touch:TouchArcProgress.Foreground> + </touch:TouchArcProgress> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="Bold" Text="{Binding DryerZone3.DisplayValue}"> + <TextBlock.Foreground> + <SolidColorBrush Color="{Binding DryerZone3.Color}"/> + </TextBlock.Foreground> + </TextBlock> + <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" >ºC</TextBlock> - </Grid> - <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Pumps pressure</TextBlock> - </StackPanel> - <StackPanel Orientation="Vertical"> - <Grid> - <touch:TouchArcProgress RingThickness="8" Value="{Binding Lubricant.Value}" Maximum="{Binding Lubricant.MaxValue}" Minimum="0" Width="100" Height="100"> - <touch:TouchArcProgress.Foreground> - <SolidColorBrush Color="{Binding Lubricant.Color}"/> - </touch:TouchArcProgress.Foreground> - </touch:TouchArcProgress> - <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding Lubricant.DisplayValue}"> - <TextBlock.Foreground> - <SolidColorBrush Color="{Binding Lubricant.Color}"/> - </TextBlock.Foreground> - </TextBlock> - <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="mVolts"></TextBlock> + </Grid> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dryer Zone 3</TextBlock> + </StackPanel> - </Grid> - <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Lubricant</TextBlock> - </StackPanel> - </UniformGrid> - <Grid Margin="0 23 0 0"> - <Image Source="../Images/Job Issues/Machine outline.png" Height="188" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Center" Width="636" /> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> <StackPanel Orientation="Vertical"> - <Border Height="184" Width="83" VerticalAlignment="Center" CornerRadius="2 0 0 2" BorderThickness="0" BorderBrush="{StaticResource TangoBlackInkBrush}"> - <UniformGrid Columns="1" Rows="4" Margin="24"> - <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" > - <!--<Image.Style> - <Style> - <Style.Triggers> - <DataTrigger Binding="{Binding Job.BTSR}}" Value="True"> - <Setter Property="Image.Source" Value="../Images/Overview Icons/Error.png"/> - </DataTrigger> - </Style.Triggers> - </Style> - </Image.Style>--> - </Image> - <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> - <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> - <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> - </UniformGrid> - </Border> - <TextBlock HorizontalAlignment="Center" Margin="0 4 0 0" FontWeight="Thin">Winder</TextBlock> + <Grid> + <touch:TouchArcProgress RingThickness="8" Value="{Binding DryerAir.Value}" Maximum="{Binding DryerAir.MaxValue}" Minimum="0" Width="100" Height="100"> + <touch:TouchArcProgress.Foreground> + <SolidColorBrush Color="{Binding DryerAir.Color}"/> + </touch:TouchArcProgress.Foreground> + </touch:TouchArcProgress> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding DryerAir.DisplayValue}"> + <TextBlock.Foreground> + <SolidColorBrush Color="{Binding DryerAir.Color}"/> + </TextBlock.Foreground> + </TextBlock> + <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="ºC" > + </TextBlock> + </Grid> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Dryer Air</TextBlock> </StackPanel> <StackPanel Orientation="Vertical"> - <Border Height="171" Width="95" VerticalAlignment="Center" CornerRadius="0" BorderThickness="0" BorderBrush="{StaticResource TangoBlackInkBrush}"> - <UniformGrid Columns="1" Rows="4" Margin="0 21 0 9" VerticalAlignment="Stretch"> - <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" > - <!--<Image.Style> - <Style> - <Style.Triggers> - <DataTrigger Binding="{Binding Job.BTSR}}" Value="True"> - <Setter Property="Image.Source" Value="../Images/Overview Icons/Error.png"/> - </DataTrigger> - </Style.Triggers> - </Style> - </Image.Style>--> - </Image> - <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> - <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> - <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> - </UniformGrid> - </Border> - <TextBlock HorizontalAlignment="Center" Margin="14 18 14 14" FontWeight="Thin">Dancer</TextBlock> - </StackPanel> + <Grid> + <touch:TouchArcProgress RingThickness="8" Value="{Binding Tunnel.Value}" Maximum="{Binding Tunnel.MaxValue}" Minimum="0" Width="100" Height="100"> + <touch:TouchArcProgress.Foreground> + <SolidColorBrush Color="{Binding Tunnel.Color}"/> + </touch:TouchArcProgress.Foreground> + </touch:TouchArcProgress> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding Tunnel.DisplayValue}"> + <TextBlock.Foreground> + <SolidColorBrush Color="{Binding Tunnel.Color}"/> + </TextBlock.Foreground> + </TextBlock> + <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="ºC"></TextBlock> - - <StackPanel Orientation="Vertical" Margin="274 0 0 0"> - <Border Height="171" Width="95" VerticalAlignment="Center" CornerRadius="0" BorderThickness="0" BorderBrush="{StaticResource TangoBlackInkBrush}"> - <UniformGrid Columns="1" Rows="4" Margin="0 21 0 9" VerticalAlignment="Stretch"> - <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" > - <!--<Image.Style> - <Style> - <Style.Triggers> - <DataTrigger Binding="{Binding Job.BTSR}}" Value="True"> - <Setter Property="Image.Source" Value="../Images/Overview Icons/Error.png"/> - </DataTrigger> - </Style.Triggers> - </Style> - </Image.Style>--> - </Image> - <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> - <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> - <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> - </UniformGrid> - </Border> - <TextBlock HorizontalAlignment="Center" Margin="0 18 0 0" FontWeight="Thin">BTSR</TextBlock> + </Grid> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Tunnel</TextBlock> </StackPanel> <StackPanel Orientation="Vertical"> - <Border Height="184" Width="83" VerticalAlignment="Center" CornerRadius="2 0 0 2" BorderThickness="0" BorderBrush="{StaticResource TangoBlackInkBrush}"> - <UniformGrid Columns="1" Rows="4" Margin="24"> - <Image Stretch="Fill" Width="20" Height="24" Source="../Images/Overview Icons/Feeder1.png" HorizontalAlignment="Center" > - - </Image> - <Image Stretch="Fill" Width="20" Height="24" Source="../Images/Overview Icons/Feeder2.png" HorizontalAlignment="Center" ></Image> - <Image Stretch="Fill" Width="20" Height="24" Source="../Images/Overview Icons/Feeder3.png" HorizontalAlignment="Center" ></Image> - <Image Stretch="Fill" Width="20" Height="24" Source="../Images/Overview Icons/Feeder4.png" HorizontalAlignment="Center" ></Image> - </UniformGrid> - </Border> - <TextBlock HorizontalAlignment="Center" Margin="0 4 0 0" FontWeight="Thin">Feeder</TextBlock> + <Grid> + <touch:TouchArcProgress RingThickness="8" Value="{Binding PumpsPressure.Value}" Maximum="{Binding PumpsPressure.MaxValue}" Minimum="0" Width="100" Height="100"> + <touch:TouchArcProgress.Foreground> + <SolidColorBrush Color="{Binding PumpsPressure.Color}"/> + </touch:TouchArcProgress.Foreground> + </touch:TouchArcProgress> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding PumpsPressure.DisplayValue}"> + <TextBlock.Foreground> + <SolidColorBrush Color="{Binding PumpsPressure.Color}"/> + </TextBlock.Foreground> + </TextBlock> + <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="Bar"></TextBlock> + + </Grid> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Pumps pressure</TextBlock> </StackPanel> - </StackPanel> - </Grid> - </StackPanel> - </Grid> - <Grid Grid.Row="2" x:Name="IncLevels" Margin="0 8 0 0" Height="196"> - <StackPanel Orientation="Vertical"> - <DockPanel> - <StackPanel Orientation="Vertical" DockPanel.Dock="Right" Margin="0 0 30 0" > - <StackPanel Orientation="Horizontal" > - <Image Source="../Images/Overview Icons/Waste.png" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32" Height="32"/> - <TextBlock Margin="12 0 0 0 " VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}">Waste</TextBlock> + <StackPanel Orientation="Vertical"> + <Grid> + <touch:TouchArcProgress RingThickness="8" Value="{Binding Lubricant.Value}" Maximum="{Binding Lubricant.MaxValue}" Minimum="0" Width="100" Height="100"> + <touch:TouchArcProgress.Foreground> + <SolidColorBrush Color="{Binding Lubricant.Color}"/> + </touch:TouchArcProgress.Foreground> + </touch:TouchArcProgress> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="{Binding Lubricant.DisplayValue}"> + <TextBlock.Foreground> + <SolidColorBrush Color="{Binding Lubricant.Color}"/> + </TextBlock.Foreground> + </TextBlock> + <TextBlock VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0 0 0 20" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="SemiBold" Text="mVolts"></TextBlock> + + </Grid> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Lubricant</TextBlock> </StackPanel> - <StackPanel Orientation="Horizontal" Margin="-25 24 0 0"> - <Rectangle Height="88" Width="2" Fill="{StaticResource TangoColumnDividerBrush}" VerticalAlignment="Top" Margin="-15 15 0 0"/> - <ContentControl Margin="20 0 0 0" ContentTemplate="{StaticResource WasteBox}" Content="{Binding}" IsTabStop="False"/> + </UniformGrid> + <Grid Margin="0 23 0 0"> + <Image Source="../Images/Job Issues/Machine outline.png" Height="188" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Center" Width="636" /> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> + <StackPanel Orientation="Vertical"> + <Border Height="184" Width="83" VerticalAlignment="Center" CornerRadius="2 0 0 2" BorderThickness="0" BorderBrush="{StaticResource TangoBlackInkBrush}"> + <UniformGrid Columns="1" Rows="4" Margin="24"> + <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" > + <!--<Image.Style> + <Style> + <Style.Triggers> + <DataTrigger Binding="{Binding Job.BTSR}}" Value="True"> + <Setter Property="Image.Source" Value="../Images/Overview Icons/Error.png"/> + </DataTrigger> + </Style.Triggers> + </Style> + </Image.Style>--> + </Image> + <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> + <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> + <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> + </UniformGrid> + </Border> + <TextBlock HorizontalAlignment="Center" Margin="0 4 0 0" FontWeight="Thin">Winder</TextBlock> + </StackPanel> + <StackPanel Orientation="Vertical"> + <Border Height="171" Width="95" VerticalAlignment="Center" CornerRadius="0" BorderThickness="0" BorderBrush="{StaticResource TangoBlackInkBrush}"> + <UniformGrid Columns="1" Rows="4" Margin="0 21 0 9" VerticalAlignment="Stretch"> + <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" > + <!--<Image.Style> + <Style> + <Style.Triggers> + <DataTrigger Binding="{Binding Job.BTSR}}" Value="True"> + <Setter Property="Image.Source" Value="../Images/Overview Icons/Error.png"/> + </DataTrigger> + </Style.Triggers> + </Style> + </Image.Style>--> + </Image> + <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> + <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> + <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> + </UniformGrid> + </Border> + <TextBlock HorizontalAlignment="Center" Margin="14 18 14 14" FontWeight="Thin">Dancer</TextBlock> + </StackPanel> + + + <StackPanel Orientation="Vertical" Margin="274 0 0 0"> + <Border Height="171" Width="95" VerticalAlignment="Center" CornerRadius="0" BorderThickness="0" BorderBrush="{StaticResource TangoBlackInkBrush}"> + <UniformGrid Columns="1" Rows="4" Margin="0 21 0 9" VerticalAlignment="Stretch"> + <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" > + <!--<Image.Style> + <Style> + <Style.Triggers> + <DataTrigger Binding="{Binding Job.BTSR}}" Value="True"> + <Setter Property="Image.Source" Value="../Images/Overview Icons/Error.png"/> + </DataTrigger> + </Style.Triggers> + </Style> + </Image.Style>--> + </Image> + <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> + <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> + <Image Stretch="Fill" Width="24" Height="24" Source="../Images/Overview Icons/Normal.png" HorizontalAlignment="Center" ></Image> + </UniformGrid> + </Border> + <TextBlock HorizontalAlignment="Center" Margin="0 18 0 0" FontWeight="Thin">BTSR</TextBlock> + </StackPanel> + <StackPanel Orientation="Vertical"> + <Border Height="184" Width="83" VerticalAlignment="Center" CornerRadius="2 0 0 2" BorderThickness="0" BorderBrush="{StaticResource TangoBlackInkBrush}"> + <UniformGrid Columns="1" Rows="4" Margin="24"> + <Image Stretch="Fill" Width="20" Height="24" Source="../Images/Overview Icons/Feeder1.png" HorizontalAlignment="Center" > + + </Image> + <Image Stretch="Fill" Width="20" Height="24" Source="../Images/Overview Icons/Feeder2.png" HorizontalAlignment="Center" ></Image> + <Image Stretch="Fill" Width="20" Height="24" Source="../Images/Overview Icons/Feeder3.png" HorizontalAlignment="Center" ></Image> + <Image Stretch="Fill" Width="20" Height="24" Source="../Images/Overview Icons/Feeder4.png" HorizontalAlignment="Center" ></Image> + </UniformGrid> + </Border> + <TextBlock HorizontalAlignment="Center" Margin="0 4 0 0" FontWeight="Thin">Feeder</TextBlock> + </StackPanel> </StackPanel> + </Grid> + </StackPanel> + </Grid> + <Grid Grid.Row="2" x:Name="IncLevels" Margin="0 8 0 0" Height="196"> + <StackPanel Orientation="Vertical"> + <DockPanel> + <StackPanel Orientation="Vertical" DockPanel.Dock="Right" Margin="0 0 30 0" > + <StackPanel Orientation="Horizontal" > + <Image Source="../Images/Overview Icons/Waste.png" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32" Height="32"/> + <TextBlock Margin="12 0 0 0 " VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}">Waste</TextBlock> + </StackPanel> + <StackPanel Orientation="Horizontal" Margin="-25 24 0 0"> + <Rectangle Height="88" Width="2" Fill="{StaticResource TangoColumnDividerBrush}" VerticalAlignment="Top" Margin="-15 15 0 0"/> + <ContentControl Margin="20 0 0 0" ContentTemplate="{StaticResource WasteBox}" Content="{Binding}" IsTabStop="False"/> + </StackPanel> - </StackPanel> - <StackPanel Orientation="Vertical"> - <StackPanel Orientation="Horizontal" > - <Image Source="../Images/Overview Icons/Inks.png" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32" Height="32"/> - <TextBlock Margin="12 0 0 0 " VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}">Ink Levels</TextBlock> </StackPanel> - <StackPanel Orientation="Horizontal" Margin="0 24 0 0"> - <ItemsControl ItemsSource="{Binding MidTankLevels}" ItemTemplate="{StaticResource LiquidBox}"> - <ItemsControl.ItemsPanel> - <ItemsPanelTemplate> - <UniformGrid Rows="1" IsItemsHost="True" Width="550"></UniformGrid> - </ItemsPanelTemplate> - </ItemsControl.ItemsPanel> - </ItemsControl> + <StackPanel Orientation="Vertical"> + <StackPanel Orientation="Horizontal" > + <Image Source="../Images/Overview Icons/Inks.png" Stretch="UniformToFill" VerticalAlignment="Top" HorizontalAlignment="Left" Width="32" Height="32"/> + <TextBlock Margin="12 0 0 0 " VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}">Ink Levels</TextBlock> + </StackPanel> + <StackPanel Orientation="Horizontal" Margin="0 24 0 0"> + <ItemsControl ItemsSource="{Binding MidTankLevels}" ItemTemplate="{StaticResource LiquidBox}"> + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <UniformGrid Rows="1" IsItemsHost="True" Width="550"></UniformGrid> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + </ItemsControl> - <!--<Rectangle Height="88" Width="2" Fill="{StaticResource TangoColumnDividerBrush}" VerticalAlignment="Top" Margin="12 15 0 0"/> - <ContentControl Margin="45 0 0 0" ContentTemplate="{StaticResource LubBox}" Content="{Binding}" IsTabStop="False"/>--> + <!--<Rectangle Height="88" Width="2" Fill="{StaticResource TangoColumnDividerBrush}" VerticalAlignment="Top" Margin="12 15 0 0"/> + <ContentControl Margin="45 0 0 0" ContentTemplate="{StaticResource LubBox}" Content="{Binding}" IsTabStop="False"/>--> + </StackPanel> </StackPanel> - </StackPanel> - </DockPanel> - - </StackPanel> - <Border VerticalAlignment="Bottom" Height="2" Background="{StaticResource TangoLightBorderBrush}" Margin="0 0 0 0" CornerRadius="2"></Border> + </DockPanel> + + </StackPanel> + <Border VerticalAlignment="Bottom" Height="2" Background="{StaticResource TangoLightBorderBrush}" Margin="0 0 0 0" CornerRadius="2"></Border> + </Grid> </Grid> </Grid> </Grid> - </Grid> - <Grid VerticalAlignment="Bottom" Grid.ColumnSpan="2" Margin="10 0 0 0"> - <touch:TouchExpander x:Name="Notifications" Style="{StaticResource TouchRoundedExpander}" IsTabStop="False" KeyboardNavigation.TabNavigation ="None" BorderThickness="0" IsExpanded="false" CornerRadius="20 20 0 0" > - <touch:TouchExpander.Header> - <DockPanel > - <touch:TouchButton Margin="0 0 20 0" Content="Clear All" DockPanel.Dock="Right" Width="120" Height="38" HorizontalAlignment="Right" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="1" CornerRadius="19" BorderBrush="{StaticResource TangoPrimaryAccentBrush}" Foreground="{StaticResource TangoPrimaryAccentBrush}" Command="{Binding ClearAllNotificationsCommand}" Visibility="{Binding NotificationProvider.HasNotificationItems, Converter={StaticResource BooleanToVisibilityConverter}}" > - - </touch:TouchButton> - <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" VerticalAlignment="Center" > - <Image Source="../Images/Job Issues/Events.png" MaxWidth="33" Stretch="Fill" Height="36"/> - <TextBlock VerticalAlignment="Center" Margin="20 4 0 0" FontWeight="SemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}">Notifications</TextBlock> - <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontWeight="Normal" FontSize="{StaticResource TangoComboBoxItemFontSize}" Visibility="{Binding NotificationProvider.HasNotificationItems, Converter={StaticResource BooleanToVisibilityConverter}}"> - <Run Text="(" ></Run> - <Run Text="{Binding NotificationProvider.NotificationItems, Mode=OneWay, Converter={StaticResource CollectionToCountConverter}}"></Run> - <Run Text=" new Events)" ></Run> - </TextBlock> - </StackPanel> - </DockPanel> - </touch:TouchExpander.Header> - <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> - <ListBox ClipToBounds="False" ItemsSource="{Binding NotificationProvider.NotificationItems}" HorizontalAlignment="Stretch" MaxHeight="258" > - <ListBox.Style> - <Style TargetType="{x:Type ListBox}" BasedOn="{StaticResource BlankListBox}"> - <Setter Property="VirtualizingPanel.ScrollUnit" Value="Pixel"></Setter> - <Setter Property="Template"> - <Setter.Value> - <ControlTemplate TargetType="{x:Type ListBox}"> - <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"> - <touch:TouchScrollViewer CanContentScroll="True" Padding="{TemplateBinding Padding}" Focusable="False" - Style="{StaticResource TouchVerticalScrollViewer}"> - <ItemsPresenter /> - </touch:TouchScrollViewer> - </Border> - </ControlTemplate> - </Setter.Value> - </Setter> - </Style> - </ListBox.Style> - <ItemsControl.ItemsPanel> - <ItemsPanelTemplate> - <VirtualizingStackPanel IsVirtualizing="True" VirtualizationMode="Recycling" VirtualizingPanel.ScrollUnit="Pixel" /> - </ItemsPanelTemplate> - </ItemsControl.ItemsPanel> - <ItemsControl.ItemTemplate> - <DataTemplate> - <Grid HorizontalAlignment="Stretch" Width="1220" Height="62"> - <Border BorderThickness="1" Margin="-1 0 0 0" BorderBrush="{StaticResource TangoDividerBrush}"> - <Grid HorizontalAlignment="Stretch" > - <Grid.ColumnDefinitions> - <ColumnDefinition Width="56"/> - <ColumnDefinition Width="1*"/> - <ColumnDefinition Width="56"/> - </Grid.ColumnDefinitions> - <touch:TouchIcon Margin="24 0 0 0" DockPanel.Dock="Left" Height="32" Grid.Column="0"> - <touch:TouchIcon.Style> - <Style TargetType="touch:TouchIcon"> - <Setter Property="Icon" Value="Information"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding MessageType}" Value="Info"> - <Setter Property="Icon" Value="InformationOutline"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"/> - </DataTrigger> - <DataTrigger Binding="{Binding MessageType}" Value="Success"> - <Setter Property="Icon" Value="Check"/> - <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"/> - </DataTrigger> - <DataTrigger Binding="{Binding MessageType}" Value="Warning"> - <Setter Property="Icon" Value="AlertCircleOutline"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"/> - </DataTrigger> - <DataTrigger Binding="{Binding MessageType}" Value="Error"> - <Setter Property="Icon" Value="AlertCircleOutline"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"/> - </DataTrigger> - <DataTrigger Binding="{Binding MessageType}" Value="Critical"> - <Setter Property="Icon" Value="Alert"></Setter> - <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"/> - </DataTrigger> - </Style.Triggers> - </Style> - </touch:TouchIcon.Style> - </touch:TouchIcon> - <StackPanel Margin="15 3 20 3" VerticalAlignment="Center" Grid.Column="1"> - <TextBlock Text="{Binding Message}" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Foreground="Black" VerticalAlignment="Center" ></TextBlock> - <TextBlock Margin="0 5 0 0" Foreground="{StaticResource TangoDarkForegroundBrush}" Text="{Binding ExpandedMessage}" FontSize="{StaticResource TangoSmallFontSize}" TextWrapping="Wrap" VerticalAlignment="Center" /> - </StackPanel> - <Grid Grid.Column="2" Width="40" HorizontalAlignment="Right" VerticalAlignment="Stretch" Visibility="{Binding CanClose,Converter={StaticResource BooleanToVisibilityConverter}}"> - <Grid Margin="0 0 20 0" HorizontalAlignment="Right" VerticalAlignment="Center" Width="14" Height="14"> - <touch:TouchIcon Icon="Close" Foreground="Black" /> - </Grid> - <touch:TouchButton Opacity="0" Background="Transparent" Style="{StaticResource TangoFlatButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" Foreground="{StaticResource TangoPrimaryBackgroundBrush}" Padding="5" /> + <Grid VerticalAlignment="Bottom" Grid.ColumnSpan="2" Margin="10 0 0 0"> + <touch:TouchExpander x:Name="Notifications" Style="{StaticResource TouchRoundedExpander}" IsTabStop="False" KeyboardNavigation.TabNavigation ="None" BorderThickness="0" IsExpanded="false" CornerRadius="20 20 0 0" > + <touch:TouchExpander.Header> + <DockPanel > + <touch:TouchButton Margin="0 0 20 0" Content="Clear All" DockPanel.Dock="Right" Width="120" Height="38" HorizontalAlignment="Right" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="1" CornerRadius="19" BorderBrush="{StaticResource TangoPrimaryAccentBrush}" Foreground="{StaticResource TangoPrimaryAccentBrush}" Command="{Binding ClearAllNotificationsCommand}" Visibility="{Binding NotificationProvider.HasNotificationItems, Converter={StaticResource BooleanToVisibilityConverter}}" > + + </touch:TouchButton> + <StackPanel DockPanel.Dock="Left" Orientation="Horizontal" VerticalAlignment="Center" > + <Image Source="../Images/Job Issues/Events.png" MaxWidth="33" Stretch="Fill" Height="36"/> + <TextBlock VerticalAlignment="Center" Margin="20 4 0 0" FontWeight="SemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}">Notifications</TextBlock> + <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" FontWeight="Normal" FontSize="{StaticResource TangoComboBoxItemFontSize}" Visibility="{Binding NotificationProvider.HasNotificationItems, Converter={StaticResource BooleanToVisibilityConverter}}"> + <Run Text="(" ></Run> + <Run Text="{Binding NotificationProvider.NotificationItems, Mode=OneWay, Converter={StaticResource CollectionToCountConverter}}"></Run> + <Run Text=" new Events)" ></Run> + </TextBlock> + </StackPanel> + </DockPanel> + </touch:TouchExpander.Header> + <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> + <ListBox ClipToBounds="False" ItemsSource="{Binding NotificationProvider.NotificationItems}" HorizontalAlignment="Stretch" MaxHeight="258" > + <ListBox.Style> + <Style TargetType="{x:Type ListBox}" BasedOn="{StaticResource BlankListBox}"> + <Setter Property="VirtualizingPanel.ScrollUnit" Value="Pixel"></Setter> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type ListBox}"> + <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"> + <touch:TouchScrollViewer CanContentScroll="True" Padding="{TemplateBinding Padding}" Focusable="False" + Style="{StaticResource TouchVerticalScrollViewer}"> + <ItemsPresenter /> + </touch:TouchScrollViewer> + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + </ListBox.Style> + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <VirtualizingStackPanel IsVirtualizing="True" VirtualizationMode="Recycling" VirtualizingPanel.ScrollUnit="Pixel" /> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + <ItemsControl.ItemTemplate> + <DataTemplate> + <Grid HorizontalAlignment="Stretch" Width="1220" Height="62"> + <Border BorderThickness="1" Margin="-1 0 0 0" BorderBrush="{StaticResource TangoDividerBrush}"> + <Grid HorizontalAlignment="Stretch" > + <Grid.ColumnDefinitions> + <ColumnDefinition Width="56"/> + <ColumnDefinition Width="1*"/> + <ColumnDefinition Width="56"/> + </Grid.ColumnDefinitions> + <touch:TouchIcon Margin="24 0 0 0" DockPanel.Dock="Left" Height="32" Grid.Column="0"> + <touch:TouchIcon.Style> + <Style TargetType="touch:TouchIcon"> + <Setter Property="Icon" Value="Information"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding MessageType}" Value="Info"> + <Setter Property="Icon" Value="InformationOutline"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"/> + </DataTrigger> + <DataTrigger Binding="{Binding MessageType}" Value="Success"> + <Setter Property="Icon" Value="Check"/> + <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"/> + </DataTrigger> + <DataTrigger Binding="{Binding MessageType}" Value="Warning"> + <Setter Property="Icon" Value="AlertCircleOutline"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"/> + </DataTrigger> + <DataTrigger Binding="{Binding MessageType}" Value="Error"> + <Setter Property="Icon" Value="AlertCircleOutline"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"/> + </DataTrigger> + <DataTrigger Binding="{Binding MessageType}" Value="Critical"> + <Setter Property="Icon" Value="Alert"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoErrorBrush}"/> + </DataTrigger> + </Style.Triggers> + </Style> + </touch:TouchIcon.Style> + </touch:TouchIcon> + <StackPanel Margin="15 3 20 3" VerticalAlignment="Center" Grid.Column="1"> + <TextBlock Text="{Binding Message}" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Foreground="Black" VerticalAlignment="Center" ></TextBlock> + <TextBlock Margin="0 5 0 0" Foreground="{StaticResource TangoDarkForegroundBrush}" Text="{Binding ExpandedMessage}" FontSize="{StaticResource TangoSmallFontSize}" TextWrapping="Wrap" VerticalAlignment="Center" /> + </StackPanel> + <Grid Grid.Column="2" Width="40" HorizontalAlignment="Right" VerticalAlignment="Stretch" Visibility="{Binding CanClose,Converter={StaticResource BooleanToVisibilityConverter}}"> + <Grid Margin="0 0 20 0" HorizontalAlignment="Right" VerticalAlignment="Center" Width="14" Height="14"> + <touch:TouchIcon Icon="Close" Foreground="Black" /> + </Grid> + <touch:TouchButton Opacity="0" Background="Transparent" Style="{StaticResource TangoFlatButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" Foreground="{StaticResource TangoPrimaryBackgroundBrush}" Padding="5" /> + </Grid> + + </Grid> + </Border> </Grid> - - </Grid> - </Border> - </Grid> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ListBox> - </Grid> - </touch:TouchExpander> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ListBox> + </Grid> + </touch:TouchExpander> + </Grid> + </Grid> + <Grid Visibility="{Binding IsDisplayJobOutline,Converter={StaticResource BooleanToVisibilityConverter}}" Background="{StaticResource TangoPrimaryBackgroundBrush}" Opacity="0.8"/> + + <Grid Margin="0 -10 0 0" Visibility="{Binding IsDisplayJobOutline,Converter={StaticResource BooleanToVisibilityConverter}}"> + <Grid> + <touch:TouchScrollViewer BorderThickness="0" Padding="10" Margin="0 0 0 100"> + <locaControls:JobOutlineControl IsHitTestVisible="False" BorderThickness="0" Margin="20" DataContext="{Binding JobOutlineTicket}" HorizontalAlignment="Left" /> + </touch:TouchScrollViewer> + </Grid> + + <touch:TouchButton Background="{StaticResource TangoPrimaryBackgroundBrush}" VerticalAlignment="Bottom" Margin="0 100 0 0" Command="{Binding HideJobOutlineCommand}" Style="{StaticResource TangoLinkButton}" Height="60" FontSize="{StaticResource TangoTitleFontSize}"> + Hide Job Outline + </touch:TouchButton> </Grid> </Grid> </UserControl> diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs index 8f8a04005..3543b8b3a 100644 --- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs +++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs @@ -87,6 +87,7 @@ namespace Tango.Emulations.Emulators private int _jobAbortCounter; private bool _abortHeadCleaning; private String _machineStatusRequestToken; + private MachineType _machineType; #region Properties @@ -620,12 +621,12 @@ namespace Tango.Emulations.Emulators monitors.Dispenser7MotorFrequency.AddRange(dispenserFrequencies[6].Data); monitors.Dispenser8MotorFrequency.AddRange(dispenserFrequencies[7].Data); - res.HeatersStates.Add(new HeaterState() - { - CurrentValue = 50, - IsInSetPoint = false, - SetPoint = 100 - }); + //res.HeatersStates.Add(new HeaterState() + //{ + // CurrentValue = 50, + // IsInSetPoint = false, + // SetPoint = 100 + //}); res.DigitalInterfaceStates.AddRange(_digitalOutputPinsStates.Concat(_digitalInputPinsStates)); res.ComponentsStates.AddRange(_componentsStates); @@ -801,10 +802,12 @@ namespace Tango.Emulations.Emulators Stopwatch watch = new Stopwatch(); Dictionary<int, IDSPackLevel> dispenserindexToPacklevel = new Dictionary<int, IDSPackLevel>(); + double dryerLength = _machineType == MachineType.Ts1800 ? (job.ProcessParameters.DryerBufferLength * ProcessParametersTable.DRYER_METERS_PER_CYCLE + ProcessParametersTable.DRYER_TO_SPOOL_LENGTH_METERS) : job.ProcessParameters.DryerBufferLength; + for (int i = 0; i < units; i++) { - while (progress < unit_length + (i == units - 1 ? (job.ProcessParameters.DryerBufferLength * ProcessParametersTable.DRYER_METERS_PER_CYCLE + ProcessParametersTable.DRYER_TO_SPOOL_LENGTH_METERS) : 0) && !_cancelJob) + while (progress < unit_length + (i == units - 1 ? dryerLength : 0) && !_cancelJob) { var status = new PMR.Printing.JobStatus(); status.Progress = progress; @@ -835,7 +838,7 @@ namespace Tango.Emulations.Emulators } } - progress += Math.Min((centimeter_per_second / 1000d), (unit_length + (i == units - 1 ? (job.ProcessParameters.DryerBufferLength * ProcessParametersTable.DRYER_METERS_PER_CYCLE + ProcessParametersTable.DRYER_TO_SPOOL_LENGTH_METERS) : 0)) - progress); + progress += Math.Min((centimeter_per_second / 1000d), (unit_length + (i == units - 1 ? dryerLength : 0)) - progress); double currentPosition = 0; double nextStopPosition = unit_length; @@ -935,7 +938,7 @@ namespace Tango.Emulations.Emulators { Status = new PMR.Printing.JobStatus() { - Progress = unit_length + job.ProcessParameters.DryerBufferLength * ProcessParametersTable.DRYER_METERS_PER_CYCLE + ProcessParametersTable.DRYER_TO_SPOOL_LENGTH_METERS, + Progress = unit_length + dryerLength, } }, request.Container.Token, new TransportResponseConfig() { Completed = !_cancelJob }); @@ -961,7 +964,7 @@ namespace Tango.Emulations.Emulators { Status = new PMR.Printing.JobStatus() { - Progress = unit_length + job.ProcessParameters.DryerBufferLength * ProcessParametersTable.DRYER_METERS_PER_CYCLE + ProcessParametersTable.DRYER_TO_SPOOL_LENGTH_METERS, + Progress = unit_length + dryerLength, } }, _current_job_resume_token, new TransportResponseConfig() { Completed = !_cancelJob }); @@ -1268,6 +1271,8 @@ namespace Tango.Emulations.Emulators }, request.Container.Token, new TransportResponseConfig() { ErrorCode = request.Message.Password == "1234" ? ErrorCode.None : ErrorCode.UnauthorizedConnection }); + _machineType = request.Message.MachineType; + _connectionTime = DateTime.Now; _isAfterReset = false; diff --git a/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs b/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs index dc8efa7dd..9c112ae75 100644 --- a/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs +++ b/Software/Visual_Studio/Tango.FileSystem/FileSystemManager.cs @@ -19,7 +19,7 @@ namespace Tango.FileSystem folder.Path = "This PC"; folder.IsRoot = true; folder.Type = FileSystemItemType.Folder; - folder.Items = DriveInfo.GetDrives().Where(x => x.DriveType == DriveType.Fixed || x.DriveType == DriveType.Removable || x.DriveType == DriveType.Network).Select(x => new FileSystemItemDTO() + folder.Items = DriveInfo.GetDrives().Where(x => x.DriveType == DriveType.Fixed || x.DriveType == DriveType.Removable || x.DriveType == DriveType.Network).Where(x => x.IsReady).Select(x => new FileSystemItemDTO() { Path = x.RootDirectory.FullName, DriveType = x.DriveType, diff --git a/Software/Visual_Studio/Tango.Transport/Discovery/UdpDiscoveryService.cs b/Software/Visual_Studio/Tango.Transport/Discovery/UdpDiscoveryService.cs index 3e714325b..f593a6ea6 100644 --- a/Software/Visual_Studio/Tango.Transport/Discovery/UdpDiscoveryService.cs +++ b/Software/Visual_Studio/Tango.Transport/Discovery/UdpDiscoveryService.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using System.Timers; using Tango.Core; using Tango.Core.ExtensionMethods; +using Tango.Logging; using Tango.PMR.Discovery; using Tango.PMR.Integration; using Tango.Transport.Helpers; @@ -190,7 +191,7 @@ namespace Tango.Transport.Discovery } catch (Exception ex) { - LogManager.Log(ex, "Error multicasting discovery packet."); + LogManager.Log(ex, LogCategory.Debug, "Error multicasting discovery packet."); } } } |
