mirror of
https://github.com/claunia/cuetools.net.git
synced 2025-12-16 18:14:25 +00:00
40 lines
1.2 KiB
C#
40 lines
1.2 KiB
C#
|
|
using System;
|
|||
|
|
using System.ComponentModel;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Xml.Serialization;
|
|||
|
|
using System.Text;
|
|||
|
|
|
|||
|
|
namespace CUETools.Codecs
|
|||
|
|
{
|
|||
|
|
public class AudioDecoderSettings
|
|||
|
|
{
|
|||
|
|
public AudioDecoderSettings()
|
|||
|
|
{
|
|||
|
|
// Iterate through each property and call ResetValue()
|
|||
|
|
foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(this))
|
|||
|
|
property.ResetValue(this);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public AudioDecoderSettings Clone()
|
|||
|
|
{
|
|||
|
|
return this.MemberwiseClone() as AudioDecoderSettings;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public bool HasBrowsableAttributes()
|
|||
|
|
{
|
|||
|
|
bool hasBrowsable = false;
|
|||
|
|
foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(this))
|
|||
|
|
{
|
|||
|
|
bool isBrowsable = true;
|
|||
|
|
foreach (var attribute in property.Attributes)
|
|||
|
|
{
|
|||
|
|
var browsable = attribute as BrowsableAttribute;
|
|||
|
|
isBrowsable &= browsable == null || browsable.Browsable;
|
|||
|
|
}
|
|||
|
|
hasBrowsable |= isBrowsable;
|
|||
|
|
}
|
|||
|
|
return hasBrowsable;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|