Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

using System.ComponentModel;
using System.ComponentModel.Design.Serialization;
using System.Collections;
using System.Globalization;
using System.Reflection;
using System.Windows.Media; // TypeConverterHelper, UriHolder
Expand Down Expand Up @@ -53,35 +52,29 @@ public override bool CanConvertTo(ITypeDescriptorContext context, Type destinati
return false;
}

/// <summary>
/// Gets the public/static properties of the Cursors class
/// </summary>
/// <returns>PropertyInfo array of the objects properties</returns>
private PropertyInfo[] GetProperties()
{
return typeof(Cursors).GetProperties(BindingFlags.Public | BindingFlags.Static);
}

/// <summary>
/// StandardValuesCollection method override
/// </summary>
/// <param name="context">ITypeDescriptorContext</param>
/// <returns>TypeConverter.StandardValuesCollection</returns>
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
if(this._standardValues == null)
if(_standardValues is null)
{
ArrayList list1 = new ArrayList();
PropertyInfo[] infoArray1 = this.GetProperties();
for(int num1 = 0; num1 < infoArray1.Length; num1++)
PropertyInfo[] properties = typeof(Cursors).GetProperties(BindingFlags.Public | BindingFlags.Static);
object[] values = new object[properties.Length]; //Could use Cursor but its wrapped in ICollection anyways

for (int i = 0; i < properties.Length; i++)
{
PropertyInfo info1 = infoArray1[num1];
object[] objArray1 = null;
list1.Add(info1.GetValue(null, objArray1));
PropertyInfo info = properties[i];

values[i] = info.GetValue(null, null);
}
this._standardValues = new TypeConverter.StandardValuesCollection(list1.ToArray());

_standardValues = new TypeConverter.StandardValuesCollection(values);
}
return this._standardValues;

return _standardValues;
}

/// <summary>
Expand Down