diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-07-19 11:29:11 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-07-19 11:29:11 +0300 |
| commit | facf3fea6ebc728cdd09d6d2a22bd32bfe8de6b9 (patch) | |
| tree | ad18e27d769ca53a483b012193fc1197b9704b59 /Software/Visual_Studio | |
| parent | c90b4e2e753a0a86ebb2af4dc827cda206b148b6 (diff) | |
| parent | a23042015bb78f0603440f5746edbc509877faa9 (diff) | |
| download | Tango-facf3fea6ebc728cdd09d6d2a22bd32bfe8de6b9.tar.gz Tango-facf3fea6ebc728cdd09d6d2a22bd32bfe8de6b9.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio')
9 files changed, 112 insertions, 61 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index ed832f468..35c621822 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -976,7 +976,8 @@ <Image Source="../Images/colorspace.png" Width="24"></Image> <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Color Space</TextBlock> </StackPanel> - <ComboBox SelectionChanged="OnBrushStopColorSpace_SelectionChanged" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ColorSpaces}" SelectedItem="{Binding ColorSpace}" DisplayMemberPath="Name" Width="100" HorizontalAlignment="Left"> + <ComboBox SelectionChanged="OnBrushStopColorSpace_SelectionChanged" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ColorSpaces}" SelectedItem="{Binding ColorSpace}" DisplayMemberPath="Name" Width="100" HorizontalAlignment="Left" + Style="{StaticResource TransparentComboBoxStyle}" > <ComboBox.ItemContainerStyle> <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}"> <Setter Property="Background" Value="{StaticResource WhiteBrush100}"></Setter> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml index de433b7e7..32d467cba 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml @@ -44,7 +44,7 @@ <Grid Grid.Row="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Width="Auto" Height="80" Margin="0 0 0 20" > <Grid.ColumnDefinitions> <ColumnDefinition Width="1*"></ColumnDefinition> - <ColumnDefinition Width="1*"></ColumnDefinition> + <ColumnDefinition Width="Auto"></ColumnDefinition> </Grid.ColumnDefinitions> <StackPanel Orientation="Vertical" Grid.Column="0"> <TextBlock FontSize="20" HorizontalAlignment="Left" >Liquid Type</TextBlock> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml index 37e35b1ab..11dc2bad3 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml @@ -540,16 +540,12 @@ <Grid.RowDefinitions> <RowDefinition Height="*" /> </Grid.RowDefinitions> - <Border Background="Transparent" - BorderBrush="{DynamicResource MaterialDesignShadowBrush}" - BorderThickness="1" - CornerRadius="2"> + <Border Background="Transparent" BorderBrush="{DynamicResource MaterialDesignShadowBrush}" BorderThickness="1" CornerRadius="2"> <Border.Effect> <BlurEffect Radius="6"/> </Border.Effect> </Border> - <Grid Margin="1" - SnapsToDevicePixels="True"> + <Grid Margin="1" SnapsToDevicePixels="True"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> @@ -560,7 +556,7 @@ <Border Grid.Row="0" CornerRadius="2 2 0 0" Background="{DynamicResource ComboBox.Floating.Background}" - Height="{StaticResource PopupTopBottomMargin}"/> + Height="0"/> <Grid Grid.Row="1"> <Grid.ColumnDefinitions> @@ -568,29 +564,18 @@ <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> - <Border Grid.Column="0" - Width="{StaticResource PopupLeftRightMargin}" - Background="{DynamicResource ComboBox.Floating.Background}" - /> - <Grid Grid.Column="1" - Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type materialDesign:ComboBoxPopup}}, Path=VisiblePlacementWidth}" - Height="{Binding ElementName=templateRoot, Path=ActualHeight}"/> - <Border Grid.Column="2" - MinWidth="{StaticResource PopupLeftRightMargin}" - Background="{DynamicResource ComboBox.Floating.Background}" - /> + <Border Grid.Column="0" Width="{StaticResource PopupLeftRightMargin}" Background="{DynamicResource ComboBox.Floating.Background}" /> + <Grid Grid.Column="1" + Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type materialDesign:ComboBoxPopup}}, Path=VisiblePlacementWidth}" + Height="0"/> + <Border Grid.Column="2" MinWidth="{StaticResource PopupLeftRightMargin}" Background="{DynamicResource ComboBox.Floating.Background}"/> </Grid> - <Border Grid.Row="2" - Background="{DynamicResource ComboBox.Floating.Background}" - Height="{StaticResource PopupContentPresenterExtend}"/> + <Border Grid.Row="2" Background="{DynamicResource ComboBox.Floating.Background}" Height="0"/> <ContentPresenter Grid.Row="3"/> - <Border Grid.Row="4" - CornerRadius="0 0 2 2" - Height="{StaticResource PopupTopBottomMargin}" - Background="{DynamicResource ComboBox.Floating.Background}" /> + <Border Grid.Row="4" CornerRadius="0 0 2 2" Height="0" Background="{DynamicResource ComboBox.Floating.Background}" /> </Grid> </Grid> </ControlTemplate> @@ -657,7 +642,7 @@ Visibility="{Binding Path=(materialDesign:TextFieldAssist.DecorationVisibility), RelativeSource={RelativeSource TemplatedParent}}"/> <materialDesign:ComboBoxPopup x:Name="PART_Popup" - + AllowsTransparency="true" Focusable="False" HorizontalOffset="-11.5" @@ -667,9 +652,9 @@ UseLayoutRounding="True" Placement="Custom" PopupAnimation="Fade" - VerticalOffset="0" + VerticalOffset="-10" DefaultVerticalOffset="5" - DownVerticalOffset="-15.5" + DownVerticalOffset="{Binding ElementName=templateRoot, Path=ActualHeight}" UpVerticalOffset="15" ClassicMode="{Binding Path=(materialDesign:ComboBoxAssist.ClassicMode), RelativeSource={RelativeSource TemplatedParent}}" UpContentTemplate="{StaticResource PopupContentUpTemplate}" diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml index 4e313f7a8..40cfc40f9 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml @@ -100,7 +100,7 @@ <StackPanel Height="90" Visibility="{Binding RunningJobStatus.IsSettingUp,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> + <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Getting Ready...</TextBlock> </StackPanel> </StackPanel> @@ -146,19 +146,19 @@ <TextBlock Margin="0 -25 0 0" Canvas.Left="{Binding RelativeSource={RelativeSource Mode=Self},Path=ActualWidth,Converter={StaticResource MathOperatorConverter},ConverterParameter='*-0.5'}" HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}"> <TextBlock.Style> <Style TargetType="TextBlock"> - <Setter Property="Text" Value="now dyeing"></Setter> + <Setter Property="Text" Value="Now Dyeing"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding RunningJobStatus.IsSettingUp}" Value="True"> - <Setter Property="Text" Value="getting ready"></Setter> + <Setter Property="Text" Value="Getting Ready"></Setter> </DataTrigger> <DataTrigger Binding="{Binding RunningJobStatus.IsCanceled}" Value="True"> - <Setter Property="Text" Value="job canceled"></Setter> + <Setter Property="Text" Value="Job Canceled"></Setter> </DataTrigger> <DataTrigger Binding="{Binding RunningJobStatus.IsFailed}" Value="True"> - <Setter Property="Text" Value="job failed"></Setter> + <Setter Property="Text" Value="Job Failed"></Setter> </DataTrigger> <DataTrigger Binding="{Binding RunningJobStatus.IsCompleted}" Value="True"> - <Setter Property="Text" Value="job completed"></Setter> + <Setter Property="Text" Value="Job Completed"></Setter> </DataTrigger> </Style.Triggers> </Style> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToBrushConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToBrushConverter.cs index c7e828148..c33efdca6 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToBrushConverter.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToBrushConverter.cs @@ -4,6 +4,7 @@ using System.Globalization; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows; using System.Windows.Data; using System.Windows.Media; using System.Windows.Media.Imaging; @@ -19,24 +20,45 @@ namespace Tango.PPC.Maintenance.Converters if (value is LiquidType) { LiquidType type = value as LiquidType; - if (type.Type == BL.Enumerations.LiquidTypes.Lubricant) + switch (type.Type) { - ImageBrush lubricantBrush = new ImageBrush() { Stretch = Stretch.None, TileMode = TileMode.Tile, ViewportUnits = BrushMappingMode.Absolute }; - lubricantBrush.ImageSource = ResourceHelper.GetImageFromResources(@"Images/lubricant2.png"); - lubricantBrush.Viewport = new System.Windows.Rect(lubricantBrush.ImageSource.Width/3, lubricantBrush.ImageSource.Height/3, lubricantBrush.ImageSource.Width, lubricantBrush.ImageSource.Height); - return lubricantBrush; - } - if (type.Type == BL.Enumerations.LiquidTypes.Cleaner) - { - ImageBrush cleanerBrush = new ImageBrush(){ Stretch = Stretch.None, TileMode = TileMode.Tile, ViewportUnits = BrushMappingMode.Absolute }; - cleanerBrush.ImageSource = ResourceHelper.GetImageFromResources(@"Images/cl-full.png"); - cleanerBrush.Viewport = new System.Windows.Rect(5, 5, cleanerBrush.ImageSource.Width, cleanerBrush.ImageSource.Height); - return cleanerBrush; - } - else - { - return new SolidColorBrush(type.LiquidTypeColor); ; + case BL.Enumerations.LiquidTypes.Lubricant: + { + + ImageBrush lubricantBrush = new ImageBrush() { Stretch = Stretch.None, TileMode = TileMode.Tile, ViewportUnits = BrushMappingMode.Absolute }; + + BitmapSource bit_source = ResourceHelper.GetImageFromResources(@"Images/lubricant2.png"); + var targetBitmap = new WriteableBitmap(new TransformedBitmap(bit_source, new ScaleTransform(0.2, 0.2))); + lubricantBrush.ImageSource = targetBitmap; + lubricantBrush.Viewport = new System.Windows.Rect(2, 2, targetBitmap.Width, targetBitmap.Height); + return lubricantBrush; + } + 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; + } + case BL.Enumerations.LiquidTypes.Yellow: + { + return new SolidColorBrush(Color.FromRgb(232, 225, 12)); + } + case BL.Enumerations.LiquidTypes.Cyan: + { + return new SolidColorBrush(Color.FromRgb(22, 98, 235)); + } + case BL.Enumerations.LiquidTypes.Magenta: + { + return new SolidColorBrush(Color.FromRgb(237, 0, 140)); + } } + + + return new SolidColorBrush(type.LiquidTypeColor); } return null; diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToShortNameConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToShortNameConverter.cs new file mode 100644 index 000000000..15041bf17 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Converters/LiquidTypeToShortNameConverter.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using Tango.BL.Entities; + +namespace Tango.PPC.Maintenance.Converters +{ + class LiquidTypeToShortNameConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is LiquidType) + { + LiquidType type = value as LiquidType; + switch (type.Type) + { + case BL.Enumerations.LiquidTypes.Cleaner: + return "CL"; + case BL.Enumerations.LiquidTypes.TransparentInk: + return "TI"; + case BL.Enumerations.LiquidTypes.Black: + return "K"; + } + return type.Name.First().ToString(); + } + else + { + return value; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj index 7e5c52725..70939e4ae 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Tango.PPC.Maintenance.csproj @@ -118,6 +118,7 @@ <Compile Include="Commands\ResetThreadLoadingCommand.cs" /> <Compile Include="Controls\StateTouchButton.cs" /> <Compile Include="Converters\LiquidTypeToBrushConverter.cs" /> + <Compile Include="Converters\LiquidTypeToShortNameConverter.cs" /> <Compile Include="Converters\MidTankLevelToElementHeightConverter.cs" /> <Compile Include="Converters\StringToFirstLetterConverter.cs" /> <Compile Include="Dialogs\HeadCleaningView.xaml.cs"> @@ -293,7 +294,7 @@ <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.Maintenance/ViewModels/MaintenanceViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs index f613d6f43..252c8aa2e 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/ViewModels/MaintenanceViewVM.cs @@ -111,8 +111,8 @@ namespace Tango.PPC.Maintenance.ViewModels { Max = MachineOperator.MAX_MIDTANK_LITERS, IDSPack = x, - }).ToList(); - + }).OrderBy(y=>y.IDSPack.LiquidType.Code).ToList(); + MachineProvider.MachineOperator.MachineStatusChanged += MachineOperator_MachineStatusChanged; } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml index 54515ae11..d51f0eb38 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Maintenance/Views/MaintenanceView.xaml @@ -18,6 +18,7 @@ <localConverters:StringToFirstLetterConverter x:Key="StringToFirstLetterConverter" /> <localConverters:MidTankLevelToElementHeightConverter x:Key="MidTankLevelToElementHeightConverter" /> <localConverters:LiquidTypeToBrushConverter x:Key="LiquidTypeToBrushConverter" /> + <localConverters:LiquidTypeToShortNameConverter x:Key="LiquidTypeToShortNameConverter"/> <Style TargetType="FrameworkElement" x:Key="Level1Container"> <Setter Property="Margin" Value="20 15 60 15"></Setter> @@ -31,8 +32,8 @@ <DataTemplate x:Key="LiquidBox"> <DockPanel> - <TextBlock DockPanel.Dock="Top" Text="{Binding IDSPack.LiquidType.Name,Converter={StaticResource StringToFirstLetterConverter}}" HorizontalAlignment="Center"></TextBlock> - <Grid MaxWidth="30" Margin="5 0"> + <TextBlock DockPanel.Dock="Top" Text="{Binding IDSPack.LiquidType,Converter={StaticResource LiquidTypeToShortNameConverter}}" HorizontalAlignment="Center"></TextBlock> + <Grid MaxWidth="20" Margin="1 0"> <touch:TouchIcon Icon="MapMarkerSolid" Width="20" Height="20" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 0 0 10" Foreground ="{Binding Path=IDSPack.LiquidType, Converter={StaticResource LiquidTypeToBrushConverter}}"> <touch:TouchIcon.Style> <Style TargetType="touch:TouchIcon"> @@ -114,13 +115,13 @@ <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="150*" /> - <ColumnDefinition Width="250*" /> - <ColumnDefinition Width="100*" /> + <ColumnDefinition Width="200*" /> + <ColumnDefinition Width="150*" /> <ColumnDefinition Width="100*" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="100" /> - <RowDefinition Height="25" /> + <RowDefinition Height="28" /> </Grid.RowDefinitions> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"> @@ -170,7 +171,7 @@ <TextBlock Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Temperature</TextBlock> <TextBlock Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Inks</TextBlock> - <TextBlock Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Cone</TextBlock> + <TextBlock Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Collecting Cone</TextBlock> </Grid> </StackPanel> </StackPanel> |
