Files
wg_cpso/CPSO/Commands/0100_Analysis/CPrepareAndRunJob.cs

54 lines
1.7 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 CaeMesh;
using CaeGlobals;
using CaeJob;
using CPSO.Forms;
namespace CPSO.Commands
{
[Serializable]
class CPrepareAndRunJob : AnalysisCommand, ICommandAsynchronous
{
// Variables
private string _jobName;
private bool _onlyCheckModel;
// Properties
public string JobName { get { return _jobName; } }
// Constructor
public CPrepareAndRunJob(string jobName, bool onlyCheckModel)
: base("Run analysis")
{
_jobName = jobName;
_onlyCheckModel = onlyCheckModel;
}
// Methods
public override bool Execute(Controller receiver)
{
return receiver.PrepareAndRunJob(_jobName, _onlyCheckModel);
//return true;
}
public bool ExecuteSynchronous(Controller receiver)
{
return receiver.PrepareAndRunJob(_jobName, _onlyCheckModel, false);
//return true;
}
public override string GetCommandString()
{
return base.GetCommandString() + _jobName.ToString();
}
}
}