Files
wg_cpso/CPSO/Commands/0110_Results/02_FieldOutput/CReplaceResultFieldOutput.cs

42 lines
1.5 KiB
C#
Raw Permalink Normal View History

2026-03-25 18:20:24 +08:00
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();
}
}
}