private void update() { if (_arrayProperty != null) { textBox.Text = DesignerArray.RetrieveDisplayValue(_arrayProperty.ItemList); button.Enabled = true; } else if (_structProperty != null) { //textBox.Text = "(Multiple properties)"; MethodDef method = null; Nodes.Action action = this._object as Nodes.Action; if (action != null) { method = action.Method; } textBox.Text = DesignerPropertyUtility.RetrieveDisplayValue(_structProperty.Owner, method, _structProperty.Name, _structProperty.ElmentIndexInArray); button.Enabled = true; } else { textBox.Text = "null"; //textBox.Text = DesignerPropertyUtility.RetrieveDisplayValue(_property, null, null); button.Enabled = false; } }
public static string RetrieveExportValue(object obj) { if (obj != null) { Type type = obj.GetType(); if (Plugin.IsArrayType(type)) { Type itemType = type.GetGenericArguments()[0]; System.Collections.IList list = (System.Collections.IList)obj; string str = string.Empty; foreach (object item in list) { if (!string.IsNullOrEmpty(str)) { str += "|"; } str += DesignerPropertyUtility.RetrieveExportValue(item, null, null); } return(string.Format("{0}:{1}", list.Count, str)); } } return(string.Empty); }
public override string GetExportValue(object owner, object obj) { return(DesignerPropertyUtility.RetrieveExportValue(obj, null, null)); }
public override string GetDisplayValue(object obj) { return(DesignerPropertyUtility.RetrieveDisplayValue(obj, null, null)); }