diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-11-06 18:06:45 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-11-06 18:06:45 +0200 |
| commit | c698425b1ab832fe351aff257815709c01950fc3 (patch) | |
| tree | 53e1c6439d54d4b4164b7e5f478066c1b00c6a25 /Software/Visual_Studio/PPC | |
| parent | 202c532e87e8114151e9b38982dcc171347a78ce (diff) | |
| download | Tango-c698425b1ab832fe351aff257815709c01950fc3.tar.gz Tango-c698425b1ab832fe351aff257815709c01950fc3.zip | |
Implemented liquid quantity validation on PPC and MS.
Improved PPC full control view.
Diffstat (limited to 'Software/Visual_Studio/PPC')
13 files changed, 138 insertions, 69 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/InsufficientLiquidQuantityView.xaml index f3c471954..90492ce9f 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/InsufficientLiquidQuantityView.xaml @@ -1,10 +1,10 @@ -<UserControl x:Class="Tango.PPC.UI.Dialogs.InsufficientLiquidQuantityView" +<UserControl x:Class="Tango.PPC.Jobs.Dialogs.InsufficientLiquidQuantityView" 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" + xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" + xmlns:local="clr-namespace:Tango.PPC.Jobs.Dialogs" mc:Ignorable="d" Background="{StaticResource TangoPrimaryBackgroundBrush}" Width="700" Height="800" d:DataContext="{d:DesignInstance Type=local:InsufficientLiquidQuantityViewVM, IsDesignTimeCreatable=False}"> <Grid Margin="20"> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/InsufficientLiquidQuantityView.xaml.cs index 9ec1eec0e..eabff89b4 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/InsufficientLiquidQuantityView.xaml.cs @@ -15,7 +15,7 @@ using System.Windows.Shapes; using Tango.Integration.Operation; using static Tango.Integration.Operation.InsufficientLiquidQuantityException; -namespace Tango.PPC.UI.Dialogs +namespace Tango.PPC.Jobs.Dialogs { /// <summary> /// Interaction logic for InsufficientLiquidQuantityView.xaml diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/InsufficientLiquidQuantityViewVM.cs index 8b15d2e00..e8cd8df85 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/InsufficientLiquidQuantityViewVM.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using Tango.Integration.Operation; using Tango.SharedUI; -namespace Tango.PPC.UI.Dialogs +namespace Tango.PPC.Jobs.Dialogs { public class InsufficientLiquidQuantityViewVM : DialogViewVM { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/cartridge_validation.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/cartridge_validation.png Binary files differindex 373cb78c1..373cb78c1 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/cartridge_validation.png +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/cartridge_validation.png diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj index aedf09ce7..65d8ecba3 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj @@ -116,6 +116,10 @@ <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </Page> + <Page Include="Dialogs\InsufficientLiquidQuantityView.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> <Page Include="Dialogs\JobCreationView.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -211,6 +215,10 @@ <Compile Include="Dialogs\CatalogSelectionView.xaml.cs"> <DependentUpon>CatalogSelectionView.xaml</DependentUpon> </Compile> + <Compile Include="Dialogs\InsufficientLiquidQuantityView.xaml.cs"> + <DependentUpon>InsufficientLiquidQuantityView.xaml</DependentUpon> + </Compile> + <Compile Include="Dialogs\InsufficientLiquidQuantityViewVM.cs" /> <Compile Include="Dialogs\JobCreationView.xaml.cs"> <DependentUpon>JobCreationView.xaml</DependentUpon> </Compile> @@ -482,10 +490,13 @@ <Resource Include="Images\small-cards-view - blue.png" /> <Resource Include="Images\small-cards-view.png" /> </ItemGroup> + <ItemGroup> + <Resource Include="Images\cartridge_validation.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs index 103a10b28..b98cde7dd 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs @@ -122,7 +122,10 @@ namespace Tango.PPC.Jobs.ViewModels NotificationProvider.CurrentAppBarItem.Close(); } - _stop_job_btn.Push(); + if (!_handler.Status.IsFailed) + { + _stop_job_btn.Push(); + } } #endregion @@ -141,10 +144,27 @@ namespace Tango.PPC.Jobs.ViewModels e.JobHandler.StatusChanged += JobHandler_StatusChanged; e.JobHandler.SpoolChangeRequired += JobHandler_SpoolChangeRequired; e.JobHandler.Stopped += JobHandler_Stopped; + e.JobHandler.Failed += JobHandler_Failed; _stop_job_btn.Push(); } + private void JobHandler_Failed(object sender, Exception ex) + { + if (ex is InsufficientLiquidQuantityException) + { + InvokeUI(async () => + { + await NotificationProvider.ShowDialog(new InsufficientLiquidQuantityViewVM(ex as InsufficientLiquidQuantityException)); + + if (IsVisible) + { + await NavigationManager.NavigateBack(); + } + }); + } + } + /// <summary> /// Handles the SpoolChangeRequired event of the JobHandler. /// </summary> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs index 3a3b820a5..ebdd18aeb 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs @@ -648,13 +648,9 @@ namespace Tango.PPC.Jobs.ViewModels try { LogManager.Log("Start job command pressed. Starting job and navigating to job progress view..."); - await PrintingManager.Print(Job, _db); + var handler = await PrintingManager.Print(Job, _db); await NavigationManager.NavigateTo<JobsModule>(nameof(JobProgressView)); } - catch (InsufficientLiquidQuantityException) - { - //Ignore.. - } catch (Exception ex) { LogManager.Log(ex, "Could not start the current job."); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/MachineStatusControl.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/MachineStatusControl.xaml new file mode 100644 index 000000000..d6114576d --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/MachineStatusControl.xaml @@ -0,0 +1,46 @@ +<UserControl x:Class="Tango.PPC.UI.Controls.MachineStatusControl" + 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:operations="clr-namespace:Tango.Integration.Operation;assembly=Tango.Integration" + xmlns:local="clr-namespace:Tango.PPC.UI.Controls" + mc:Ignorable="d" + Width="36" Height="Auto"> + <Grid> + <touch:TouchGifAnimation Width="36" HorizontalAlignment="Center" EnableAnimation="True"> + <touch:TouchGifAnimation.Style> + <Style TargetType="touch:TouchGifAnimation"> + <Setter Property="Source" Value="/Images/GlobalStatus/standby.png"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.Disconnected}"> + <Setter Property="Source" Value="/Images/GlobalStatus/machine_off_Anim.gif"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.Standby}"> + <Setter Property="Source" Value="/Images/GlobalStatus/standby_Anim.gif"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.ReadyToDye}"> + <Setter Property="Source" Value="/Images/GlobalStatus/Ready_Anim.gif"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.GettingReady}"> + <Setter Property="Source" Value="/Images/GlobalStatus/getting_ready_Anim.gif"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.Printing}"> + <Setter Property="Source" Value="/Images/GlobalStatus/dyeing_Anim.gif"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.ShuttingDown}"> + <Setter Property="Source" Value="/Images/GlobalStatus/shutdown_icon_Anim.gif"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.Error}"> + <Setter Property="Source" Value="/Images/GlobalStatus/error_Anim.gif"></Setter> + </DataTrigger> + <DataTrigger Binding="{Binding Status}" Value="{x:Static operations:MachineStatuses.Service}"> + <Setter Property="Source" Value="/Images/GlobalStatus/service_Anim.gif"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </touch:TouchGifAnimation.Style> + </touch:TouchGifAnimation> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/MachineStatusControl.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/MachineStatusControl.xaml.cs new file mode 100644 index 000000000..61ecef0ad --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Controls/MachineStatusControl.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.Controls +{ + /// <summary> + /// Interaction logic for MachineStatusControl.xaml + /// </summary> + public partial class MachineStatusControl : UserControl + { + public MachineStatusControl() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs index 56ec2fa7e..21c68d3e6 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs @@ -56,16 +56,8 @@ namespace Tango.PPC.UI.Printing #if STUBPRINT handler = await _machineProvider.MachineOperator.PrintStub(job); #else - try - { - handler = await _machineProvider.MachineOperator.Print(job); - } - catch (InsufficientLiquidQuantityException ex) - { - LogManager.Log(ex); - await _notificationProvider.ShowDialog(new InsufficientLiquidQuantityViewVM(ex)); - throw ex; - } + + handler = await _machineProvider.MachineOperator.Print(job); #endif handler.Completed += async (x, e) => @@ -113,9 +105,13 @@ namespace Tango.PPC.UI.Printing }; handler.Failed += async (x, e) => { - try + if (e is InsufficientLiquidQuantityException) { + return; + } + try + { job.JobStatus = JobStatuses.Disrupted; if (!context.IsDisposed) 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 c5045abf3..a0ad5b44d 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 @@ -120,15 +120,14 @@ <DependentUpon>WiFiAuthenticationView.xaml</DependentUpon> </Compile> <Compile Include="Connectivity\WiFiAuthenticationViewVM.cs" /> + <Compile Include="Controls\MachineStatusControl.xaml.cs"> + <DependentUpon>MachineStatusControl.xaml</DependentUpon> + </Compile> <Compile Include="Converters\AppBarItemConverter.cs" /> <Compile Include="Converters\ItemBaseConverter.cs" /> <Compile Include="Dialogs\CartridgeValidationView.xaml.cs"> <DependentUpon>CartridgeValidationView.xaml</DependentUpon> </Compile> - <Compile Include="Dialogs\InsufficientLiquidQuantityView.xaml.cs"> - <DependentUpon>InsufficientLiquidQuantityView.xaml</DependentUpon> - </Compile> - <Compile Include="Dialogs\InsufficientLiquidQuantityViewVM.cs" /> <Compile Include="Dialogs\ScreenLockView.xaml.cs"> <DependentUpon>ScreenLockView.xaml</DependentUpon> </Compile> @@ -202,13 +201,13 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> - <Page Include="Dialogs\CartridgeValidationView.xaml"> - <Generator>MSBuild:Compile</Generator> + <Page Include="Controls\MachineStatusControl.xaml"> <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> </Page> - <Page Include="Dialogs\InsufficientLiquidQuantityView.xaml"> - <SubType>Designer</SubType> + <Page Include="Dialogs\CartridgeValidationView.xaml"> <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> </Page> <Page Include="Dialogs\ScreenLockView.xaml"> <Generator>MSBuild:Compile</Generator> @@ -327,7 +326,6 @@ <Resource Include="Images\GlobalStatus\service_Anim.gif" /> <Resource Include="Images\GlobalStatus\shutdown_icon_Anim.gif" /> <Resource Include="Images\GlobalStatus\standby_Anim.gif" /> - <Resource Include="Images\cartridge_validation.png" /> <Resource Include="Images\bug.png" /> <Content Include="..\..\Build\ColorLib\Debug\Tango.ColorLib_v1.dll"> <Link>Tango.ColorLib_v1.dll</Link> @@ -577,7 +575,7 @@ if $(ConfigurationName) == Release del *.xml</PostBuildEvent> </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> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/ExternalBridgeView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/ExternalBridgeView.xaml index d83128007..4de00120f 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/ExternalBridgeView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/ExternalBridgeView.xaml @@ -7,14 +7,19 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:localControls="clr-namespace:Tango.PPC.UI.Controls" xmlns:local="clr-namespace:Tango.PPC.UI.Views" mc:Ignorable="d" d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:ExternalBridgeViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.ExternalBridgeViewVM}" Background="{StaticResource TangoPrimaryBackgroundBrush}"> <Grid> <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> - <Grid HorizontalAlignment="Center"> - <Image Source="/Images/machine-trans.png" Stretch="None" RenderOptions.BitmapScalingMode="Fant"></Image> - <touch:TouchIcon Icon="Wifi" Foreground="{StaticResource TangoGreenBrush}" Width="30" Height="30" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 25 30"> + <Grid HorizontalAlignment="Center" VerticalAlignment="Center" > + <Ellipse Stroke="{StaticResource TangoDarkForegroundBrush}" Width="50" Height="50"/> + <localControls:MachineStatusControl Margin="0 0 0 -1" VerticalAlignment="Center" DataContext="{Binding MachineProvider.MachineOperator}" /> + </Grid> + <Grid HorizontalAlignment="Center" Margin="0 20 0 0"> + <Image Source="/Images/machine.png" Stretch="None" RenderOptions.BitmapScalingMode="Fant"></Image> + <touch:TouchIcon Icon="Wifi" Foreground="{StaticResource TangoGreenBrush}" Width="30" Height="30" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 40 45"> <touch:TouchIcon.Style> <Style TargetType="touch:TouchIcon"> <Style.Triggers> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml index 586fa987b..39c087c52 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml @@ -14,6 +14,7 @@ xmlns:commonControls="clr-namespace:Tango.PPC.Common.Controls;assembly=Tango.PPC.Common" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:components="clr-namespace:Tango.Touch.Components;assembly=Tango.Touch" + xmlns:locaControls="clr-namespace:Tango.PPC.UI.Controls" xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch" mc:Ignorable="d" d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:LayoutViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LayoutViewVM}"> @@ -256,39 +257,7 @@ <Grid DockPanel.Dock="Right" Margin="0 0 20 0"> <StackPanel Orientation="Horizontal"> <StackPanel x:Name="techPressElement" VerticalAlignment="Center" Background="Transparent"> - <touch:TouchGifAnimation Width="36" HorizontalAlignment="Center" EnableAnimation="True"> - <touch:TouchGifAnimation.Style> - <Style TargetType="touch:TouchGifAnimation"> - <Setter Property="Source" Value="/Images/GlobalStatus/standby.png"></Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Disconnected}"> - <Setter Property="Source" Value="/Images/GlobalStatus/machine_off_Anim.gif"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Standby}"> - <Setter Property="Source" Value="/Images/GlobalStatus/standby_Anim.gif"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.ReadyToDye}"> - <Setter Property="Source" Value="/Images/GlobalStatus/Ready_Anim.gif"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.GettingReady}"> - <Setter Property="Source" Value="/Images/GlobalStatus/getting_ready_Anim.gif"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Printing}"> - <Setter Property="Source" Value="/Images/GlobalStatus/dyeing_Anim.gif"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.ShuttingDown}"> - <Setter Property="Source" Value="/Images/GlobalStatus/shutdown_icon_Anim.gif"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Error}"> - <Setter Property="Source" Value="/Images/GlobalStatus/error_Anim.gif"></Setter> - </DataTrigger> - <DataTrigger Binding="{Binding MachineProvider.MachineOperator.Status}" Value="{x:Static operations:MachineStatuses.Service}"> - <Setter Property="Source" Value="/Images/GlobalStatus/service_Anim.gif"></Setter> - </DataTrigger> - </Style.Triggers> - </Style> - </touch:TouchGifAnimation.Style> - </touch:TouchGifAnimation> + <locaControls:MachineStatusControl HorizontalAlignment="Center" DataContext="{Binding MachineProvider.MachineOperator}" /> <TextBlock Margin="0 10 0 0" Text="{Binding MachineProvider.MachineOperator.Status,Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock> </StackPanel> |
