Initial commit: Complete open-source Decal rebuild
All 5 phases of the open-source Decal rebuild: Phase 1: 14 decompiled .NET projects (Interop.*, Adapter, FileService, DecalUtil) Phase 2: 10 native DLLs rewritten as C# COM servers with matching GUIDs - DecalDat, DHS, SpellFilter, DecalInput, DecalNet, DecalFilters - Decal.Core, DecalControls, DecalRender, D3DService Phase 3: C++ shims for Inject.DLL (D3D9 hooking) and LauncherHook.DLL Phase 4: DenAgent WinForms tray application Phase 5: WiX installer and build script 25 C# projects building with 0 errors. Native C++ projects require VS 2022 + Windows SDK (x86). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
commit
d1442e3747
1382 changed files with 170725 additions and 0 deletions
194
Managed/Decal.Adapter/Decal.Adapter.Wrappers/ListWrapper.cs
Normal file
194
Managed/Decal.Adapter/Decal.Adapter.Wrappers/ListWrapper.cs
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
using System;
|
||||
using Decal.Interop.Controls;
|
||||
|
||||
namespace Decal.Adapter.Wrappers;
|
||||
|
||||
public class ListWrapper : ControlWrapperBase<ListClass>
|
||||
{
|
||||
private EventHandler<ControlEventArgs> evtDestroy;
|
||||
|
||||
private EventHandler<ListSelectEventArgs> evtSelect;
|
||||
|
||||
public ListRow this[int row]
|
||||
{
|
||||
get
|
||||
{
|
||||
if (row >= 0 && row < base.Control.Count)
|
||||
{
|
||||
return new ListRow(this, row);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public bool AutoScroll
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Control.AutoScroll;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.Control.AutoScroll = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int RowEstimate
|
||||
{
|
||||
set
|
||||
{
|
||||
base.Control.RowEstimate = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int ScrollPosition
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Control.ScrollPosition;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.Control.ScrollPosition = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int RowCount => base.Control.Count;
|
||||
|
||||
public int ColCount => base.Control.CountCols;
|
||||
|
||||
public event EventHandler<ControlEventArgs> Destroy
|
||||
{
|
||||
add
|
||||
{
|
||||
if (evtDestroy == null)
|
||||
{
|
||||
base.Control.Destroy += DestroyEvent;
|
||||
}
|
||||
evtDestroy = (EventHandler<ControlEventArgs>)Delegate.Combine(evtDestroy, value);
|
||||
}
|
||||
remove
|
||||
{
|
||||
evtDestroy = (EventHandler<ControlEventArgs>)Delegate.Remove(evtDestroy, value);
|
||||
if (evtDestroy == null)
|
||||
{
|
||||
base.Control.Destroy -= DestroyEvent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event EventHandler<ListSelectEventArgs> Selected
|
||||
{
|
||||
add
|
||||
{
|
||||
if (evtSelect == null)
|
||||
{
|
||||
base.Control.Change += SelectEvent;
|
||||
}
|
||||
evtSelect = (EventHandler<ListSelectEventArgs>)Delegate.Combine(evtSelect, value);
|
||||
}
|
||||
remove
|
||||
{
|
||||
evtSelect = (EventHandler<ListSelectEventArgs>)Delegate.Remove(evtSelect, value);
|
||||
if (evtSelect == null)
|
||||
{
|
||||
base.Control.Change -= SelectEvent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
if (evtDestroy != null)
|
||||
{
|
||||
evtDestroy = (EventHandler<ControlEventArgs>)Delegate.Remove(evtDestroy, evtDestroy);
|
||||
base.Control.Destroy -= DestroyEvent;
|
||||
}
|
||||
if (evtSelect != null)
|
||||
{
|
||||
evtSelect = (EventHandler<ListSelectEventArgs>)Delegate.Remove(evtSelect, evtSelect);
|
||||
base.Control.Change -= SelectEvent;
|
||||
}
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
internal int AddRow()
|
||||
{
|
||||
return base.Control.AddRow();
|
||||
}
|
||||
|
||||
internal object get_Data(int row, int col, int subVal)
|
||||
{
|
||||
return ((dynamic)base.Control).get_Data(col, row, subVal);
|
||||
}
|
||||
|
||||
internal void set_Data(int row, int col, int subVal, ref object val)
|
||||
{
|
||||
((dynamic)base.Control).set_Data(col, row, subVal, val);
|
||||
}
|
||||
|
||||
internal int get_Color(int row, int col)
|
||||
{
|
||||
return ((dynamic)base.Control).get_Color(col, row);
|
||||
}
|
||||
|
||||
internal void set_Color(int row, int col, int color)
|
||||
{
|
||||
((dynamic)base.Control).set_Color(col, row, color);
|
||||
}
|
||||
|
||||
internal int get_ColWidth(int col)
|
||||
{
|
||||
return ((dynamic)base.Control).get_ColumnWidth(col);
|
||||
}
|
||||
|
||||
internal void set_ColWidth(int col, int width)
|
||||
{
|
||||
((dynamic)base.Control).set_ColumnWidth(col, width);
|
||||
}
|
||||
|
||||
public ListRow Add()
|
||||
{
|
||||
return new ListRow(this, AddRow());
|
||||
}
|
||||
|
||||
public ListRow Insert(int row)
|
||||
{
|
||||
base.Control.InsertRow(row);
|
||||
return new ListRow(this, row);
|
||||
}
|
||||
|
||||
public void JumpToPosition(int row)
|
||||
{
|
||||
base.Control.JumpToPosition(row);
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
base.Control.Clear();
|
||||
}
|
||||
|
||||
public void Delete(int index)
|
||||
{
|
||||
base.Control.DeleteRow(index);
|
||||
}
|
||||
|
||||
private void SelectEvent(int ID, int Col, int Row)
|
||||
{
|
||||
if (evtSelect != null)
|
||||
{
|
||||
evtSelect(new ListColumn(this, Row, Col), new ListSelectEventArgs(ID, Row, Col));
|
||||
}
|
||||
}
|
||||
|
||||
private void DestroyEvent(int ID)
|
||||
{
|
||||
if (evtDestroy != null)
|
||||
{
|
||||
evtDestroy(this, new ControlEventArgs(ID));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue