aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2019-11-14 11:38:18 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2019-11-14 11:38:18 +0200
commitebcd646d565cc251d808048fc7ffa2bacbeaeca2 (patch)
tree271bbe112725a35d67ebac6845cfd79ff1d13fd8 /Software/Visual_Studio
parent07083f3615d3c0d8badcf9e41ef740afc5e9442e (diff)
downloadTango-ebcd646d565cc251d808048fc7ffa2bacbeaeca2.tar.gz
Tango-ebcd646d565cc251d808048fc7ffa2bacbeaeca2.zip
Changed color of text and format in InsufficientLiquidQuantityException dialog
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/InsufficientLiquidQuantityView.xaml33
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/InsufficientLiquidQuantityException.cs8
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs11
3 files changed, 36 insertions, 16 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/InsufficientLiquidQuantityView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/InsufficientLiquidQuantityView.xaml
index fa85ea598..c0cb963e7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/InsufficientLiquidQuantityView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/InsufficientLiquidQuantityView.xaml
@@ -25,7 +25,7 @@
<Button HorizontalAlignment="Right" DockPanel.Dock="Bottom" Height="40" Width="140" Command="{Binding CloseCommand}" Margin="10 0 0 0">CLOSE</Button>
</Grid>
- <Border Margin="0 20 0 0" BorderThickness="1" BorderBrush="{StaticResource BorderBrushGainsboro}" CornerRadius="3">
+ <Border Margin="0 20 0 0" Padding="10" BorderThickness="1" BorderBrush="{StaticResource BorderBrushGainsboro}" CornerRadius="3">
<ItemsControl ItemsSource="{Binding Exception.IdsPackLevels}" VerticalAlignment="Top">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
@@ -34,7 +34,7 @@
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
- <Grid Margin="15 2">
+ <Grid Margin="0 0 0 4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40" />
<ColumnDefinition Width="160" />
@@ -43,7 +43,7 @@
<material:PackIcon VerticalAlignment="Center" Width="24" Height="24">
<material:PackIcon.Style>
<Style TargetType="material:PackIcon">
- <Setter Property="Kind" Value="CheckCircle"></Setter>
+ <Setter Property="Kind" Value="Check"></Setter>
<Setter Property="Foreground" Value="{StaticResource GreenBrush100}"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsValid}" Value="False">
@@ -54,12 +54,19 @@
<Setter Property="Kind" Value="AlertOctagon"></Setter>
<Setter Property="Foreground" Value="{StaticResource RedBrush100}"></Setter>
</DataTrigger>
+ <MultiDataTrigger>
+ <MultiDataTrigger.Conditions>
+ <Condition Binding="{Binding IsValid}" Value="True" />
+ <Condition Binding="{Binding IsOverMax}" Value="False" />
+ </MultiDataTrigger.Conditions>
+ <Setter Property="Kind" Value="Check"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource GreenBrush100}"></Setter>
+ </MultiDataTrigger>
</Style.Triggers>
- </Style>
+ </Style>
</material:PackIcon.Style>
-
</material:PackIcon>
- <material:PackIcon Kind="AlertOctagon" VerticalAlignment="Center" Width="24" Height="24" Visibility="{Binding IsValid,Converter={StaticResource BoolToVisConverter}}" />
+ <!--<material:PackIcon Kind="AlertOctagon" VerticalAlignment="Center" Width="24" Height="24" Visibility="{Binding IsValid,Converter={StaticResource BoolToVisConverter}}" />-->
<Border Grid.Column="1" Margin="5 0 0 0" Height="45" Width="150" CornerRadius="3" BorderThickness="1" BorderBrush="{StaticResource BorderBrushGainsboro}">
<Grid>
@@ -97,14 +104,16 @@
</Rectangle.Style>
</Rectangle>
- <TextBlock Foreground="White" HorizontalAlignment="Center" Text="{Binding IdsPack.LiquidType.Name}" VerticalAlignment="Center">
- <TextBlock.Effect>
- <DropShadowEffect ShadowDepth="0" BlurRadius="5" Color="Black" />
- </TextBlock.Effect>
- </TextBlock>
+
+ <TextBlock Foreground="#3B3B3B" HorizontalAlignment="Center" Text="{Binding IdsPack.LiquidType.Name}" VerticalAlignment="Center">
+ <TextBlock.Effect>
+ <DropShadowEffect ShadowDepth="1" BlurRadius="1" Color="White" />
+ </TextBlock.Effect>
+ </TextBlock>
+
</Grid>
</Border>
- <TextBlock Grid.Column="2" HorizontalAlignment="Left" Text="{Binding Message}" VerticalAlignment="Center" Margin="20,0,0,0"></TextBlock>
+ <TextBlock Grid.Column="2" HorizontalAlignment="Left" Text="{Binding Message}" VerticalAlignment="Center" Margin="20,0,0,0" TextWrapping="Wrap" Foreground="{StaticResource RedBrush100}"></TextBlock>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/InsufficientLiquidQuantityException.cs b/Software/Visual_Studio/Tango.Integration/Operation/InsufficientLiquidQuantityException.cs
index 3e4758c58..797d4f498 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/InsufficientLiquidQuantityException.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/InsufficientLiquidQuantityException.cs
@@ -27,6 +27,12 @@ namespace Tango.Integration.Operation
}
public String Message { get; set; }
+ public IDSPackLevel()
+ {
+ Maximum = 130000000;
+ Required = 0;
+ Current = 0;
+ }
}
public InsufficientLiquidQuantityException(String message) : base(message)
@@ -35,5 +41,7 @@ namespace Tango.Integration.Operation
}
public List<IDSPackLevel> IdsPackLevels { get; internal set; }
+
+
}
}
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index ebbf520c3..9a5c7ff9b 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -40,6 +40,7 @@ using Tango.Integration.Emergency;
using Tango.PMR.MachineStatus;
using Newtonsoft.Json;
using Tango.PMR.Integration;
+using System.Globalization;
namespace Tango.Integration.Operation
{
@@ -1484,12 +1485,13 @@ namespace Tango.Integration.Operation
if (idsLevel.Required > idsLevel.Current)
{
shouldThrow = true;
-
- idsLevel.Message = $"Missing {idsLevel.Required - idsLevel.Current} nanoliters to complete the job.";
+ string display_value = (((double)(idsLevel.Required - idsLevel.Current)/ 1000000000)).ToString("N2", CultureInfo.InvariantCulture);
+ idsLevel.Message = $"Missing {display_value} liters to complete the job.";
if (idsLevel.Required > idsLevel.Maximum)
{
- idsLevel.Message = $"Required ink exceeds the maximum capacity of the dispenser by {idsLevel.Required - idsLevel.Maximum} nanoliters. Please reduce the segment length.";
+ display_value = (((double)(idsLevel.Required - idsLevel.Maximum))/ 1000000000).ToString("N2", CultureInfo.InvariantCulture);
+ idsLevel.Message = $"Required ink exceeds the maximum capacity of the dispenser by {display_value} liters. Please reduce the segment length.";
}
}
@@ -1569,7 +1571,8 @@ namespace Tango.Integration.Operation
{
IdsPack = idsPack,
Current = packLevel.DispenserLevel,
- Required = (int)liquidQuantities[index]
+ Required = (int)liquidQuantities[index],
+ Maximum = MAX_DISPENSER_NANOLITER,
};
if (liquidQuantities[index] > packLevel.DispenserLevel)