aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy@twine-s.com>2020-12-30 15:11:34 +0000
committerRoy Ben Shabat <Roy@twine-s.com>2020-12-30 15:11:34 +0000
commitd33c19b3ac6803de4b5c8d475832efef131c1a45 (patch)
treeea725abc39def99a755b041c13cba1fe0d594ddc /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views
parent1bdcaa9f51303bbff682507f31fb3b4414692ca4 (diff)
downloadTango-d33c19b3ac6803de4b5c8d475832efef131c1a45.tar.gz
Tango-d33c19b3ac6803de4b5c8d475832efef131c1a45.zip
Revert "Hope it is fine"
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml213
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml.cs42
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/HeadCleaningParametersView.xaml59
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/HeadCleaningParametersView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlDeleteDialogView.xaml82
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlDeleteDialogView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml47
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml8
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/SpoolsView.xaml85
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/SpoolsView.xaml.cs28
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml121
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml.cs28
14 files changed, 762 insertions, 13 deletions
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
new file mode 100644
index 000000000..116500f80
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml
@@ -0,0 +1,213 @@
+<UserControl x:Class="Tango.MachineStudio.RML.Views.ColorCalibrationView"
+ 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:vm="clr-namespace:Tango.MachineStudio.RML.ViewModels"
+ xmlns:global="clr-namespace:Tango.MachineStudio.RML"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:oxy="http://oxyplot.org/wpf"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ mc:Ignorable="d"
+ d:DesignHeight="450" d:DesignWidth="1200" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+
+ <UserControl.Resources>
+ <converters:EmptyStringToNullConverter x:Key="EmptyStringToNullConverter" />
+ <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
+ <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter"/>
+ </UserControl.Resources>
+
+ <Grid>
+ <DockPanel>
+ <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Margin="20 10">
+ <TextBlock FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Center">Liquid Type:</TextBlock>
+ <ComboBox Margin="40 0 0 0" MinWidth="180" HorizontalAlignment="Left" ItemsSource="{Binding LiquidTypes}"
+ SelectedItem="{Binding LiquidType}" DisplayMemberPath="Name"
+ Style="{StaticResource TransparentComboBoxStyle}" FontSize="16"></ComboBox>
+ </StackPanel>
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1.1*"/>
+ <ColumnDefinition Width="*"/>
+ </Grid.ColumnDefinitions>
+ <DockPanel Grid.Column="0">
+ <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0 0 0 " Padding="5" CornerRadius="5" Height="40" VerticalAlignment="Top">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 4 0 0" FontSize="16" Padding="0">LIQUID FACTOR</TextBlock>
+ </Grid>
+ </Border>
+ <Grid Margin="10 20 0 10">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1*"/>
+ <ColumnDefinition Width="1*"/>
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="1*"/>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+
+
+ <Grid HorizontalAlignment="Left" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Margin="20 0 10 0">
+ <StackPanel Orientation="Vertical">
+ <Button HorizontalAlignment="Left" Padding="6" Width="120" Background="{StaticResource TransparentBackgroundBrush200}" Command="{Binding ImportDataCommand}" ToolTip="Import data to calculate Liquid factor." Margin="0 0 10 4" BorderBrush="{StaticResource TransparentBackgroundBrush200}">
+ <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">IMPORT DATA</TextBlock>
+ </Button>
+ <DataGrid HorizontalAlignment="Left" VerticalScrollBarVisibility ="Auto" MaxHeight="280" SelectionUnit="FullRow" BorderBrush="{StaticResource DarkGrayBrush }" BorderThickness="1" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="True" CanUserDeleteRows="False" ItemsSource="{Binding Measurements}" Margin="0 0 0 50">
+ <DataGrid.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
+ </Style>
+ </DataGrid.CellStyle>
+ <DataGrid.Resources>
+ <Style x:Key="CellNumericUpDown" TargetType="{x:Type mahapps:NumericUpDown}" BasedOn="{StaticResource {x:Type mahapps:NumericUpDown}}">
+ <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/>
+ <Setter Property="HorizontalContentAlignment" Value="Left"/>
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="Focusable" Value="false"/>
+ <Setter Property="IsHitTestVisible" Value="false"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="FrameworkElement.VerticalAlignment" Value="Top"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="FrameworkElement.MinHeight" Value="0"/>
+ <Setter Property="HideUpDownButtons" Value="true"/>
+ </Style>
+ <Style x:Key="EditableCellNumericUpDown" TargetType="{x:Type mahapps:NumericUpDown}" BasedOn="{StaticResource {x:Type mahapps:NumericUpDown}}">
+ <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/>
+ <Setter Property="HorizontalContentAlignment" Value="Left"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
+ <Setter Property="FrameworkElement.VerticalAlignment" Value="Top"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="FrameworkElement.MinHeight" Value="0"/>
+ </Style>
+ </DataGrid.Resources>
+ <DataGrid.Columns>
+ <mahapps:DataGridNumericUpDownColumn Header="Ink nl/cm" Minimum="0" Maximum="100000" Binding="{Binding Ink}" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource CellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}" />
+ <mahapps:DataGridNumericUpDownColumn Header="L" Minimum="0" Maximum="100" Binding="{Binding L}" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource CellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}"/>
+ <mahapps:DataGridNumericUpDownColumn Header="A" Minimum="-128" Maximum="127" Binding="{Binding A}" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource CellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}" />
+ <mahapps:DataGridNumericUpDownColumn Header="B" Minimum="-128" Maximum="127" Binding="{Binding B}" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource CellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}" />
+ </DataGrid.Columns>
+ </DataGrid>
+
+ </StackPanel>
+ </Grid>
+
+ <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" Grid.Row="0" Margin="10 0 0 0">
+ <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0" BorderBrush="{StaticResource DarkGrayBrush}" CornerRadius="5">
+ <oxy:Plot Title="{Binding LiquidTypeName}" TitleFontSize="14" x:Name="CalibrationPlot" Margin="0 0 10 0" Background="Transparent" >
+ <oxy:Plot.Series >
+ <oxy:LineSeries ItemsSource="{Binding Points}" Color="#73B6EC" MarkerFill="SteelBlue" MarkerType="Circle" />
+ <oxy:LineSeries ItemsSource="{Binding TargetPoints}" Color="#E14141" />
+ </oxy:Plot.Series>
+ <oxy:Plot.Axes>
+ <oxy:LinearAxis Position="Bottom" Title = "nl/cm" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" />
+ <oxy:LinearAxis Position="Left" Title = "Lab" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="{Binding From}" Maximum="{Binding To}" />
+ </oxy:Plot.Axes>
+ </oxy:Plot>
+ </Border>
+ </Grid>
+
+ <Border Grid.Row="1" Grid.ColumnSpan="2" BorderBrush="{StaticResource BlueBrush100}" BorderThickness="0" CornerRadius="5" Margin="20 0 20 0">
+ <StackPanel Orientation="Vertical" Grid.Row="0" Margin="2 5 0 0">
+ <Border BorderThickness="0.5" CornerRadius="4" BorderBrush="{StaticResource DarkGrayBrush}" Visibility="{Binding HasError, Converter={StaticResource BooleanToVisibilityInverseConverter}}" Height="Auto" Margin="0 6 0 0">
+ <TextBlock FontSize="16" Foreground="{StaticResource MainWindow.Foreground}" FontWeight="SemiBold" Visibility="{Binding HasError, Converter={StaticResource BooleanToVisibilityInverseConverter}}" Margin="10" >
+ <Run FontSize="16"> Factor: </Run>
+ <Run Text="{Binding Factor,StringFormat='#.0000'}" Foreground="{StaticResource BlueBrush100}"></Run>
+ </TextBlock>
+ </Border>
+
+ <Border BorderThickness="0.5" CornerRadius="4" BorderBrush="{StaticResource DarkGrayBrush}" Visibility="{Binding HasError, Converter={StaticResource BooleanToVisibilityConverter}}" Height="Auto" Margin="0 6 0 0">
+ <TextBlock FontSize="16" Foreground="{StaticResource MainWindow.Foreground}" FontWeight="SemiBold" Visibility="{Binding HasError, Converter={StaticResource BooleanToVisibilityConverter}}" Margin="10" >
+ <Run FontSize="14"> Warning: </Run>
+ <Run Foreground="{StaticResource RedBrush300}" Text="{Binding ErrorMessage}" ></Run>
+ </TextBlock>
+ </Border>
+ </StackPanel>
+ </Border>
+ <Button Grid.Row="2" Grid.Column="1" Margin="0 20 20 0" VerticalAlignment="Bottom" HorizontalAlignment="Right" Background="{StaticResource TransparentBackgroundBrush200}" MinWidth="160" BorderBrush="{StaticResource TransparentBackgroundBrush200}" Command="{Binding CreateGraphCommand}" >
+ <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">GET LIQUID FACTOR</TextBlock>
+ </Button>
+ </Grid>
+ </DockPanel>
+ <DockPanel Grid.Column="1">
+ <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0 0 0 " Padding="5" CornerRadius="5" Height="40" VerticalAlignment="Top">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 4 0 0" FontSize="16" Padding="0">LINEARIZATION</TextBlock>
+ </Grid>
+ </Border>
+ <Grid Margin="10 20 20 10">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="1*"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <Grid Grid.Column="0" Margin="10 0 0 0">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="1*"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="0" Margin="0 0 0 0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="1*"></ColumnDefinition>
+ <ColumnDefinition Width="1*"></ColumnDefinition>
+ </Grid.ColumnDefinitions>
+
+ <Border Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0" BorderBrush="{StaticResource DarkGrayBrush}" CornerRadius="5">
+ <oxy:Plot Title="{Binding LiquidTypeName}" TitleFontSize="14" x:Name="LABLinearizationPlot" Margin="0 0 10 0" Background="Transparent" LegendPlacement="Inside" LegendPosition="TopRight" LegendOrientation="Vertical" LegendFontSize="9" LegendItemAlignment="Left" LegendLineSpacing="3" Foreground="{StaticResource Dialog.Foreground}">
+ <oxy:Plot.Series >
+ <oxy:LineSeries ItemsSource="{Binding LPoints}" Color="LawnGreen" Title="L" StrokeThickness="1.5"/>
+ <oxy:LineSeries ItemsSource="{Binding APoints}" Color="#E14141" Title="A" StrokeThickness="1.5"/>
+ <oxy:LineSeries ItemsSource="{Binding BPoints}" Color="#73B6EC" Title="B" StrokeThickness="1.5"/>
+ </oxy:Plot.Series>
+ <oxy:Plot.Axes>
+ <oxy:LinearAxis Position="Bottom" Title = "Ink%" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" AxisTitleDistance ="12" Minimum="0" Maximum="100" />
+ <oxy:LinearAxis Position="Left" Title = "LAB" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="{Binding LabMinVal}" Maximum="{Binding LabMaxVal}" MinorStep="10" />
+ </oxy:Plot.Axes>
+ </oxy:Plot>
+ </Border>
+
+ <Border Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0" BorderThickness="0" BorderBrush="{StaticResource DarkGrayBrush}" CornerRadius="5" >
+ <oxy:Plot Title="{Binding LiquidTypeName}" TitleFontSize="14" x:Name="LinearizationPlot" Margin="0 0 0 0" Background="Transparent" LegendPlacement="Inside" LegendPosition="RightTop" LegendOrientation="Vertical" >
+ <oxy:Plot.Series >
+ <oxy:LineSeries ItemsSource="{Binding LinearizationPoints}" Color="#73B6EC" MarkerFill="SteelBlue" MarkerType="Circle"/>
+ </oxy:Plot.Series>
+ <oxy:Plot.Axes>
+ <oxy:LinearAxis Position="Bottom" Title = "In Ink" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="0" Maximum="100"/>
+ <oxy:LinearAxis Position="Left" Title = "Out Ink" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="0" Maximum="100"/>
+ </oxy:Plot.Axes>
+ </oxy:Plot>
+ </Border>
+ </Grid>
+ <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0 20 10 0" HorizontalAlignment="Right">
+ <Button Background="{StaticResource TransparentBackgroundBrush200}" BorderBrush="{StaticResource TransparentBackgroundBrush200}" Padding="6" MinWidth="130" Command="{Binding ApplyCalibrationDataCommand}" ToolTip="Apply the calibration data to the current RML calibration tables.">
+ <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">APPLY TO RML</TextBlock>
+ </Button>
+ <Button Margin="20 0 0 0" Background="{StaticResource TransparentBackgroundBrush200}" BorderBrush="{StaticResource TransparentBackgroundBrush200}" Padding="6" ToolTip="Export to excel" MinWidth="130" Command="{Binding ExportGraphCommand}">
+ <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">EXPORT TO FILE</TextBlock>
+ </Button>
+ <Button Margin="20 0 0 0" VerticalAlignment="Bottom" HorizontalAlignment="Right" Background="{StaticResource TransparentBackgroundBrush200}" MinWidth="180" BorderBrush="{StaticResource TransparentBackgroundBrush200}" Command="{Binding CreateLinearizationGraphCommand}" >
+ <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">CREATE LINEARIZATION GRAPH</TextBlock>
+ </Button>
+ </StackPanel>
+ </Grid>
+
+ </Grid>
+ </DockPanel>
+ </Grid>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml.cs
new file mode 100644
index 000000000..c29bb68fb
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorCalibrationView.xaml.cs
@@ -0,0 +1,42 @@
+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;
+using Tango.MachineStudio.RML.ViewModels;
+
+namespace Tango.MachineStudio.RML.Views
+{
+ /// <summary>
+ /// Interaction logic for ColorCalibrationView.xaml
+ /// </summary>
+ public partial class ColorCalibrationView : UserControl
+ {
+ public ColorCalibrationView()
+ {
+ InitializeComponent();
+ this.Loaded += ColorCalibrationView_Loaded;
+ }
+
+ private void ColorCalibrationView_Loaded(object sender, RoutedEventArgs e)
+ {
+ if(DataContext is ColorCalibrationViewVM)
+ {
+ ColorCalibrationViewVM vm = (ColorCalibrationViewVM)DataContext;
+ vm.PlotControl = CalibrationPlot;
+ vm.LinearizationPlotControl = LinearizationPlot;
+ vm.LABLinearizationPlotControl = LABLinearizationPlot;
+ vm.Loading();
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/HeadCleaningParametersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/HeadCleaningParametersView.xaml
new file mode 100644
index 000000000..aec12aa63
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/HeadCleaningParametersView.xaml
@@ -0,0 +1,59 @@
+<UserControl x:Class="Tango.MachineStudio.RML.Views.HeadCleaningParametersView"
+ 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:vm="clr-namespace:Tango.MachineStudio.RML.ViewModels"
+ xmlns:global="clr-namespace:Tango.MachineStudio.RML"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:local="clr-namespace:Tango.MachineStudio.RML.Views"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+
+ <UserControl.Resources>
+ <converters:EmptyStringToNullConverter x:Key="EmptyStringToNullConverter" />
+ </UserControl.Resources>
+
+ <Grid>
+ <DockPanel>
+ <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0" Padding="5" CornerRadius="5">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16" Padding="2">HEAD CLEANING PARAMETERS</TextBlock>
+ </Grid>
+ </Border>
+
+ <Grid>
+ <StackPanel Orientation="Horizontal">
+ <DockPanel Grid.Column="1" Margin="25" HorizontalAlignment="Left" Width="400">
+ <materialDesign:Card>
+ <StackPanel>
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top" Margin="20 10 0 10" FontSize="16">CLEANER</TextBlock>
+ <controls:TableGrid RowHeight="25" Margin="20 0" MakeFirstColumnVerticalAlignmentBottom="False">
+ <controls:TableGrid.Resources>
+ <Style TargetType="TextBlock">
+ <Setter Property="VerticalAlignment" Value="Center"></Setter>
+ <Setter Property="Margin" Value="0 3 0 0"></Setter>
+ </Style>
+ </controls:TableGrid.Resources>
+ <TextBlock Text="Cleaner Flow:" VerticalAlignment="Center"></TextBlock>
+ <mahapps:NumericUpDown Value="{Binding ActiveRML.CleanerFlow,Mode=TwoWay}" Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Arc Head Cleaning Motor Speed:" VerticalAlignment="Center"></TextBlock>
+ <mahapps:NumericUpDown Value="{Binding ActiveRML.ArcHeadCleaningMotorSpeed,Mode=TwoWay}" Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
+ </controls:TableGrid>
+ </DockPanel>
+ </StackPanel>
+ </materialDesign:Card>
+ </DockPanel>
+ </StackPanel>
+ </Grid>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/HeadCleaningParametersView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/HeadCleaningParametersView.xaml.cs
new file mode 100644
index 000000000..8d036efa5
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/HeadCleaningParametersView.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.MachineStudio.RML.Views
+{
+ /// <summary>
+ /// Interaction logic for SpoolsView.xaml
+ /// </summary>
+ public partial class HeadCleaningParametersView : UserControl
+ {
+ public HeadCleaningParametersView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml
index ab5207722..e52ac4ece 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/MainView.xaml
@@ -9,7 +9,7 @@
xmlns:local="clr-namespace:Tango.MachineStudio.RML.Views"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
- <Grid>
+ <Grid IsEnabled="{Binding IsFree}">
<controls:NavigationControl x:Name="navigationControl" TransitionType="Slide">
<local:RmlsView />
<local:RmlView/>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml
index b85fd2c12..03bf65522 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml
@@ -32,7 +32,7 @@
<DropShadowEffect Opacity="0.4" />
</Border.Effect>
<Grid>
- <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">ACTIVE PROCESS GROUP</TextBlock>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">ACTIVE PROCESS GROUP</TextBlock>
<Button ToolTip="Add new table" Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" Width="30" HorizontalAlignment="Right" Padding="0" Command="{Binding AddProcessParametersTableCommand}">
<materialDesign:PackIcon Kind="Plus" Foreground="#0AC30A" Width="24" Height="24" />
</Button>
@@ -70,7 +70,7 @@
<DataTemplate>
<DockPanel>
<TextBlock IsHitTestVisible="False" Margin="0 5 0 5" Text="{Binding Name}" FontSize="11"></TextBlock>
- <mahapps:NumericUpDown HorizontalAlignment="Right" Minimum="0" Margin="0 0 5 0" HideUpDownButtons="True" HorizontalContentAlignment="Right" Maximum="10000" StringFormat="0.0" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" Value="{Binding Value,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown HorizontalAlignment="Right" Minimum="0" Margin="0 0 5 0" HideUpDownButtons="True" HorizontalContentAlignment="Right" Maximum="10000" StringFormat="{Binding StringFormat}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" Value="{Binding Value,Mode=TwoWay}"></mahapps:NumericUpDown>
</DockPanel>
</DataTemplate>
</editors:ParameterizedEditor.DoubleTemplate>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlDeleteDialogView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlDeleteDialogView.xaml
new file mode 100644
index 000000000..7745848c1
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlDeleteDialogView.xaml
@@ -0,0 +1,82 @@
+<UserControl x:Class="Tango.MachineStudio.RML.Views.RmlDeleteDialogView"
+ 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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:vm="clr-namespace:Tango.MachineStudio.RML.ViewModels"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:local="clr-namespace:Tango.MachineStudio.RML.Views"
+ mc:Ignorable="d"
+ d:DesignHeight="400" d:DesignWidth="700" Height="600" Width="900" Background="{StaticResource Dialog.Background}" d:DataContext="{d:DesignInstance Type=vm:RmlDeleteDialogViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource Dialog.Foreground}">
+
+ <UserControl.Resources>
+ <converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
+ </UserControl.Resources>
+
+ <Grid Margin="10">
+ <DockPanel>
+ <Grid DockPanel.Dock="Top">
+ <StackPanel Orientation="Horizontal">
+ <Grid>
+ <materialDesign:PackIcon Kind="Alert" Foreground="{StaticResource OrangeBrush}" Width="42" Height="42" />
+ </Grid>
+ <TextBlock Margin="20 0 0 0" VerticalAlignment="Center" FontSize="22">
+ <Run>DELETE</Run>
+ <Run></Run>
+ <Run Text="{Binding Rml.Name}"></Run>
+ </TextBlock>
+ </StackPanel>
+ </Grid>
+
+ <Grid DockPanel.Dock="Bottom">
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right" DockPanel.Dock="Bottom">
+ <Button Command="{Binding CloseCommand}" Width="140" Height="40" Margin="0 0 10 0">
+ CANCEL
+ </Button>
+ <Button Command="{Binding OKCommand}" IsDefault="True" Width="140" Height="40">
+ DELETE
+ </Button>
+ </StackPanel>
+ </Grid>
+
+ <Grid>
+ <DockPanel Margin="0 10 0 0">
+ <TextBlock DockPanel.Dock="Top" Margin="5">
+ <Run>The following jobs must be removed or change thread type before the selected thread can be deleted.</Run>
+ </TextBlock>
+ <DataGrid Margin="0 10 0 10" SelectionUnit="FullRow" SelectionMode="Single" ItemsSource="{Binding JobsActions}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False" CanUserSortColumns="False">
+ <DataGrid.Columns>
+ <DataGridTextColumn Header="MACHINE" Width="Auto" Binding="{Binding Machine.SerialNumber}" IsReadOnly="True" />
+ <DataGridTextColumn Header="JOB" Width="200" Binding="{Binding Job.Name}" IsReadOnly="True" />
+ <DataGridComboBoxColumn Header="ACTION" Width="100" SelectedItemBinding="{Binding Action}">
+ <DataGridComboBoxColumn.ElementStyle>
+ <Style TargetType="{x:Type ComboBox}">
+ <Setter Property="ItemsSource" Value="{Binding Path=DataContext.Actions, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
+ </Style>
+ </DataGridComboBoxColumn.ElementStyle>
+ <DataGridComboBoxColumn.EditingElementStyle>
+ <Style TargetType="{x:Type ComboBox}">
+ <Setter Property="ItemsSource" Value="{Binding Path=DataContext.Actions, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
+ </Style>
+ </DataGridComboBoxColumn.EditingElementStyle>
+ </DataGridComboBoxColumn>
+ <DataGridComboBoxColumn Header="TARGET RML" SelectedItemBinding="{Binding TargetRml}" Width="1*" DisplayMemberPath="Name">
+ <DataGridComboBoxColumn.ElementStyle>
+ <Style TargetType="{x:Type ComboBox}">
+ <Setter Property="ItemsSource" Value="{Binding Path=DataContext.Rmls, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
+ </Style>
+ </DataGridComboBoxColumn.ElementStyle>
+ <DataGridComboBoxColumn.EditingElementStyle>
+ <Style TargetType="{x:Type ComboBox}">
+ <Setter Property="ItemsSource" Value="{Binding Path=DataContext.Rmls, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
+ </Style>
+ </DataGridComboBoxColumn.EditingElementStyle>
+ </DataGridComboBoxColumn>
+ </DataGrid.Columns>
+ </DataGrid>
+ </DockPanel>
+ </Grid>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlDeleteDialogView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlDeleteDialogView.xaml.cs
new file mode 100644
index 000000000..96254c03a
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlDeleteDialogView.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.MachineStudio.RML.Views
+{
+ /// <summary>
+ /// Interaction logic for RmlDeleteDialogView.xaml
+ /// </summary>
+ public partial class RmlDeleteDialogView : UserControl
+ {
+ public RmlDeleteDialogView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
index 50f6a6297..b6c91f066 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
@@ -4,6 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:global="clr-namespace:Tango.MachineStudio.RML"
+ xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
@@ -19,6 +20,7 @@
<UserControl.Resources>
<converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
+ <converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter"/>
</UserControl.Resources>
<Grid Margin="20">
@@ -28,7 +30,7 @@
<Button Style="{StaticResource MaterialDesignFlatButton}" Height="Auto" Command="{Binding BackToRmlsCommand}">
<materialDesign:PackIcon Kind="ArrowLeft" Width="50" Height="50" Foreground="{StaticResource DarkGrayBrush200}" ToolTip="Back to RML list" />
</Button>
- <TextBlock Text="{Binding ActiveRML.Name}" VerticalAlignment="Center" Margin="10 0 0 0" FontSize="34"></TextBlock>
+ <TextBlock MaxWidth="350" Text="{Binding ActiveRML.Name}" VerticalAlignment="Center" Margin="10 0 0 0" FontSize="30" TextWrapping="Wrap"></TextBlock>
</StackPanel>
<Button HorizontalAlignment="Right" Width="170" Height="45" Margin="0 0 20 0" VerticalAlignment="Center" Command="{Binding SaveCommand}">
@@ -54,10 +56,25 @@
<Grid>
<DockPanel>
<TextBlock DockPanel.Dock="Top" Margin="20 10 0 10" FontSize="16">PROPERTIES</TextBlock>
- <controls:TableGrid RowHeight="35" Margin="20 0">
+ <controls:TableGrid RowHeight="35" Margin="20 0" MakeFirstColumnVerticalAlignmentBottom="False">
+ <controls:TableGrid.Resources>
+ <Style TargetType="TextBlock">
+ <Setter Property="VerticalAlignment" Value="Center"></Setter>
+ <Setter Property="Margin" Value="0 3 0 0"></Setter>
+ </Style>
+ </controls:TableGrid.Resources>
<TextBlock Text="Name:" ></TextBlock>
<TextBox Text="{Binding ActiveRML.Name,UpdateSourceTrigger=PropertyChanged}"></TextBox>
+ <TextBlock Text="Display Name:" ></TextBlock>
+ <TextBox Text="{Binding ActiveRML.DisplayName,UpdateSourceTrigger=PropertyChanged}"></TextBox>
+
+ <TextBlock Text="Head Type:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding Source={x:Type enumerations:HeadTypes},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding ActiveRML.RmlHeadType}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox>
+
+ <TextBlock Text="Qualification Level:" ></TextBlock>
+ <ComboBox ItemsSource="{Binding Source={x:Type enumerations:RmlQualifications},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding ActiveRML.RmlQualificationLevel}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox>
+
<TextBlock Text="Manufacturer:" ></TextBlock>
<TextBox Text="{Binding ActiveRML.Manufacturer}"></TextBox>
@@ -138,28 +155,34 @@
<Setter Property="Padding" Value="20,2"></Setter>
</Style>
</TabControl.Resources>
- <TabItem Header="PROCESS PARAMETERS" Margin="-100 0 0 0 ">
+ <TabItem Header="PROCESS PARAMETERS" Margin="-100 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20">
<local:ProcessParametersView x:Name="processParametersView" WidthLilquidFactors="{Binding ElementName=calibrationDataView,Path=ActualWidth}"/>
</TabItem>
- <TabItem Header="COLOR CONVERSION" Margin="-100 0 0 0 ">
+ <TabItem Header="THREAD PARAMETERS" Margin="-100 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20">
+ <local:ThreadParametersView/>
+ </TabItem>
+ <TabItem Header="HEAD CLEANING" Margin="-100 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20">
+ <local:HeadCleaningParametersView/>
+ </TabItem>
+ <TabItem Header="COLOR CONVERSION" Margin="-100 0 0 0 " mahapps:ControlsHelper.HeaderFontSize="20">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="260"></ColumnDefinition>
</Grid.ColumnDefinitions>
<DockPanel>
- <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0" Padding="5" CornerRadius="5">
+ <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0" Padding="7" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Opacity="0.4" />
</Border.Effect>
<Grid>
- <TextBlock HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">COLOR CONVERSION</TextBlock>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16">COLOR CONVERSION</TextBlock>
</Grid>
</Border>
<local:ColorConversionView x:Name="colorConversionView" Margin="0 0 0 0" Grid.Column="0" DataContext="{Binding ColorConversionViewVM}"/>
</DockPanel>
<DockPanel Grid.Column="1">
- <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="16 0" Padding="5" CornerRadius="5">
+ <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="16 0" Padding="7" CornerRadius="5">
<Border.Effect>
<DropShadowEffect Opacity="0.4" />
</Border.Effect>
@@ -191,7 +214,9 @@
</UniformGrid>
<TextBlock Margin="0 40 0 0" Text="Color Conversion Version:" HorizontalAlignment="Center"></TextBlock>
- <mahapps:NumericUpDown Minimum="1" Maximum="2" Value="{Binding ActiveRML.ColorConversionVersion}" HorizontalContentAlignment="Center" Background="Transparent" BorderBrush="{StaticResource DimGrayBrush}" HasDecimals="False" Margin="0 5 0 0" />
+ <mahapps:NumericUpDown Minimum="1" Maximum="4" Value="{Binding ActiveRML.ColorConversionVersion}" HorizontalContentAlignment="Center" Background="Transparent" BorderBrush="{StaticResource DimGrayBrush}" HasDecimals="False" Margin="0 5 0 0" />
+
+ <CheckBox ToolTip="Use the color conversion engine to generate gradients" IsChecked="{Binding ActiveRML.UseColorLibGradients}" HorizontalAlignment="Center" Margin="0 40 0 0">Enable Gradient Generation</CheckBox>
</StackPanel>
</StackPanel>
</Grid>
@@ -200,6 +225,12 @@
</DockPanel>
</Grid>
</TabItem>
+ <TabItem Header="SPOOLS" Margin="-100 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20">
+ <local:SpoolsView/>
+ </TabItem>
+ <TabItem Header="COLOR CALIBRATION" Margin="-100 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20">
+ <local:ColorCalibrationView DataContext="{Binding ColorCalibrationVM}" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"/>
+ </TabItem>
</TabControl>
</Grid>
<Grid Grid.Row="1">
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml
index 288f00a3d..b1a1f4aa5 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml
@@ -18,10 +18,14 @@
<converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
</UserControl.Resources>
- <Grid>
+ <Grid IsEnabled="{Binding IsFree}">
<DockPanel Margin="100 100 100 50" MaxWidth="1200">
<Grid DockPanel.Dock="Top">
<Image Source="../Images/threads.png" Width="300" Margin="10" />
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 10 30">
+ <materialDesign:PackIcon Kind="Magnify" Width="26" Height="26"/>
+ <TextBox Width="300" materialDesign:HintAssist.Hint="Search by name" Text="{Binding RMLFilter,UpdateSourceTrigger=PropertyChanged,Delay=500}"></TextBox>
+ </StackPanel>
</Grid>
<Grid DockPanel.Dock="Bottom">
<StackPanel>
@@ -74,7 +78,7 @@
</StackPanel>
</Grid>
<Grid>
- <DataGrid Margin="0 0 0 10" BorderBrush="Silver" IsReadOnly="True" BorderThickness="1" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding Rmls}" SelectedItem="{Binding SelectedRML}">
+ <DataGrid Margin="0 0 0 10" BorderBrush="Silver" IsReadOnly="True" BorderThickness="1" RowHeight="60" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding Rmls}" SelectedItem="{Binding SelectedRML}">
<DataGrid.CellStyle>
<Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
<Setter Property="BorderThickness" Value="0"/>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/SpoolsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/SpoolsView.xaml
new file mode 100644
index 000000000..6eae05c76
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/SpoolsView.xaml
@@ -0,0 +1,85 @@
+<UserControl x:Class="Tango.MachineStudio.RML.Views.SpoolsView"
+ 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:vm="clr-namespace:Tango.MachineStudio.RML.ViewModels"
+ xmlns:global="clr-namespace:Tango.MachineStudio.RML"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:local="clr-namespace:Tango.MachineStudio.RML.Views"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+
+ <UserControl.Resources>
+ <converters:EmptyStringToNullConverter x:Key="EmptyStringToNullConverter" />
+ </UserControl.Resources>
+
+ <Grid>
+ <DockPanel>
+ <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0" Padding="5" CornerRadius="5">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16" Padding="2">SPOOLS</TextBlock>
+ </Grid>
+ </Border>
+
+ <Grid>
+ <DockPanel Grid.Column="1" Margin="25">
+ <Grid DockPanel.Dock="Bottom">
+ <StackPanel VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 0 0 0">
+ <Button Margin="0 0 10 0" MinWidth="160" Height="50" Background="{StaticResource RedBrush300}" BorderBrush="{StaticResource RedBrush300}" Command="{Binding RemoveSpoolCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="Delete" Width="20" Height="20" />
+ <TextBlock Margin="5 0 0 0" FontSize="16">DELETE</TextBlock>
+ </StackPanel>
+ </Button>
+ <Button Margin="0 0 0 0" MinWidth="160" Height="50" Background="{StaticResource GreenBrush300}" BorderBrush="{StaticResource GreenBrush300}" Command="{Binding AddSpoolCommand}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon Kind="Plus" Width="20" Height="20" />
+ <TextBlock Margin="5 0 0 0" FontSize="16">NEW SPOOL</TextBlock>
+ </StackPanel>
+ </Button>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
+
+ </StackPanel>
+ </Grid>
+ <Grid>
+ <DataGrid Margin="0 0 0 10" SelectionUnit="FullRow" BorderBrush="{StaticResource borderBrush }" BorderThickness="1" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding ActiveRML.RmlsSpools}" SelectedItem="{Binding SelectedSpool}">
+ <DataGrid.CellStyle>
+ <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}">
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
+ </Style>
+ </DataGrid.CellStyle>
+ <DataGrid.Columns>
+ <DataGridComboBoxColumn Header="SPOOL TYPE" SelectedItemBinding="{Binding SpoolType}" DisplayMemberPath="Name" Width="Auto">
+ <DataGridComboBoxColumn.ElementStyle>
+ <Style TargetType="ComboBox">
+ <Setter Property="ItemsSource" Value="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid},Path=DataContext.SpoolTypes}"/>
+ </Style>
+ </DataGridComboBoxColumn.ElementStyle>
+ <DataGridComboBoxColumn.EditingElementStyle>
+ <Style TargetType="ComboBox">
+ <Setter Property="ItemsSource" Value="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=DataGrid},Path=DataContext.SpoolTypes}"/>
+ </Style>
+ </DataGridComboBoxColumn.EditingElementStyle>
+ </DataGridComboBoxColumn>
+ <DataGridTextColumn Header="ROTATIONS PER PASSAGE" Binding="{Binding RotationsPerPassage,Converter={StaticResource EmptyStringToNullConverter}}" Width="Auto" />
+ <DataGridTextColumn Header="MAX LENGTH" Binding="{Binding Length,Converter={StaticResource EmptyStringToNullConverter}}" Width="Auto" />
+ <DataGridTextColumn Header="BACKING RATE" Binding="{Binding BackingRate,Converter={StaticResource EmptyStringToNullConverter}}" Width="Auto" />
+ <DataGridTextColumn Header="BOTTOM BACKING RATE" Binding="{Binding BottomBackingRate,Converter={StaticResource EmptyStringToNullConverter}}" Width="Auto" />
+ </DataGrid.Columns>
+ </DataGrid>
+ </Grid>
+ </DockPanel>
+ </Grid>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/SpoolsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/SpoolsView.xaml.cs
new file mode 100644
index 000000000..6e363681c
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/SpoolsView.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.MachineStudio.RML.Views
+{
+ /// <summary>
+ /// Interaction logic for SpoolsView.xaml
+ /// </summary>
+ public partial class SpoolsView : UserControl
+ {
+ public SpoolsView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml
new file mode 100644
index 000000000..c083e9b02
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml
@@ -0,0 +1,121 @@
+<UserControl x:Class="Tango.MachineStudio.RML.Views.ThreadParametersView"
+ 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:vm="clr-namespace:Tango.MachineStudio.RML.ViewModels"
+ xmlns:global="clr-namespace:Tango.MachineStudio.RML"
+ xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
+ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
+ xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
+ xmlns:local="clr-namespace:Tango.MachineStudio.RML.Views"
+ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ mc:Ignorable="d"
+ d:DesignHeight="720" d:DesignWidth="1280" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
+
+ <UserControl.Resources>
+ <converters:EmptyStringToNullConverter x:Key="EmptyStringToNullConverter" />
+ </UserControl.Resources>
+
+ <Grid>
+ <DockPanel>
+ <Border DockPanel.Dock="Top" Background="{StaticResource TransparentBackgroundBrush200}" Margin="20 0" Padding="5" CornerRadius="5">
+ <Border.Effect>
+ <DropShadowEffect Opacity="0.4" />
+ </Border.Effect>
+ <Grid>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 0 0 0" FontSize="16" Padding="2">THREAD PARAMETERS</TextBlock>
+ </Grid>
+ </Border>
+
+ <Grid>
+ <StackPanel Orientation="Horizontal">
+ <DockPanel Grid.Column="1" Margin="25" HorizontalAlignment="Left" Width="400">
+ <materialDesign:Card>
+ <StackPanel>
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top" Margin="20 10 0 10" FontSize="16">FEEDER</TextBlock>
+ <controls:TableGrid RowHeight="25" Margin="20 0" MakeFirstColumnVerticalAlignmentBottom="False">
+ <controls:TableGrid.Resources>
+ <Style TargetType="TextBlock">
+ <Setter Property="VerticalAlignment" Value="Center"></Setter>
+ <Setter Property="Margin" Value="0 3 0 0"></Setter>
+ </Style>
+ </controls:TableGrid.Resources>
+ <TextBlock Text="Feeder P:" ></TextBlock>
+ <mahapps:NumericUpDown Value="{Binding ActiveRML.FeederP,Mode=TwoWay}" Minimum="-100000" Maximum="1000000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Feeder I:" ></TextBlock>
+ <mahapps:NumericUpDown Value="{Binding ActiveRML.FeederI,Mode=TwoWay}" Minimum="-100000" Maximum="1000000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Feeder D:" ></TextBlock>
+ <mahapps:NumericUpDown Value="{Binding ActiveRML.FeederD,Mode=TwoWay}" Minimum="-100000" Maximum="1000000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
+ </controls:TableGrid>
+ </DockPanel>
+
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top" Margin="20 10 0 10" FontSize="16">PULLER</TextBlock>
+ <controls:TableGrid RowHeight="25" Margin="20 0" MakeFirstColumnVerticalAlignmentBottom="False">
+ <controls:TableGrid.Resources>
+ <Style TargetType="TextBlock">
+ <Setter Property="VerticalAlignment" Value="Center"></Setter>
+ <Setter Property="Margin" Value="0 3 0 0"></Setter>
+ </Style>
+ </controls:TableGrid.Resources>
+ <TextBlock Text="Puller P:" ></TextBlock>
+ <mahapps:NumericUpDown Value="{Binding ActiveRML.PullerP,Mode=TwoWay}" Minimum="-100000" Maximum="1000000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Puller I:" ></TextBlock>
+ <mahapps:NumericUpDown Value="{Binding ActiveRML.PullerI,Mode=TwoWay}" Minimum="-100000" Maximum="1000000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Puller D:" ></TextBlock>
+ <mahapps:NumericUpDown Value="{Binding ActiveRML.PullerD,Mode=TwoWay}" Minimum="-100000" Maximum="1000000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
+ </controls:TableGrid>
+ </DockPanel>
+
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top" Margin="20 10 0 10" FontSize="16">WINDER</TextBlock>
+ <controls:TableGrid RowHeight="25" Margin="20 0" MakeFirstColumnVerticalAlignmentBottom="False">
+ <controls:TableGrid.Resources>
+ <Style TargetType="TextBlock">
+ <Setter Property="VerticalAlignment" Value="Center"></Setter>
+ <Setter Property="Margin" Value="0 3 0 0"></Setter>
+ </Style>
+ </controls:TableGrid.Resources>
+ <TextBlock Text="Winder P:" ></TextBlock>
+ <mahapps:NumericUpDown Value="{Binding ActiveRML.WinderP,Mode=TwoWay}" Minimum="-100000" Maximum="1000000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Winder I:" ></TextBlock>
+ <mahapps:NumericUpDown Value="{Binding ActiveRML.WinderI,Mode=TwoWay}" Minimum="-100000" Maximum="1000000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
+
+ <TextBlock Text="Winder D:" ></TextBlock>
+ <mahapps:NumericUpDown Value="{Binding ActiveRML.WinderD,Mode=TwoWay}" Minimum="-100000" Maximum="1000000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left"></mahapps:NumericUpDown>
+ </controls:TableGrid>
+ </DockPanel>
+ </StackPanel>
+ </materialDesign:Card>
+ </DockPanel>
+
+ <DockPanel Grid.Column="1" Margin="25" HorizontalAlignment="Left" Width="400">
+ <materialDesign:Card>
+ <StackPanel>
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top" Margin="20 10 0 10" FontSize="16">ROCKERS</TextBlock>
+ <controls:TableGrid RowHeight="25" Margin="20 0" MakeFirstColumnVerticalAlignmentBottom="False">
+ <controls:TableGrid.Resources>
+ <Style TargetType="TextBlock">
+ <Setter Property="VerticalAlignment" Value="Center"></Setter>
+ </Style>
+ </controls:TableGrid.Resources>
+ <TextBlock Text="Bypass Rockers:" ></TextBlock>
+ <ToggleButton IsChecked="{Binding ActiveRML.BypassRockers,Mode=TwoWay}" HorizontalAlignment="Right" ></ToggleButton>
+ </controls:TableGrid>
+ </DockPanel>
+ </StackPanel>
+ </materialDesign:Card>
+ </DockPanel>
+ </StackPanel>
+ </Grid>
+ </DockPanel>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml.cs
new file mode 100644
index 000000000..aa63e48fb
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.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.MachineStudio.RML.Views
+{
+ /// <summary>
+ /// Interaction logic for SpoolsView.xaml
+ /// </summary>
+ public partial class ThreadParametersView : UserControl
+ {
+ public ThreadParametersView()
+ {
+ InitializeComponent();
+ }
+ }
+}