Files
wg_cpso/CPSO/Forms/52_HistoryOutput/ViewHistoryOutput.cs
2026-03-25 18:20:24 +08:00

58 lines
2.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
using CaeGlobals;
namespace CPSO
{
[Serializable]
public abstract class ViewHistoryOutput : ViewMultiRegion
{
// Variables
private string _selectionHidden;
// Properties
[Category("Data")]
[OrderedDisplayName(0, 10, "Name")]
[Description("Name of the history output.")]
public abstract string Name { get; set; }
//
[Category("Data")]
[OrderedDisplayName(10, 10, "Global")]
[Description("Parameter global controls whether the results are saved in a global or local coordinate system.")]
public abstract bool Global { get; set; }
//
[Category("Region")]
[OrderedDisplayName(0, 10, "Region type")]
[Description("Select the region type for the creation of the history output.")]
public override string RegionType { get { return base.RegionType; } set { base.RegionType = value; } }
//
[Category("Region")]
[OrderedDisplayName(1, 10, "Hidden")]
[Description("Hidden.")]
public string SelectionHidden { get { return _selectionHidden; } set { _selectionHidden = value; } }
// Constructors
// Methods
public abstract CaeModel.HistoryOutput GetBase();
public override void UpdateRegionVisibility()
{
base.UpdateRegionVisibility();
// Hide SelectionHidden
DynamicTypeDescriptor.CustomPropertyDescriptor cpd;
if (base.RegionType == RegionTypeEnum.Selection.ToFriendlyString())
{
cpd = base.DynamicCustomTypeDescriptor.GetProperty(nameof(SelectionHidden));
cpd.SetIsBrowsable(false);
}
}
}
}