75 lines
3.3 KiB
C#
75 lines
3.3 KiB
C#
using System;
|
|
|
|
namespace System.ComponentModel
|
|
{
|
|
/// <summary>
|
|
/// <see cref="T:System.ComponentModel.DesignTimeVisibleAttribute" /> marks a component's visibility. If <see cref="F:System.ComponentModel.DesignTimeVisibleAttribute.Yes" /> is present, a visual designer can show this component on a designer.</summary>
|
|
// Token: 0x02000071 RID: 113
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)]
|
|
public sealed class DesignTimeVisibleAttribute : Attribute
|
|
{
|
|
/// <summary>Creates a new <see cref="T:System.ComponentModel.DesignTimeVisibleAttribute" /> set to the default value of false.</summary>
|
|
// Token: 0x0600041D RID: 1053 RVA: 0x0000C4D4 File Offset: 0x0000A6D4
|
|
public DesignTimeVisibleAttribute()
|
|
: this(true)
|
|
{
|
|
}
|
|
|
|
/// <summary>Creates a new <see cref="T:System.ComponentModel.DesignTimeVisibleAttribute" /> with the <see cref="P:System.ComponentModel.DesignTimeVisibleAttribute.Visible" /> property set to the given value in <paramref name="visible" />.</summary>
|
|
/// <param name="visible">The value that the <see cref="P:System.ComponentModel.DesignTimeVisibleAttribute.Visible" /> property will be set against. </param>
|
|
// Token: 0x0600041E RID: 1054 RVA: 0x0000C4E0 File Offset: 0x0000A6E0
|
|
public DesignTimeVisibleAttribute(bool visible)
|
|
{
|
|
this.visible = visible;
|
|
}
|
|
|
|
/// <summary>Gets or sets whether the component should be shown at design time.</summary>
|
|
/// <returns>true if this component should be shown at design time, or false if it shouldn't.</returns>
|
|
// Token: 0x17000116 RID: 278
|
|
// (get) Token: 0x06000420 RID: 1056 RVA: 0x0000C514 File Offset: 0x0000A714
|
|
public bool Visible
|
|
{
|
|
get
|
|
{
|
|
return this.visible;
|
|
}
|
|
}
|
|
|
|
/// <param name="obj">The object to compare.</param>
|
|
// Token: 0x06000421 RID: 1057 RVA: 0x0000C51C File Offset: 0x0000A71C
|
|
public override bool Equals(object obj)
|
|
{
|
|
return obj is DesignTimeVisibleAttribute && (obj == this || ((DesignTimeVisibleAttribute)obj).Visible == this.visible);
|
|
}
|
|
|
|
// Token: 0x06000422 RID: 1058 RVA: 0x0000C548 File Offset: 0x0000A748
|
|
public override int GetHashCode()
|
|
{
|
|
return this.visible.GetHashCode();
|
|
}
|
|
|
|
/// <summary>Gets a value indicating if this instance is equal to the <see cref="F:System.ComponentModel.DesignTimeVisibleAttribute.Default" /> value.</summary>
|
|
/// <returns>true, if this instance is equal to the <see cref="F:System.ComponentModel.DesignTimeVisibleAttribute.Default" /> value; otherwise, false.</returns>
|
|
// Token: 0x06000423 RID: 1059 RVA: 0x0000C558 File Offset: 0x0000A758
|
|
public override bool IsDefaultAttribute()
|
|
{
|
|
return this.visible == DesignTimeVisibleAttribute.Default.Visible;
|
|
}
|
|
|
|
// Token: 0x04000152 RID: 338
|
|
private bool visible;
|
|
|
|
/// <summary>The default visibility which is Yes.</summary>
|
|
// Token: 0x04000153 RID: 339
|
|
public static readonly DesignTimeVisibleAttribute Default = new DesignTimeVisibleAttribute(true);
|
|
|
|
/// <summary>Marks a component as not visible in a visual designer.</summary>
|
|
// Token: 0x04000154 RID: 340
|
|
public static readonly DesignTimeVisibleAttribute No = new DesignTimeVisibleAttribute(false);
|
|
|
|
/// <summary>Marks a component as visible in a visual designer.</summary>
|
|
// Token: 0x04000155 RID: 341
|
|
public static readonly DesignTimeVisibleAttribute Yes = new DesignTimeVisibleAttribute(true);
|
|
}
|
|
}
|