mirror of
https://github.com/jeremytammik/RevitSdkSamples.git
synced 2026-10-02 15:11:28 +00:00
integrate Revit 2025 SDK
This commit is contained in:
@@ -31,7 +31,7 @@ namespace Revit.SDK.Samples.NewPathReinforcement.CS
|
||||
/// <summary>
|
||||
/// tool used to draw line
|
||||
/// </summary>
|
||||
public class LineTool
|
||||
public class LineTool : IDisposable
|
||||
{
|
||||
# region members
|
||||
private List<Point> m_points = new List<Point>(); // Field used to store points of a line
|
||||
@@ -140,5 +140,20 @@ namespace Revit.SDK.Samples.NewPathReinforcement.CS
|
||||
graphic.DrawLine(m_foreGroundPen, m_points[i], m_points[i + 1]);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
m_backGroundPen?.Dispose();
|
||||
m_foreGroundPen?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(disposing: true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user