aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
index 1da3723d1..2fcb87c59 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
@@ -29,6 +29,7 @@ using Google.Protobuf;
using Tango.ColorConversion;
using Tango.CSV;
using Tango.Core;
+using Tango.SharedUI.Helpers;
namespace Tango.MachineStudio.RML.ViewModels
{
@@ -282,6 +283,8 @@ namespace Tango.MachineStudio.RML.ViewModels
public RelayCommand<ProcessParametersTable> RemoveProcessParametersTableCommand { get; set; }
+ public RelayCommand<ProcessParametersTable> CopyProcessParametersTableCommand { get; set; }
+
public RelayCommand AddLiquidFactorCommand { get; set; }
public RelayCommand<LiquidTypesRml> RemoveLiquidFactorCommand { get; set; }
@@ -329,6 +332,7 @@ namespace Tango.MachineStudio.RML.ViewModels
BackToRmlsCommand = new RelayCommand(BackToRmls, () => IsFree);
AddProcessParametersTableCommand = new RelayCommand(AddProcessParametersTable, () => IsFree);
RemoveProcessParametersTableCommand = new RelayCommand<ProcessParametersTable>(RemoveProcessParametersTable, () => IsFree);
+ CopyProcessParametersTableCommand = new RelayCommand<ProcessParametersTable>(CopyProcessParametersTable, () => IsFree);
AddLiquidFactorCommand = new RelayCommand(AddLiquidFactor, () => IsFree);
RemoveLiquidFactorCommand = new RelayCommand<LiquidTypesRml>(RemoveLiquidFactor, () => IsFree);
CreateCalibrationDataExcelTemplateCommand = new RelayCommand(CreateCalibrationDataExcelTemplate);
@@ -481,6 +485,8 @@ namespace Tango.MachineStudio.RML.ViewModels
{
IsFree = false;
+ UIHelper.DoEvents();
+
if (_active_context != null)
{
_active_context.Dispose();
@@ -1045,6 +1051,18 @@ namespace Tango.MachineStudio.RML.ViewModels
}
}
+ private void CopyProcessParametersTable(ProcessParametersTable processParametersTable)
+ {
+ var nextTable = ActiveProcessParametersGroup.ProcessParametersTables.FirstOrDefault(x => x.TableIndex == processParametersTable.TableIndex + 1);
+ if (nextTable != null)
+ {
+ for (int i = 0; i < processParametersTable.VisualParameters.Count; i++)
+ {
+ nextTable.VisualParameters[i].Value = processParametersTable.VisualParameters[i].Value;
+ }
+ }
+ }
+
private void CreateCalibrationDataExcelTemplate()
{
SaveFileDialog dlg = new SaveFileDialog();