Ejemplo n.º 1
0
        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;
            }
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public override string GetExportValue(object owner, object obj)
 {
     return(DesignerPropertyUtility.RetrieveExportValue(obj, null, null));
 }
Ejemplo n.º 4
0
 public override string GetDisplayValue(object obj)
 {
     return(DesignerPropertyUtility.RetrieveDisplayValue(obj, null, null));
 }