diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2022-07-26 12:09:33 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2022-07-26 12:09:33 +0300 |
| commit | 27605ffd1ec7496767c215249ebd6898fe4beb8b (patch) | |
| tree | 6d381d8e3b61a91b8246255d0340c0e9ffda9ff6 /Software/Visual_Studio/PPC/Tango.PPC.Common | |
| parent | 729aba268c416391525ba6a16347d24a59ec8f91 (diff) | |
| parent | c3dd2cc1ca8f06c905a80216bb306049235f3c9f (diff) | |
| download | Tango-27605ffd1ec7496767c215249ebd6898fe4beb8b.tar.gz Tango-27605ffd1ec7496767c215249ebd6898fe4beb8b.zip | |
Merge branch 'software' of https://twinetfs.visualstudio.com/Tango/_git/Tango into software
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common')
22 files changed, 153 insertions, 5 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/MachineStatusControl.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/MachineStatusControl.xaml new file mode 100644 index 000000000..b2bb998f7 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/MachineStatusControl.xaml @@ -0,0 +1,49 @@ +<UserControl x:Class="Tango.PPC.Common.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.Common.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.PowerUp}"> + <Setter Property="Source" Value="/Images/GlobalStatus/getting_ready_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.Common/Controls/MachineStatusControl.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/MachineStatusControl.xaml.cs new file mode 100644 index 000000000..55f1294f2 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/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.Common.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.Common/Controls/TwineCatalogControl.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml index 7a8b2908d..4a804447a 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml @@ -93,7 +93,7 @@ </touch:TouchListBox.ItemTemplate> </touch:TouchListBox>--> - <Grid Grid.Column="1" Margin="10 60 0 20"> + <Grid Grid.Column="1" Margin="30 60 0 20"> <!--<Rectangle Stroke="{StaticResource TangoDividerBrush}" HorizontalAlignment="Left" />--> <Grid> <Grid.ColumnDefinitions> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs index 3af921f7d..8d57cbfd0 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs @@ -372,7 +372,8 @@ namespace Tango.PPC.Common.Controls { if(collectionFilter.Filter(item.Item)) { - _scrollViewer.ScrollToPosition(item.PositionY - _scrollViewer.ActualHeight / 2); + if (_scrollViewer != null) + _scrollViewer.ScrollToPosition(item.PositionY - _scrollViewer.ActualHeight / 2); break; } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/Ready_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/Ready_Anim.gif Binary files differnew file mode 100644 index 000000000..11cef3b10 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/Ready_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/dyeing.png b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/dyeing.png Binary files differnew file mode 100644 index 000000000..fbace4fa5 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/dyeing.png diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/dyeing_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/dyeing_Anim.gif Binary files differnew file mode 100644 index 000000000..058d9a34d --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/dyeing_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/error.png b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/error.png Binary files differnew file mode 100644 index 000000000..b4b50e4ac --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/error.png diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/error_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/error_Anim.gif Binary files differnew file mode 100644 index 000000000..9bf0d84f3 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/error_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/getting-ready.png b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/getting-ready.png Binary files differnew file mode 100644 index 000000000..a0dc77f92 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/getting-ready.png diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/getting_ready_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/getting_ready_Anim.gif Binary files differnew file mode 100644 index 000000000..79256816a --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/getting_ready_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/machine-off.png b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/machine-off.png Binary files differnew file mode 100644 index 000000000..6dc569e35 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/machine-off.png diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/machine_off_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/machine_off_Anim.gif Binary files differnew file mode 100644 index 000000000..9ca81da39 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/machine_off_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/ready-to-dye.png b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/ready-to-dye.png Binary files differnew file mode 100644 index 000000000..7edf624be --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/ready-to-dye.png diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/service.png b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/service.png Binary files differnew file mode 100644 index 000000000..ba351ee66 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/service.png diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/service_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/service_Anim.gif Binary files differnew file mode 100644 index 000000000..f5962c36c --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/service_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/shutdown_icon_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/shutdown_icon_Anim.gif Binary files differnew file mode 100644 index 000000000..d936476b6 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/shutdown_icon_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/shutting-down.png b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/shutting-down.png Binary files differnew file mode 100644 index 000000000..9aa8e2db6 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/shutting-down.png diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/standby.png b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/standby.png Binary files differnew file mode 100644 index 000000000..6b46c22c0 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/standby.png diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/standby_Anim.gif b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/standby_Anim.gif Binary files differnew file mode 100644 index 000000000..89491179d --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Images/GlobalStatus/standby_Anim.gif diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs index ff6dbce08..fce1ce046 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs @@ -22,6 +22,8 @@ namespace Tango.PPC.Common /// <seealso cref="Tango.Settings.SettingsBase" /> public class PPCSettings : SettingsBase { + private int _gradientGenerationResolution; + /// <summary> /// Gets or sets the state of the application. /// </summary> @@ -105,7 +107,7 @@ namespace Tango.PPC.Common /// <summary> /// Gets or sets the gradient generation resolution. /// </summary> - public int GradientGenerationResolution { get; set; } + public int GradientGenerationResolution { get => Math.Max(40, _gradientGenerationResolution); set => _gradientGenerationResolution = value; } /// <summary> /// Gets or sets a value indicating whether to enable the application lock screen. @@ -215,7 +217,7 @@ namespace Tango.PPC.Common /// <summary> /// Gets or sets the automatic update check interval. /// </summary> - public TimeSpan AutoUpdateCheckInterval { get; set; } + public TimeSpan AutoUpdateCheckInterval { get; set; } /// <summary> /// Gets or sets a value indicating whether to enable the automatic thread loading support. @@ -308,6 +310,17 @@ namespace Tango.PPC.Common /// </summary> public bool UseJobsModuleV2 { get; set; } + public ColorSpaces? DefaultTabColorSpace + { + get; + set; + } + + /// <summary> + /// Gets or sets the fine tuning trial length in meters. + /// </summary> + public int FineTuningTrialLengthMeters { get; set; } + /// <summary> /// Gets the machine service address. /// </summary> @@ -324,8 +337,9 @@ namespace Tango.PPC.Common { LubricationLevels = new List<RmlLubricationLevel>(); JobUploadStrategy = JobUploadStrategy.JobDescriptionFile; + FineTuningTrialLengthMeters = 200; EnableGradientGeneration = true; - GradientGenerationResolution = 20; + GradientGenerationResolution = 40; MachineScanningTimeoutSeconds = 20; EmbeddedComPort = "COM10"; EmbeddedDeviceHint = "Tango USB Serial Port"; @@ -369,6 +383,7 @@ namespace Tango.PPC.Common EnableSpoolReplacementDialog = true; EnableProxifier = true; UseJobsModuleV2 = true; + DefaultTabColorSpace = ColorSpaces.CMYK; } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj index 2334cc568..d3a27955d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj @@ -148,6 +148,9 @@ <Compile Include="Console\IConsoleEngineService.cs" /> <Compile Include="Controls\AsyncAdornerControl.cs" /> <Compile Include="Controls\ImageGalleryControl.cs" /> + <Compile Include="Controls\MachineStatusControl.xaml.cs"> + <DependentUpon>MachineStatusControl.xaml</DependentUpon> + </Compile> <Compile Include="Controls\TwineCatalogControl.xaml.cs"> <DependentUpon>TwineCatalogControl.xaml</DependentUpon> </Compile> @@ -294,6 +297,10 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Controls\MachineStatusControl.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> <Page Include="Controls\MultiPieChart.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> @@ -519,6 +526,54 @@ <Resource Include="Images\cl-full.png" /> <Resource Include="Images\lubricant2.png" /> </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\dyeing.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\dyeing_Anim.gif" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\error.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\error_Anim.gif" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\getting-ready.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\getting_ready_Anim.gif" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\machine-off.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\machine_off_Anim.gif" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\ready-to-dye.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\Ready_Anim.gif" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\service.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\service_Anim.gif" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\shutdown_icon_Anim.gif" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\shutting-down.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\standby.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\GlobalStatus\standby_Anim.gif" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" /> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
