commit 1e0121586370ccbb9831933d9e035c21d5a765e4 Author: Eugen Höglinger Date: Wed Nov 25 17:39:30 2020 +0100 Initialize diff --git a/.vs/NxVersion.git/v16/.suo b/.vs/NxVersion.git/v16/.suo new file mode 100644 index 0000000..0c8b1e9 Binary files /dev/null and b/.vs/NxVersion.git/v16/.suo differ diff --git a/NxVersion.git.sln b/NxVersion.git.sln new file mode 100644 index 0000000..7f1a3b8 --- /dev/null +++ b/NxVersion.git.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30621.155 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NxVersion", "NxVersion\NxVersion.csproj", "{5409502C-5E57-44D9-AA55-57BBE89071CF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_NxVersion", "Test_NxVersion\Test_NxVersion.csproj", "{C089C691-2593-42DA-B99B-5405ECF606AD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5409502C-5E57-44D9-AA55-57BBE89071CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5409502C-5E57-44D9-AA55-57BBE89071CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5409502C-5E57-44D9-AA55-57BBE89071CF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5409502C-5E57-44D9-AA55-57BBE89071CF}.Release|Any CPU.Build.0 = Release|Any CPU + {C089C691-2593-42DA-B99B-5405ECF606AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C089C691-2593-42DA-B99B-5405ECF606AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C089C691-2593-42DA-B99B-5405ECF606AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C089C691-2593-42DA-B99B-5405ECF606AD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {75280ACC-8D19-4BC1-B067-FA2F05AA2605} + EndGlobalSection +EndGlobal diff --git a/NxVersion/NxVersion.cs b/NxVersion/NxVersion.cs new file mode 100644 index 0000000..0db4883 --- /dev/null +++ b/NxVersion/NxVersion.cs @@ -0,0 +1,994 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Eugen.NX +{ + /// + /// Description of NxVersion. + /// + public class NxVersion + { + #region Version und Copyright + // Version und Copyright + string dllName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen + string dllVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); + static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); + string copyright = GenerateCopyright(); + string icon = Application.StartupPath + "\\Info.bmp"; + //Assembly Datum und Zeit + static DateTime value = AssemblyDateTime(); + string date = value.ToShortDateString(); + string time = value.ToLongTimeString(); + private static DateTime AssemblyDateTime() + { + var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; + var buildDateTime = new DateTime(2000, 1, 1).Add(new TimeSpan(TimeSpan.TicksPerDay * version.Build + TimeSpan.TicksPerSecond * 2 * version.Revision)); + //Tage seit dem 1. Januar 2000 und Sekunden seit Mitternacht, (multiplizier mit 2 ergibt das Original) + return buildDateTime; + } + + private static string CurrentYear() + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + + private static string StartYear() + { + string startYear = ""; + if (((AssemblyCopyrightAttribute)attributes[0]).Copyright.Contains("Copyright © ")) + { + startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace("Copyright © ", ""); + while (startYear.StartsWith(" ")) + { + startYear = startYear.Remove(0, 1); + } + startYear = startYear.Remove(startYear.IndexOf(" ")); + return startYear; + } + else + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + } + + private static string GenerateCopyright() + { + string startYear = StartYear(); + string currentYear = CurrentYear(); + + if (startYear == currentYear) + { + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + } + else + { + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace(startYear, String.Concat(startYear, "-", currentYear)); + } + } + #endregion + + #region DLL-Info + /// + /// Contains the name of the program file + /// + public static string DllName { set; get; } + + /// + /// Contains the version of the program file + /// + public static string DllVersion { set; get; } + + /// + /// Contains the copyright notice + /// + public static string Copyright { set; get; } + + private void SetDllInfo() + { + //Name, Version und Copyright setzen + DllName = dllName; + DllVersion = dllVersion; + Copyright = copyright; + } + #endregion + + public NxVersion() + { + SetDllInfo(); + } + + public NxVersion(string ugiiBaseDir) + { + SetDllInfo(); + + if (Directory.Exists(ugiiBaseDir)) + { + UgiiBaseDir = ugiiBaseDir; + UgiiRootDir = String.Concat(UgiiBaseDir, "\\UGII\\"); + } + else + { + throw new DirectoryNotFoundException(); + } + + string nxVersionNo = ReadNxEnvValues(UgiiRootDir, "-n").Replace("\r\n", ""); + + if (IsPostNX12(UgiiRootDir)) + { + //Nach NX12 + AlignCode(nxVersionNo); + } + else + { + //Bis einschliesslich NX12 + string tempPatchText = ReadNxEnvValues(UgiiRootDir, "-m"); + tempPatchText = tempPatchText.Remove(tempPatchText.IndexOf(",")); + + AlignCode(nxVersionNo, tempPatchText); + } + } + + #region Base value + /// + /// UGII_BASE_DIR. E.g.: C:\Program Files\Siemens\NX 12.0 + /// + public string UgiiBaseDir { set; get; } + + /// + /// UGII_ROOT_DIR. E.g.: C:\Program Files\Siemens\NX 12.0\UGII\ + /// + public string UgiiRootDir { set; get; } + + /// + /// Defines whether NX is newer than NX12. Yes=true, No=false + /// + public bool PostNX12 { set; get; } + #endregion + + #region Define Type + /// + /// NX Version. E.g.: NX 10.0.3.5 + /// + public string NXversion { get; set; } + + /// + /// NX Patch. E.g.: NX 10.0.3.5 MP4 + /// + public string NXpatch { get; set; } + + + /// + /// UGII_PRODUCT_NAME. E.g.: NX of NX 10.0.3.5 + /// + public string UgiiProductName { get; set; } + + /// + /// UGII_MAJOR_VERSION. E.g.: 10 of NX 10.0.3.5 + /// + public int UgiiMajorVersion { get; set; } + + /// + /// UGII_MINOR_VERSION. E.g.: 0 of NX 10.0.3.5 + /// + public int UgiiMinorVersion { get; set; } + + /// + /// UGII_SUBMINOR_VERSION. E.g.: 3 of NX 10.0.3.5 + /// + public int UgiiSubminorVersion { get; set; } + + /// + /// NX Phase. E.g.: 5 of NX 10.0.3.5 + /// + public int NXphase { get; set; } + + + /// + /// UGII_FULL_VERSION. E.g.: v10.0.3.5 instead of NX 10.0.3.5 + /// + public string UgiiFullVersion { get; set; } + + /// + /// UGII_VERSION. E.g.: v10 of v10.0.3.5 + /// + public string UgiiVersion { get; set; } + + + /// + /// NX_VERSION_STRING. E.g.: V28.0.3.5 instead of NX 10.0.3.5 MP4 + /// + public string NxVersionString { get; set; } + + /// + /// NX_MAJOR_STRING. E.g.: V28 of V28.0.3.5 + /// + public string NxMajorVersionString { get; set; } + + /// + /// NX_MINOR_STRING. E.g.: 0 of V28.0.3.5 + /// + public string NxMinorVersionString { get; set; } + + /// + /// NX_SUBMINOR_STRING. E.g.: 3 of V28.0.3.5 + /// + public string NxSubminorVersionString { get; set; } + + /// + /// NX_PHASE_STRING. E.g.: 5 of V28.0.3.5 + /// + public string NxPhaseString { get; set; } + + + /// + /// Maintenance Release. E.g.: 10.0.3.5 of NX 10.0.3.5 MP4 + /// + public string MaintenanceRelease { get; set; } + + /// + /// Maintenance Pack. E.g.: MP4 of NX 10.0.3.5 MP4 + /// + public string MaintenancePack { get; set; } + + /// + /// Maintenance Pack Number. E.g.: 4 of NX 10.0.3.5 MP4 + /// + public int MaintenancePackNumber { get; set; } + #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) + { + string nxVersion = ReadNxEnvValues(UgiiRootDir, "-n").Replace("\r\n", ""); + nxVersion = nxVersion.Remove(nxVersion.IndexOf(".")).Replace("NX ", ""); + return Convert.ToInt16(nxVersion); + } + + private string ReadNxEnvValues(string ugiiRootDir, string envPrintArg) + { + string envPrint = String.Concat(ugiiRootDir, "env_print.exe"); + return ProcessOutput(envPrint, envPrintArg); //Prozess mit env_print.exe aufrufen + } + + private string ReadProcessOutput(string ugii_base_dir, string arguments) + { + // Liest die Daten nach beenden der Prozess-Ausgabe aus + // Tritt ein Fehler auf, liefert die Funktion null zurück + + //Wenn UGII_BASE_DIR mit '\\' endet, dann diese entfernen + if (ugii_base_dir.EndsWith("\\")) + { + ugii_base_dir = ugii_base_dir.Remove(ugii_base_dir.Length - 2); + } + + //Überprüfen ob auf alle notwendigen Dateien (env_print.exe, libpatch.dll, libsyss.dll) zugegriffen werden kann + ExecutablesExists(ugii_base_dir); + + //Wenn 'ugii_base_dir' existiert, dann die Werte ermitteln} + return ProcessOutput(String.Concat(ugii_base_dir, "\\UGII\\env_print.exe"), arguments); + } + + private void ExecutablesExists(string ugii_base_dir) + { + //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 (!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"); + } + if (!File.Exists(String.Concat(ugii_base_dir, "\\UGII\\libsyss.dll"))) throw new NoLibSysDllException("Unable to find LibSys.dll"); + } + + private string ProcessOutput(string envPrint, string envPrintArg) + { + try + { + Process process = new Process(); + + process.StartInfo.FileName = envPrint; + process.StartInfo.Arguments = envPrintArg; + process.StartInfo.UseShellExecute = false; + process.StartInfo.RedirectStandardOutput = true; + process.StartInfo.CreateNoWindow = true; + + process.Start(); + process.WaitForExit(); + + return process.StandardOutput.ReadToEnd(); + } + catch (Exception) + { + return null; + } + } + + private void AlignCode(string nxVersionNo) + { + //Neue NX Versionen auflösen + + //NX Version zerlegen + string[] versionSegments = new string[3]; + string[] temp = new string[2]; + temp = SeperateVersionCode(nxVersionNo); + for (int i = 0; i < 3; i++) + { + versionSegments[i] = temp[i]; + } + + //Patch Text zerlegen + //versionSegments[5] = SeperatePatchText(nxVersionNo); + + UgiiProductName = versionSegments[0]; //Produkt Name + UgiiMajorVersion = Convert.ToInt32(versionSegments[1]); //Major Version + UgiiMinorVersion = Convert.ToInt32(versionSegments[2]); //Minor Version + } + + private void AlignCode(string nxVersionNo, string tempPatchText) + { + //NX Version zerlegen + string[] versionSegments = new string[6]; + string[] temp = new string[5]; + temp = SeperateVersionCode(nxVersionNo); + for (int i = 0; i < 5; i++) + { + versionSegments[i] = temp[i]; + } + + //Patch Text zerlegen + versionSegments[5] = SeperatePatchText(tempPatchText); + + //Werte zuordnen + NXpatch = String.Concat(versionSegments[0], " ", versionSegments[1], ".", versionSegments[2], ".", versionSegments[3], ".", versionSegments[4], " ", versionSegments[5]); //NX Patch + NXversion = String.Concat(versionSegments[0], " ", versionSegments[1], ".", versionSegments[2], ".", versionSegments[3], ".", versionSegments[4]); //NX Version + MaintenanceRelease = String.Concat(versionSegments[1], ".", versionSegments[2], ".", versionSegments[3], ".", versionSegments[4]); //Maintenance Release + UgiiProductName = versionSegments[0]; //Produkt Name + UgiiMajorVersion = Convert.ToInt32(versionSegments[1]); //Major Version + UgiiMinorVersion = Convert.ToInt32(versionSegments[2]); //Minor Version + UgiiSubminorVersion = Convert.ToInt32(versionSegments[3]); //Subminor Version + NXphase = Convert.ToInt32(versionSegments[4]); //NX Phase + MaintenancePack = versionSegments[5]; //Maintenance Pack + MaintenancePackNumber = Convert.ToInt32(versionSegments[5].Replace("MP", "")); + NxVersionString = String.Concat("V", (Convert.ToInt32(versionSegments[1]) + 18).ToString(), ".", versionSegments[2], ".", versionSegments[3], ".", versionSegments[4]); //NX Version String + NxMajorVersionString = String.Concat("V", (Convert.ToInt32(versionSegments[1]) + 18).ToString()); //Major Version String + NxMinorVersionString = versionSegments[2].ToString(); //Minor Version String + NxSubminorVersionString = versionSegments[3].ToString(); //Subminor Version String + 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]); + } + + private void AlignCode(string ugiiProductName, int majorVersion, int minorVersion, int subminorVersion, int phase, int mp) + { + //Werte zuordnen + NXpatch = String.Concat(ugiiProductName, " ", majorVersion, ".", minorVersion, ".", subminorVersion, ".", phase, " MP", mp); //NX Patch + NXversion = String.Concat(ugiiProductName, " ", majorVersion, ".", minorVersion, ".", subminorVersion, ".", phase); //NX Version + MaintenanceRelease = String.Concat(majorVersion, ".", minorVersion, ".", subminorVersion, ".", phase); //Maintenance Release + UgiiProductName = ugiiProductName; //Produkt Name + UgiiMajorVersion = majorVersion; //Major Version + UgiiMinorVersion = minorVersion; //Minor Version + UgiiSubminorVersion = subminorVersion; //Subminor Version + NXphase = phase; //NX Phase + MaintenancePack = String.Concat("MP", mp); //Maintenance Pack + MaintenancePackNumber = mp; + NxVersionString = String.Concat("V", (Convert.ToInt32(majorVersion) + 18).ToString(), ".", minorVersion, ".", subminorVersion, ".", phase); //NX Version String + NxMajorVersionString = String.Concat("V", (Convert.ToInt32(majorVersion) + 18).ToString()); //Major Version String + NxMinorVersionString = minorVersion.ToString(); //Minor Version String + NxSubminorVersionString = subminorVersion.ToString(); //Subminor Version String + NxPhaseString = phase.ToString(); //NX Phase String + UgiiFullVersion = String.Concat("v", majorVersion, ".", minorVersion, ".", subminorVersion, ".", phase); //NX Full Version + UgiiVersion = String.Concat("v", majorVersion); + } + + private string[] SeperateVersionCode(string versionNumber) + { + //Wert auflösen und in den Variablen ablegen + if (versionNumber == "\n\r" || versionNumber == null) + { + versionNumber = "NX 00.0.0.00 MP0"; //Wenn kein Wert zurückgeliefert wird, dann mit Null vorbelegen + } + + if (versionNumber.EndsWith("\r\n")) + { + versionNumber = versionNumber.Replace("\r\n", ""); //Zeilenvorschub und Wagenrücklauf entfernen + } + else if (versionNumber.EndsWith("\n\r")) + { + versionNumber = versionNumber.Replace("\n\r", ""); //Zeilenvorschub und Wagenrücklauf entfernen + } + + string[] versionSegments = new string[6]; + + if (versionNumber.Contains("MP")) + { + versionSegments[5] = versionNumber.Remove(0, versionNumber.IndexOf("MP")); + versionNumber = versionNumber.Remove(versionNumber.IndexOf("MP") - 1); //Wenn ' MP' vorkommt, dann abschneiden + } + else + { + versionSegments[5] = "MP0"; + } + versionSegments[0] = versionNumber.Remove(versionNumber.IndexOf(" ")); //Produktnamen zuordnen. Z.B.: NX of NX 10.0.3.5 + versionNumber = versionNumber.Remove(0, versionNumber.IndexOf(" ") + 1); //Den Produktnamen entfernen + + //Die einzelnen Segmente herauslösen + string[] tempVersionSegments = versionNumber.Split(new Char[] { '.' }); + + + if (tempVersionSegments.Length != 4) + { + if (tempVersionSegments.Length == 3) + { + //NX Phase fehlt + versionSegments[1] = tempVersionSegments[0]; + versionSegments[2] = tempVersionSegments[1]; + versionSegments[3] = tempVersionSegments[2]; + versionSegments[4] = "0"; + } + else if (tempVersionSegments.Length == 2) + { + //Sub Minor Version und NX Phase fehlen + versionSegments[1] = tempVersionSegments[0]; + versionSegments[2] = tempVersionSegments[1]; + versionSegments[3] = "0"; + versionSegments[4] = "0"; + } + else if (tempVersionSegments.Length == 1) + { + //Minor Version, Sub Minor Version und NX Phase fehlen + versionSegments[1] = tempVersionSegments[0]; + versionSegments[2] = "0"; + versionSegments[3] = "0"; + versionSegments[4] = "0"; + } + else + { + //Major Version, Minor Version, Sub Minor Version und NX Phase fehlen + versionSegments[1] = "0"; + versionSegments[2] = "0"; + versionSegments[3] = "0"; + versionSegments[4] = "0"; + } + } + else + { + versionSegments[1] = tempVersionSegments[0]; + versionSegments[2] = tempVersionSegments[1]; + versionSegments[3] = tempVersionSegments[2]; + versionSegments[4] = tempVersionSegments[3]; + } + return versionSegments; + } + + private string SeperatePatchText(string patchText) + { + if (patchText.Contains("MP")) + { + patchText = patchText.Remove(0, patchText.IndexOf("MP")); //Alles vor MP abschneiden + if (patchText.Contains(",")) + { + patchText = patchText.Remove(patchText.IndexOf(",")); + } + return patchText; + } + else + { + return "MP0"; //Es wurde kein gültiger Text gefunden, darum einen Wert zuweisen + } + } + + private NxVersion AssignVersion() + { + NxVersion nxVersion = new NxVersion(); + + nxVersion.NXpatch = NXpatch; //NX Patch. E.g.: NX 10.0.3.5 MP4 + nxVersion.NXversion = NXversion; //NX Version. E.g.: NX 10.0.3.5 + nxVersion.MaintenanceRelease = MaintenanceRelease; //Maintenance Release. E.g.: 10.0.3.5 of NX 10.0.3.5 MP4 + nxVersion.UgiiProductName = UgiiProductName; //UGII_PRODUCT_NAME. E.g.: NX of NX 10.0.3.5 + nxVersion.UgiiMajorVersion = UgiiMajorVersion; //UGII_MAJOR_VERSION. E.g.: 10 of NX 10.0.3.5 + nxVersion.UgiiMinorVersion = UgiiMinorVersion; //UGII_MINOR_VERSION. E.g.: 0 of NX 10.0.3.5 + nxVersion.UgiiSubminorVersion = UgiiSubminorVersion; //UGII_SUBMINOR_VERSION. E.g.: 3 of NX 10.0.3.5 + nxVersion.NXphase = NXphase; //NX Phase. E.g.: 5 of NX 10.0.3. + nxVersion.MaintenancePack = MaintenancePack; //Maintenance Pack. E.g.: MP4 of NX 10.0.3.5 MP4 + nxVersion.MaintenancePackNumber = MaintenancePackNumber; //Maintenance Pack Number. E.g.: 4 of NX 10.0.3.5 MP4 + nxVersion.NxVersionString = NxVersionString; //NX_VERSION_STRING. E.g.: V28.0.3.5 instead of NX 10.0.3.5 MP4 + nxVersion.NxMajorVersionString = NxMajorVersionString; //NX_MAJOR_STRING. E.g.: V28 of V28.0.3.5 + nxVersion.NxMinorVersionString = NxMinorVersionString; //NX_MINOR_STRING. E.g.: 0 of V28.0.3.5 + nxVersion.NxSubminorVersionString = NxSubminorVersionString; //NX_SUBMINOR_STRING. E.g.: 3 of V28.0.3.5 + 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 + + return nxVersion; + } + + private NxVersion AssignVersionSegments(string[] versionSegments) + { + NxVersion nxVersion = new NxVersion(); + + // NX_VERSION. E.g.: NX 10.0.3.5 + nxVersion.NXversion = versionSegments[0] + " " + versionSegments[1] + "." + versionSegments[2] + "." + versionSegments[3] + "." + versionSegments[4]; + NXversion = nxVersion.NXversion; + + // NX_PHASE. E.g.: 5 of NX 10.0.3.5 + nxVersion.NXphase = Convert.ToInt16(versionSegments[4]); + NXphase = nxVersion.NXphase; + + // NX_PATCH. E.g.: NX 10.0.3.5 MP4 + nxVersion.NXpatch = nxVersion.NXversion + " " + versionSegments[5]; + NXpatch = nxVersion.NXpatch; + + + // UGII_PRODUCT_NAME. E.g.: NX of NX 10.0.3.5 + nxVersion.UgiiProductName = versionSegments[0]; + UgiiProductName = nxVersion.UgiiProductName; + + // UGII_VERSION. E.g.: v10 of NX 10.0.3.5 + nxVersion.UgiiVersion = "v" + versionSegments[1]; + UgiiVersion = nxVersion.UgiiVersion; + + // UGII_FULL_VERSION. E.g.: v10.0.3.5 + nxVersion.UgiiFullVersion = "v" + versionSegments[1] + "." + versionSegments[2] + "." + versionSegments[3] + "." + versionSegments[4]; + UgiiFullVersion = nxVersion.UgiiFullVersion; + + // UGII_MAJOR_VERSION. E.g.: 10 of NX 10.0.3.5 + nxVersion.UgiiMajorVersion = Convert.ToInt16(versionSegments[1]); + UgiiMajorVersion = nxVersion.UgiiMajorVersion; + + // UGII_MINOR_VERSION. E.g.: 0 of NX 10.0.3.5 + nxVersion.UgiiMinorVersion = Convert.ToInt16(versionSegments[2]); + UgiiMinorVersion = nxVersion.UgiiMinorVersion; + + // UGII_SUBMINOR_VERSION. E.g.: 3 of NX 10.0.3.5 + nxVersion.UgiiSubminorVersion = Convert.ToInt16(versionSegments[3]); + UgiiSubminorVersion = nxVersion.UgiiSubminorVersion; + + + // NX_VERSION_STRING. E.g.: V28.0.3.5 instead of NX 10.0.3.5 MP4 + nxVersion.NxVersionString = "V" + (Convert.ToInt16(versionSegments[1]) + 18).ToString() + "." + versionSegments[2] + "." + versionSegments[3] + "." + versionSegments[4]; + NxVersionString = nxVersion.NxVersionString; + + // NX_MAJOR_STRING. E.g.: V28 of V28.0.3.5 + nxVersion.NxMajorVersionString = "V" + (Convert.ToInt16(versionSegments[1]) + 18).ToString(); + NxMajorVersionString = nxVersion.NxMajorVersionString; + + // NX_MINOR_STRING. E.g.: 0 of V28.0.3.5 + nxVersion.NxMinorVersionString = versionSegments[2]; + NxMinorVersionString = nxVersion.NxMinorVersionString; + + // NX_SUBMINOR_STRING. E.g.: 3 of V28.0.3.5 + nxVersion.NxSubminorVersionString = versionSegments[3]; + NxSubminorVersionString = nxVersion.NxSubminorVersionString; + + // NX_PHASE_STRING. E.g.: 5 of V28.0.3.5 + nxVersion.NxPhaseString = versionSegments[4]; + NxPhaseString = nxVersion.NxPhaseString; + + + // Maintenance Release. E.g.: 10.0.3.5 of NX 10.0.3.5 MP4 + nxVersion.MaintenanceRelease = versionSegments[1] + "." + versionSegments[2] + "." + versionSegments[3] + "." + versionSegments[4]; + MaintenanceRelease = nxVersion.MaintenanceRelease; + + // Maintenance Pack. E.g.: MP4 of NX 10.0.3.5 MP4 + nxVersion.MaintenancePack = versionSegments[5]; + MaintenancePack = nxVersion.MaintenancePack; + + // Maintenance Pack Number. E.g.: 4 of NX 10.0.3.5 MP4 + nxVersion.MaintenancePackNumber = Convert.ToInt16(nxVersion.MaintenancePack.Remove(0, nxVersion.MaintenancePack.IndexOf("MP") + 2)); + MaintenancePackNumber = nxVersion.MaintenancePackNumber; + + return nxVersion; + } + #endregion + + #region Common Public Methodes + /// + /// Converts a NxPatch string to NxVersion + /// + /// A valid NxPatch. E.g.: NX 10.0.3.5 MP4 + /// + public NxVersion ConvertStringPatchToNxVersionPatch(string nxPatch) + { + return AssignVersionSegments(SeperateVersionCode(nxPatch)); + } + + /// + /// Assign values to a NX Version. + /// + /// A valid UGII_BASE_DIR. + /// A full defined NX Version. + public NxVersion GetNxVersion(string ugii_base_dir) + { + NxVersion nxVersion = new NxVersion(); + + string tempVersion = ""; + string tempPatchText = ""; + + + if (Directory.Exists(ugii_base_dir)) + { + tempVersion = ReadProcessOutput(ugii_base_dir, "-n"); //Prozess mit env_print.exe -n aufrufen + tempPatchText = ReadProcessOutput(ugii_base_dir, "-m"); //Prozess mit env_print.exe -m aufrufen + + //Wert auflösen und in den Variablen ablegen + AlignCode(tempVersion, tempPatchText); + + return AssignVersion(); //Werte zuordnen + } + else + { + return null; //Wenn 'ugii_base_dir' nicht existiert, dann 'null' zurückgeben + } + } + + /// + /// Assign values to a NX Version. + /// + /// A valid product name. E.g.: NX + /// A valid UGII_MAJOR_VERSION. E.g.: 10 of NX 10.0.3.5 + /// A valid UGII_MINOR_VERSION. E.g.: 0 of NX 10.0.3.5 + /// A full defined NX Version. + public NxVersion GetNxVersion(string ugiiProductName, int majorVersion, int minorVersion) + { + NxVersion nxVersion = new NxVersion(); + + //Wert auflösen und in den Variablen ablegen + AlignCode(ugiiProductName, majorVersion, minorVersion, 0, 0, 0); + + return AssignVersion(); //Werte zuordnen + } + + /// + /// Assign values to a NX Version. + /// + /// A valid product name. E.g.: NX + /// A valid UGII_MAJOR_VERSION. E.g.: 10 of NX 10.0.3.5 + /// A valid UGII_MINOR_VERSION. E.g.: 0 of NX 10.0.3.5 + /// A valid UGII_SUBMINOR_VERSION. E.g.: 3 of NX 10.0.3.5 + /// A full defined NX Version. + public NxVersion GetNxVersion(string ugiiProductName, int majorVersion, int minorVersion, int subminorVersion) + { + NxVersion nxVersion = new NxVersion(); + + //Wert auflösen und in den Variablen ablegen + AlignCode(ugiiProductName, majorVersion, minorVersion, subminorVersion, 0, 0); + + return AssignVersion(); //Werte zuordnen + } + + /// + /// Assign values to a NX Version. + /// + /// A valid product name. E.g.: NX + /// A valid UGII_MAJOR_VERSION. E.g.: 10 of NX 10.0.3.5 + /// A valid UGII_MINOR_VERSION. E.g.: 0 of NX 10.0.3.5 + /// A valid UGII_SUBMINOR_VERSION. E.g.: 3 of NX 10.0.3.5 + /// A valid NX Phase. E.g.: 5 of NX 10.0.3.5 + /// A valid Maintenance Pack. E.g.: MP4 of NX 10.0.3.5 MP4 + /// A full defined NX Version. + public NxVersion GetNxVersion(string ugiiProductName, int majorVersion, int minorVersion, int subminorVersion, int phase, int mp) + { + NxVersion nxVersion = new NxVersion(); + + //Wert auflösen und in den Variablen ablegen + AlignCode(ugiiProductName, majorVersion, minorVersion, subminorVersion, phase, mp); + + return AssignVersion(); //Werte zuordnen + } + #endregion + + #region Compare + /// + /// Compares two NX-Versions. + /// + /// A valid NX-Version. + /// 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); + } + + /// + /// Compares two NX-Versions. + /// + /// A valid NX Version. + /// A valid NX Version. + /// 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)) + { + return ComparePostNX12(version1, version2); + } + if (!IsPostNX12(version1) & !IsPostNX12(version2)) + { + return CompareUpToNX12(version1, version2); + } + if ((IsPostNX12(version1) & !IsPostNX12(version2)) || (!IsPostNX12(version1) & IsPostNX12(version2))) + { + return CompareDiffVersions(version1, version2); + } + return -1; + } + + /// + /// Compares two NX-Versions. + /// + /// A valid product name. E.g.: NX + /// A valid UGII_MAJOR_VERSION. E.g.: 10 of NX 10.0.3.5 + /// A valid UGII_MINOR_VERSION. E.g.: 0 of NX 10.0.3.5 + /// A valid UGII_SUBMINOR_VERSION. E.g.: 3 of NX 10.0.3.5 + /// A valid NX Phase. E.g.: 5 of NX 10.0.3.5 + /// A valid Maintenance Pack. E.g.: MP4 of NX 10.0.3.5 MP4 + /// 0 = equal, 1 = first version newer, 2 = second version newer, -1 = An error is happened. + public int Compare(string ugiiProductName, int majorVersion, int minorVersion, int subminorVersion, int phase, int mp) + { + NxVersion nxVersion = new NxVersion(); + nxVersion.UgiiProductName = ugiiProductName; + nxVersion.UgiiMajorVersion = majorVersion; + nxVersion.UgiiMinorVersion = minorVersion; + nxVersion.UgiiSubminorVersion = subminorVersion; + nxVersion.NXphase = phase; + nxVersion.MaintenancePackNumber = mp; + + //NX-Version vergleichen + return Compare(this, nxVersion); + } + + private int CompareUpToNX12(NxVersion version1, NxVersion version2) + { + //Nummer setzen wenn noch nicht geschehen + if (!String.IsNullOrEmpty(version2.MaintenancePack)) + { + if (version2.MaintenancePackNumber != Convert.ToInt32(version2.MaintenancePack.Remove(0, 2))) + { + version2.MaintenancePackNumber = Convert.ToInt32(version2.MaintenancePack.Remove(0, 2)); + } + } + + //if (version1.NXpatch == version2.NXpatch) + if (version1.UgiiMajorVersion == version2.UgiiMajorVersion & version1.UgiiMinorVersion == version2.UgiiMinorVersion & version1.UgiiSubminorVersion == version2.UgiiSubminorVersion & version1.NXphase == version2.NXphase & version1.MaintenancePackNumber == version2.MaintenancePackNumber) + { + return 0; //Versionen gleich + } + if (version1.UgiiMajorVersion < version2.UgiiMajorVersion) + { + return 2; //Version 1 ist älter als Version 2 + } + if (version1.UgiiMajorVersion > version2.UgiiMajorVersion) + { + return 1; //Version 1 ist neuer als Version 2 + } + if (version1.UgiiMinorVersion < version2.UgiiMinorVersion) + { + return 2; //Version 1 ist älter als Version 2 + } + if (version1.UgiiMinorVersion > version2.UgiiMinorVersion) + { + return 1; //Version 1 ist neuer als Version 2 + } + if (version1.UgiiSubminorVersion < version2.UgiiSubminorVersion) + { + return 2; //Version 1 ist älter als Version 2 + } + if (version1.UgiiSubminorVersion > version2.UgiiSubminorVersion) + { + return 1; //Version 1 ist neuer als Version 2 + } + if (version1.NXphase < version2.NXphase) + { + return 2; //Version 1 ist älter als Version 2 + } + if (version1.NXphase > version2.NXphase) + { + return 1; //Version 1 ist neuer als Version 2 + } + if (version1.MaintenancePackNumber < version2.MaintenancePackNumber) + { + return 2; //Version 1 ist älter als Version 2 + } + if (version1.MaintenancePackNumber > version2.MaintenancePackNumber) + { + return 1; //Version 1 ist neuer als Version 2 + } + + return -1; //Fehler passiert + } + + private int ComparePostNX12(NxVersion version1, NxVersion version2) + { + if (version1.UgiiMajorVersion == version2.UgiiMajorVersion & version1.UgiiMinorVersion == version2.UgiiMinorVersion) + { + return 0; //Versionen gleich + } + if (version1.UgiiMajorVersion < version2.UgiiMajorVersion) + { + return 2; //Version 1 ist älter als Version 2 + } + if (version1.UgiiMajorVersion > version2.UgiiMajorVersion) + { + return 1; //Version 1 ist neuer als Version 2 + } + if (version1.UgiiMinorVersion < version2.UgiiMinorVersion) + { + return 2; //Version 1 ist älter als Version 2 + } + if (version1.UgiiMinorVersion > version2.UgiiMinorVersion) + { + return 1; //Version 1 ist neuer als Version 2 + } + + return -1; //Fehler passiert + } + + private int CompareDiffVersions(NxVersion version1, NxVersion version2) + { + if (version1.UgiiMajorVersion > version2.UgiiMajorVersion) + { + return 1; //Version 1 ist neuer als Version 2 + } + if (version1.UgiiMajorVersion < version2.UgiiMajorVersion) + { + return 2; //Version 1 ist neuer als Version 2 + } + + return -1; //Fehler passiert + } + + private int CompareMethode(NxVersion version) + { + return CompareMethode(this, version); + } + + private int CompareMethode(NxVersion version1, NxVersion version2) + { + if (version1.NXpatch == version2.NXpatch) + { + return 0; //Versionen gleich + } + if (version1.UgiiMajorVersion < version2.UgiiMajorVersion) + { + return 2; //Version 1 ist älter als Version 2 + } + if (version1.UgiiMajorVersion > version2.UgiiMajorVersion) + { + return 1; //Version 1 ist neuer als Version 2 + } + if (version1.UgiiMinorVersion < version2.UgiiMinorVersion) + { + return 2; //Version 1 ist älter als Version 2 + } + if (version1.UgiiMinorVersion > version2.UgiiMinorVersion) + { + return 1; //Version 1 ist neuer als Version 2 + } + if (version1.UgiiSubminorVersion < version2.UgiiSubminorVersion) + { + return 2; //Version 1 ist älter als Version 2 + } + if (version1.UgiiSubminorVersion > version2.UgiiSubminorVersion) + { + return 1; //Version 1 ist neuer als Version 2 + } + if (version1.NXphase < version2.NXphase) + { + return 2; //Version 1 ist älter als Version 2 + } + if (version1.NXphase > version2.NXphase) + { + return 1; //Version 1 ist neuer als Version 2 + } + if (version1.MaintenancePackNumber < version2.MaintenancePackNumber) + { + return 2; //Version 1 ist älter als Version 2 + } + if (version1.MaintenancePackNumber > version2.MaintenancePackNumber) + { + return 1; //Version 1 ist neuer als Version 2 + } + + return -1; //Fehler passiert + } + + private int CompareMethode(string ugiiProductName, int majorVersion, int minorVersion, int subminorVersion, int phase, int mp) + { + //NxVersion nxVersion = new NxVersion(); + + NxVersion nxVersion = GetNxVersion(ugiiProductName, majorVersion, minorVersion, subminorVersion, phase, mp); + + //NX-Version vergleichen + return CompareMethode(this, nxVersion); + } + #endregion + } + + #region Exception + class NoNXversionException : ApplicationException + { + public NoNXversionException() + { } + + public NoNXversionException(string message) : base(message) + { } + + public NoNXversionException(string message, Exception inner) : base(message, inner) + { } + } + + class NoEnvPrintExeException : ApplicationException + { + public NoEnvPrintExeException() + { } + + public NoEnvPrintExeException(string message) : base(message) + { } + + public NoEnvPrintExeException(string message, Exception inner) : base(message, inner) + { } + } + + class NoLibPatchDllException : ApplicationException + { + public NoLibPatchDllException() + { } + + public NoLibPatchDllException(string message) : base(message) + { } + + public NoLibPatchDllException(string message, Exception inner) : base(message, inner) + { } + } + + class NoLibSysDllException : ApplicationException + { + public NoLibSysDllException() + { } + + public NoLibSysDllException(string message) : base(message) + { } + + public NoLibSysDllException(string message, Exception inner) : base(message, inner) + { } + } + #endregion +} diff --git a/NxVersion/NxVersion.csproj b/NxVersion/NxVersion.csproj new file mode 100644 index 0000000..ee947e3 --- /dev/null +++ b/NxVersion/NxVersion.csproj @@ -0,0 +1,49 @@ + + + + + Debug + AnyCPU + {5409502C-5E57-44D9-AA55-57BBE89071CF} + Library + Properties + NxVersion + NxVersion + v4.7.2 + 512 + false + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NxVersion/Properties/AssemblyInfo.cs b/NxVersion/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4610b20 --- /dev/null +++ b/NxVersion/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("NxVersion")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NxVersion")] +[assembly: AssemblyCopyright("Copyright © 2019 by Eugen Höglinger")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly +// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("5409502c-5e57-44d9-aa55-57bbe89071cf")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +// indem Sie "*" wie unten gezeigt eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/NxVersion/bin/Debug/NxVersion.dll b/NxVersion/bin/Debug/NxVersion.dll new file mode 100644 index 0000000..4ba09c0 Binary files /dev/null and b/NxVersion/bin/Debug/NxVersion.dll differ diff --git a/NxVersion/bin/Debug/NxVersion.pdb b/NxVersion/bin/Debug/NxVersion.pdb new file mode 100644 index 0000000..8f07cb7 Binary files /dev/null and b/NxVersion/bin/Debug/NxVersion.pdb differ diff --git a/NxVersion/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/NxVersion/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/NxVersion/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/NxVersion/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/NxVersion/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..e6954de Binary files /dev/null and b/NxVersion/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache 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 new file mode 100644 index 0000000..9ec4e57 --- /dev/null +++ b/NxVersion/obj/Debug/NxVersion.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\NxVersion\obj\Debug\NxVersion.csprojAssemblyReference.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\NxVersion\obj\Debug\NxVersion.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\NxVersion\bin\Debug\NxVersion.dll +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 diff --git a/NxVersion/obj/Debug/NxVersion.csprojAssemblyReference.cache b/NxVersion/obj/Debug/NxVersion.csprojAssemblyReference.cache new file mode 100644 index 0000000..9bc3f46 Binary files /dev/null and b/NxVersion/obj/Debug/NxVersion.csprojAssemblyReference.cache differ diff --git a/NxVersion/obj/Debug/NxVersion.dll b/NxVersion/obj/Debug/NxVersion.dll new file mode 100644 index 0000000..4ba09c0 Binary files /dev/null and b/NxVersion/obj/Debug/NxVersion.dll differ diff --git a/NxVersion/obj/Debug/NxVersion.pdb b/NxVersion/obj/Debug/NxVersion.pdb new file mode 100644 index 0000000..8f07cb7 Binary files /dev/null and b/NxVersion/obj/Debug/NxVersion.pdb differ diff --git a/Test_NxVersion/App.config b/Test_NxVersion/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/Test_NxVersion/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Test_NxVersion/Form1.Designer.cs b/Test_NxVersion/Form1.Designer.cs new file mode 100644 index 0000000..df619d5 --- /dev/null +++ b/Test_NxVersion/Form1.Designer.cs @@ -0,0 +1,122 @@ +namespace Test_NxVersion +{ + partial class Form1 + { + /// + /// Erforderliche Designervariable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Verwendete Ressourcen bereinigen. + /// + /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Windows Form-Designer generierter Code + + /// + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// + private void InitializeComponent() + { + this.buttonStart = new System.Windows.Forms.Button(); + this.labelNxVersion = new System.Windows.Forms.Label(); + this.labelProgramInfo = new System.Windows.Forms.Label(); + this.labelDLLInfo = new System.Windows.Forms.Label(); + this.labelNxVersion1 = new System.Windows.Forms.Label(); + this.labelCompare = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // buttonStart + // + this.buttonStart.Location = new System.Drawing.Point(13, 415); + this.buttonStart.Name = "buttonStart"; + this.buttonStart.Size = new System.Drawing.Size(75, 23); + this.buttonStart.TabIndex = 0; + this.buttonStart.Text = "Start"; + this.buttonStart.UseVisualStyleBackColor = true; + this.buttonStart.Click += new System.EventHandler(this.buttonStart_Click); + // + // labelNxVersion + // + this.labelNxVersion.AutoSize = true; + this.labelNxVersion.Location = new System.Drawing.Point(13, 13); + this.labelNxVersion.Name = "labelNxVersion"; + this.labelNxVersion.Size = new System.Drawing.Size(16, 13); + this.labelNxVersion.TabIndex = 1; + this.labelNxVersion.Text = "..."; + // + // labelProgramInfo + // + this.labelProgramInfo.AutoSize = true; + this.labelProgramInfo.Location = new System.Drawing.Point(453, 362); + this.labelProgramInfo.Name = "labelProgramInfo"; + this.labelProgramInfo.Size = new System.Drawing.Size(16, 13); + this.labelProgramInfo.TabIndex = 2; + this.labelProgramInfo.Text = "..."; + // + // labelDLLInfo + // + this.labelDLLInfo.AutoSize = true; + this.labelDLLInfo.Location = new System.Drawing.Point(453, 195); + this.labelDLLInfo.Name = "labelDLLInfo"; + this.labelDLLInfo.Size = new System.Drawing.Size(16, 13); + this.labelDLLInfo.TabIndex = 3; + this.labelDLLInfo.Text = "..."; + // + // labelNxVersion1 + // + this.labelNxVersion1.AutoSize = true; + this.labelNxVersion1.Location = new System.Drawing.Point(233, 13); + this.labelNxVersion1.Name = "labelNxVersion1"; + this.labelNxVersion1.Size = new System.Drawing.Size(16, 13); + this.labelNxVersion1.TabIndex = 4; + this.labelNxVersion1.Text = "..."; + // + // labelCompare + // + this.labelCompare.AutoSize = true; + this.labelCompare.Location = new System.Drawing.Point(453, 13); + this.labelCompare.Name = "labelCompare"; + this.labelCompare.Size = new System.Drawing.Size(16, 13); + this.labelCompare.TabIndex = 5; + this.labelCompare.Text = "..."; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.labelCompare); + this.Controls.Add(this.labelNxVersion1); + this.Controls.Add(this.labelDLLInfo); + this.Controls.Add(this.labelProgramInfo); + this.Controls.Add(this.labelNxVersion); + this.Controls.Add(this.buttonStart); + this.Name = "Form1"; + this.Text = "Test_NxVersion"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button buttonStart; + private System.Windows.Forms.Label labelNxVersion; + private System.Windows.Forms.Label labelProgramInfo; + private System.Windows.Forms.Label labelDLLInfo; + private System.Windows.Forms.Label labelNxVersion1; + private System.Windows.Forms.Label labelCompare; + } +} + diff --git a/Test_NxVersion/Form1.cs b/Test_NxVersion/Form1.cs new file mode 100644 index 0000000..2b1c312 --- /dev/null +++ b/Test_NxVersion/Form1.cs @@ -0,0 +1,192 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Eugen.NX; + +namespace Test_NxVersion +{ + public partial class Form1 : Form + { + #region Version und Copyright + // Version und Copyright + string programName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen + string programVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); + static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); + string copyright = GenerateCopyright(); + string icon = Application.StartupPath + "\\Info.bmp"; + //Assembly Datum und Zeit + static DateTime value = AssemblyDateTime(); + string date = value.ToShortDateString(); + string time = value.ToLongTimeString(); + private static DateTime AssemblyDateTime() + { + var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; + var buildDateTime = new DateTime(2000, 1, 1).Add(new TimeSpan(TimeSpan.TicksPerDay * version.Build + TimeSpan.TicksPerSecond * 2 * version.Revision)); + //Tage seit dem 1. Januar 2000 und Sekunden seit Mitternacht, (multiplizier mit 2 ergibt das Original) + return buildDateTime; + } + + private static string CurrentYear() + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + + private static string StartYear() + { + //string startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + //return startYear.Remove(0, startYear.LastIndexOf(" ") + 1); + string startYear = ""; + if (((AssemblyCopyrightAttribute)attributes[0]).Copyright.Contains("Copyright © ")) + { + startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace("Copyright © ", ""); + while (startYear.StartsWith(" ")) + { + startYear = startYear.Remove(0, 1); + } + startYear = startYear.Remove(startYear.IndexOf(" ")); + return startYear; + } + else + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + } + + private static string GenerateCopyright() + { + string startYear = StartYear(); + string currentYear = CurrentYear(); + + if (startYear == currentYear) + { + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + } + else + { + //return String.Concat(((AssemblyCopyrightAttribute)attributes[0]).Copyright, "-", currentYear); + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace(startYear, String.Concat(startYear, "-", currentYear)); + } + } + #endregion + + #region Programm-Info + /// + /// Contains the name of the program file + /// + public static string ProgramName { set; get; } + + /// + /// Contains the version of the program file + /// + public static string ProgramVersion { set; get; } + + /// + /// Contains the copyright notice + /// + public static string Copyright { set; get; } + + private void SetProgramInfo() + { + //Name, Version und Copyright setzen + ProgramName = programName; + ProgramVersion = programVersion; + Copyright = copyright; + } + #endregion + + public Form1() + { + 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 + labelDLLInfo.Text = String.Concat("DLL-Info:\n\n", NxVersion.DllName, "\n", NxVersion.DllVersion, "\n", NxVersion.Copyright); //DLL-Info + } + + private void buttonStart_Click(object sender, EventArgs e) + { + Start(); + } + + private void Start() + { + try + { + string version1 = "C:\\CAD\\NX10"; + string version2 = "C:\\CAD\\NX12"; + + NxVersion nxVer1 = new NxVersion(); //NX Version initialisieren + NxVersion nxVer2 = nxVer1.GetNxVersion(version1); //Informationen über diese Version (C:\\CAD\\NX10) abrufen + NxVersion nxVer3 = nxVer1.GetNxVersion(version2); //Informationen über diese Version (C:\\CAD\\NX12) abrufen + + //Werte zuordnen + string text = ""; + text = "Eingabe Methode 1 (UGII_BASE_DIR):\n\nNX Patch: " + nxVer2.NXpatch; + text += "\nNX Version: " + nxVer2.NXversion; + text += "\nMaintenance Release: " + nxVer2.MaintenanceRelease; + text += "\nUGII_PRODUCT_NAME: " + nxVer2.UgiiProductName; + text += "\nUGII_MAJOR_VERSION: " + nxVer2.UgiiMajorVersion; + text += "\nUGII_MINOR_VERSION: " + nxVer2.UgiiMinorVersion; + text += "\nUGII_SUBMINOR_VERSION: " + nxVer2.UgiiSubminorVersion; + text += "\nNX Phase: " + nxVer2.NXphase; + text += "\nMaintenance Pack: " + nxVer2.MaintenancePack; + text += "\nMaintenance Pack Number: " + nxVer2.MaintenancePackNumber; + text += "\nNX_VERSION_STRING: " + nxVer2.NxVersionString; + text += "\nNX_MAJOR_STRING: " + nxVer2.NxMajorVersionString; + text += "\nNX_MINOR_STRING: " + nxVer2.NxMinorVersionString; + text += "\nNX_SUBMINOR_STRING: " + nxVer2.NxSubminorVersionString; + text += "\nNX_PHASE_STRING: " + nxVer2.NxPhaseString; + text += "\nUGII_FULL_VERSION: " + nxVer2.UgiiFullVersion; + text += "\nUGII_VERSION: " + nxVer2.UgiiVersion; + labelNxVersion.Text = text; //Werte der installierten NX10 Version + + nxVer2 = nxVer1.GetNxVersion("NX", 10, 0, 3, 5, 19); //Zweite Art der Zuordnung + text = ""; + text = "Eingabe Methode 2 (Einzelne Werte):\n\nNX Patch: " + nxVer2.NXpatch; + text += "\nNX Version: " + nxVer2.NXversion; + text += "\nMaintenance Release: " + nxVer2.MaintenanceRelease; + text += "\nUGII_PRODUCT_NAME: " + nxVer2.UgiiProductName; + text += "\nUGII_MAJOR_VERSION: " + nxVer2.UgiiMajorVersion; + text += "\nUGII_MINOR_VERSION: " + nxVer2.UgiiMinorVersion; + text += "\nUGII_SUBMINOR_VERSION: " + nxVer2.UgiiSubminorVersion; + text += "\nNX Phase: " + nxVer2.NXphase; + text += "\nMaintenance Pack: " + nxVer2.MaintenancePack; + text += "\nMaintenance Pack Number: " + nxVer2.MaintenancePackNumber; + text += "\nNX_VERSION_STRING: " + nxVer2.NxVersionString; + text += "\nNX_MAJOR_STRING: " + nxVer2.NxMajorVersionString; + text += "\nNX_MINOR_STRING: " + nxVer2.NxMinorVersionString; + text += "\nNX_SUBMINOR_STRING: " + nxVer2.NxSubminorVersionString; + text += "\nNX_PHASE_STRING: " + nxVer2.NxPhaseString; + text += "\nUGII_FULL_VERSION: " + nxVer2.UgiiFullVersion; + text += "\nUGII_VERSION: " + nxVer2.UgiiVersion; + labelNxVersion1.Text = text; //Werte der übergebenen NX Version (NX10.0.3.5MP19) + + //Werte vergleichen + text = "Der Vergleich von " + version1 + " mit NX10 ergibt: "; + text += nxVer2.Compare("NX", 10, 0, 3, 5, 19); //Installierte Version mit der übergebenen Version (NX10) vergleichen + text += "\nDer Vergleich von " + version1 + " mit " + version2 + " ergibt: "; + text += nxVer2.Compare(nxVer3); //Installierte Version mit der übergebenen Version (NX12) vergleichen + text += "\nDer Vergleich von " + version2 + " mit " + version1 + " ergibt: "; + text += nxVer3.Compare(nxVer2); //Übergebenen Version (NX12) mit der installierten Version vergleichen + text += "\n\nLegende:\n0 = beide Versionen gleich\n1 = Erste Version neuer\n2 = Zweite Version ist neuer"; + labelCompare.Text = text; + } + catch (Exception ex) + { + MessageBox.Show("Es ist ein Fehler passiert!\n\nGenaue Beschreibung:\n" + ex.Message); + } + } + } +} diff --git a/Test_NxVersion/Form1.resx b/Test_NxVersion/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Test_NxVersion/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Test_NxVersion/Program.cs b/Test_NxVersion/Program.cs new file mode 100644 index 0000000..bb5e2dc --- /dev/null +++ b/Test_NxVersion/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Test_NxVersion +{ + static class Program + { + /// + /// Der Haupteinstiegspunkt für die Anwendung. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Test_NxVersion/Properties/AssemblyInfo.cs b/Test_NxVersion/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3fd0268 --- /dev/null +++ b/Test_NxVersion/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("Test_NxVersion")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Test_NxVersion")] +[assembly: AssemblyCopyright("Copyright © 2019 by Eugen Höglinger")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly +// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("c089c691-2593-42da-b99b-5405ecf606ad")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +// indem Sie "*" wie unten gezeigt eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Test_NxVersion/Properties/Resources.Designer.cs b/Test_NxVersion/Properties/Resources.Designer.cs new file mode 100644 index 0000000..672a982 --- /dev/null +++ b/Test_NxVersion/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion: 4.0.30319.42000 +// +// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn +// der Code neu generiert wird. +// +//------------------------------------------------------------------------------ + +namespace Test_NxVersion.Properties +{ + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse + // über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Test_NxVersion.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Test_NxVersion/Properties/Resources.resx b/Test_NxVersion/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Test_NxVersion/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Test_NxVersion/Properties/Settings.Designer.cs b/Test_NxVersion/Properties/Settings.Designer.cs new file mode 100644 index 0000000..3cedd38 --- /dev/null +++ b/Test_NxVersion/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Test_NxVersion.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Test_NxVersion/Properties/Settings.settings b/Test_NxVersion/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Test_NxVersion/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Test_NxVersion/Test_NxVersion.csproj b/Test_NxVersion/Test_NxVersion.csproj new file mode 100644 index 0000000..0f22777 --- /dev/null +++ b/Test_NxVersion/Test_NxVersion.csproj @@ -0,0 +1,89 @@ + + + + + Debug + AnyCPU + {C089C691-2593-42DA-B99B-5405ECF606AD} + WinExe + Test_NxVersion + Test_NxVersion + v4.7.2 + 512 + true + false + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {5409502c-5e57-44d9-aa55-57bbe89071cf} + NxVersion + + + + \ No newline at end of file diff --git a/Test_NxVersion/bin/Debug/NxVersion.dll b/Test_NxVersion/bin/Debug/NxVersion.dll new file mode 100644 index 0000000..4ba09c0 Binary files /dev/null and b/Test_NxVersion/bin/Debug/NxVersion.dll differ diff --git a/Test_NxVersion/bin/Debug/NxVersion.pdb b/Test_NxVersion/bin/Debug/NxVersion.pdb new file mode 100644 index 0000000..8f07cb7 Binary files /dev/null and b/Test_NxVersion/bin/Debug/NxVersion.pdb differ diff --git a/Test_NxVersion/bin/Debug/Test_NxVersion.exe b/Test_NxVersion/bin/Debug/Test_NxVersion.exe new file mode 100644 index 0000000..d460d0c Binary files /dev/null and b/Test_NxVersion/bin/Debug/Test_NxVersion.exe differ diff --git a/Test_NxVersion/bin/Debug/Test_NxVersion.exe.config b/Test_NxVersion/bin/Debug/Test_NxVersion.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/Test_NxVersion/bin/Debug/Test_NxVersion.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Test_NxVersion/bin/Debug/Test_NxVersion.pdb b/Test_NxVersion/bin/Debug/Test_NxVersion.pdb new file mode 100644 index 0000000..4d1b628 Binary files /dev/null and b/Test_NxVersion/bin/Debug/Test_NxVersion.pdb differ diff --git a/Test_NxVersion/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/Test_NxVersion/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..3871b18 --- /dev/null +++ b/Test_NxVersion/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/Test_NxVersion/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Test_NxVersion/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..d277094 Binary files /dev/null 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 new file mode 100644 index 0000000..fb7ee88 Binary files /dev/null and b/Test_NxVersion/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Test_NxVersion/obj/Debug/Test_NxVersion.Form1.resources b/Test_NxVersion/obj/Debug/Test_NxVersion.Form1.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Test_NxVersion/obj/Debug/Test_NxVersion.Form1.resources differ diff --git a/Test_NxVersion/obj/Debug/Test_NxVersion.Properties.Resources.resources b/Test_NxVersion/obj/Debug/Test_NxVersion.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Test_NxVersion/obj/Debug/Test_NxVersion.Properties.Resources.resources differ diff --git a/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.CopyComplete b/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.CoreCompileInputs.cache b/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..94d0cd0 --- /dev/null +++ b/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +0f9338665d29beafda26e20e81f3c41d75a68e58 diff --git a/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.FileListAbsolute.txt b/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..ec8031c --- /dev/null +++ b/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.FileListAbsolute.txt @@ -0,0 +1,13 @@ +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\Test_NxVersion\bin\Debug\Test_NxVersion.exe.config +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\Test_NxVersion\bin\Debug\Test_NxVersion.exe +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\Test_NxVersion\bin\Debug\Test_NxVersion.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.csprojAssemblyReference.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.Form1.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.Properties.Resources.resources +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.csproj.GenerateResource.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.csproj.CopyComplete +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.exe +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\Test_NxVersion\obj\Debug\Test_NxVersion.pdb +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\Test_NxVersion\bin\Debug\NxVersion.dll +H:\Programmieren\Git-Repository\VisualStudio\2017\_DLL\NxVersion.git\Test_NxVersion\bin\Debug\NxVersion.pdb diff --git a/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.GenerateResource.cache b/Test_NxVersion/obj/Debug/Test_NxVersion.csproj.GenerateResource.cache new file mode 100644 index 0000000..a055a58 Binary files /dev/null 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 new file mode 100644 index 0000000..06d60c2 Binary files /dev/null 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 new file mode 100644 index 0000000..d460d0c Binary files /dev/null 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 new file mode 100644 index 0000000..4d1b628 Binary files /dev/null and b/Test_NxVersion/obj/Debug/Test_NxVersion.pdb differ