aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModule.cs54
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj1
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs7
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml79
4 files changed, 96 insertions, 45 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModule.cs
index 1a405f861..6cdda4bc8 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModule.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/DeveloperModule.cs
@@ -12,41 +12,43 @@ using Tango.SharedUI.Helpers;
namespace Tango.MachineStudio.Developer
{
- public class DeveloperModule : IStudioModule
+ /// <summary>
+ /// Represents the Machine Studio developer module.
+ /// </summary>
+ /// <seealso cref="Tango.MachineStudio.Common.StudioModuleBase" />
+ public class DeveloperModule : StudioModuleBase
{
- private bool _isInitialized;
- private bool _isLoaded;
-
- public string Name => "Developer";
-
- public string Description => "Research and development, manage RML, STRIP and Process.";
-
- public BitmapSource Image => ResourceHelper.GetImageFromResources("Images/developer.jpg");
-
- public FrameworkElement MainView => new MainView();
+ /// <summary>
+ /// Gets the module name.
+ /// </summary>
+ public override string Name => "Developer";
- public bool IsInitialized => _isInitialized;
+ /// <summary>
+ /// Gets the module description.
+ /// </summary>
+ public override string Description => "Research and development, manage RML, STRIP and Process.";
/// <summary>
- /// Sets a value indicating whether this module is loaded.
+ /// Gets the module cover image.
/// </summary>
- public bool IsLoaded { get => _isLoaded; set => _isLoaded = value; }
+ public override BitmapSource Image => ResourceHelper.GetImageFromResources("Images/developer.jpg");
- public Permissions Permission => Permissions.RunDeveloperModule;
+ /// <summary>
+ /// Gets the module entry point view.
+ /// </summary>
+ public override FrameworkElement MainView => new MainView();
- public void Dispose()
- {
- throw new NotImplementedException();
- }
+ /// <summary>
+ /// Gets the permission required to see and load this module.
+ /// </summary>
+ public override Permissions Permission => Permissions.RunDeveloperModule;
- public void Initialize()
+ /// <summary>
+ /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
+ /// </summary>
+ public override void Dispose()
{
- if (!_isInitialized)
- {
- //Initialize..
-
- _isInitialized = true;
- }
+
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj
index 43ebc515d..f076106bc 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj
@@ -103,6 +103,7 @@
<Compile Include="Converters\JobProgressToPositionConverter.cs" />
<Compile Include="Converters\JobToColumnDefinitionsConverter.cs" />
<Compile Include="Converters\ObjectsNotEqualToBooleanConveter.cs" />
+ <Compile Include="Converters\OneToPercentConverter.cs" />
<Compile Include="Converters\SegmentLengthToWidthConverter.cs" />
<Compile Include="Converters\SegmentToBrushConverter.cs" />
<Compile Include="Converters\SegmentToBrushConverterMulti.cs" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
index f9ec5b063..148e4375c 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
@@ -460,11 +460,6 @@ namespace Tango.MachineStudio.Developer.ViewModels
public RelayCommand MediaTogglePlayPauseCommand { get; set; }
/// <summary>
- /// Gets or sets the media load file command.
- /// </summary>
- public RelayCommand MediaLoadFileCommand { get; set; }
-
- /// <summary>
/// Gets or sets the media play pause command.
/// </summary>
public RelayCommand MediaPlayPauseCommand { get; set; }
@@ -916,7 +911,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
private void UpdateEstimatedDuration()
{
- if (SelectedJob != null && SelectedProcessParametersTable != null)
+ if (SelectedJob != null && SelectedProcessParametersTable != null && SelectedProcessParametersTable.DyeingSpeed > 0)
{
EstimatedDuration = TimeSpan.FromSeconds(SelectedJob.Length / (SelectedProcessParametersTable.DyeingSpeed / 100d));
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
index cd5cdb8a2..844a38917 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml
@@ -7,8 +7,11 @@
xmlns:global="clr-namespace:Tango.MachineStudio.Developer"
xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:techViews="clr-namespace:Tango.MachineStudio.Technician.Views;assembly=Tango.MachineStudio.Technician"
xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
+ xmlns:printing="clr-namespace:Tango.Integration.Printing;assembly=Tango.Integration"
+ xmlns:dispensing="clr-namespace:Tango.Integration.Dispensing;assembly=Tango.Integration"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:db="clr-namespace:Tango.MachineStudio.DB.Views.DBViews;assembly=Tango.MachineStudio.DB"
xmlns:commonControls="clr-namespace:Tango.MachineStudio.Common.Controls;assembly=Tango.MachineStudio.Common"
@@ -57,6 +60,17 @@
<localConverters:BrushStopToOffsetValueConverter x:Key="BrushStopToOffsetValueConverter" />
<converters:StringEllipsisConverter x:Key="StringEllipsisConverter" />
<converters:NumberToFileSizeConverter x:Key="NumberToFileSizeConverter"/>
+ <localConverters:OneToPercentConverter x:Key="OneToPercentConverter"/>
+ <converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
+ <converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
+
+
+ <ObjectDataProvider x:Key="dispenserDivisions" MethodName="GetValues" ObjectType="{x:Type sys:Enum}">
+ <ObjectDataProvider.MethodParameters>
+ <x:Type TypeName="dispensing:DispenserStepDivisions"/>
+ </ObjectDataProvider.MethodParameters>
+ </ObjectDataProvider>
+
<SolidColorBrush x:Key="SideBarBackground" Color="White">
@@ -1180,7 +1194,7 @@
<Setter.Value>
<StackPanel Orientation="Horizontal">
<ContentControl Style="{StaticResource numberBorder}" Foreground="Cyan" Width="50" Height="50" Margin="10 0 0 0">
- <mahapps:NumericUpDown FontSize="14" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Cyan, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown FontSize="14" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Cyan,Converter={StaticResource OneToPercentConverter}, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
<mahapps:NumericUpDown.Resources>
<Style TargetType="TextBox"/>
</mahapps:NumericUpDown.Resources>
@@ -1188,7 +1202,7 @@
</ContentControl>
<ContentControl Style="{StaticResource numberBorder}" Foreground="Magenta" Width="50" Height="50" Margin="10 0 0 0">
- <mahapps:NumericUpDown FontSize="14" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Magenta, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown FontSize="14" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Magenta,Converter={StaticResource OneToPercentConverter}, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
<mahapps:NumericUpDown.Resources>
<Style TargetType="TextBox"/>
</mahapps:NumericUpDown.Resources>
@@ -1196,7 +1210,7 @@
</ContentControl>
<ContentControl Style="{StaticResource numberBorder}" Foreground="Yellow" Width="50" Height="50" Margin="10 0 0 0">
- <mahapps:NumericUpDown FontSize="14" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Yellow, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown FontSize="14" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Yellow,Converter={StaticResource OneToPercentConverter}, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
<mahapps:NumericUpDown.Resources>
<Style TargetType="TextBox"/>
</mahapps:NumericUpDown.Resources>
@@ -1204,7 +1218,7 @@
</ContentControl>
<ContentControl Style="{StaticResource numberBorder}" Foreground="Black" Width="50" Height="50" Margin="10 0 0 0">
- <mahapps:NumericUpDown FontSize="14" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Black, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
+ <mahapps:NumericUpDown FontSize="14" FontFamily="{StaticResource digital-7}" HorizontalAlignment="Center" Value="{Binding Black,Converter={StaticResource OneToPercentConverter}, Mode=TwoWay}" Background="Transparent" Width="40" StringFormat="0" HideUpDownButtons="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Center">
<mahapps:NumericUpDown.Resources>
<Style TargetType="TextBox"/>
</mahapps:NumericUpDown.Resources>
@@ -1344,7 +1358,13 @@
</Style>
</Grid.Style>
<Grid>
- <DataGrid ItemsSource="{Binding LiquidVolumes}" AutoGenerateColumns="False" Background="Transparent">
+ <DataGrid ItemsSource="{Binding LiquidVolumes}" AutoGenerateColumns="False" Background="Transparent" SelectionUnit="FullRow">
+ <DataGrid.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+ </Style>
+ </DataGrid.CellStyle>
<DataGrid.Columns>
<DataGridTemplateColumn Header="IDS PACK">
<DataGridTemplateColumn.CellTemplate>
@@ -1360,7 +1380,7 @@
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
- <DataGridTemplateColumn Header="DISPENSER NL / PULSE">
+ <DataGridTemplateColumn Header="D/F">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock VerticalAlignment="Center">
@@ -1370,7 +1390,25 @@
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
- <DataGridTemplateColumn Header="LIQUID MAX NL / CM">
+ <DataGridTemplateColumn Header="STEP">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <ComboBox ItemsSource="{Binding Source={StaticResource dispenserDivisions}}" SelectedItem="{Binding DispenserStepDivision,UpdateSourceTrigger=PropertyChanged}">
+ <ComboBox.ItemContainerStyle>
+ <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}">
+ <Setter Property="Background" Value="#ECECEC"></Setter>
+ </Style>
+ </ComboBox.ItemContainerStyle>
+ <ComboBox.ItemTemplate>
+ <DataTemplate>
+ <TextBlock Text="{Binding Converter={StaticResource EnumToDescriptionConverter}}"></TextBlock>
+ </DataTemplate>
+ </ComboBox.ItemTemplate>
+ </ComboBox>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
+ <DataGridTemplateColumn Header="MAX NL / CM">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock VerticalAlignment="Center">
@@ -1422,10 +1460,25 @@
<DataGridTemplateColumn Header="PULSE / SEC">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
- <TextBlock VerticalAlignment="Center">
- <Run Text="{Binding PulsePerSecond,Mode=OneWay,StringFormat='0.0'}"></Run>
- <Run Text="(pulse)" FontSize="9" Foreground="Gray"></Run>
- </TextBlock>
+ <Label VerticalAlignment="Center">
+ <Label.Style>
+ <Style TargetType="Label">
+ <Setter Property="Content">
+ <Setter.Value>
+ <TextBlock>
+ <Run Text="{Binding PulsePerSecond,Mode=OneWay,StringFormat='0.0'}"></Run>
+ <Run Text="(pulse)" FontSize="9" Foreground="Gray"></Run>
+ </TextBlock>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding DispenserStepDivision}" Value="{x:Static dispensing:DispenserStepDivisions.Auto}">
+ <Setter Property="Content" Value="Auto"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Label.Style>
+ </Label>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
@@ -1960,7 +2013,7 @@
</Grid>
<!--MONITORING-->
- <Grid Grid.ColumnSpan="3" Background="White" Visibility="Visible">
+ <!--<Grid Grid.ColumnSpan="3" Background="White" Visibility="Visible">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="RenderTransform">
@@ -1990,7 +2043,7 @@
</Grid.Style>
<techViews:MachineTechView DataContext="{Binding MachineTechViewVM}" />
- </Grid>
+ </Grid>-->
</Grid>
</Grid>
</Grid>