本文整理汇总了C#中Behaviac.Design.PropertyDef类的典型用法代码示例。如果您正苦于以下问题:C# PropertyDef类的具体用法?C# PropertyDef怎么用?C# PropertyDef使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PropertyDef类属于Behaviac.Design命名空间,在下文中一共展示了PropertyDef类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: MetaPropertyDialog
public MetaPropertyDialog(bool canBeEdited, AgentType agent, CustomizedStruct customizedStruct, PropertyDef prop, bool canBePar)
{
InitializeComponent();
this.Owner = MainWindow.Instance;
this.metaPropertyPanel.Initialize(canBeEdited, agent, customizedStruct, prop, canBePar);
}
开发者ID:675492062,项目名称:behaviac,代码行数:8,代码来源:MetaPropertyDialog.cs
示例2: ResetMembers
public override bool ResetMembers(bool check, AgentType agentType, bool clear, MethodDef method = null, PropertyDef property = null)
{
bool bReset = false;
if (this._frames != null)
{
bReset |= this._frames.ResetMembers(check, agentType, clear, method, property);
}
bReset |= base.ResetMembers(check, agentType, clear, method, property);
return bReset;
}
开发者ID:675492062,项目名称:behaviac,代码行数:13,代码来源:WaitFramesState.cs
示例3: Initialize
public void Initialize(bool canBeEdit, AgentType agent, CustomizedStruct customizedStruct, PropertyDef prop, bool canBePar)
{
Debug.Check(agent != null || customizedStruct != null);
_initialized = false;
_isModified = false;
_isNew = (prop == null);
_agent = agent;
_customizedStruct = customizedStruct;
_originalProperty = prop;
setTypes();
if (_isNew)
{
this.Text = canBeEdit ? Resources.AddProperty : Resources.ViewProperty;
if (customizedStruct == null)
_property = new PropertyDef(agent, null, agent.AgentTypeName, "", "", "");
else
_property = new PropertyDef(null, null, customizedStruct.Name, "", "", "");
}
else
{
this.Text = canBeEdit ? Resources.EditProperty : Resources.ViewProperty;
resetProperty(prop, prop.IsPar);
}
this.isStaticCheckBox.Visible = (agent != null);
this.isPublicCheckBox.Visible = !canBeEdit && (agent != null);
this.isConstcheckBox.Visible = (agent != null);
this.customizedCheckBox.Visible = !canBeEdit && !_property.IsInherited;
this.isLocalCheckBox.Checked = customizedStruct == null && _property.IsPar;
this.isLocalCheckBox.Visible = canBePar && customizedStruct == null && !_property.IsMember;
this.nameTextBox.Enabled = canBeEdit;
this.arrayCheckBox.Enabled = canBeEdit || _property.IsChangeableType;
this.typeComboBox.Enabled = canBeEdit || _property.IsChangeableType;
this.isStaticCheckBox.Enabled = canBeEdit;
this.isConstcheckBox.Enabled = canBeEdit;
this.dispTextBox.Enabled = canBeEdit;
this.descTextBox.Enabled = canBeEdit;
_initialized = true;
}
开发者ID:Just4F,项目名称:behaviac,代码行数:45,代码来源:MetaPropertyPanel.cs
示例4: SwapTwoProperties
public bool SwapTwoProperties(PropertyDef property1, PropertyDef property2) {
if (property1 != null && (property1.IsCustomized || property1.IsPar) &&
property2 != null && (property2.IsCustomized || property2.IsPar) &&
(property1.IsCustomized == property2.IsCustomized || property1.IsPar == property2.IsPar)) {
int index1 = getPropertyIndex(property1);
int index2 = getPropertyIndex(property2);
if (index1 >= 0 && index2 >= 0) {
this._propertyList[index1] = property2;
this._propertyList[index2] = property1;
return true;
}
}
return false;
}
开发者ID:Just4F,项目名称:behaviac,代码行数:17,代码来源:Agent.cs
示例5: ParInfo
public ParInfo(PropertyDef other)
{
this.CopyFrom(other);
}
开发者ID:Just4F,项目名称:behaviac,代码行数:4,代码来源:DataType.cs
示例6: ResetMembers
public bool ResetMembers(bool check, AgentType agentType, bool clear, PropertyDef property)
{
if (property != null && this._property != null &&
(property.OldName == this._property.Name ||
!property.IsArrayElement && this._property.IsArrayElement &&
(property.OldName + "[]") == this._property.Name))
{
if (!check)
{
if (clear || this._property.ShouldBeCleared(agentType))
{
this._property = null;
}
else
{
bool isArrayElement = this._property.IsArrayElement;
this._property.CopyFrom(property);
if (isArrayElement)
{ this._property.SetArrayElement(property); }
}
}
return true;
}
return false;
}
开发者ID:Just4F,项目名称:behaviac,代码行数:30,代码来源:DataType.cs
示例7: VariableDef
public VariableDef(PropertyDef property, string valueType)
{
SetProperty(property, valueType);
}
开发者ID:Just4F,项目名称:behaviac,代码行数:4,代码来源:DataType.cs
示例8: SetArrayElement
public void SetArrayElement(PropertyDef arrayProperty)
{
Debug.Check(arrayProperty != null && arrayProperty.Type != null && Plugin.IsArrayType(arrayProperty.Type));
this.IsArrayElement = true;
this.IsAddedAutomatically = true;
this.Type = arrayProperty.Type.GetGenericArguments()[0];
this.Name = arrayProperty.Name + "[]";
this.DisplayName = arrayProperty.DisplayName + "[]";
this.Description = this.DisplayName;
}
开发者ID:Just4F,项目名称:behaviac,代码行数:11,代码来源:DataType.cs
示例9: PropertyDef
public PropertyDef(PropertyDef other)
{
this.CopyFrom(other);
}
开发者ID:Just4F,项目名称:behaviac,代码行数:4,代码来源:DataType.cs
示例10: addRowControl
private void addRowControl(PropertyDef property) {
this.tableLayoutPanel.RowCount++;
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
int rowIndex = _rowControls.Count + 1;
RowControl rowControl = new RowControl();
_rowControls.Add(rowControl);
rowControl.Name = property.BasicName;
rowControl.NameLabel = new System.Windows.Forms.Label();
rowControl.NameLabel.Dock = System.Windows.Forms.DockStyle.Fill;
rowControl.NameLabel.Margin = new System.Windows.Forms.Padding(0);
rowControl.NameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
rowControl.NameLabel.Text = property.DisplayName;
this.tableLayoutPanel.Controls.Add(rowControl.NameLabel, 0, rowIndex);
rowControl.TypeLabel = new System.Windows.Forms.Label();
rowControl.TypeLabel.Dock = System.Windows.Forms.DockStyle.Fill;
rowControl.TypeLabel.Margin = new System.Windows.Forms.Padding(0);
rowControl.TypeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
rowControl.TypeLabel.Text = Plugin.GetNativeTypeName(property.Type);
this.tableLayoutPanel.Controls.Add(rowControl.TypeLabel, 1, rowIndex);
rowControl.ValueEditor = createPropertyEditor(property);
rowControl.ValueEditor.Dock = System.Windows.Forms.DockStyle.Fill;
rowControl.ValueEditor.Margin = new System.Windows.Forms.Padding(0);
this.tableLayoutPanel.Controls.Add(rowControl.ValueEditor, 2, rowIndex);
}
开发者ID:675492062,项目名称:behaviac,代码行数:29,代码来源:ParametersPanel.cs
示例11: GetGeneratedPropertyDefaultValue
public static string GetGeneratedPropertyDefaultValue(PropertyDef prop, string typename)
{
return (prop != null) ? GetGeneratedDefaultValue(prop.Type, typename, prop.DefaultValue) : null;
}
开发者ID:675492062,项目名称:behaviac,代码行数:4,代码来源:DataCppExporter.cs
示例12: ResetMembers
public override bool ResetMembers(bool check, AgentType agentType, bool clear, MethodDef method = null, PropertyDef property = null) {
bool bReset = false;
if (this.Opl != null) {
bReset |= this.Opl.ResetMembers(check, agentType, clear, method, property);
}
if (this.Opr1 != null) {
bReset |= this.Opr1.ResetMembers(check, agentType, clear, method, property);
}
if (this.Opr2 != null) {
bReset |= this.Opr2.ResetMembers(check, agentType, clear, method, property);
}
bReset |= base.ResetMembers(check, agentType, clear, method, property);
if (!check && bReset) {
OnPropertyValueChanged(false);
}
return bReset;
}
开发者ID:Just4F,项目名称:behaviac,代码行数:23,代码来源:AttachAction.cs
示例13: resetProperty
private void resetProperty(PropertyDef prop, bool isPar)
{
if (isPar)
_property = new ParInfo(prop);
else
_property = new PropertyDef(prop);
_property.OldName = prop.Name;
_isArray = Plugin.IsArrayType(_property.Type);
Type type = _isArray ? _property.Type.GetGenericArguments()[0] : _property.Type;
this.nameTextBox.Text = _property.BasicName;
this.arrayCheckBox.Checked = _isArray;
this.typeComboBox.Text = Plugin.GetMemberValueTypeName(type);
this.isStaticCheckBox.Checked = _property.IsStatic;
this.isPublicCheckBox.Checked = _property.IsPublic;
this.isConstcheckBox.Checked = _property.IsReadonly;
this.customizedCheckBox.Checked = _property.IsExportedButAlsoCustomized;
this.dispTextBox.Text = _property.DisplayName;
this.descTextBox.Text = _property.BasicDescription;
resetType(type, false);
}
开发者ID:Just4F,项目名称:behaviac,代码行数:23,代码来源:MetaPropertyPanel.cs
示例14: GetGeneratedPropertyDefaultValue
public static string GetGeneratedPropertyDefaultValue(PropertyDef prop, string typename)
{
string value = "";
if (prop != null)
{
value = prop.DefaultValue;
if (Plugin.IsStringType(prop.Type))
{
value = "\"" + value + "\"";
}
else if (Plugin.IsBooleanType(prop.Type))
{
value = value.ToLowerInvariant();
}
else if (Plugin.IsEnumType(prop.Type))
{
value = string.Format("{0}.{1}", typename, value);
}
else if (Plugin.IsArrayType(prop.Type))
{
value = "";
}
else if (Plugin.IsCustomClassType(prop.Type))
{
value = "";
}
}
return value;
}
开发者ID:pjkui,项目名称:behaviac,代码行数:32,代码来源:DataCsExporter.cs
示例15: getPropertyIndex
private int getPropertyIndex(PropertyDef property) {
if (property != null) {
for (int i = 0; i < this._propertyList.Count; ++i) {
if (property == this._propertyList[i])
{ return i; }
}
}
return -1;
}
开发者ID:Just4F,项目名称:behaviac,代码行数:10,代码来源:Agent.cs
示例16: ResetMembers
public override bool ResetMembers(bool check, AgentType agentType, bool clear, MethodDef method = null, PropertyDef property = null) {
bool bReset = false;
if (this._task != null && method != null && this._task.Name == method.OldName) {
if (method != null && this._task.Name == method.OldName &&
(clear || this._task.ShouldBeCleared(agentType))) {
bReset = true;
if (!check)
{ this._task = null; }
} else {
bReset |= this._task.ResetMembers(check, agentType, clear, method, property);
}
}
bReset |= base.ResetMembers(check, agentType, clear, method, property);
return bReset;
}
开发者ID:675492062,项目名称:behaviac,代码行数:20,代码来源:Task.cs
示例17: createPropertyEditor
private DesignerPropertyEditor createPropertyEditor(PropertyDef property) {
Type type = property.Type;
Type editorType = Plugin.InvokeEditorType(type);
Debug.Check(editorType != null);
DesignerPropertyEditor editor = (DesignerPropertyEditor)editorType.InvokeMember(string.Empty, BindingFlags.CreateInstance, null, null, new object[0]);
editor.TabStop = false;
editor.Dock = System.Windows.Forms.DockStyle.Fill;
editor.Margin = new System.Windows.Forms.Padding(0);
editor.ValueWasChanged += new DesignerPropertyEditor.ValueChanged(editor_ValueWasChanged);
VariableDef var = new VariableDef(Plugin.DefaultValue(type));
editor.SetVariable(var, null);
editor.ValueWasAssigned();
return editor;
}
开发者ID:675492062,项目名称:behaviac,代码行数:18,代码来源:ParametersPanel.cs
示例18: resetMembersInWorkspace
private void resetMembersInWorkspace(AgentType agentType, bool clear, MethodDef method, PropertyDef property)
{
foreach(Nodes.BehaviorNode behavior in getAllBehaviors(property)) {
if (behavior != null && behavior is Nodes.Node) {
bool bReset = ((Nodes.Node)behavior).ResetMembers(false, agentType, clear, method, property);
if (bReset)
UndoManager.Save(behavior);
}
}
}
开发者ID:yecaokinux,项目名称:behaviac,代码行数:10,代码来源:MetaStoreDock.cs
示例19: MemberItem
public MemberItem(string displayName, PropertyDef property)
{
DisplayName = displayName;
Property = property;
}
开发者ID:yecaokinux,项目名称:behaviac,代码行数:5,代码来源:MetaStoreDock.cs
示例20: CopyFrom
public virtual void CopyFrom(PropertyDef other)
{
if (other == null)
return;
_agentType = other._agentType;
_propertyInfo = other._propertyInfo;
_type = other._type;
_isChangeableType = other._isChangeableType;
_isStatic = other._isStatic;
_isPublic = other._isPublic;
_isProperty = other._isProperty;
_isReadonly = other._isReadonly;
_classname = other._classname;
_owner = other._owner;
_name = other._name;
_nativeType = other._nativeType;
_displayName = other._displayName;
_description = other._description;
_isAddedAutomatically = other._isAddedAutomatically;
_isArrayElement = other._isArrayElement;
_isExportedButAlsoCustomized = other._isExportedButAlsoCustomized;
if (other._variable != null)
{ _variable = (VariableDef)other._variable.Clone(); }
}
开发者ID:Just4F,项目名称:behaviac,代码行数:26,代码来源:DataType.cs
注:本文中的Behaviac.Design.PropertyDef类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论