Example #1
0
        private void GenerateMethods()
        {
            ExposedMethod[] methods = BoundVariableType.GetExposedMethods();
            if (methods != null)
            {
                bool isInitialized = Value != null && !Value.Equals(null);
                for (int i = 0; i < methods.Length; i++)
                {
                    ExposedMethod method = methods[i];
                    if ((isInitialized && method.VisibleWhenInitialized) || (!isInitialized && method.VisibleWhenUninitialized))
                    {
                        ExposedMethodField methodDrawer = (ExposedMethodField)Inspector.CreateDrawerForType(typeof(ExposedMethod), drawArea, Depth + 1, false);
                        if (methodDrawer != null)
                        {
                            methodDrawer.BindTo(typeof(ExposedMethod), string.Empty, () => Value, (value) => Value = value);
                            methodDrawer.SetBoundMethod(method);

                            exposedMethods.Add(methodDrawer);
                        }
                    }
                }
            }
        }
Example #2
0
 public void SetBoundMethod(ExposedMethod boundMethod)
 {
     this.boundMethod = boundMethod;
     NameRaw          = boundMethod.Label;
 }