aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-01-23 17:58:59 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-01-23 17:58:59 +0200
commit8ae0f3da19c537eff30e19a1fe99cce51b3116f1 (patch)
tree999f8c0ab670b775b4bcde5a4a0d26fb4f287fd5 /Software/Visual_Studio/MachineStudio/Modules
parent891b5703fc8722ecc70c7883213b994f8902bb7b (diff)
downloadTango-8ae0f3da19c537eff30e19a1fe99cce51b3116f1.tar.gz
Tango-8ae0f3da19c537eff30e19a1fe99cce51b3116f1.zip
A lot of work on Developer Module and Jobs related DB tables.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs6
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs33
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RmlsProcessParametersTablesViewVM.cs18
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTableView.xaml8
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupView.xaml (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTableView.xaml)12
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupView.xaml.cs (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTableView.xaml.cs)4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTablesView.xaml)16
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml.cs (renamed from Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTablesView.xaml.cs)4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs120
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MainView.xaml100
12 files changed, 242 insertions, 97 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj
index bb3084207..54c29f7f3 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj
@@ -129,7 +129,7 @@
<Compile Include="ViewModels\OrganizationsViewVM.cs" />
<Compile Include="ViewModels\PermissionsViewVM.cs" />
<Compile Include="ViewModels\ProcessParametersTablesViewVM.cs" />
- <Compile Include="ViewModels\RmlsProcessParametersTablesViewVM.cs" />
+ <Compile Include="ViewModels\ProcessParametersTablesGroupsViewVM.cs" />
<Compile Include="ViewModels\RmlsViewVM.cs" />
<Compile Include="ViewModels\RolesViewVM.cs" />
<Compile Include="ViewModels\UsersViewVM.cs" />
@@ -142,11 +142,11 @@
<Compile Include="Views\DBViews\ActionTypeView.xaml.cs">
<DependentUpon>ActionTypeView.xaml</DependentUpon>
</Compile>
- <Compile Include="Views\DBViews\RmlsProcessParametersTablesView.xaml.cs">
- <DependentUpon>RmlsProcessParametersTablesView.xaml</DependentUpon>
+ <Compile Include="Views\DBViews\ProcessParametersTablesGroupsView.xaml.cs">
+ <DependentUpon>ProcessParametersTablesGroupsView.xaml</DependentUpon>
</Compile>
- <Compile Include="Views\DBViews\RmlsProcessParametersTableView.xaml.cs">
- <DependentUpon>RmlsProcessParametersTableView.xaml</DependentUpon>
+ <Compile Include="Views\DBViews\ProcessParametersTablesGroupView.xaml.cs">
+ <DependentUpon>ProcessParametersTablesGroupView.xaml</DependentUpon>
</Compile>
<Compile Include="Views\DBViews\ProcessParametersTablesView.xaml.cs">
<DependentUpon>ProcessParametersTablesView.xaml</DependentUpon>
@@ -378,11 +378,11 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
- <Page Include="Views\DBViews\RmlsProcessParametersTablesView.xaml">
+ <Page Include="Views\DBViews\ProcessParametersTablesGroupsView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
- <Page Include="Views\DBViews\RmlsProcessParametersTableView.xaml">
+ <Page Include="Views\DBViews\ProcessParametersTablesGroupView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
index 5fe386749..8a7afc067 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs
@@ -60,7 +60,7 @@ namespace Tango.MachineStudio.DB
SimpleIoc.Default.Register<CatsViewVM>();
SimpleIoc.Default.Register<ProcessParametersTablesViewVM>();
- SimpleIoc.Default.Register<RmlsProcessParametersTablesViewVM>();
+ SimpleIoc.Default.Register<ProcessParametersTablesGroupsViewVM>();
}
public static MainViewVM MainViewVM
@@ -351,11 +351,11 @@ namespace Tango.MachineStudio.DB
}
}
- public static RmlsProcessParametersTablesViewVM RmlsProcessParametersTablesViewVM
+ public static ProcessParametersTablesGroupsViewVM ProcessParametersTablesGroupsViewVM
{
get
{
- return ServiceLocator.Current.GetInstance<RmlsProcessParametersTablesViewVM>();
+ return ServiceLocator.Current.GetInstance<ProcessParametersTablesGroupsViewVM>();
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs
new file mode 100644
index 000000000..620762a6f
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/ProcessParametersTablesGroupsViewVM.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
+
+namespace Tango.MachineStudio.DB.ViewModels
+{
+ public class ProcessParametersTablesGroupsViewVM : DbTableViewModel<ProcessParametersTablesGroup>
+ {
+ public ProcessParametersTablesGroupsViewVM(INotificationProvider notification) : base(notification)
+ {
+
+ }
+
+ protected override void OnBeforeEntitySave(DialogOpenMode mode, ProcessParametersTablesGroup entity)
+ {
+ entity.SaveDate = DateTime.UtcNow;
+
+ if (entity.Rml != null && entity.Active)
+ {
+ foreach (var group in entity.Rml.ProcessParametersTablesGroups.Where(x => x != entity))
+ {
+ group.Active = false;
+ }
+ }
+
+ base.OnBeforeEntitySave(mode, entity);
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RmlsProcessParametersTablesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RmlsProcessParametersTablesViewVM.cs
deleted file mode 100644
index 4ae1f063f..000000000
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/RmlsProcessParametersTablesViewVM.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.DAL.Observables;
-using Tango.MachineStudio.Common.Notifications;
-
-namespace Tango.MachineStudio.DB.ViewModels
-{
- public class RmlsProcessParametersTablesViewVM : DbTableViewModel<RmlsProcessParametersTable>
- {
- public RmlsProcessParametersTablesViewVM(INotificationProvider notification) : base(notification)
- {
-
- }
- }
-}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTableView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTableView.xaml
index e9b7c31af..1e3933ce0 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTableView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTableView.xaml
@@ -22,8 +22,12 @@
<TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
<TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
<TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
+ <TextBlock Text="Group:" FontWeight="Bold"></TextBlock>
+ <ComboBox ItemsSource="{Binding Adapter.ProcessParametersTablesGroups}" SelectedItem="{Binding EditEntity.ProcessParametersTablesGroups,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
<TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
<TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Index:" FontWeight="Bold"></TextBlock>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.TableIndex,Mode=TwoWay}"></mahapps:NumericUpDown>
<TextBlock Text="Dyeing Speed:" FontWeight="Bold"></TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.DyeingSpeed,Mode=TwoWay}"></mahapps:NumericUpDown>
<TextBlock Text="Min Ink Uptake:" FontWeight="Bold"></TextBlock>
@@ -54,10 +58,6 @@
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.DryerAirFlow,Mode=TwoWay}"></mahapps:NumericUpDown>
<TextBlock Text="Winder Tension:" FontWeight="Bold"></TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.WinderTension,Mode=TwoWay}"></mahapps:NumericUpDown>
- <TextBlock Text="Lubrication:" FontWeight="Bold"></TextBlock>
- <ToggleButton HorizontalAlignment="Right" IsChecked="{Binding EditEntity.Lubrication}" Style="{StaticResource MaterialDesignSwitchToggleButton}" />
- <TextBlock Text="Lubrication Nanoliter Per Centimeter:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.LubricationNlPerCm,Mode=TwoWay}"></mahapps:NumericUpDown>
</controls:TableGrid>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTableView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupView.xaml
index 767b39f29..135d66eac 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTableView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupView.xaml
@@ -1,4 +1,4 @@
-<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.RmlsProcessParametersTableView"
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.ProcessParametersTablesGroupView"
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"
@@ -10,7 +10,7 @@
xmlns:converters="clr-namespace:Tango.MachineStudio.DB.Converters"
xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300" DataContext="{x:Static global:ViewModelLocator.RmlsProcessParametersTablesViewVM}">
+ d:DesignHeight="300" d:DesignWidth="300" DataContext="{x:Static global:ViewModelLocator.ProcessParametersTablesGroupsViewVM}">
<Grid>
<controls:TableGrid>
@@ -22,10 +22,10 @@
<TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True" IsEnabled="False"></TextBox>
<TextBlock Text="RML:" FontWeight="Bold"></TextBlock>
<ComboBox ItemsSource="{Binding Adapter.Rmls}" SelectedItem="{Binding EditEntity.Rml,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
- <TextBlock Text="Process Parameters Table:" FontWeight="Bold"></TextBlock>
- <ComboBox ItemsSource="{Binding Adapter.ProcessParametersTables}" SelectedItem="{Binding EditEntity.ProcessParametersTables}" DisplayMemberPath="Name"></ComboBox>
- <TextBlock Text="Index:" FontWeight="Bold"></TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.TableIndex,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
+ <TextBox Text="{Binding EditEntity.Name,Mode=TwoWay}"></TextBox>
+ <TextBlock Text="Active:" FontWeight="Bold"></TextBlock>
+ <ToggleButton IsChecked="{Binding EditEntity.Active}" HorizontalAlignment="Right"></ToggleButton>
</controls:TableGrid>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTableView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupView.xaml.cs
index 713a46204..490453f2a 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTableView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupView.xaml.cs
@@ -18,9 +18,9 @@ namespace Tango.MachineStudio.DB.Views.DBViews
/// <summary>
/// Interaction logic for UserView.xaml
/// </summary>
- public partial class RmlsProcessParametersTableView : UserControl
+ public partial class ProcessParametersTablesGroupView : UserControl
{
- public RmlsProcessParametersTableView()
+ public ProcessParametersTablesGroupView()
{
InitializeComponent();
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTablesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml
index d599c64a3..0eee2aa77 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTablesView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml
@@ -1,24 +1,30 @@
-<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.RmlsProcessParametersTablesView"
+<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.ProcessParametersTablesGroupsView"
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:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
xmlns:global="clr-namespace:Tango.MachineStudio.DB"
xmlns:converters="clr-namespace:Tango.MachineStudio.DB.Converters"
+ xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
mc:Ignorable="d"
- d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.RmlsProcessParametersTablesViewVM}">
+ d:DesignHeight="720" d:DesignWidth="1280" Background="White" DataContext="{x:Static global:ViewModelLocator.ProcessParametersTablesGroupsViewVM}">
+
+ <UserControl.Resources>
+ <sharedConverters:BooleanToYesNoConverter x:Key="BooleanToYesNoConverter"></sharedConverters:BooleanToYesNoConverter>
+ </UserControl.Resources>
<Grid>
<controls:DbTableView>
- <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.RmlsProcessParametersTablesViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" IsReadOnly="True">
+ <DataGrid Background="Transparent" ItemsSource="{Binding Adapter.ProcessParametersTablesGroupsViewSource}" SelectedItem="{Binding SelectedEntity}" AutoGenerateColumns="False" IsReadOnly="True">
<DataGrid.Columns>
<DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
<DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
<DataGridTextColumn Header="RML" Binding="{Binding Rml.Name}"></DataGridTextColumn>
- <DataGridTextColumn Header="Process Parameters Table" Binding="{Binding ProcessParametersTables.Name}"></DataGridTextColumn>
- <DataGridTextColumn Header="Index" Binding="{Binding TableIndex}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Saved Date" Binding="{Binding SaveDate}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Active" Binding="{Binding Active,Converter={StaticResource BooleanToYesNoConverter}}"></DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
</controls:DbTableView>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTablesView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml.cs
index c4ee7e66d..67072d554 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/RmlsProcessParametersTablesView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesGroupsView.xaml.cs
@@ -20,9 +20,9 @@ namespace Tango.MachineStudio.DB.Views.DBViews
/// Interaction logic for UsersView.xaml
/// </summary>
[DBView]
- public partial class RmlsProcessParametersTablesView : UserControl
+ public partial class ProcessParametersTablesGroupsView : UserControl
{
- public RmlsProcessParametersTablesView()
+ public ProcessParametersTablesGroupsView()
{
InitializeComponent();
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml
index 2648b78a0..d9ad83f68 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/ProcessParametersTablesView.xaml
@@ -21,7 +21,9 @@
<DataGrid.Columns>
<DataGridTextColumn Header="ID" Binding="{Binding ID}"></DataGridTextColumn>
<DataGridTextColumn Header="GUID" Binding="{Binding Guid}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Group" Binding="{Binding ProcessParametersTablesGroups.Name}"></DataGridTextColumn>
<DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn>
+ <DataGridTextColumn Header="Index" Binding="{Binding TableIndex}"></DataGridTextColumn>
<DataGridTextColumn Header="Dyeing Speed" Binding="{Binding DyeingSpeed}"></DataGridTextColumn>
<DataGridTextColumn Header="Min Ink Uptake" Binding="{Binding MinInkUptake}"></DataGridTextColumn>
<DataGridTextColumn Header="Mixer Temp" Binding="{Binding MixerTemp}"></DataGridTextColumn>
@@ -37,8 +39,6 @@
<DataGridTextColumn Header="Dryer Zone 3 Temp" Binding="{Binding DryerZone3Temp}"></DataGridTextColumn>
<DataGridTextColumn Header="Dryer Air Flow" Binding="{Binding DryerAirFlow}"></DataGridTextColumn>
<DataGridTextColumn Header="Winder Tension" Binding="{Binding WinderTension}"></DataGridTextColumn>
- <DataGridTextColumn Header="Lubrication" Binding="{Binding Lubrication,Converter={StaticResource BooleanToYesNoConverter}}"></DataGridTextColumn>
- <DataGridTextColumn Header="Lubrication nl/cm" Binding="{Binding LubricationNlPerCm}"></DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
</controls:DbTableView>
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 621ce550b..34a4ff470 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
@@ -7,6 +7,7 @@ using System.Text;
using System.Threading.Tasks;
using Tango.Core.Commands;
using Tango.DAL.Observables;
+using Tango.MachineStudio.Common.Notifications;
using Tango.MachineStudio.Common.StudioApplication;
using Tango.SharedUI;
@@ -14,6 +15,8 @@ namespace Tango.MachineStudio.Developer.ViewModels
{
public class MainViewVM : ViewModel
{
+ private INotificationProvider _notification;
+
public IStudioApplicationManager ApplicationManager { get; set; }
public ObservablesEntitiesAdapter Adapter { get; set; }
@@ -34,18 +37,43 @@ namespace Tango.MachineStudio.Developer.ViewModels
set { _liquidTypesRmls = value; RaisePropertyChangedAuto(); }
}
- private ObservableCollection<RmlsProcessParametersTable> _rmlProcessParametersTables;
+ private ProcessParametersTablesGroup _rmlProcessParametersTablesGroup;
+
+ public ProcessParametersTablesGroup RmlProcessParametersTableGroup
+ {
+ get { return _rmlProcessParametersTablesGroup; }
+ set { _rmlProcessParametersTablesGroup = value; RaisePropertyChangedAuto(); }
+ }
+
+ private ProcessParametersTablesGroup _selectedGroupHistory;
+
+ public ProcessParametersTablesGroup SelectedGroupHistory
+ {
+ get { return _selectedGroupHistory; }
+ set { _selectedGroupHistory = value; RaisePropertyChangedAuto(); OnSelectedGroupHistoryChanged(); }
+ }
+
+ private void OnSelectedGroupHistoryChanged()
+ {
+ if (SelectedGroupHistory != null)
+ {
+ RmlProcessParametersTableGroup = SelectedGroupHistory.CloneGroup();
+ }
+ }
+
+ private ObservableCollection<ProcessParametersTablesGroup> _groupsHistory;
- public ObservableCollection<RmlsProcessParametersTable> RmlProcessParametersTables
+ public ObservableCollection<ProcessParametersTablesGroup> GroupsHistory
{
- get { return _rmlProcessParametersTables; }
- set { _rmlProcessParametersTables = value; RaisePropertyChangedAuto(); }
+ get { return _groupsHistory; }
+ set { _groupsHistory = value; RaisePropertyChangedAuto(); }
}
- private DBViewContextWrapper<Rml> _selectedRML;
- public DBViewContextWrapper<Rml> SelectedRML
+ private Rml _selectedRML;
+
+ public Rml SelectedRML
{
get { return _selectedRML; }
set { _selectedRML = value; RaisePropertyChangedAuto(); InvalidateLiquidFactorsAndProcessTables(); InvalidateRelayCommands(); }
@@ -66,24 +94,48 @@ namespace Tango.MachineStudio.Developer.ViewModels
public RelayCommand ToggleSideBarCommand { get; set; }
+ public RelayCommand SaveProcessParametersCommand { get; set; }
+
+ public RelayCommand SaveLiquidFactorsCommand { get; set; }
+
public MainViewVM()
{
IsSideBarOpened = true;
}
[PreferredConstructor]
- public MainViewVM(IStudioApplicationManager applicationManager)
+ public MainViewVM(IStudioApplicationManager applicationManager, INotificationProvider notificationProvider)
{
+ _notification = notificationProvider;
Adapter = ObservablesEntitiesAdapter.Instance;
EditMachineCommand = new RelayCommand(EditMachine, (x) => SelectedMachine != null);
ApplicationManager = applicationManager;
EditRMLCommand = new RelayCommand(EditRML, (x) => SelectedRML != null);
ToggleSideBarCommand = new RelayCommand(() => IsSideBarOpened = !IsSideBarOpened);
+ SaveProcessParametersCommand = new RelayCommand(SaveProcessParameters);
+ SaveLiquidFactorsCommand = new RelayCommand(SaveLiquidFactors);
+ }
+
+ private async void SaveLiquidFactors()
+ {
+ if (SelectedRML != null)
+ {
+ using (_notification.PushTaskItem("Saving Liquid Factors..."))
+ {
+ String machineGuid = SelectedMachine.Guid;
+ String rmlGuid = SelectedRML.Guid;
+
+ await SelectedRML.SaveAsync();
+
+ SelectedMachine = Adapter.Machines.SingleOrDefault(x => x.Guid == machineGuid);
+ SelectedRML = Adapter.Rmls.SingleOrDefault(x => x.Guid == rmlGuid);
+ }
+ }
}
private void EditRML()
{
- ApplicationManager.RequestModule("Data Base", SelectedRML.EditEntity);
+ ApplicationManager.RequestModule("Data Base", SelectedRML);
}
private void EditMachine()
@@ -96,12 +148,60 @@ namespace Tango.MachineStudio.Developer.ViewModels
InvalidateLiquidFactorsAndProcessTables();
}
+ private async void SaveProcessParameters()
+ {
+ var response = _notification.ShowTextInput("Enter Group Name", "Group Name");
+
+ if (response == null) return;
+
+ using (_notification.PushTaskItem("Saving Parameters Group..."))
+ {
+ ProcessParametersTablesGroup group = new ProcessParametersTablesGroup();
+
+ List<ProcessParametersTable> tables = new List<ProcessParametersTable>();
+ foreach (var table in RmlProcessParametersTableGroup.ProcessParametersTables)
+ {
+ var newTable = table.CloneEntity();
+ newTable.ProcessParametersTablesGroups = group;
+ tables.Add(newTable);
+ }
+
+ group.Active = true;
+ group.ProcessParametersTables = tables.ToObservableCollection();
+ group.Rml = SelectedRML;
+ group.Name = response;
+ group.SaveDate = DateTime.UtcNow;
+
+ foreach (var g in SelectedRML.ProcessParametersTablesGroups)
+ {
+ g.Active = false;
+ }
+
+ String machineGuid = SelectedMachine.Guid;
+ String rmlGuid = SelectedRML.Guid;
+
+ SelectedRML.ProcessParametersTablesGroups.Add(group);
+ await SelectedRML.SaveAsync();
+
+ SelectedMachine = Adapter.Machines.SingleOrDefault(x => x.Guid == machineGuid);
+ SelectedRML = Adapter.Rmls.SingleOrDefault(x => x.Guid == rmlGuid);
+ }
+ }
+
private void InvalidateLiquidFactorsAndProcessTables()
{
if (SelectedRML != null && SelectedMachine != null)
{
- LiquidTypesRmls = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidTypes).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.EditEntity.Guid).ToList();
- RmlProcessParametersTables = SelectedRML.EditEntity.RmlsProcessParametersTables.ToObservableCollection();
+ LiquidTypesRmls = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidTypes).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.Guid).ToList();
+ RmlProcessParametersTableGroup = SelectedRML.ProcessParametersTablesGroups.SingleOrDefault(x => x.Active);
+
+ if (RmlProcessParametersTableGroup != null)
+ {
+ RmlProcessParametersTableGroup = RmlProcessParametersTableGroup.CloneGroup();
+ RmlProcessParametersTableGroup.ProcessParametersTables = RmlProcessParametersTableGroup.ProcessParametersTables.OrderBy(x => x.TableIndex).ToObservableCollection();
+ }
+
+ GroupsHistory = SelectedRML.ProcessParametersTablesGroups.OrderByDescending(x => x.SaveDate).OrderBy(x => !x.Active).ToObservableCollection();
}
}
}
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 d6cba4914..fa6cbbd76 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
@@ -77,18 +77,45 @@
<Expander Header="PROCESS PARAMETERS" IsExpanded="True">
<Grid>
<Grid Height="250">
- <StackPanel Orientation="Horizontal" Margin="20 0 0 0">
- <ItemsControl ItemsSource="{Binding RmlProcessParametersTables}">
+ <StackPanel Orientation="Horizontal" Margin="25 0 0 0">
+
+ <Border Width="140" Margin="0 0 10 0" Padding="5" CornerRadius="5" BorderThickness="1" BorderBrush="Silver">
+ <DockPanel>
+ <TextBlock DockPanel.Dock="Top" VerticalAlignment="Center" Padding="2">HISTORY</TextBlock>
+ <ListBox Margin="0 10 0 0" ItemsSource="{Binding GroupsHistory}" SelectedItem="{Binding SelectedGroupHistory}">
+ <ListBox.ItemTemplate>
+ <DataTemplate>
+ <StackPanel>
+ <TextBlock Text="{Binding Name}" FontSize="11" FontWeight="Bold">
+ <TextBlock.Style>
+ <Style TargetType="TextBlock">
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Active}" Value="True">
+ <Setter Property="Foreground" Value="#FF5F5F"></Setter>
+ <Setter Property="FontStyle" Value="Italic"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </TextBlock.Style>
+ </TextBlock>
+ <TextBlock Text="{Binding SaveDate}" FontStyle="Italic" Foreground="Gray" FontSize="10"></TextBlock>
+ </StackPanel>
+ </DataTemplate>
+ </ListBox.ItemTemplate>
+ </ListBox>
+ </DockPanel>
+ </Border>
+ <ItemsControl ItemsSource="{Binding RmlProcessParametersTableGroup.ProcessParametersTables}" IsEnabled="{Binding RmlProcessParametersTableGroup.Active}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel IsItemsHost="True"></WrapPanel>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
- <DataTemplate DataType="{x:Type observables:RmlsProcessParametersTable}">
+ <DataTemplate DataType="{x:Type observables:ProcessParametersTable}">
<Border Padding="5" CornerRadius="5" BorderThickness="1" BorderBrush="Silver" Height="250" Margin="0 0 10 0">
<DockPanel>
- <TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding ProcessParametersTables.Name}"></TextBox>
+ <TextBox materialDesign:HintAssist.Hint="Table Name" DockPanel.Dock="Top" Text="{Binding Name}"></TextBox>
<WrapPanel Orientation="Vertical" Margin="0 5 0 0">
<WrapPanel.Resources>
<Style TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
@@ -105,98 +132,98 @@
<Setter Property="Margin" Value="5"></Setter>
<Setter Property="CornerRadius" Value="3"></Setter>
</Style>
-
-
+
+
</WrapPanel.Resources>
<Border>
<StackPanel>
<TextBlock>Dyeing Speed:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.DyeingSpeed,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DyeingSpeed,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Min Ink Uptake:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.MinInkUptake,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding MinInkUptake,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Mixer Temp:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.MixerTemp,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding MixerTemp,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Head Zone1 Temp:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.HeadZone1Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding HeadZone1Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Head Zone2 Temp:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.HeadZone2Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding HeadZone2Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Head Zone3 Temp:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.HeadZone3Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding HeadZone3Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Head Air Flow:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.HeadAirFlow,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding HeadAirFlow,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Feeder Tension:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.FeederTension,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding FeederTension,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Puller Tension:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.PullerTension,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding PullerTension,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Dryer Buffer Length:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.DryerBufferLength,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DryerBufferLength,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Dryer Zone1 Temp:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.DryerZone1Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DryerZone1Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Dryer Zone2 Temp:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.DryerZone2Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DryerZone2Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Dryer Zone3 Temp:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.DryerZone3Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DryerZone3Temp,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
@@ -204,28 +231,14 @@
<Border>
<StackPanel>
<TextBlock>Dryer Air Flow:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.DryerAirFlow,Mode=TwoWay}"></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding DryerAirFlow,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
<Border>
<StackPanel>
<TextBlock>Winder Tension:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.WinderTension,Mode=TwoWay}"></mahapps:NumericUpDown>
- </StackPanel>
- </Border>
-
- <Border>
- <StackPanel>
- <TextBlock>Lubrication NL/CM:</TextBlock>
- <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding ProcessParametersTables.LubricationNlPerCm,Mode=TwoWay}"></mahapps:NumericUpDown>
- </StackPanel>
- </Border>
-
- <Border>
- <StackPanel>
- <TextBlock>Lubrication:</TextBlock>
- <ToggleButton HorizontalAlignment="Right" IsChecked="{Binding ProcessParametersTables.Lubrication}"></ToggleButton>
+ <mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding WinderTension,Mode=TwoWay}"></mahapps:NumericUpDown>
</StackPanel>
</Border>
</WrapPanel>
@@ -234,10 +247,14 @@
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
+
+ <StackPanel Margin="5 0 0 10" VerticalAlignment="Bottom">
+ <Button Command="{Binding SaveProcessParametersCommand}">SAVE GROUP</Button>
+ </StackPanel>
</StackPanel>
</Grid>
- <Grid Height="150">
+ <Grid Background="White">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Visibility" Value="Visible"></Setter>
@@ -324,7 +341,7 @@
<Expander Header="MEDIA" Background="{StaticResource SideBarBackground}" IsExpanded="True">
<StackPanel>
- <ComboBox DockPanel.Dock="Top" ItemsSource="{Binding Adapter.Rmls}" SelectedItem="{Binding SelectedRML,Converter={StaticResource DbRmlViewToEntityConverter}}" materialDesign:HintAssist.IsFloating="True" materialDesign:HintAssist.Hint="Selected Thread" Margin="40 0 40 0">
+ <ComboBox DockPanel.Dock="Top" ItemsSource="{Binding Adapter.Rmls}" SelectedItem="{Binding SelectedRML}" materialDesign:HintAssist.IsFloating="True" materialDesign:HintAssist.Hint="Selected Thread" Margin="40 0 40 0">
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel>
@@ -382,9 +399,16 @@
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
+
+ <Button Command="{Binding SaveLiquidFactorsCommand}" HorizontalAlignment="Right" Margin="0 10 -20 20" Style="{StaticResource MaterialDesignFlatButton}">
+ <StackPanel Orientation="Horizontal">
+ <materialDesign:PackIcon VerticalAlignment="Center" Kind="Harddisk"></materialDesign:PackIcon>
+ <TextBlock Margin="10 0 0 0">SAVE</TextBlock>
+ </StackPanel>
+ </Button>
</StackPanel>
- <Grid Height="150">
+ <Grid Height="150" Background="{StaticResource SideBarBackground}">
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Visibility" Value="Visible"></Setter>