64 lines
2.2 KiB
C#
64 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 DynamicTypeDescriptor;
|
|||
|
|
using CaeGlobals;
|
|||
|
|
using System.Drawing.Design;
|
|||
|
|
|
|||
|
|
namespace CPSO
|
|||
|
|
{
|
|||
|
|
[Serializable]
|
|||
|
|
public abstract class ViewInitialCondition : ViewMultiRegion
|
|||
|
|
{
|
|||
|
|
// Variables
|
|||
|
|
|
|||
|
|
|
|||
|
|
// Properties
|
|||
|
|
[Category("Data")]
|
|||
|
|
[OrderedDisplayName(0, 10, "Name")]
|
|||
|
|
[Description("Name of the initial condition.")]
|
|||
|
|
[Id(1, 1)]
|
|||
|
|
public abstract string Name { get; set; }
|
|||
|
|
//
|
|||
|
|
[Category("Region")]
|
|||
|
|
[OrderedDisplayName(0, 10, "Region type")]
|
|||
|
|
[Description("Select the region type for the creation of the initial condition.")]
|
|||
|
|
[Id(1, 2)]
|
|||
|
|
public override string RegionType { get { return base.RegionType; } set { base.RegionType = value; } }
|
|||
|
|
//
|
|||
|
|
[Category("Region")]
|
|||
|
|
[OrderedDisplayName(1, 10, "Hidden")]
|
|||
|
|
[Description("Hidden.")]
|
|||
|
|
[Id(2, 2)]
|
|||
|
|
public string SelectionHidden { get; set; }
|
|||
|
|
//
|
|||
|
|
[Category("Appearance")]
|
|||
|
|
[DisplayName("Color")]
|
|||
|
|
[Description("Select load color.")]
|
|||
|
|
[Editor(typeof(UserControls.ColorEditorEx), typeof(UITypeEditor))]
|
|||
|
|
[Id(1, 20)]
|
|||
|
|
public abstract System.Drawing.Color Color { get; set; }
|
|||
|
|
|
|||
|
|
|
|||
|
|
// Constructors
|
|||
|
|
|
|||
|
|
|
|||
|
|
// Methods
|
|||
|
|
public abstract CaeModel.InitialCondition 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);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|