Пример #1
0
        protected override void FillTreeWithData(ObjectSelectorEditor.Selector selector, ITypeDescriptorContext context, IServiceProvider provider)
        {
            if (context == null || context.Instance == null)
            {
                return;
            }
            this.instance = context.Instance;
            selector.Clear();
            if (this.BdDbx0JCT)
            {
                selector.AddNode(USaG3GpjZagj1iVdv4u.Y4misFk9D9(424), (object)null, (ObjectSelectorEditor.SelectorNode)null);
            }
            foreach (KeyValuePair <string, object> keyValuePair in this.GetItems())
            {
                selector.AddNode(keyValuePair.Key, keyValuePair.Value, (ObjectSelectorEditor.SelectorNode)null);
            }
            object obj = context.PropertyDescriptor.GetValue(context.Instance);

            if (obj == null && this.BdDbx0JCT)
            {
                selector.SelectedNode = selector.Nodes[0];
            }
            else
            {
                foreach (ObjectSelectorEditor.SelectorNode selectorNode in selector.Nodes)
                {
                    if (selectorNode.value != null && selectorNode.value.Equals(obj))
                    {
                        selector.SelectedNode = (TreeNode)selectorNode;
                        break;
                    }
                }
            }
        }
Пример #2
0
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            IProvider provider = value as IProvider;

            if (provider != null)
            {
                return((object)provider.Name);
            }
            else
            {
                return((object)USaG3GpjZagj1iVdv4u.Y4misFk9D9(11156));
            }
        }
Пример #3
0
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            IComponentBase componentBase = value as IComponentBase;

            if (componentBase != null)
            {
                return((object)componentBase.Name);
            }
            else
            {
                return((object)USaG3GpjZagj1iVdv4u.Y4misFk9D9(2260));
            }
        }