Projekt neu angelegt.

This commit is contained in:
Eugen Höglinger 2020-02-26 15:22:38 +01:00
commit 6e0b29224e
15 changed files with 1361 additions and 0 deletions

32
.gitignore vendored Normal file
View File

@ -0,0 +1,32 @@
#Ignore thumbnails created by Windows
Thumbs.db
#Ignore files built by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
[Bb]in
[Dd]ebug*/
*.lib
*.sbr
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
.vs/
#Nuget packages folder
packages/

8
NxVersion.cs Normal file
View File

@ -0,0 +1,8 @@
using System;
public class Class1
{
public Class1()
{
}
}

24
Test_NxVersion.sln Normal file
View File

@ -0,0 +1,24 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.15
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_NxVersion", "Test_NxVersion\Test_NxVersion.csproj", "{631855B1-EA0D-4F92-A1CB-67A2C3EEA80F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4104FD41-6288-4B03-B0D0-DFE93B8AD119}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{631855B1-EA0D-4F92-A1CB-67A2C3EEA80F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{631855B1-EA0D-4F92-A1CB-67A2C3EEA80F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{631855B1-EA0D-4F92-A1CB-67A2C3EEA80F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{631855B1-EA0D-4F92-A1CB-67A2C3EEA80F}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>

99
Test_NxVersion/Form1.Designer.cs generated Normal file
View File

@ -0,0 +1,99 @@
namespace Test_NxVersion
{
partial class Form1
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Windows Form-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.buttonStart = new System.Windows.Forms.Button();
this.labelNxVersion = 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(12, 363);
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(9, 9);
this.labelNxVersion.Name = "labelNxVersion";
this.labelNxVersion.Size = new System.Drawing.Size(16, 13);
this.labelNxVersion.TabIndex = 1;
this.labelNxVersion.Text = "...";
//
// labelNxVersion1
//
this.labelNxVersion1.AutoSize = true;
this.labelNxVersion1.Location = new System.Drawing.Point(226, 9);
this.labelNxVersion1.Name = "labelNxVersion1";
this.labelNxVersion1.Size = new System.Drawing.Size(16, 13);
this.labelNxVersion1.TabIndex = 2;
this.labelNxVersion1.Text = "...";
//
// labelCompare
//
this.labelCompare.AutoSize = true;
this.labelCompare.Location = new System.Drawing.Point(12, 312);
this.labelCompare.Name = "labelCompare";
this.labelCompare.Size = new System.Drawing.Size(16, 13);
this.labelCompare.TabIndex = 3;
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(427, 398);
this.Controls.Add(this.labelCompare);
this.Controls.Add(this.labelNxVersion1);
this.Controls.Add(this.labelNxVersion);
this.Controls.Add(this.buttonStart);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button buttonStart;
private System.Windows.Forms.Label labelNxVersion;
private System.Windows.Forms.Label labelNxVersion1;
private System.Windows.Forms.Label labelCompare;
}
}

103
Test_NxVersion/Form1.cs Normal file
View File

@ -0,0 +1,103 @@
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.Version;
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 version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); // Die Programmversion auslesen
static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false);
string copyright = ((AssemblyCopyrightAttribute)attributes[0]).Copyright;
string icon = Application.StartupPath + "\\Info.bmp";
// Assembly Datum und Zeit
static DateTime value = AssemblyDateTime();
string date = value.ToShortDateString();
string time = value.ToLongTimeString();
// Programmversion berechnen
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;
}
#endregion
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
this.Text = programName; //Programnamen ins Fenster schreiben
}
private void buttonStart_Click(object sender, EventArgs e)
{
NxVersion nxVersion = new NxVersion();
NxVersion nxVer = nxVersion.GetNxVersion("C:\\CAD\\NX10");
NxVersion nxVer1 = nxVersion.GetNxVersion("C:\\CAD\\NX12_Beta\\NX 12.0");
//Werte zuordnen
string text = "";
text = "NX Patch: " + nxVer.NXpatch;
text += "\nNX Version: " + nxVer.NXversion;
text += "\nMaintenance Release: " + nxVer.MaintenanceRelease;
text += "\nUGII_PRODUCT_NAME: " + nxVer.UgiiProductName;
text += "\nUGII_MAJOR_VERSION: " + nxVer.UgiiMajorVersion;
text += "\nUGII_MINOR_VERSION: " + nxVer.UgiiMinorVersion;
text += "\nUGII_SUBMINOR_VERSION: " + nxVer.UgiiSubminorVersion;
text += "\nNX Phase: " + nxVer.NXphase;
text += "\nMaintenance Pack: " + nxVer.MaintenancePack;
text += "\nMaintenance Pack Number: " + nxVer.MaintenancePackNumber;
text += "\nNX_VERSION_STRING: " + nxVer.NxVersionString;
text += "\nNX_MAJOR_STRING: " + nxVer.NxMajorVersionString;
text += "\nNX_MINOR_STRING: " + nxVer.NxMinorVersionString;
text += "\nNX_SUBMINOR_STRING: " + nxVer.NxSubminorVersionString;
text += "\nNX_PHASE_STRING: " + nxVer.NxPhaseString;
text += "\nUGII_FULL_VERSION: " + nxVer.UgiiFullVersion;
text += "\nUGII_VERSION: " + nxVer.UgiiVersion;
labelNxVersion.Text = text;
nxVer = nxVersion.GetNxVersion("NX", 10, 0, 3, 5, 11);
text = "";
text = "NX Patch: " + nxVer.NXpatch;
text += "\nNX Version: " + nxVer.NXversion;
text += "\nMaintenance Release: " + nxVer.MaintenanceRelease;
text += "\nUGII_PRODUCT_NAME: " + nxVer.UgiiProductName;
text += "\nUGII_MAJOR_VERSION: " + nxVer.UgiiMajorVersion;
text += "\nUGII_MINOR_VERSION: " + nxVer.UgiiMinorVersion;
text += "\nUGII_SUBMINOR_VERSION: " + nxVer.UgiiSubminorVersion;
text += "\nNX Phase: " + nxVer.NXphase;
text += "\nMaintenance Pack: " + nxVer.MaintenancePack;
text += "\nMaintenance Pack Number: " + nxVer.MaintenancePackNumber;
text += "\nNX_VERSION_STRING: " + nxVer.NxVersionString;
text += "\nNX_MAJOR_STRING: " + nxVer.NxMajorVersionString;
text += "\nNX_MINOR_STRING: " + nxVer.NxMinorVersionString;
text += "\nNX_SUBMINOR_STRING: " + nxVer.NxSubminorVersionString;
text += "\nNX_PHASE_STRING: " + nxVer.NxPhaseString;
text += "\nUGII_FULL_VERSION: " + nxVer.UgiiFullVersion;
text += "\nUGII_VERSION: " + nxVer.UgiiVersion;
labelNxVersion1.Text = text;
//Werte vergleichen
text = "Der Vergleich von C:\\CAD\\NX10 mit C:\\CAD\\NX12_Beta\\NX 12.0 ergibt: ";
text += nxVer.Compare(nxVer1);
labelCompare.Text = text;
}
}
}

120
Test_NxVersion/Form1.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

603
Test_NxVersion/NxVersion.cs Normal file
View File

@ -0,0 +1,603 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Eugen.NX.Version
{
class NxVersion
{
/// <summary>
/// UGII_BASE_DIR. E.g.: C:\Program Files\Siemens\NX 10.0
/// </summary>
public string Ugii_base_dir { get; set; }
#region Define Type
/// <summary>
/// NX Version. E.g.: NX 10.0.3.5
/// </summary>
public string NXversion { get; set; }
/// <summary>
/// NX Patch. E.g.: NX 10.0.3.5 MP4
/// </summary>
public string NXpatch { get; set; }
/// <summary>
/// UGII_PRODUCT_NAME. E.g.: NX of NX 10.0.3.5
/// </summary>
public string UgiiProductName { get; set; }
/// <summary>
/// UGII_MAJOR_VERSION. E.g.: 10 of NX 10.0.3.5
/// </summary>
public int UgiiMajorVersion { get; set; }
/// <summary>
/// UGII_MINOR_VERSION. E.g.: 0 of NX 10.0.3.5
/// </summary>
public int UgiiMinorVersion { get; set; }
/// <summary>
/// UGII_SUBMINOR_VERSION. E.g.: 3 of NX 10.0.3.5
/// </summary>
public int UgiiSubminorVersion { get; set; }
/// <summary>
/// NX Phase. E.g.: 5 of NX 10.0.3.5
/// </summary>
public int NXphase { get; set; }
/// <summary>
/// UGII_FULL_VERSION. E.g.: v10.0.3.5 instead of NX 10.0.3.5
/// </summary>
public string UgiiFullVersion { get; set; }
/// <summary>
/// UGII_VERSION. E.g.: v10 of v10.0.3.5
/// </summary>
public string UgiiVersion { get; set; }
/// <summary>
/// NX_VERSION_STRING. E.g.: V28.0.3.5 instead of NX 10.0.3.5 MP4
/// </summary>
public string NxVersionString { get; set; }
/// <summary>
/// NX_MAJOR_STRING. E.g.: V28 of V28.0.3.5
/// </summary>
public string NxMajorVersionString { get; set; }
/// <summary>
/// NX_MINOR_STRING. E.g.: 0 of V28.0.3.5
/// </summary>
public string NxMinorVersionString { get; set; }
/// <summary>
/// NX_SUBMINOR_STRING. E.g.: 3 of V28.0.3.5
/// </summary>
public string NxSubminorVersionString { get; set; }
/// <summary>
/// NX_PHASE_STRING. E.g.: 5 of V28.0.3.5
/// </summary>
public string NxPhaseString { get; set; }
/// <summary>
/// Maintenance Release. E.g.: 10.0.3.5 of NX 10.0.3.5 MP4
/// </summary>
public string MaintenanceRelease { get; set; }
/// <summary>
/// Maintenance Pack. E.g.: MP4 of NX 10.0.3.5 MP4
/// </summary>
public string MaintenancePack { get; set; }
/// <summary>
/// Maintenance Pack Number. E.g.: 4 of NX 10.0.3.5 MP4
/// </summary>
public int MaintenancePackNumber { get; set; }
#endregion
#region GetVersion
/// <summary>
/// Assign values to a NX Version.
/// </summary>
/// <param name="ugii_base_dir">A valid UGII_BASE_DIR.</param>
/// <returns>A full defined NX Version.</returns>
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 -n 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
}
}
/// <summary>
/// Assign values to a NX Version.
/// </summary>
/// <param name="ugiiProductName">A valid product name. E.g.: NX</param>
/// <param name="majorVersion">A valid UGII_MAJOR_VERSION. E.g.: 10 of NX 10.0.3.5</param>
/// <param name="minorVersion">A valid UGII_MINOR_VERSION. E.g.: 0 of NX 10.0.3.5</param>
/// <param name="subminorVersion">A valid UGII_SUBMINOR_VERSION. E.g.: 3 of NX 10.0.3.5</param>
/// <param name="phase">A valid NX Phase. E.g.: 5 of NX 10.0.3.5</param>
/// <param name="mp">A valid Maintenance Pack. E.g.: MP4 of NX 10.0.3.5 MP4</param>
/// <returns>A full defined NX Version.</returns>
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
/// <summary>
/// Compares two NX-Versions.
/// </summary>
/// <param name="version">A valid NX-Version.</param>
/// <returns>0 = equal, 1 = first version newer, 2 = second version newer, -1 = An error is happened.</returns>
public int Compare(NxVersion version)
{
return Compare(this, version);
}
/// <summary>
/// Compares two NX-Versions.
/// </summary>
/// <param name="version1">A valid NX Version.</param>
/// <param name="version2">A valid NX Version.</param>
/// <returns>0 = equal, 1 = first version newer, 2 = second version newer, -1 = An error is happened.</returns>
public int Compare(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
}
/// <summary>
/// Compares two NX-Versions.
/// </summary>
/// <param name="ugiiProductName">A valid product name. E.g.: NX</param>
/// <param name="majorVersion">A valid UGII_MAJOR_VERSION. E.g.: 10 of NX 10.0.3.5</param>
/// <param name="minorVersion">A valid UGII_MINOR_VERSION. E.g.: 0 of NX 10.0.3.5</param>
/// <param name="subminorVersion">A valid UGII_SUBMINOR_VERSION. E.g.: 3 of NX 10.0.3.5</param>
/// <param name="phase">A valid NX Phase. E.g.: 5 of NX 10.0.3.5</param>
/// <param name="mp">A valid Maintenance Pack. E.g.: MP4 of NX 10.0.3.5 MP4</param>
/// <returns>0 = equal, 1 = first version newer, 2 = second version newer, -1 = An error is happened.</returns>
public int Compare(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 Compare(this, nxVersion);
}
#endregion
#region CommonMethodes
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(ugii_base_dir, 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");
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 ugii_base_dir, string arguments)
{
try
{
Process process = new Process();
process.StartInfo.FileName = String.Concat(ugii_base_dir, "\\UGII\\env_print.exe");
process.StartInfo.Arguments = arguments;
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 versionNumber, string tempPatchText)
{
//NX Version zerlegen
string[] versionSegments = new string[6] ;
string[] temp = new string[5];
temp = SeperateVersionCode(versionNumber);
for (int i = 0; i < 5; i++)
{
versionSegments[i] = temp[i];
}
//versionSegments = SeperateVersionCode(versionNumber);
//Patch Text zerlegen
versionSegments[5] = SeperatePatchText(tempPatchText);
//TODO:
//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 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 string[] SeperateVersionCode(string versionNumber)
{
//Wert auflösen und in den Variablen ablegen
if (versionNumber == "\n\r" || versionNumber == null)
{
versionNumber = "NX 00.0.0.00"; //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[5];
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(patchText.IndexOf(",")); //Alles nach dem Beistrich
patchText = patchText.Remove(0, patchText.IndexOf("MP")); //Alles vor MP abschneiden
return patchText;
}
else
{
return "MP0"; //Es wurde kein gültiger Text gefunden, darum einen Wert zuweisen
}
}
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;
}
/// <summary>
/// Converts a NxPatch string to NxVersion
/// </summary>
/// <param name="nxPatch">A valid NxPatch. E.g.: NX 10.0.3.5 MP4</param>
/// <returns></returns>
public NxVersion ConvertStringPatchToNxVersionPatch(string nxPatch)
{
return AssignVersionSegments(SeperateVersionCode(nxPatch));
}
#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
}

22
Test_NxVersion/Program.cs Normal file
View File

@ -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
{
/// <summary>
/// Der Haupteinstiegspunkt für die Anwendung.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}

View File

@ -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 © 2017")]
[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("631855b1-ea0d-4f92-a1cb-67a2c3eea80f")]
// 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,
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.*")]
// [assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Test_NxVersion.Properties
{
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// 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()
{
}
/// <summary>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </summary>
[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;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
//------------------------------------------------------------------------------
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;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{631855B1-EA0D-4F92-A1CB-67A2C3EEA80F}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Test_NxVersion</RootNamespace>
<AssemblyName>Test_NxVersion</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="NxVersion.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>