Skip to content

Commit

Permalink
Update to the latest version.
Browse files Browse the repository at this point in the history
  • Loading branch information
bimangle committed Oct 8, 2024
1 parent 71577d6 commit d3cd54c
Show file tree
Hide file tree
Showing 93 changed files with 3,047 additions and 2,495 deletions.
16 changes: 8 additions & 8 deletions Bimangle.ForgeEngine.3DXML/Bimangle.ForgeEngine.3DXML.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Bimangle.ForgeEngine.3DXML, Version=1.2.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Bimangle.ForgeEngine.3DXML.1.2.6\lib\net452\Bimangle.ForgeEngine.3DXML.dll</HintPath>
<Reference Include="Bimangle.ForgeEngine.3DXML, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Bimangle.ForgeEngine.3DXML.1.3.1\lib\net452\Bimangle.ForgeEngine.3DXML.dll</HintPath>
</Reference>
<Reference Include="Bimangle.ForgeEngine.Common, Version=1.8.6.0, Culture=neutral, PublicKeyToken=20bc10ce2f34a3e5, processorArchitecture=MSIL">
<HintPath>..\packages\Bimangle.ForgeEngine.Common.1.8.6\lib\net45\Bimangle.ForgeEngine.Common.dll</HintPath>
<Reference Include="Bimangle.ForgeEngine.Common, Version=1.8.8.0, Culture=neutral, PublicKeyToken=20bc10ce2f34a3e5, processorArchitecture=MSIL">
<HintPath>..\packages\Bimangle.ForgeEngine.Common.1.8.8\lib\net45\Bimangle.ForgeEngine.Common.dll</HintPath>
</Reference>
<Reference Include="Bimangle.Libs, Version=2024.6.11.1136, Culture=neutral, PublicKeyToken=20bc10ce2f34a3e5, processorArchitecture=AMD64">
<HintPath>..\packages\Bimangle.ForgeEngine.3DXML.1.2.6\lib\net452\Bimangle.Libs.dll</HintPath>
<Reference Include="Bimangle.Libs, Version=2024.9.18.1131, Culture=neutral, PublicKeyToken=20bc10ce2f34a3e5, processorArchitecture=AMD64">
<HintPath>..\packages\Bimangle.ForgeEngine.3DXML.1.3.1\lib\net452\Bimangle.Libs.dll</HintPath>
</Reference>
<Reference Include="Bimangle.Libs.Proj, Version=2024.6.11.1136, Culture=neutral, PublicKeyToken=20bc10ce2f34a3e5, processorArchitecture=AMD64">
<HintPath>..\packages\Bimangle.ForgeEngine.3DXML.1.2.6\lib\net452\Bimangle.Libs.Proj.dll</HintPath>
<Reference Include="Bimangle.Libs.Proj, Version=2024.9.18.1131, Culture=neutral, PublicKeyToken=20bc10ce2f34a3e5, processorArchitecture=AMD64">
<HintPath>..\packages\Bimangle.ForgeEngine.3DXML.1.3.1\lib\net452\Bimangle.Libs.Proj.dll</HintPath>
</Reference>
<Reference Include="CommandLine, Version=2.9.1.0, Culture=neutral, PublicKeyToken=5a870481e358d379, processorArchitecture=MSIL">
<HintPath>..\packages\CommandLineParser.2.9.1\lib\net45\CommandLine.dll</HintPath>
Expand Down
5 changes: 0 additions & 5 deletions Bimangle.ForgeEngine.3DXML/Core/GeoreferncingAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ public override bool IsLocal()
return true;
}

public override void SetDirectionLetters(Label lblLocalX, Label lblLocalY)
{
//do nothing
}

public override bool IsTrueNorth(OriginType originType)
{
return true;
Expand Down
3 changes: 2 additions & 1 deletion Bimangle.ForgeEngine.3DXML/Core/ProjValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ public bool Check(string definition, out string wkt)
using (proj)
{
var type = proj.GetProjType();
if (type == ProjType.PROJECTED_CRS)
if (type == ProjType.PROJECTED_CRS ||
type == ProjType.COMPOUND_CRS)
{
wkt = Context.AsWKT(proj);
return true;
Expand Down
4 changes: 2 additions & 2 deletions Bimangle.ForgeEngine.3DXML/packages.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Bimangle.ForgeEngine.3DXML" version="1.2.6" targetFramework="net452" />
<package id="Bimangle.ForgeEngine.Common" version="1.8.6" targetFramework="net452" />
<package id="Bimangle.ForgeEngine.3DXML" version="1.3.1" targetFramework="net452" />
<package id="Bimangle.ForgeEngine.Common" version="1.8.8" targetFramework="net452" />
<package id="Bimangle.License.UsbkeyDriver" version="1.0.1" targetFramework="net452" />
<package id="CommandLineParser" version="2.9.1" targetFramework="net452" />
<package id="DotNetZip" version="1.16.0" targetFramework="net452" />
Expand Down
18 changes: 9 additions & 9 deletions Bimangle.ForgeEngine.Dgn/Bimangle.ForgeEngine.Dgn.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,20 @@
<HintPath>C:\Program Files\Bentley\MicroStation CONNECT Edition\MicroStation\Assemblies\ECFramework\Bentley.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Bimangle.ForgeEngine.Common, Version=1.8.6.0, Culture=neutral, PublicKeyToken=20bc10ce2f34a3e5, processorArchitecture=MSIL">
<HintPath>..\packages\Bimangle.ForgeEngine.Common.1.8.6\lib\net45\Bimangle.ForgeEngine.Common.dll</HintPath>
<Reference Include="Bimangle.ForgeEngine.Common, Version=1.8.8.0, Culture=neutral, PublicKeyToken=20bc10ce2f34a3e5, processorArchitecture=MSIL">
<HintPath>..\packages\Bimangle.ForgeEngine.Common.1.8.8\lib\net45\Bimangle.ForgeEngine.Common.dll</HintPath>
</Reference>
<Reference Include="Bimangle.ForgeEngine.Dgn, Version=2.0.9.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Bimangle.ForgeEngine.Dgn.2.0.9\lib\net462\Bimangle.ForgeEngine.Dgn.dll</HintPath>
<Reference Include="Bimangle.ForgeEngine.Dgn, Version=2.1.4.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Bimangle.ForgeEngine.Dgn.2.1.4\lib\net462\Bimangle.ForgeEngine.Dgn.dll</HintPath>
</Reference>
<Reference Include="Bimangle.ForgeEngine.Dgn.Support, Version=2021.1.21.1050, Culture=neutral, PublicKeyToken=20bc10ce2f34a3e5, processorArchitecture=AMD64">
<HintPath>..\packages\Bimangle.ForgeEngine.Dgn.2.0.9\lib\net462\Bimangle.ForgeEngine.Dgn.Support.dll</HintPath>
<HintPath>..\packages\Bimangle.ForgeEngine.Dgn.2.1.4\lib\net462\Bimangle.ForgeEngine.Dgn.Support.dll</HintPath>
</Reference>
<Reference Include="Bimangle.Libs, Version=2024.6.11.1133, Culture=neutral, PublicKeyToken=20bc10ce2f34a3e5, processorArchitecture=AMD64">
<HintPath>..\packages\Bimangle.ForgeEngine.Dgn.2.0.9\lib\net462\Bimangle.Libs.dll</HintPath>
<Reference Include="Bimangle.Libs, Version=2024.9.18.1128, Culture=neutral, PublicKeyToken=20bc10ce2f34a3e5, processorArchitecture=AMD64">
<HintPath>..\packages\Bimangle.ForgeEngine.Dgn.2.1.4\lib\net462\Bimangle.Libs.dll</HintPath>
</Reference>
<Reference Include="Bimangle.Libs.Proj, Version=2024.6.11.1133, Culture=neutral, PublicKeyToken=20bc10ce2f34a3e5, processorArchitecture=AMD64">
<HintPath>..\packages\Bimangle.ForgeEngine.Dgn.2.0.9\lib\net462\Bimangle.Libs.Proj.dll</HintPath>
<Reference Include="Bimangle.Libs.Proj, Version=2024.9.18.1128, Culture=neutral, PublicKeyToken=20bc10ce2f34a3e5, processorArchitecture=AMD64">
<HintPath>..\packages\Bimangle.ForgeEngine.Dgn.2.1.4\lib\net462\Bimangle.Libs.Proj.dll</HintPath>
</Reference>
<Reference Include="DotNetZip, Version=1.13.2.0, Culture=neutral, PublicKeyToken=6583c7c814667745, processorArchitecture=MSIL">
<HintPath>..\packages\DotNetZip.1.13.2\lib\net40\DotNetZip.dll</HintPath>
Expand Down
25 changes: 17 additions & 8 deletions Bimangle.ForgeEngine.Dgn/Core/GeoreferncingAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
Expand Down Expand Up @@ -83,11 +84,6 @@ public override bool IsLocal()
return true;
}

public override void SetDirectionLetters(Label lblLocalX, Label lblLocalY)
{
//do nothing
}

public override bool IsTrueNorth(OriginType originType)
{
return true;
Expand Down Expand Up @@ -144,9 +140,10 @@ private bool GetEPSG(DgnGCS gcs, out string epsgCode)
{
try
{
//至少 Update 10 的时候,还没有这个 EPSGCode 属性
if (gcs.GetType().GetProperty(@"EPSGCode") != null)
{
var code = gcs.EPSGCode;
var code = SafeEPSGCode(gcs);
if (code > 0)
{
epsgCode = $@"EPSG:{code}";
Expand All @@ -163,8 +160,8 @@ private bool GetEPSG(DgnGCS gcs, out string epsgCode)
{
if (gcs.GetType().GetMethod(@"GetEPSGCode") != null)
{
//疑似 Update14 新增加的方法
var code = gcs.GetEPSGCode(false);
//至少 Update 10 的时候,这个 GetEPSGCode 方法已存在
var code = SafeGetEPSGCode(gcs, false);
if (code > 0)
{
epsgCode = $@"EPSG:{code}";
Expand All @@ -181,6 +178,18 @@ private bool GetEPSG(DgnGCS gcs, out string epsgCode)
return false;
}

[MethodImpl(MethodImplOptions.NoInlining)]
private int SafeEPSGCode(DgnGCS gcs)
{
return gcs.EPSGCode;
}

[MethodImpl(MethodImplOptions.NoInlining)]
private int SafeGetEPSGCode(DgnGCS gcs, bool dontSearch)
{
return gcs.GetEPSGCode(dontSearch);
}

/// <summary>
/// 为了兼容 Update 17 的接口变更, 用反射方法来调用 GetWellKnownText
/// </summary>
Expand Down
3 changes: 2 additions & 1 deletion Bimangle.ForgeEngine.Dgn/Core/ProjValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ public bool Check(string definition, out string wkt)
using (proj)
{
var type = proj.GetProjType();
if (type == ProjType.PROJECTED_CRS)
if (type == ProjType.PROJECTED_CRS ||
type == ProjType.COMPOUND_CRS)
{
wkt = Context.AsWKT(proj);
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Diagnostics;
using System.Windows.Forms;
using Bentley.MstnPlatformNET;

using Bimangle.ForgeEngine.Dgn.Config;
using Bimangle.ForgeEngine.Dgn.Core;
using Bimangle.ForgeEngine.Dgn.Utility;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

namespace Bimangle.ForgeEngine.Dgn.Toolset
{
class CommandToolsetPickPosition : IExternalCommand
public class CommandToolsetPickPosition : IExternalCommand
{
private readonly AddIn _Addin;

public CommandToolsetPickPosition(AddIn addin)
internal CommandToolsetPickPosition(AddIn addin)
{
_Addin = addin ?? throw new ArgumentNullException(nameof(addin));
}
Expand Down
Loading

0 comments on commit d3cd54c

Please sign in to comment.