42 lines
1.5 KiB
C#
42 lines
1.5 KiB
C#
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
using CPSO;
|
|||
|
|
using CaeModel;
|
|||
|
|
using CaeGlobals;
|
|||
|
|
using CaeResults;
|
|||
|
|
|
|||
|
|
namespace CPSO.Commands
|
|||
|
|
{
|
|||
|
|
[Serializable]
|
|||
|
|
class CReplaceResultFieldOutput : PostprocessCommand
|
|||
|
|
{
|
|||
|
|
// Variables
|
|||
|
|
private string _oldResultFieldOutputName;
|
|||
|
|
private ResultFieldOutput _newResultFieldOutput;
|
|||
|
|
|
|||
|
|
|
|||
|
|
// Constructor
|
|||
|
|
public CReplaceResultFieldOutput(string oldResultFieldOutputName, ResultFieldOutput newResultFieldOutput)
|
|||
|
|
: base("Edit result field output")
|
|||
|
|
{
|
|||
|
|
_oldResultFieldOutputName = oldResultFieldOutputName;
|
|||
|
|
_newResultFieldOutput = newResultFieldOutput.DeepClone();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
// Methods
|
|||
|
|
public override bool Execute(Controller receiver)
|
|||
|
|
{
|
|||
|
|
receiver.ReplaceResultFieldOutput(_oldResultFieldOutputName, _newResultFieldOutput.DeepClone());
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
public override string GetCommandString()
|
|||
|
|
{
|
|||
|
|
return base.GetCommandString() + _oldResultFieldOutputName + ", " + _newResultFieldOutput.ToString();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|