diff --git a/.vs/NxVersion.git/v16/.suo b/.vs/NxVersion.git/v16/.suo index 55feca3..24ed3e8 100644 Binary files a/.vs/NxVersion.git/v16/.suo and b/.vs/NxVersion.git/v16/.suo differ diff --git a/NxVersion/NxVersion.cs b/NxVersion/NxVersion.cs index 0db4883..0425e4a 100644 --- a/NxVersion/NxVersion.cs +++ b/NxVersion/NxVersion.cs @@ -122,7 +122,7 @@ namespace Eugen.NX string nxVersionNo = ReadNxEnvValues(UgiiRootDir, "-n").Replace("\r\n", ""); - if (IsPostNX12(UgiiRootDir)) + if (Convert.ToInt32(ugiiBaseDir.ToLower().Remove(0, ugiiBaseDir.LastIndexOf("\\") + 3)) <= 12) { //Nach NX12 AlignCode(nxVersionNo); @@ -246,35 +246,6 @@ namespace Eugen.NX #endregion #region Common Private Methodes - private bool IsPostNX12(string ugiiRootDir) - { - if (NxVersionNumber(ugiiRootDir) <= 12) - { - //Bis einschliesslich NX12 - PostNX12 = false; - } - else - { - //Nach NX12 - PostNX12 = true; - } - return PostNX12; - } - - private bool IsPostNX12(NxVersion version) - { - if (version.UgiiMajorVersion <= 12) - { - //Bis einschliesslich NX12 - PostNX12 = false; - } - else - { - //Nach NX12 - PostNX12 = true; - } - return PostNX12; - } private int NxVersionNumber(string ugiiRootDir) { @@ -312,7 +283,7 @@ namespace Eugen.NX //Wenn eine der drei Dateien nicht existiert, dann eine Exception werfen if (!File.Exists(String.Concat(ugii_base_dir, "\\UGII\\env_print.exe"))) throw new NoEnvPrintExeException("Unable to find EnvPrint.exe"); //Nur vor 'NX 1847' ausführen, weil es nur vorher diese Biblithek gibt - if (!ugii_base_dir.ToLower().Contains("nx18") & !ugii_base_dir.ToLower().Contains("beta") & ugii_base_dir.Remove(0, ugii_base_dir.LastIndexOf("\\") + 1).Length != 2) + if (Convert.ToInt32(ugii_base_dir.ToLower().Remove(0, ugii_base_dir.LastIndexOf("\\") + 3)) <= 12 & !ugii_base_dir.ToLower().Contains("beta") & ugii_base_dir.Remove(0, ugii_base_dir.LastIndexOf("\\") + 1).Length != 2) { if (!File.Exists(String.Concat(ugii_base_dir, "\\UGII\\libpatch.dll")) & !File.Exists(String.Concat(ugii_base_dir, "\\NXBIN\\libpatch.dll"))) throw new NoLibPatchDllException("Unable to find LibPatch.dll"); } @@ -395,6 +366,7 @@ namespace Eugen.NX NxPhaseString = versionSegments[4].ToString(); //NX Phase String UgiiFullVersion = String.Concat("v", versionSegments[1], ".", versionSegments[2], ".", versionSegments[3], ".", versionSegments[4]); //NX Full Version UgiiVersion = String.Concat("v", versionSegments[1]); + PostNX12 = !(UgiiMajorVersion <= 12); } private void AlignCode(string ugiiProductName, int majorVersion, int minorVersion, int subminorVersion, int phase, int mp) @@ -417,6 +389,7 @@ namespace Eugen.NX NxPhaseString = phase.ToString(); //NX Phase String UgiiFullVersion = String.Concat("v", majorVersion, ".", minorVersion, ".", subminorVersion, ".", phase); //NX Full Version UgiiVersion = String.Concat("v", majorVersion); + PostNX12 = !(UgiiMajorVersion <= 12); } private string[] SeperateVersionCode(string versionNumber) @@ -537,6 +510,7 @@ namespace Eugen.NX nxVersion.NxPhaseString = NxPhaseString; //NX_PHASE_STRING. E.g.: 5 of V28.0.3.5 nxVersion.UgiiFullVersion = UgiiFullVersion; //UGII_FULL_VERSION. E.g.: v10.0.3.5 instead of NX 10.0.3.5 nxVersion.UgiiVersion = UgiiVersion; //UGII_VERSION. E.g.: v10 of v10.0.3.5 + nxVersion.PostNX12 = PostNX12; return nxVersion; } @@ -616,6 +590,9 @@ namespace Eugen.NX nxVersion.MaintenancePackNumber = Convert.ToInt16(nxVersion.MaintenancePack.Remove(0, nxVersion.MaintenancePack.IndexOf("MP") + 2)); MaintenancePackNumber = nxVersion.MaintenancePackNumber; + // Post NX12. E.g.: true + nxVersion.PostNX12 = PostNX12; + return nxVersion; } #endregion @@ -724,7 +701,6 @@ namespace Eugen.NX /// 0 = equal, 1 = first version newer, 2 = second version newer, -1 = An error is happened. public int Compare(NxVersion version) { - //version.PostNX12 = IsPostNX12(version); return Compare(this, version); } @@ -736,15 +712,15 @@ namespace Eugen.NX /// 0 = equal, 1 = first version newer, 2 = second version newer, -1 = An error is happened. public int Compare(NxVersion version1, NxVersion version2) { - if (IsPostNX12(version1) & IsPostNX12(version2)) + if (version1.PostNX12 & version2.PostNX12) { return ComparePostNX12(version1, version2); } - if (!IsPostNX12(version1) & !IsPostNX12(version2)) + if (!version1.PostNX12 & !version2.PostNX12) { return CompareUpToNX12(version1, version2); } - if ((IsPostNX12(version1) & !IsPostNX12(version2)) || (!IsPostNX12(version1) & IsPostNX12(version2))) + if ((version1.PostNX12 & !version2.PostNX12) || (!version1.PostNX12 & version2.PostNX12)) { return CompareDiffVersions(version1, version2); } diff --git a/NxVersion/bin/Debug/NxVersion.dll b/NxVersion/bin/Debug/NxVersion.dll deleted file mode 100644 index 4ba09c0..0000000 Binary files a/NxVersion/bin/Debug/NxVersion.dll and /dev/null differ diff --git a/NxVersion/bin/Debug/NxVersion.pdb b/NxVersion/bin/Debug/NxVersion.pdb deleted file mode 100644 index 8f07cb7..0000000 Binary files a/NxVersion/bin/Debug/NxVersion.pdb and /dev/null differ diff --git a/NxVersion/bin/Debug/henxver.dll b/NxVersion/bin/Debug/henxver.dll new file mode 100644 index 0000000..b0ce5f5 Binary files /dev/null and b/NxVersion/bin/Debug/henxver.dll differ diff --git a/NxVersion/bin/Debug/henxver.pdb b/NxVersion/bin/Debug/henxver.pdb new file mode 100644 index 0000000..5c72835 Binary files /dev/null and b/NxVersion/bin/Debug/henxver.pdb differ diff --git a/NxVersion/obj/Debug/NxVersion.csproj.CoreCompileInputs.cache b/NxVersion/obj/Debug/NxVersion.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..5b4a01c --- /dev/null +++ b/NxVersion/obj/Debug/NxVersion.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +16aaa6b329891a69cbad3d5b12489a34279c0ce9 diff --git a/NxVersion/obj/Debug/NxVersion.csproj.FileListAbsolute.txt b/NxVersion/obj/Debug/NxVersion.csproj.FileListAbsolute.txt index 9ec4e57..0344b4e 100644 --- a/NxVersion/obj/Debug/NxVersion.csproj.FileListAbsolute.txt +++ b/NxVersion/obj/Debug/NxVersion.csproj.FileListAbsolute.txt @@ -4,3 +4,8 @@ H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\NxVersion\b H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\NxVersion\bin\Debug\NxVersion.pdb H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\NxVersion\obj\Debug\NxVersion.dll H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\NxVersion\obj\Debug\NxVersion.pdb +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\NxVersion\bin\Debug\henxver.dll +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\NxVersion\bin\Debug\henxver.pdb +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\NxVersion\obj\Debug\NxVersion.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\NxVersion\obj\Debug\henxver.dll +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\NxVersion\obj\Debug\henxver.pdb diff --git a/NxVersion/obj/Debug/henxver.dll b/NxVersion/obj/Debug/henxver.dll new file mode 100644 index 0000000..b0ce5f5 Binary files /dev/null and b/NxVersion/obj/Debug/henxver.dll differ diff --git a/NxVersion/obj/Debug/henxver.pdb b/NxVersion/obj/Debug/henxver.pdb new file mode 100644 index 0000000..5c72835 Binary files /dev/null and b/NxVersion/obj/Debug/henxver.pdb differ diff --git a/Test_NxVersion/Form1.Designer.cs b/Test_NxVersion/Form1.Designer.cs index df619d5..6d23c35 100644 --- a/Test_NxVersion/Form1.Designer.cs +++ b/Test_NxVersion/Form1.Designer.cs @@ -58,7 +58,7 @@ // labelProgramInfo // this.labelProgramInfo.AutoSize = true; - this.labelProgramInfo.Location = new System.Drawing.Point(453, 362); + this.labelProgramInfo.Location = new System.Drawing.Point(243, 362); this.labelProgramInfo.Name = "labelProgramInfo"; this.labelProgramInfo.Size = new System.Drawing.Size(16, 13); this.labelProgramInfo.TabIndex = 2; @@ -67,7 +67,7 @@ // labelDLLInfo // this.labelDLLInfo.AutoSize = true; - this.labelDLLInfo.Location = new System.Drawing.Point(453, 195); + this.labelDLLInfo.Location = new System.Drawing.Point(473, 362); this.labelDLLInfo.Name = "labelDLLInfo"; this.labelDLLInfo.Size = new System.Drawing.Size(16, 13); this.labelDLLInfo.TabIndex = 3; @@ -76,7 +76,7 @@ // labelNxVersion1 // this.labelNxVersion1.AutoSize = true; - this.labelNxVersion1.Location = new System.Drawing.Point(233, 13); + this.labelNxVersion1.Location = new System.Drawing.Point(243, 13); this.labelNxVersion1.Name = "labelNxVersion1"; this.labelNxVersion1.Size = new System.Drawing.Size(16, 13); this.labelNxVersion1.TabIndex = 4; @@ -85,7 +85,7 @@ // labelCompare // this.labelCompare.AutoSize = true; - this.labelCompare.Location = new System.Drawing.Point(453, 13); + this.labelCompare.Location = new System.Drawing.Point(473, 13); this.labelCompare.Name = "labelCompare"; this.labelCompare.Size = new System.Drawing.Size(16, 13); this.labelCompare.TabIndex = 5; diff --git a/Test_NxVersion/Form1.cs b/Test_NxVersion/Form1.cs index 2b1c312..0558a7a 100644 --- a/Test_NxVersion/Form1.cs +++ b/Test_NxVersion/Form1.cs @@ -108,7 +108,7 @@ namespace Test_NxVersion { SetProgramInfo(); InitializeComponent(); - + labelProgramInfo.Text = String.Concat("Programm-Info:\n\n",ProgramName, "\n", ProgramVersion, "\n", Copyright); //Programm-Info var nxv = new NxVersion(); //Initialisieren damit die DLL-Info abgefragt werden kann diff --git a/Test_NxVersion/Test_NxVersion.csproj b/Test_NxVersion/Test_NxVersion.csproj index 83b2752..721db7d 100644 --- a/Test_NxVersion/Test_NxVersion.csproj +++ b/Test_NxVersion/Test_NxVersion.csproj @@ -33,9 +33,8 @@ 4 - - False - ..\NxVersion\bin\Debug\NxVersion.dll + + ..\NxVersion\bin\Debug\henxver.dll diff --git a/Test_NxVersion/bin/Debug/NxVersion.dll b/Test_NxVersion/bin/Debug/NxVersion.dll deleted file mode 100644 index 4ba09c0..0000000 Binary files a/Test_NxVersion/bin/Debug/NxVersion.dll and /dev/null differ diff --git a/Test_NxVersion/bin/Debug/NxVersion.pdb b/Test_NxVersion/bin/Debug/NxVersion.pdb deleted file mode 100644 index 8f07cb7..0000000 Binary files a/Test_NxVersion/bin/Debug/NxVersion.pdb and /dev/null differ diff --git a/Test_NxVersion/bin/Debug/Test_NxVersion.exe b/Test_NxVersion/bin/Debug/Test_NxVersion.exe index dd21088..40e9421 100644 Binary files a/Test_NxVersion/bin/Debug/Test_NxVersion.exe and b/Test_NxVersion/bin/Debug/Test_NxVersion.exe differ diff --git a/Test_NxVersion/bin/Debug/Test_NxVersion.pdb b/Test_NxVersion/bin/Debug/Test_NxVersion.pdb index 757cf5f..fc7158a 100644 Binary files a/Test_NxVersion/bin/Debug/Test_NxVersion.pdb and b/Test_NxVersion/bin/Debug/Test_NxVersion.pdb differ diff --git a/Test_NxVersion/bin/Debug/henxver.dll b/Test_NxVersion/bin/Debug/henxver.dll new file mode 100644 index 0000000..b0ce5f5 Binary files /dev/null and b/Test_NxVersion/bin/Debug/henxver.dll differ diff --git a/Test_NxVersion/bin/Debug/henxver.pdb b/Test_NxVersion/bin/Debug/henxver.pdb new file mode 100644 index 0000000..5c72835 Binary files /dev/null and b/Test_NxVersion/bin/Debug/henxver.pdb differ diff --git a/Test_NxVersion/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Test_NxVersion/obj/Debug/DesignTimeResolveAssemblyReferences.cache index d277094..11d44c7 100644 Binary files a/Test_NxVersion/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/Test_NxVersion/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Test_NxVersion/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Test_NxVersion/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index ed0ee96..4c08484 100644 Binary files a/Test_NxVersion/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/Test_NxVersion/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.CoreCompileInputs.cache b/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.CoreCompileInputs.cache index 811a048..8b5fc82 100644 --- a/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.CoreCompileInputs.cache +++ b/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -4cc85cfbbd99d80050b587ef246050866ba70d69 +9795f9b0e1a1f35fa41576dd4174ad416e27b351 diff --git a/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.FileListAbsolute.txt b/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.FileListAbsolute.txt index b8bc546..0a049d8 100644 --- a/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.FileListAbsolute.txt +++ b/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.FileListAbsolute.txt @@ -14,9 +14,6 @@ H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\Test_NxVers H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersion\bin\Debug\Test_NxVersion.exe.config H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersion\bin\Debug\Test_NxVersion.exe H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersion\bin\Debug\Test_NxVersion.pdb -H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersion\bin\Debug\NxVersion.dll -H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersion\bin\Debug\NxVersion.pdb -H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.csprojAssemblyReference.cache H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.Form1.resources H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.Properties.Resources.resources H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.csproj.GenerateResource.cache @@ -24,3 +21,6 @@ H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersi H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.csproj.CopyComplete H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.exe H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.pdb +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.csprojAssemblyReference.cache +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersion\bin\Debug\henxver.dll +H:\Programmieren\Git-WorkRepository\VisualStudio\_DLL\NxVersion.git\Test_NxVersion\bin\Debug\henxver.pdb diff --git a/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.GenerateResource.cache b/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.GenerateResource.cache index a055a58..8222d78 100644 Binary files a/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.GenerateResource.cache and b/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.GenerateResource.cache differ diff --git a/Test_NxVersion/obj/Debug/Test_NxVersion.csprojAssemblyReference.cache b/Test_NxVersion/obj/Debug/Test_NxVersion.csprojAssemblyReference.cache index 2d14b48..a7bdf91 100644 Binary files a/Test_NxVersion/obj/Debug/Test_NxVersion.csprojAssemblyReference.cache and b/Test_NxVersion/obj/Debug/Test_NxVersion.csprojAssemblyReference.cache differ diff --git a/Test_NxVersion/obj/Debug/Test_NxVersion.exe b/Test_NxVersion/obj/Debug/Test_NxVersion.exe index dd21088..40e9421 100644 Binary files a/Test_NxVersion/obj/Debug/Test_NxVersion.exe and b/Test_NxVersion/obj/Debug/Test_NxVersion.exe differ diff --git a/Test_NxVersion/obj/Debug/Test_NxVersion.pdb b/Test_NxVersion/obj/Debug/Test_NxVersion.pdb index 757cf5f..fc7158a 100644 Binary files a/Test_NxVersion/obj/Debug/Test_NxVersion.pdb and b/Test_NxVersion/obj/Debug/Test_NxVersion.pdb differ