Files
wg_cpso/CPSO/Forms/51_Step/ViewBuckleStep.cs

75 lines
2.4 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 System.ComponentModel;
using CaeGlobals;
using DynamicTypeDescriptor;
namespace CPSO
{
[Serializable]
public class ViewBuckleStep : ViewStep
{
// Variables
private CaeModel.BuckleStep _buckleStep;
// Properties
[Category("Data")]
[OrderedDisplayName(4, 10, "Perturbation")]
[Description("Perturbation parameter set to On applies preloads from the previous step if it exists.")]
[Id(5, 1)]
public bool Perturbation { get { return _buckleStep.Perturbation; } set { _buckleStep.Perturbation = value; } }
//
[Category("Data")]
[OrderedDisplayName(5, 10, "Num. of buckling factors")]
[Description("Number of buckling factors desired (default: 1).")]
[Id(6, 1)]
public int NumBucklingFactors
{
get { return _buckleStep.NumOfBucklingFactors; }
set { _buckleStep.NumOfBucklingFactors = value; }
}
//
[Category("Data")]
[OrderedDisplayName(6, 10, "Accuracy")]
[Description("Accuracy desired (default: 0.01).")]
[Id(7, 1)]
[TypeConverter(typeof(StringDoubleConverter))]
public double Accuracy { get { return _buckleStep.Accuracy; } set { _buckleStep.Accuracy = value; } }
// Constructors
public ViewBuckleStep(CaeModel.BuckleStep step, bool installProvider = true)
: base(step)
{
_buckleStep = step;
//
if (installProvider)
{
InstallProvider();
UpdateVisibility();
}
}
// Methods
public override CaeModel.Step GetBase()
{
return _buckleStep;
}
public override void InstallProvider()
{
base.InstallProvider();
//
_dctd.RenameBooleanPropertyToOnOff("Perturbation");
}
public override void UpdateVisibility()
{
base.UpdateVisibility();
}
}
}