46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using CPSO;
|
|
using CaeModel;
|
|
using CaeMesh;
|
|
using CaeGlobals;
|
|
|
|
|
|
namespace CPSO.Commands
|
|
{
|
|
[Serializable]
|
|
class CImportParameters : PreprocessCommand, IImportFileCommand
|
|
{
|
|
// Variables
|
|
private string _fileName;
|
|
|
|
|
|
// Properties
|
|
public string FileName { get { return _fileName; } set { _fileName = value; } }
|
|
|
|
|
|
// Constructor
|
|
public CImportParameters(string fileName)
|
|
: base("Import parameters")
|
|
{
|
|
_fileName = Tools.GetLocalPath(fileName);
|
|
}
|
|
|
|
|
|
// Methods
|
|
public override bool Execute(Controller receiver)
|
|
{
|
|
receiver.ImportParametersFromFile(Tools.GetGlobalPath(_fileName));
|
|
return true;
|
|
}
|
|
|
|
public override string GetCommandString()
|
|
{
|
|
return base.GetCommandString() + _fileName;
|
|
}
|
|
}
|
|
}
|