MosswartMassacre/Unused/Decal.Adapter.Wrappers/ChoiceDataIndexer.cs
2025-06-09 02:03:11 +02:00

33 lines
526 B
C#

using System;
using System.Runtime.InteropServices;
using Decal.Interop.Controls;
namespace Decal.Adapter.Wrappers;
public sealed class ChoiceDataIndexer : IDisposable
{
private Choice myControl;
public object this[int index]
{
get
{
return ((IChoice)myControl).get_Data(index);
}
set
{
((IChoice)myControl).set_Data(index, value);
}
}
internal ChoiceDataIndexer(Choice control)
{
myControl = control;
}
public void Dispose()
{
Marshal.ReleaseComObject(myControl);
myControl = null;
}
}