diff --git a/src/DynamoCore/Core/IDSDKManager.cs b/src/DynamoCore/Core/IDSDKManager.cs index b8e38dd2e6c..d6d66ce6ea6 100644 --- a/src/DynamoCore/Core/IDSDKManager.cs +++ b/src/DynamoCore/Core/IDSDKManager.cs @@ -1,6 +1,9 @@ using System; using System.Diagnostics; using Autodesk.IDSDK; +using Dynamo.Configuration; +using Dynamo.Logging; +using DynamoServices; using Greg; using Greg.AuthProviders; using RestSharp; @@ -212,14 +215,14 @@ private string IDSDK_GetToken() private bool Initialize() { - if (Client.IsInitialized()) return true; - idsdk_status_code bRet = Client.Init(); - - if (Client.IsSuccess(bRet)) + try { - if (Client.IsInitialized()) + if (Client.IsInitialized()) return true; + idsdk_status_code bRet = Client.Init(); + + if (Client.IsSuccess(bRet)) { - try + if (Client.IsInitialized()) { IntPtr hWnd = Process.GetCurrentProcess().MainWindowHandle; if (hWnd != null) @@ -235,13 +238,13 @@ private bool Initialize() return ret; } } - catch (Exception e) - { - return false; - } } + return false; + } + catch (Exception) + { + return false; } - return false; } private bool Deinitialize() { diff --git a/src/Libraries/DSOffice/Properties/Resources.Designer.cs b/src/Libraries/DSOffice/Properties/Resources.Designer.cs index c539e961931..7eac46d508d 100644 --- a/src/Libraries/DSOffice/Properties/Resources.Designer.cs +++ b/src/Libraries/DSOffice/Properties/Resources.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000