Inheritance: IDesignerOptionService
Example #1
0
 public bool ShouldAutoShow(IComponent component)
 {
     if (this.serviceProvider != null)
     {
         DesignerOptionService service = this.serviceProvider.GetService(typeof(DesignerOptionService)) as DesignerOptionService;
         if (service != null)
         {
             PropertyDescriptor descriptor = service.Options.Properties["ObjectBoundSmartTagAutoShow"];
             if (((descriptor != null) && (descriptor.PropertyType == typeof(bool))) && !((bool)descriptor.GetValue(null)))
             {
                 return(false);
             }
         }
     }
     if (this.designerActionService != null)
     {
         DesignerActionListCollection componentActions = this.designerActionService.GetComponentActions(component);
         if ((componentActions != null) && (componentActions.Count > 0))
         {
             for (int i = 0; i < componentActions.Count; i++)
             {
                 if (componentActions[i].AutoShow)
                 {
                     return(true);
                 }
             }
         }
     }
     return(false);
 }
 protected override void PopulateOptionCollection(DesignerOptionService.DesignerOptionCollection options)
 {
     if (options.Parent == null)
     {
         DesignerOptions compatibilityOptions = this.CompatibilityOptions;
         if (compatibilityOptions != null)
         {
             base.CreateOptionCollection(options, "DesignerOptions", compatibilityOptions);
         }
     }
 }
Example #3
0
 internal DesignerOptionCollection(DesignerOptionService service, DesignerOptionService.DesignerOptionCollection parent, string name, object value)
 {
     this._service = service;
     this._parent  = parent;
     this._name    = name;
     this._value   = value;
     if (this._parent != null)
     {
         if (this._parent._children == null)
         {
             this._parent._children = new ArrayList(1);
         }
         this._parent._children.Add(this);
     }
 }
Example #4
0
            /// <summary>
            ///     Creates a new DesignerOptionCollection.
            /// </summary>
            internal DesignerOptionCollection(DesignerOptionService service, DesignerOptionCollection parent, string name, object value)
            {
                _service = service;
                Parent   = parent;
                Name     = name;
                _value   = value;

                if (Parent != null)
                {
                    parent._properties = null;
                    if (Parent._children == null)
                    {
                        Parent._children = new ArrayList(1);
                    }
                    Parent._children.Add(this);
                }
            }
Example #5
0
            internal DesignerOptionCollection(DesignerOptionCollection parent, string name, object propertiesProvider, DesignerOptionService service)
            {
                _name = name;
                _propertiesProvider = propertiesProvider;
                _parent             = parent;

                if (parent != null)
                {
                    if (parent._children == null)
                    {
                        parent._children = new ArrayList();
                    }
                    parent._children.Add(this);
                }

                _children      = new ArrayList();
                _optionService = service;
                service.PopulateOptionCollection(this);
            }
 protected virtual new bool ShowDialog(DesignerOptionService.DesignerOptionCollection options, Object optionObject)
 {
   return default(bool);
 }
 protected virtual new void PopulateOptionCollection(DesignerOptionService.DesignerOptionCollection options)
 {
 }
    protected DesignerOptionService.DesignerOptionCollection CreateOptionCollection(DesignerOptionService.DesignerOptionCollection parent, string name, Object value)
    {
      Contract.Ensures(Contract.Result<System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection>() != null);

      return default(DesignerOptionService.DesignerOptionCollection);
    }
		protected override void PopulateOptionCollection (DesignerOptionService.DesignerOptionCollection options)
		{
			throw new NotImplementedException ();
		}
            /// <devdoc>
            ///     Creates a new DesignerOptionCollection.
            /// </devdoc>
            internal DesignerOptionCollection(DesignerOptionService service, DesignerOptionCollection parent, string name, object value) {
                _service = service;
                _parent = parent;
                _name = name;
                _value = value;

                if (_parent != null) {
                    if (_parent._children == null) {
                        _parent._children = new ArrayList(1);
                    }
                    _parent._children.Add(this);
                }
            }
			internal DesignerOptionCollection (DesignerOptionCollection parent, string name, object propertiesProvider, DesignerOptionService service)
			{
				_name = name;
				_propertiesProvider = propertiesProvider;
				_parent = parent;

				if (parent != null) {
					if (parent._children == null)
						parent._children = new ArrayList ();
					parent._children.Add (this);
				}
				
				_children = new ArrayList ();
				_optionService = service;
				service.PopulateOptionCollection (this);
			}
 internal OptionPropertyDescriptor(DesignerOptionService.DesignerOptionCollection option) : base(option.Name, null)
 {
     this._option = option;
 }
 private static object RecurseFindValue(DesignerOptionService.DesignerOptionCollection options)
 {
     if (options._value != null)
     {
         return options._value;
     }
     foreach (DesignerOptionService.DesignerOptionCollection options2 in options)
     {
         object obj2 = RecurseFindValue(options2);
         if (obj2 != null)
         {
             return obj2;
         }
     }
     return null;
 }
 public int IndexOf(DesignerOptionService.DesignerOptionCollection value)
 {
     this.EnsurePopulated();
     return this._children.IndexOf(value);
 }