aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2020-03-23 10:36:13 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2020-03-23 10:36:13 +0200
commit35842a2b231af79f34c7e8685bd1ca8313b1a122 (patch)
tree45680658dd7a03333a762c8a0b7b459e77a94b64 /Software/Visual_Studio/MachineStudio/Modules
parentc025ab482326b6809e40e4e35026b58488795df3 (diff)
parent3c4ff5beaa41a376ce42fa400d36d7a5a74330ec (diff)
downloadTango-35842a2b231af79f34c7e8685bd1ca8313b1a122.tar.gz
Tango-35842a2b231af79f34c7e8685bd1ca8313b1a122.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs22
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj7
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/HeadCleaningParametersView.xaml56
-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/RmlView.xaml19
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml31
9 files changed, 164 insertions, 17 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs
index 5a3f5d337..68dc7e3bf 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Controls/JobOutlineControl.cs
@@ -150,6 +150,20 @@ namespace Tango.MachineStudio.Developer.Controls
_sizeControl.Height += NORMAL_FONT_HEIGHT;
}
}
+ //JobTicket.HeadCleaningParameters
+ if (job.HeadCleaningParameters != null)
+ {
+ _sizeControl.Height += 20;
+ DrawHeaderText(drawingContext, "HEAD CLEANING PARAMETERS", 17, LevelOffset.level_0);
+ _sizeControl.Height += TITLE_FONT_HEIGHT;
+ _sizeControl.Height += 5.0;
+ basicProps = GetNameValueList(job.HeadCleaningParameters);
+ foreach (var prop in basicProps)
+ {
+ DrawNameValueText(drawingContext, prop, LevelOffset.level_1, PackIconKind.Settings);
+ _sizeControl.Height += NORMAL_FONT_HEIGHT;
+ }
+ }
//JobTicket.Segments
if (job.Segments != null)
{
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
index ed8fc57fe..ed832f468 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
@@ -1553,7 +1553,7 @@
<Grid Background="Transparent">
<ContentControl>
<StackPanel>
- <TextBlock IsHitTestVisible="False" Margin="0 5 0 5" Text="{Binding Name}" FontSize="11" Foreground="{StaticResource MainWindow.Foreground}"></TextBlock>
+ <TextBlock ToolTip="{Binding Name}" IsHitTestVisible="False" Margin="0 5 0 5" Text="{Binding Name}" FontSize="11" Foreground="{StaticResource MainWindow.Foreground}"></TextBlock>
<mahapps:NumericUpDown FontSize="20" Minimum="0" Margin="0 0 5 0" HideUpDownButtons="True" HorizontalContentAlignment="Center" Maximum="10000" StringFormat="{Binding StringFormat}" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" Value="{Binding Value,Mode=TwoWay}" Foreground="{StaticResource MainWindow.Foreground}"></mahapps:NumericUpDown>
</StackPanel>
</ContentControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs
index 91cc677e0..a384c133d 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs
@@ -59,14 +59,14 @@ namespace Tango.MachineStudio.Logging.ViewModels
}
}
- private bool _displayDebug;
+ private bool _processDebugLogs;
/// <summary>
/// Gets or sets a value indicating whether display debug logs.
/// </summary>
- public bool DisplayDebug
+ public bool ProcessDebugLogs
{
- get { return _displayDebug; }
- set { _displayDebug = value; RaisePropertyChangedAuto(); }
+ get { return _processDebugLogs; }
+ set { _processDebugLogs = value; RaisePropertyChangedAuto(); OnProcessDebugLogsChanged(); }
}
private LogItemBase _selectedLog;
@@ -184,6 +184,18 @@ namespace Tango.MachineStudio.Logging.ViewModels
_is_debug = LogManager.Categories.Contains(LogCategory.Debug);
}
+ private void OnProcessDebugLogsChanged()
+ {
+ if (ProcessDebugLogs)
+ {
+ LogManager.Categories.Add(LogCategory.Debug);
+ }
+ else
+ {
+ LogManager.Categories.RemoveAll(x => x == LogCategory.Debug);
+ }
+ }
+
private void ApplyLogsFilter()
{
if ((_realTimePaused && _isRealTime) || !_isRealTime)
@@ -204,8 +216,6 @@ namespace Tango.MachineStudio.Logging.ViewModels
private void LogManager_NewLog(object sender, LogItemBase log)
{
- if (log.Category == LogCategory.Debug && !DisplayDebug) return;
-
if (!RealTimePaused)
{
InvokeUI(() =>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml
index 4c291d0df..486c0751d 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/Views/ApplicationLogsView.xaml
@@ -114,7 +114,7 @@
</StackPanel>
</Border>
- <CheckBox VerticalAlignment="Center" Margin="20 0 0 0" IsChecked="{Binding DisplayDebug}" IsEnabled="{Binding IsRealTime}" ToolTip="Hide/Display debug logs (applies only when debug logs are enabled in the settings file)">Process Debug Logs</CheckBox>
+ <CheckBox VerticalAlignment="Center" Margin="20 0 0 0" IsChecked="{Binding ProcessDebugLogs}" IsEnabled="{Binding IsRealTime}" ToolTip="Allow incoming real-time debug logs">Enable Debug Logs</CheckBox>
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 30 0">
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj
index f448932a0..a413223c3 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Tango.MachineStudio.RML.csproj
@@ -118,6 +118,9 @@
<Compile Include="Views\RmlView.xaml.cs">
<DependentUpon>RmlView.xaml</DependentUpon>
</Compile>
+ <Compile Include="Views\HeadCleaningParametersView.xaml.cs">
+ <DependentUpon>HeadCleaningParametersView.xaml</DependentUpon>
+ </Compile>
<Compile Include="Views\ThreadParametersView.xaml.cs">
<DependentUpon>ThreadParametersView.xaml</DependentUpon>
</Compile>
@@ -229,6 +232,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
+ <Page Include="Views\HeadCleaningParametersView.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
<Page Include="Views\ThreadParametersView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
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..72e377c34
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/HeadCleaningParametersView.xaml
@@ -0,0 +1,56 @@
+<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>
+ </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/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
index e967c7d83..f425f2003 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
@@ -56,7 +56,13 @@
<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>
@@ -149,13 +155,16 @@
<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="THREAD PARAMETERS" Margin="-100 0 0 0">
+ <TabItem Header="THREAD PARAMETERS" Margin="-100 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20">
<local:ThreadParametersView/>
</TabItem>
- <TabItem Header="COLOR CONVERSION" Margin="-100 0 0 0 ">
+ <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>
@@ -214,7 +223,7 @@
</DockPanel>
</Grid>
</TabItem>
- <TabItem Header="SPOOLS" Margin="-100 0 0 0">
+ <TabItem Header="SPOOLS" Margin="-100 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20">
<local:SpoolsView/>
</TabItem>
</TabControl>
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
index 7f1ca2262..c083e9b02 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ThreadParametersView.xaml
@@ -35,7 +35,13 @@
<StackPanel>
<DockPanel>
<TextBlock DockPanel.Dock="Top" Margin="20 10 0 10" FontSize="16">FEEDER</TextBlock>
- <controls:TableGrid RowHeight="25" Margin="20 0">
+ <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>
@@ -49,7 +55,13 @@
<DockPanel>
<TextBlock DockPanel.Dock="Top" Margin="20 10 0 10" FontSize="16">PULLER</TextBlock>
- <controls:TableGrid RowHeight="25" Margin="20 0">
+ <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>
@@ -63,7 +75,13 @@
<DockPanel>
<TextBlock DockPanel.Dock="Top" Margin="20 10 0 10" FontSize="16">WINDER</TextBlock>
- <controls:TableGrid RowHeight="25" Margin="20 0">
+ <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>
@@ -83,7 +101,12 @@
<StackPanel>
<DockPanel>
<TextBlock DockPanel.Dock="Top" Margin="20 10 0 10" FontSize="16">ROCKERS</TextBlock>
- <controls:TableGrid RowHeight="25" Margin="20 0">
+ <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>