Some improvements
Use specific CAEX file version Update assembly information Code cleanup
This commit is contained in:
parent
5bef6aa1db
commit
be82e509a0
34
SOURCE/Plugin/DeviceDescription.Designer.cs
generated
34
SOURCE/Plugin/DeviceDescription.Designer.cs
generated
@ -55,7 +55,7 @@ namespace Aml.Editor.Plugin
|
|||||||
this.automationComponentLibraryv100FullCAEX3BETAToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.automationComponentLibraryv100FullCAEX3BETAToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.electricConnectorLibraryv100ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.electricConnectorLibraryv100ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.industrialSensorLibraryv100ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.industrialSensorLibraryv100ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.advancedModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.advancedModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.helpButton = new System.Windows.Forms.ToolStripDropDownButton();
|
this.helpButton = new System.Windows.Forms.ToolStripDropDownButton();
|
||||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
@ -228,6 +228,7 @@ namespace Aml.Editor.Plugin
|
|||||||
this.toolStripButton13 = new System.Windows.Forms.ToolStripButton();
|
this.toolStripButton13 = new System.Windows.Forms.ToolStripButton();
|
||||||
this.toolStripButton14 = new System.Windows.Forms.ToolStripButton();
|
this.toolStripButton14 = new System.Windows.Forms.ToolStripButton();
|
||||||
this.toolStripButton15 = new System.Windows.Forms.ToolStripButton();
|
this.toolStripButton15 = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.caexVersionFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolStrip1.SuspendLayout();
|
this.toolStrip1.SuspendLayout();
|
||||||
this.Page0_FullWindow.SuspendLayout();
|
this.Page0_FullWindow.SuspendLayout();
|
||||||
this.Page0_FullWindowPanel2.SuspendLayout();
|
this.Page0_FullWindowPanel2.SuspendLayout();
|
||||||
@ -293,7 +294,7 @@ namespace Aml.Editor.Plugin
|
|||||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.fileButton,
|
this.fileButton,
|
||||||
this.librariesSplitButton,
|
this.librariesSplitButton,
|
||||||
this.viewToolStripMenuItem,
|
this.optionsToolStripMenuItem,
|
||||||
this.helpButton,
|
this.helpButton,
|
||||||
this.vendorNameTextBox,
|
this.vendorNameTextBox,
|
||||||
this.filePathLabel,
|
this.filePathLabel,
|
||||||
@ -441,18 +442,19 @@ namespace Aml.Editor.Plugin
|
|||||||
this.industrialSensorLibraryv100ToolStripMenuItem.Text = "IndustrialSensorLibrary_v1_0_0";
|
this.industrialSensorLibraryv100ToolStripMenuItem.Text = "IndustrialSensorLibrary_v1_0_0";
|
||||||
this.industrialSensorLibraryv100ToolStripMenuItem.Click += new System.EventHandler(this.industrialSensorLibraryv100ToolStripMenuItem_Click);
|
this.industrialSensorLibraryv100ToolStripMenuItem.Click += new System.EventHandler(this.industrialSensorLibraryv100ToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// viewToolStripMenuItem
|
// optionsToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.advancedModeToolStripMenuItem});
|
this.advancedModeToolStripMenuItem,
|
||||||
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
|
this.caexVersionFileToolStripMenuItem});
|
||||||
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 23);
|
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
|
||||||
this.viewToolStripMenuItem.Text = "View";
|
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(61, 23);
|
||||||
|
this.optionsToolStripMenuItem.Text = "Options";
|
||||||
//
|
//
|
||||||
// advancedModeToolStripMenuItem
|
// advancedModeToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.advancedModeToolStripMenuItem.Name = "advancedModeToolStripMenuItem";
|
this.advancedModeToolStripMenuItem.Name = "advancedModeToolStripMenuItem";
|
||||||
this.advancedModeToolStripMenuItem.Size = new System.Drawing.Size(161, 22);
|
this.advancedModeToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
this.advancedModeToolStripMenuItem.Text = "Advanced Mode";
|
this.advancedModeToolStripMenuItem.Text = "Advanced Mode";
|
||||||
this.advancedModeToolStripMenuItem.Click += new System.EventHandler(this.advancedModeToolStripMenuItem_Click);
|
this.advancedModeToolStripMenuItem.Click += new System.EventHandler(this.advancedModeToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
@ -470,14 +472,14 @@ namespace Aml.Editor.Plugin
|
|||||||
//
|
//
|
||||||
this.aboutToolStripMenuItem.BackColor = System.Drawing.SystemColors.Control;
|
this.aboutToolStripMenuItem.BackColor = System.Drawing.SystemColors.Control;
|
||||||
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
|
||||||
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
|
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
this.aboutToolStripMenuItem.Text = "About";
|
this.aboutToolStripMenuItem.Text = "About";
|
||||||
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
|
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
// manualToolStripMenuItem
|
// manualToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.manualToolStripMenuItem.Name = "manualToolStripMenuItem";
|
this.manualToolStripMenuItem.Name = "manualToolStripMenuItem";
|
||||||
this.manualToolStripMenuItem.Size = new System.Drawing.Size(114, 22);
|
this.manualToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
this.manualToolStripMenuItem.Text = "Manual";
|
this.manualToolStripMenuItem.Text = "Manual";
|
||||||
this.manualToolStripMenuItem.Click += new System.EventHandler(this.manualToolStripMenuItem_Click);
|
this.manualToolStripMenuItem.Click += new System.EventHandler(this.manualToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
@ -2385,6 +2387,13 @@ namespace Aml.Editor.Plugin
|
|||||||
this.toolStripButton15.Size = new System.Drawing.Size(44, 24);
|
this.toolStripButton15.Size = new System.Drawing.Size(44, 24);
|
||||||
this.toolStripButton15.Text = "Save";
|
this.toolStripButton15.Text = "Save";
|
||||||
//
|
//
|
||||||
|
// caexVersionFileToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.caexVersionFileToolStripMenuItem.Name = "caexVersionFileToolStripMenuItem";
|
||||||
|
this.caexVersionFileToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||||
|
this.caexVersionFileToolStripMenuItem.Text = "Use CAEX 2.15 File";
|
||||||
|
this.caexVersionFileToolStripMenuItem.Click += new System.EventHandler(this.caexVersionFileToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// DeviceDescription
|
// DeviceDescription
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||||
@ -2674,7 +2683,8 @@ namespace Aml.Editor.Plugin
|
|||||||
private System.Windows.Forms.TextBox genericDataDescriptionTxtBx;
|
private System.Windows.Forms.TextBox genericDataDescriptionTxtBx;
|
||||||
private System.Windows.Forms.ToolStrip toolStrip5;
|
private System.Windows.Forms.ToolStrip toolStrip5;
|
||||||
private System.Windows.Forms.ToolStripLabel genericDataHeaderLabel;
|
private System.Windows.Forms.ToolStripLabel genericDataHeaderLabel;
|
||||||
private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem advancedModeToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem advancedModeToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem caexVersionFileToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ namespace Aml.Editor.Plugin
|
|||||||
private object _row;
|
private object _row;
|
||||||
private bool isEditing = false;
|
private bool isEditing = false;
|
||||||
private bool expertMode = false;
|
private bool expertMode = false;
|
||||||
|
private bool useCaex2_15 = false;
|
||||||
private OpenFileDialog openFileDialog = new OpenFileDialog();
|
private OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||||
|
|
||||||
private List<string> AllInterfaces = new List<string>();
|
private List<string> AllInterfaces = new List<string>();
|
||||||
@ -1591,10 +1592,11 @@ namespace Aml.Editor.Plugin
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
SaveFileDialog saveFileDialog = new SaveFileDialog
|
||||||
|
{
|
||||||
saveFileDialog.Filter = "AML Files( *.amlx )| *.amlx;";
|
Filter = "AML Files( *.amlx )| *.amlx;",
|
||||||
saveFileDialog.FileName = vendorNameTextBox.Text + "-" + deviceNameTextBox.Text + "-V.1.0-" + DateTime.Now.Date.ToShortDateString();
|
FileName = vendorNameTextBox.Text + "-" + deviceNameTextBox.Text + "-V.1.0-" + DateTime.Now.Date.ToShortDateString()
|
||||||
|
};
|
||||||
|
|
||||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
@ -1603,11 +1605,10 @@ namespace Aml.Editor.Plugin
|
|||||||
device.environment = Path.GetDirectoryName(saveFileDialog.FileName);
|
device.environment = Path.GetDirectoryName(saveFileDialog.FileName);
|
||||||
device.fileName = saveFileDialog.FileName;
|
device.fileName = saveFileDialog.FileName;
|
||||||
|
|
||||||
|
|
||||||
// storing user defined values of Attachebles data grid view in to list
|
// storing user defined values of Attachebles data grid view in to list
|
||||||
|
|
||||||
// Pass the device to the controller
|
// Pass the device to the controller
|
||||||
string result1 = mWController.CreateDeviceOnClick(device, isEditing);
|
string result1 = mWController.CreateDeviceOnClick(device, isEditing, useCaex2_15);
|
||||||
|
|
||||||
//clear();
|
//clear();
|
||||||
|
|
||||||
@ -1730,7 +1731,7 @@ namespace Aml.Editor.Plugin
|
|||||||
// storing user defined values of Attachebles data grid view in to list
|
// storing user defined values of Attachebles data grid view in to list
|
||||||
|
|
||||||
// Pass the device to the controller
|
// Pass the device to the controller
|
||||||
string result1 = mWController.CreateDeviceOnClick(device, isEditing);
|
string result1 = mWController.CreateDeviceOnClick(device, isEditing, useCaex2_15);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1760,6 +1761,7 @@ namespace Aml.Editor.Plugin
|
|||||||
|
|
||||||
private void newToolStripMenuItem_Click(object sender, EventArgs e)
|
private void newToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
isEditing = false;
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
|
|
||||||
@ -1827,6 +1829,8 @@ namespace Aml.Editor.Plugin
|
|||||||
|
|
||||||
private void openToolStripMenuItem_Click(object sender, EventArgs e)
|
private void openToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
isEditing = true;
|
||||||
|
|
||||||
searchAMLComponentFile.DictionaryofElectricalConnectorType = new Dictionary<string, List<List<ClassOfListsFromReferencefile>>>();
|
searchAMLComponentFile.DictionaryofElectricalConnectorType = new Dictionary<string, List<List<ClassOfListsFromReferencefile>>>();
|
||||||
searchAMLComponentFile.DictioanryofElectricalConnectorPinType = new Dictionary<string, List<List<ClassOfListsFromReferencefile>>>();
|
searchAMLComponentFile.DictioanryofElectricalConnectorPinType = new Dictionary<string, List<List<ClassOfListsFromReferencefile>>>();
|
||||||
|
|
||||||
@ -4579,5 +4583,21 @@ namespace Aml.Editor.Plugin
|
|||||||
}
|
}
|
||||||
catch (Exception) { }
|
catch (Exception) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void caexVersionFileToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// Switch mode
|
||||||
|
useCaex2_15 = !useCaex2_15;
|
||||||
|
|
||||||
|
// Change text
|
||||||
|
if (useCaex2_15)
|
||||||
|
{
|
||||||
|
this.caexVersionFileToolStripMenuItem.Text = "Use CAEX 3.0 File";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.caexVersionFileToolStripMenuItem.Text = "Use CAEX 2.15 File";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -123,6 +123,12 @@
|
|||||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>265, 17</value>
|
<value>265, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>1330, 103</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="toolStrip24.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>1066, 103</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="imageList2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="imageList2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>278, 103</value>
|
<value>278, 103</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
@ -131,7 +137,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD6
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD6
|
||||||
DAAAAk1TRnQBSQFMAgEBAwEAAVABBAFQAQQBHAEAARwBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
DAAAAk1TRnQBSQFMAgEBAwEAAZABBAGQAQQBHAEAARwBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABcAMAARwDAAEBAQABCAUAAUABDBgAAYACAAGAAwACgAEAAYADAAGAAQABgAEAAoACAAPAAQABwAHc
|
AwABcAMAARwDAAEBAQABCAUAAUABDBgAAYACAAGAAwACgAEAAYADAAGAAQABgAEAAoACAAPAAQABwAHc
|
||||||
AcABAAHwAcoBpgEAATMFAAEzAQABMwEAATMBAAIzAgADFgEAAxwBAAMiAQADKQEAA1UBAANNAQADQgEA
|
AcABAAHwAcoBpgEAATMFAAEzAQABMwEAATMBAAIzAgADFgEAAxwBAAMiAQADKQEAA1UBAANNAQADQgEA
|
||||||
AzkBAAGAAXwB/wEAAlAB/wEAAZMBAAHWAQAB/wHsAcwBAAHGAdYB7wEAAdYC5wEAAZABqQGtAgAB/wEz
|
AzkBAAGAAXwB/wEAAlAB/wEAAZMBAAHWAQAB/wHsAcwBAAHGAdYB7wEAAdYC5wEAAZABqQGtAgAB/wEz
|
||||||
@ -207,6 +213,24 @@
|
|||||||
<metadata name="deleteRoleClassesButton.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="deleteRoleClassesButton.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>853, 146</value>
|
<value>853, 146</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="toolStrip5.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>1038, 146</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn31.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn32.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="loadfromLibrary.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="loadFromComponentFile.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewCheckBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
<data name="deleteRoleClassButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="deleteRoleClassButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
@ -241,8 +265,23 @@
|
|||||||
<metadata name="dataGridViewTextBoxColumn29.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="dataGridViewTextBoxColumn29.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="toolStrip5.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="dataGridViewTextBoxColumn24.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>1038, 146</value>
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn25.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn26.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn27.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn28.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn29.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="dataGridViewTextBoxColumn17.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="dataGridViewTextBoxColumn17.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
@ -262,8 +301,38 @@
|
|||||||
<metadata name="dataGridViewTextBoxColumn22.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="dataGridViewTextBoxColumn22.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="dataGridViewTextBoxColumn17.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>1330, 103</value>
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn18.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn19.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn20.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn21.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewTextBoxColumn22.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="SerialNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="SelectedClassorInterface.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="libraryFile.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="componentFile.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dataGridViewCheckBoxColumn1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="SerialNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="SerialNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
@ -298,6 +367,18 @@
|
|||||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
|
<metadata name="toolStrip19.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>1179, 60</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="ElementName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="FilePath.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="Add.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="ElementName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="ElementName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
@ -328,6 +409,9 @@
|
|||||||
<metadata name="toolStrip13.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="toolStrip13.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>729, 60</value>
|
<value>729, 60</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="toolStrip13.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>729, 60</value>
|
||||||
|
</metadata>
|
||||||
<data name="addRole.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="addRole.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
@ -336,6 +420,12 @@
|
|||||||
RgtnViTyCJEC4UCoEdfIj94AAAAASUVORK5CYII=
|
RgtnViTyCJEC4UCoEdfIj94AAAAASUVORK5CYII=
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
|
<metadata name="toolStrip7.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>1311, 60</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="toolStrip9.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>1435, 60</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>149, 103</value>
|
<value>149, 103</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
@ -344,7 +434,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkF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cYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm
|
AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm
|
||||||
|
@ -56,14 +56,14 @@ namespace Aml.Editor.Plugin
|
|||||||
/// <param name="newDevice"></param>
|
/// <param name="newDevice"></param>
|
||||||
/// <param name="isEdit"></param>
|
/// <param name="isEdit"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public String CreateDeviceOnClick(MWDevice newDevice, bool isEdit)
|
public String CreateDeviceOnClick(MWDevice newDevice, bool isEdit, bool useCaex2_15)
|
||||||
{
|
{
|
||||||
string result = "";
|
string result = "";
|
||||||
|
|
||||||
if (newDevice.deviceName != null && newDevice.vendorName != null)
|
if (newDevice.deviceName != null && newDevice.vendorName != null)
|
||||||
{
|
{
|
||||||
// create the device
|
// create the device
|
||||||
result = mWData.CreateDevice(newDevice, isEdit);
|
result = mWData.CreateDevice(newDevice, isEdit, useCaex2_15);
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the device list
|
// update the device list
|
||||||
|
@ -55,44 +55,27 @@ namespace Aml.Editor.Plugin
|
|||||||
/// <param name="device">The device which will be created</param>
|
/// <param name="device">The device which will be created</param>
|
||||||
/// <param name="isEdit">true if an amlx file get update, false if a new file will be created</param>
|
/// <param name="isEdit">true if an amlx file get update, false if a new file will be created</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string CreateDevice(MWDevice device, bool isEdit)
|
public string CreateDevice(MWDevice device, bool isEdit, bool useCaex2_15)
|
||||||
{
|
{
|
||||||
|
CAEXDocument document;
|
||||||
CAEXDocument document = null;
|
|
||||||
AutomationMLContainer amlx = null;
|
AutomationMLContainer amlx = null;
|
||||||
|
|
||||||
// Init final .amlx Filepath
|
// Init final .amlx Filepath
|
||||||
//first of all create a folder on "Vendor Name"
|
|
||||||
string vendorCompanyName = device.vendorName;
|
|
||||||
|
|
||||||
string amlFilePath;
|
string amlFilePath;
|
||||||
|
|
||||||
string fileName = device.fileName;
|
string fileName = device.fileName;
|
||||||
|
|
||||||
if (fileName.Contains(".amlx"))
|
amlFilePath = fileName.Contains(".amlx") ? Path.Combine(device.filepath, fileName) : Path.Combine(device.filepath, fileName + ".amlx");
|
||||||
{
|
|
||||||
amlFilePath = System.IO.Path.Combine(device.filepath, fileName);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
amlFilePath = System.IO.Path.Combine(device.filepath, fileName + ".amlx");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FileInfo file = new FileInfo(amlFilePath);
|
FileInfo file = new FileInfo(amlFilePath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Create directory if it's not existing
|
// Create directory if it's not existing
|
||||||
file.Directory.Create();
|
file.Directory.Create();
|
||||||
|
|
||||||
|
|
||||||
// Init CAEX Document
|
// Init CAEX Document
|
||||||
if (isEdit)
|
if (isEdit)
|
||||||
{
|
{
|
||||||
// Load the amlx file
|
// Load the amlx file
|
||||||
amlx = new AutomationMLContainer(amlFilePath, FileMode.Open);
|
amlx = new AutomationMLContainer(amlFilePath, FileMode.OpenOrCreate);
|
||||||
|
|
||||||
IEnumerable<PackagePart> rootParts = amlx.GetPartsByRelationShipType(AutomationMLContainer.RelationshipType.Root);
|
IEnumerable<PackagePart> rootParts = amlx.GetPartsByRelationShipType(AutomationMLContainer.RelationshipType.Root);
|
||||||
|
|
||||||
@ -107,27 +90,26 @@ namespace Aml.Editor.Plugin
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// the amlx contains no aml file
|
// the amlx contains no aml file
|
||||||
document = CAEXDocument.New_CAEXDocument();
|
if (useCaex2_15) document = CAEXDocument.New_CAEXDocument(CAEXDocument.CAEXSchema.CAEX2_15);
|
||||||
|
else document = CAEXDocument.New_CAEXDocument(CAEXDocument.CAEXSchema.CAEX3_0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// create a new CAEX document
|
// create a new CAEX document
|
||||||
document = CAEXDocument.New_CAEXDocument();
|
if (useCaex2_15) document = CAEXDocument.New_CAEXDocument(CAEXDocument.CAEXSchema.CAEX2_15);
|
||||||
|
else document = CAEXDocument.New_CAEXDocument(CAEXDocument.CAEXSchema.CAEX3_0);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
amlx = new AutomationMLContainer(amlFilePath, FileMode.Create);
|
amlx = new AutomationMLContainer(amlFilePath, FileMode.OpenOrCreate);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("Failed to create AutomationMLContainer object");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Init the default Libs
|
// Init the default Libs
|
||||||
AutomationMLBaseRoleClassLibType.RoleClassLib(document);
|
AutomationMLBaseRoleClassLibType.RoleClassLib(document);
|
||||||
AutomationMLInterfaceClassLibType.InterfaceClassLib(document);
|
AutomationMLInterfaceClassLibType.InterfaceClassLib(document);
|
||||||
@ -152,15 +134,9 @@ namespace Aml.Editor.Plugin
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
Boolean myBool;
|
Boolean myBool;
|
||||||
Boolean.TryParse(eachparameter.AddToFile, out myBool);
|
Boolean.TryParse(eachparameter.AddToFile, out myBool);
|
||||||
|
|
||||||
if (myBool == true)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Uri eachUri = null;
|
Uri eachUri = null;
|
||||||
AttachablesDataGridViewParameters par = new AttachablesDataGridViewParameters();
|
AttachablesDataGridViewParameters par = new AttachablesDataGridViewParameters();
|
||||||
eachUri = createPictureRef(eachparameter.FilePath, eachparameter.ElementName.ToString(), "ExternalDataConnector", systemUnitClass);
|
eachUri = createPictureRef(eachparameter.FilePath, eachparameter.ElementName.ToString(), "ExternalDataConnector", systemUnitClass);
|
||||||
@ -168,14 +144,11 @@ namespace Aml.Editor.Plugin
|
|||||||
par.FilePath = eachparameter.FilePath;
|
par.FilePath = eachparameter.FilePath;
|
||||||
|
|
||||||
device.listWithURIConvertedToString.Add(par);
|
device.listWithURIConvertedToString.Add(par);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var pair in device.DictionaryForRoleClassofComponent)
|
foreach (var pair in device.DictionaryForRoleClassofComponent)
|
||||||
{
|
{
|
||||||
|
|
||||||
Match numberfromElectricalConnectorType = Regex.Match(pair.Key.ToString(), @"\((\d+)\)");
|
Match numberfromElectricalConnectorType = Regex.Match(pair.Key.ToString(), @"\((\d+)\)");
|
||||||
string initialnumberbetweenparanthesisofElectricalConnectorType =
|
string initialnumberbetweenparanthesisofElectricalConnectorType =
|
||||||
numberfromElectricalConnectorType.Groups[1].Value;
|
numberfromElectricalConnectorType.Groups[1].Value;
|
||||||
@ -285,8 +258,6 @@ namespace Aml.Editor.Plugin
|
|||||||
|
|
||||||
SRC.RefRoleClassPath = item.SupportesRoleClassType;
|
SRC.RefRoleClassPath = item.SupportesRoleClassType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -327,8 +298,7 @@ namespace Aml.Editor.Plugin
|
|||||||
foundSysClassLib = true;
|
foundSysClassLib = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!foundSysClassLib)
|
if (!foundSysClassLib) systemUnitClass = document.CAEXFile.SystemUnitClassLib.Append("ComponentSystemUnitClassLib").SystemUnitClass.Append(device.deviceName);
|
||||||
systemUnitClass = document.CAEXFile.SystemUnitClassLib.Append("ComponentSystemUnitClassLib").SystemUnitClass.Append(device.deviceName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the internalElement Interfaces
|
// Create the internalElement Interfaces
|
||||||
@ -458,9 +428,6 @@ namespace Aml.Editor.Plugin
|
|||||||
|
|
||||||
electricalConnectorType.RefBaseClassPath = item.RefBaseClassPath;
|
electricalConnectorType.RefBaseClassPath = item.RefBaseClassPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -474,9 +441,6 @@ namespace Aml.Editor.Plugin
|
|||||||
electricalConnectorPinName = Regex.Replace(electricalConnectorPinName, @"\{.*?\}", "");
|
electricalConnectorPinName = Regex.Replace(electricalConnectorPinName, @"\{.*?\}", "");
|
||||||
electricalConnectorPinName = electricalConnectorPinName.Replace(electricalConnectorTypeName, "");
|
electricalConnectorPinName = electricalConnectorPinName.Replace(electricalConnectorTypeName, "");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (initialnumberbetweenparanthesisofElectricalConnectorType == initialnumberbetweenparanthesisElectricalConnectorPins)
|
if (initialnumberbetweenparanthesisofElectricalConnectorType == initialnumberbetweenparanthesisElectricalConnectorPins)
|
||||||
{
|
{
|
||||||
electricalConnectorPins = electricalConnectorType.ExternalInterface.Append(electricalConnectorPinName);
|
electricalConnectorPins = electricalConnectorType.ExternalInterface.Append(electricalConnectorPinName);
|
||||||
@ -625,14 +589,7 @@ namespace Aml.Editor.Plugin
|
|||||||
amlx.Save();
|
amlx.Save();
|
||||||
amlx.Close();
|
amlx.Close();
|
||||||
|
|
||||||
if (isEdit)
|
return isEdit ? "Sucessfully updated device!\nFilepath " + amlFilePath : "Device description file created!\nFilepath " + amlFilePath;
|
||||||
{
|
|
||||||
return "Sucessfully updated device!\nFilepath " + amlFilePath;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return "Device description file created!\nFilepath " + amlFilePath;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -894,7 +851,7 @@ namespace Aml.Editor.Plugin
|
|||||||
|
|
||||||
|
|
||||||
// Load Libary .dll
|
// Load Libary .dll
|
||||||
Assembly assembly = Assembly.Load("Iodd2AmlConverter.Library");
|
Assembly assembly = Assembly.Load(File.ReadAllBytes("Dd2Aml.Lib.dll"));
|
||||||
Type conversionHandler = null;
|
Type conversionHandler = null;
|
||||||
// Iterate over all Types in the Libary and get the ConversionHandler Type
|
// Iterate over all Types in the Libary and get the ConversionHandler Type
|
||||||
foreach (Type type in assembly.ExportedTypes)
|
foreach (Type type in assembly.ExportedTypes)
|
||||||
@ -945,7 +902,7 @@ namespace Aml.Editor.Plugin
|
|||||||
// If it is, then it's calling the Convert Function
|
// If it is, then it's calling the Convert Function
|
||||||
// Gsd2Aml.Lib.Converter.Convert(string inputFilepath, bool strictValidation)
|
// Gsd2Aml.Lib.Converter.Convert(string inputFilepath, bool strictValidation)
|
||||||
|
|
||||||
Assembly assembly = Assembly.Load("Gsd2Aml.Lib");
|
Assembly assembly = Assembly.Load(File.ReadAllBytes("Gsd2Aml.Lib.dll"));
|
||||||
Type conversionHandler = null;
|
Type conversionHandler = null;
|
||||||
// Iterate over all Types in the Libary and get the ConversionHandler Type
|
// Iterate over all Types in the Libary and get the ConversionHandler Type
|
||||||
foreach (Type type in assembly.ExportedTypes)
|
foreach (Type type in assembly.ExportedTypes)
|
||||||
@ -999,6 +956,7 @@ namespace Aml.Editor.Plugin
|
|||||||
byte[] bytearray = System.Text.Encoding.Unicode.GetBytes(caex);
|
byte[] bytearray = System.Text.Encoding.Unicode.GetBytes(caex);
|
||||||
CAEXDocument document = CAEXDocument.LoadFromBinary(bytearray);
|
CAEXDocument document = CAEXDocument.LoadFromBinary(bytearray);
|
||||||
|
|
||||||
|
|
||||||
// create the amlx file
|
// create the amlx file
|
||||||
string name = Path.GetFileNameWithoutExtension(filename);
|
string name = Path.GetFileNameWithoutExtension(filename);
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>..\..\TINF20C_ModellingWizard_Devices\SOURCE\bin\Release\</OutputPath>
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
@ -179,6 +179,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="DeviceDescription.resx">
|
<EmbeddedResource Include="DeviceDescription.resx">
|
||||||
<DependentUpon>DeviceDescription.cs</DependentUpon>
|
<DependentUpon>DeviceDescription.cs</DependentUpon>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
|
@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("DHBW-Stuttgart")]
|
[assembly: AssemblyCompany("DHBW-Stuttgart")]
|
||||||
[assembly: AssemblyProduct("ModellingWizard")]
|
[assembly: AssemblyProduct("ModellingWizard")]
|
||||||
[assembly: AssemblyCopyright("Copyright © DHBW-Stuttgart TINF19C")]
|
[assembly: AssemblyCopyright("Copyright © DHBW-Stuttgart TINF20C")]
|
||||||
[assembly: AssemblyTrademark("ModellingWizard")]
|
[assembly: AssemblyTrademark("ModellingWizard")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user