diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-26 14:08:27 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-26 14:08:27 +0300 |
| commit | e2ae3a8f203d149094aa48ef576f7f0bc241fc8e (patch) | |
| tree | 62a143d4878277151d3fb2e78bcdca3dcbee6ea9 /Software | |
| parent | d5a855a3980a835460befab0acc36caa7f0230b7 (diff) | |
| download | Tango-e2ae3a8f203d149094aa48ef576f7f0bc241fc8e.tar.gz Tango-e2ae3a8f203d149094aa48ef576f7f0bc241fc8e.zip | |
Fixed several bugs with machine studio.
Diffstat (limited to 'Software')
15 files changed, 30 insertions, 15 deletions
diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf Binary files differindex 7aede2f90..a24bede42 100644 --- a/Software/DB/Tango.mdf +++ b/Software/DB/Tango.mdf diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf Binary files differindex 16e9ae4a6..e61761279 100644 --- a/Software/DB/Tango_log.ldf +++ b/Software/DB/Tango_log.ldf diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml index 4d1cc08e4..8e064e30c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml @@ -33,12 +33,12 @@ <controls:RealTimeGraphMultiControl x:Name="InnerGraph" UseAutoRange="{Binding UseAutoRange}" IsHitTestVisible="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable,Converter={StaticResource BooleanInverseConverter}}" x:FieldModifier="public" EnableToolBar="False" SensorName="{Binding TechMonitor.Description}" SensorUnits="{Binding TechMonitor.Units}"> <controls:RealTimeGraphMultiControl.Style> <Style TargetType="controls:RealTimeGraphMultiControl"> - <Setter Property="Minimum" Value="{Binding TechMonitor.Min}"></Setter> - <Setter Property="Maximum" Value="{Binding TechMonitor.Max}"></Setter> + <Setter Property="Minimum" Value="{Binding TechMonitor.Min,Mode=TwoWay}"></Setter> + <Setter Property="Maximum" Value="{Binding TechMonitor.Max,Mode=TwoWay}"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding UseMinMax}" Value="True"> - <Setter Property="Minimum" Value="{Binding Min}"></Setter> - <Setter Property="Maximum" Value="{Binding Max}"></Setter> + <Setter Property="Minimum" Value="{Binding Min,Mode=TwoWay}"></Setter> + <Setter Property="Maximum" Value="{Binding Max,Mode=TwoWay}"></Setter> </DataTrigger> </Style.Triggers> </Style> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml index 4d80478c5..89da5be7c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml @@ -33,12 +33,12 @@ <controls:RealTimeGraphControl x:Name="InnerGraph" UseAutoRange="{Binding UseAutoRange}" IsHitTestVisible="{Binding RelativeSource={RelativeSource AncestorType=local:ElementsEditor},Path=IsEditable,Converter={StaticResource BooleanInverseConverter}}" x:FieldModifier="public" EnableToolBar="False" SensorName="{Binding TechMonitor.Description}" Color="{Binding Color,Mode=OneWay}" SensorUnits="{Binding TechMonitor.Units}"> <controls:RealTimeGraphControl.Style> <Style TargetType="controls:RealTimeGraphControl"> - <Setter Property="Minimum" Value="{Binding TechMonitor.Min}"></Setter> - <Setter Property="Maximum" Value="{Binding TechMonitor.Max}"></Setter> + <Setter Property="Minimum" Value="{Binding TechMonitor.Min,Mode=TwoWay}"></Setter> + <Setter Property="Maximum" Value="{Binding TechMonitor.Max,Mode=TwoWay}"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding UseMinMax}" Value="True"> - <Setter Property="Minimum" Value="{Binding Min}"></Setter> - <Setter Property="Maximum" Value="{Binding Max}"></Setter> + <Setter Property="Minimum" Value="{Binding Min,Mode=TwoWay}"></Setter> + <Setter Property="Maximum" Value="{Binding Max,Mode=TwoWay}"></Setter> </DataTrigger> </Style.Triggers> </Style> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml index 464c12bfd..da5818a6b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/MultiGraphTemplate.xaml @@ -37,11 +37,11 @@ <UniformGrid Columns="2" Margin="0 5 0 0" IsEnabled="{Binding UseMinMax}"> <StackPanel Margin="0 0 5 0"> <TextBlock>Minimum</TextBlock> - <mahapps:NumericUpDown HasDecimals="True" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="-1000000" Maximum="1000000" Value="{Binding Min}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown HasDecimals="True" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="-1000000" Maximum="1000000" Value="{Binding Min,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> <StackPanel Margin="5 0 0 0"> <TextBlock>Maximum</TextBlock> - <mahapps:NumericUpDown HasDecimals="True" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="{Binding Min}" Maximum="1000000" Value="{Binding Max}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown HasDecimals="True" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="{Binding Min}" Maximum="1000000" Value="{Binding Max,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </UniformGrid> <CheckBox Margin="0 10 0 0" IsChecked="{Binding UseMinMax,Converter={StaticResource BooleanInverseConverter}}">Use default ranges</CheckBox> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml index bb0db666c..d7e40f2e0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/PropertiesTemplates/SingleGraphTemplate.xaml @@ -37,11 +37,11 @@ <UniformGrid Columns="2" Margin="0 5 0 0" IsEnabled="{Binding UseMinMax}"> <StackPanel Margin="0 0 5 0"> <TextBlock>Minimum</TextBlock> - <mahapps:NumericUpDown HasDecimals="True" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="-1000000" Maximum="1000000" Value="{Binding Min}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown HasDecimals="True" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="-1000000" Maximum="1000000" Value="{Binding Min,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> <StackPanel Margin="5 0 0 0"> <TextBlock>Maximum</TextBlock> - <mahapps:NumericUpDown HasDecimals="True" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="{Binding Min}" Maximum="1000000" Value="{Binding Max}"></mahapps:NumericUpDown> + <mahapps:NumericUpDown HasDecimals="True" HorizontalContentAlignment="Center" BorderBrush="Gainsboro" Foreground="Gray" Margin="0 5 0 0" Minimum="{Binding Min}" Maximum="1000000" Value="{Binding Max,Mode=TwoWay}"></mahapps:NumericUpDown> </StackPanel> </UniformGrid> <CheckBox Margin="0 10 0 0" IsChecked="{Binding UseMinMax,Converter={StaticResource BooleanInverseConverter}}">Use default ranges</CheckBox> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs index 072720c4b..52925ee59 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs @@ -96,6 +96,7 @@ namespace Tango.MachineStudio.Technician.TechItems /// <summary> /// Gets or sets a value indicating whether this instance is paused. /// </summary> + [XmlIgnore] public bool IsPaused { get { return _isPaused; } @@ -110,6 +111,7 @@ namespace Tango.MachineStudio.Technician.TechItems } } + [XmlIgnore] public RelayCommand ClearCommand { get; set; } /// <summary> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs index 8a88aad7a..f2bad5349 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs @@ -96,6 +96,7 @@ namespace Tango.MachineStudio.Technician.TechItems /// <summary> /// Gets or sets a value indicating whether this instance is paused. /// </summary> + [XmlIgnore] public bool IsPaused { get { return _isPaused; } @@ -110,6 +111,7 @@ namespace Tango.MachineStudio.Technician.TechItems } } + [XmlIgnore] public RelayCommand ClearCommand { get; set; } /// <summary> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs index 7c2acfdbb..54a790cbe 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs @@ -1221,6 +1221,7 @@ namespace Tango.MachineStudio.Technician.ViewModels } catch (Exception ex) { + item.IsJobStarted = false; _notification.ShowError(ex.Message); } }; diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml index f12a433df..33755f909 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml @@ -63,7 +63,7 @@ </StackPanel> </Border> <Border Grid.Column="1" BorderThickness="1" BorderBrush="{StaticResource borderBrush}" Background="{DynamicResource graphBackground}" Margin="5 0 0 0"> - <graphEx:RealTimeGraphExLineErase x:Name="Graph" x:FieldModifier="public" UseAutoRange="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=UseAutoRange}" Controller="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Controller}" Antialiased="True" RefreshRate="30" MarkerColor="{StaticResource graphsMarkerColor}" FillGraph="False" Stroke="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Color}" Minimum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Minimum}" Maximum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Maximum}"> + <graphEx:RealTimeGraphExLineErase x:Name="Graph" x:FieldModifier="public" UseAutoRange="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=UseAutoRange}" Controller="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Controller}" Antialiased="True" RefreshRate="30" MarkerColor="{StaticResource graphsMarkerColor}" FillGraph="False" Stroke="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Color}" Minimum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Minimum,Mode=TwoWay}" Maximum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Maximum,Mode=TwoWay}"> <graphEx:RealTimeGraphExLineErase.Components> <components:MouseValueToolTip ToolTipTemplate="{StaticResource graphTooltipTemplate}" /> <components:GridLines Rows="4" Columns="6" GridBrush="{DynamicResource graphGridLinesBrush}"></components:GridLines> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml index 1e1a5b123..45b4aa9fb 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphMultiControl.xaml @@ -63,7 +63,7 @@ </StackPanel> </Border> <Border Grid.Column="1" BorderThickness="1" BorderBrush="{StaticResource borderBrush}" Background="{DynamicResource graphBackground}" Margin="5 0 0 0"> - <graphEx:RealTimeGraphExMultiLineErase x:Name="Graph" x:FieldModifier="public" UseAutoRange="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=UseAutoRange}" Controller="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Controller}" Antialiased="True" RefreshRate="30" MarkerColor="{StaticResource graphsMarkerColor}" FillGraph="False" Minimum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Minimum}" Maximum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Maximum}" Stroke="DodgerBlue"> + <graphEx:RealTimeGraphExMultiLineErase x:Name="Graph" x:FieldModifier="public" UseAutoRange="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=UseAutoRange}" Controller="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Controller}" Antialiased="True" RefreshRate="30" MarkerColor="{StaticResource graphsMarkerColor}" FillGraph="False" Minimum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Minimum,Mode=TwoWay}" Maximum="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=Maximum,Mode=TwoWay}" Stroke="DodgerBlue"> <graphEx:RealTimeGraphExMultiLineErase.Components> <components:MouseValueToolTip ToolTipTemplate="{StaticResource graphTooltipTemplate}" /> <components:GridLines Rows="4" Columns="6" GridBrush="{DynamicResource graphGridLinesBrush}"></components:GridLines> diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs index d33b12a17..debeccded 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs @@ -135,7 +135,7 @@ namespace Tango.MachineStudio.UI.StudioApplication { get { - return AssemblyHelper.GetCurrentAssemblyVersion().ToString(3); + return AssemblyHelper.GetCurrentAssemblyVersion().ToString(4); } } diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs index bb94c9bc2..c5a4dc4e8 100644 --- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs +++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Job.cs @@ -424,6 +424,10 @@ namespace Tango.BL.Entities /// <returns></returns> public TimeSpan GetEstimatedDuration(ProcessParametersTable processParameters) { + if (processParameters.DyeingSpeed == 0) + { + throw new ArgumentException("Process parameters dying speed cannot be zero."); + } return TimeSpan.FromSeconds((LengthIncludingNumberOfUnits + processParameters.DryerBufferLength) / (processParameters.DyeingSpeed / 100d)); } diff --git a/Software/Visual_Studio/Tango.BL/ObservableEntity.cs b/Software/Visual_Studio/Tango.BL/ObservableEntity.cs index 1919bd9ed..4f002c073 100644 --- a/Software/Visual_Studio/Tango.BL/ObservableEntity.cs +++ b/Software/Visual_Studio/Tango.BL/ObservableEntity.cs @@ -380,6 +380,7 @@ Maybe you have deleted an entity that was no yet inserted into database?", LogCa private bool _validateOnPropertyChanged; [NotMapped] [ParameterIgnore] + [XmlIgnore] public bool ValidateOnPropertyChanged { get { return _validateOnPropertyChanged; } @@ -402,6 +403,7 @@ Maybe you have deleted an entity that was no yet inserted into database?", LogCa /// </summary> [NotMapped] [ParameterIgnore] + [XmlIgnore] public bool HasErrors { get { return _hasErrors; } @@ -414,6 +416,7 @@ Maybe you have deleted an entity that was no yet inserted into database?", LogCa /// </summary> [NotMapped] [ParameterIgnore] + [XmlIgnore] public ObservableCollection<String> ValidationErrors { get { return _validationErrors; } diff --git a/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Program.cs b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Program.cs index 274a3a95e..43eee95a0 100644 --- a/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Program.cs +++ b/Software/Visual_Studio/Utilities/Tango.PortsListGenerator/Program.cs @@ -42,6 +42,8 @@ namespace Tango.PortsListGenerator db.Database.ExecuteSqlCommand("DELETE FROM TECH_IOS"); } + int port = 0; + using (ObservablesContext db = ObservablesContext.CreateDefault()) { foreach (var item in results) @@ -50,6 +52,7 @@ namespace Tango.PortsListGenerator db.TechIos.Add(new BL.Entities.TechIo() { + Port = port++, Designator = item.Designator, Asm = item.Asm, InterfaceName = item.InterfaceName, |
