Files
wg_cpso/CPSO/Commands/0110_Results/03_HistoryOutput/CReplaceResultHisotryOutput.cs

42 lines
1.5 KiB
C#
Raw 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 CReplaceResultHistoryOutput : PostprocessCommand
{
// Variables
private string _oldResultHistoryOutputName;
private ResultHistoryOutput _newResultHistoryOutput;
// Constructor
public CReplaceResultHistoryOutput(string oldHistoryOutputName, ResultHistoryOutput newResultHistoryOutput)
: base("Edit result history output")
{
_oldResultHistoryOutputName = oldHistoryOutputName;
_newResultHistoryOutput = newResultHistoryOutput.DeepClone();
}
// Methods
public override bool Execute(Controller receiver)
{
receiver.ReplaceResultHistoryOutput(_oldResultHistoryOutputName, _newResultHistoryOutput.DeepClone());
return true;
}
public override string GetCommandString()
{
return base.GetCommandString() + _oldResultHistoryOutputName + ", " + _newResultHistoryOutput.ToString();
}
}
}