Compare commits
No commits in common. "app-source-code" and "v0.0.2" have entirely different histories.
app-source
...
v0.0.2
7
SOURCE/Application/Form1.Designer.cs
generated
7
SOURCE/Application/Form1.Designer.cs
generated
@ -30,7 +30,7 @@ namespace App
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
this.deviceDescription1 = new Aml.Editor.Plugin.DeviceDescription(new Aml.Editor.Plugin.MWController());
|
||||
this.deviceDescription1 = new Aml.Editor.Plugin.DeviceDescription();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// deviceDescription1
|
||||
@ -41,10 +41,11 @@ namespace App
|
||||
this.deviceDescription1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.deviceDescription1.Location = new System.Drawing.Point(0, 0);
|
||||
this.deviceDescription1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.deviceDescription1.MaximumSize = new System.Drawing.Size(1750, 866);
|
||||
this.deviceDescription1.MinimumSize = new System.Drawing.Size(1750, 866);
|
||||
this.deviceDescription1.Name = "deviceDescription1";
|
||||
this.deviceDescription1.Size = new System.Drawing.Size(884, 461);
|
||||
this.deviceDescription1.Size = new System.Drawing.Size(1750, 866);
|
||||
this.deviceDescription1.TabIndex = 0;
|
||||
this.deviceDescription1.Load += new System.EventHandler(this.deviceDescription1_Load);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
|
@ -1,4 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace App
|
||||
@ -9,10 +16,5 @@ namespace App
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void deviceDescription1_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
@ -1,4 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace App
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
|
@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Aml.Engine" version="1.5.8" targetFramework="net472" />
|
||||
<package id="System.IO.FileSystem.AccessControl" version="5.0.0" targetFramework="net472" />
|
||||
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net472" />
|
||||
<package id="System.IO.Packaging" version="5.0.0" targetFramework="net472" />
|
||||
<package id="System.Security.AccessControl" version="5.0.0" targetFramework="net472" />
|
||||
<package id="System.Security.Principal.Windows" version="5.0.0" targetFramework="net472" />
|
||||
</packages>
|
Binary file not shown.
Before Width: | Height: | Size: 66 KiB |
@ -45,13 +45,13 @@
|
||||
<ScrollViewer>
|
||||
<StackPanel MinWidth="200">
|
||||
<TextBlock Margin="10,5" Style="{StaticResource Heading2}">
|
||||
<Run Text="About the Modelling Wizard for Devices Application!" />
|
||||
<Run Text="About the Modelling Wizard for Devices PlugIn!" />
|
||||
</TextBlock>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Width="400"
|
||||
Margin="10,5"
|
||||
Text="This Modelling Wizard for Devices standalone application can be used to create or modify Devices and Interfaces. It can also be used to import IODD and GSDML Files which will be converted to an AMLX Package."
|
||||
Text="This Modelling Wizard for Devices PlugIn can be used to create or modify Devices and Interfaces. It can also be used to import IODD and GSDML Files which will be converted to an AMLX Package."
|
||||
TextWrapping="Wrap" />
|
||||
</StackPanel>
|
||||
|
||||
@ -90,16 +90,9 @@
|
||||
<TextBlock Margin="15,0,0,0">
|
||||
<Run FontWeight="Bold" Text="DHBW Stuttgart" />
|
||||
</TextBlock>
|
||||
<TextBlock Margin="15,0,0,0">
|
||||
<Run Text="and" />
|
||||
</TextBlock>
|
||||
<TextBlock FontWeight="Bold" Margin="15,5,0,0" Text="TINF20C" />
|
||||
<TextBlock Margin="15,0,0,0">
|
||||
<Run FontWeight="Bold" Text="DHBW Stuttgart" />
|
||||
</TextBlock>
|
||||
|
||||
<TextBlock Margin="15,5,0,10" Text="This Plugin was created as a group project in the class "Software Engineering"" />
|
||||
<TextBlock Margin="15,5,0,10" Text="Later this plugin was developed as a sample tool that create vendor independent 
automation component, and included as part of Master Thesis" />
|
||||
<TextBlock Margin="15,5,0,10" Text="Later this plugin was developed as a sample tool that create vendor independent 
automation component, and included as part of Master Thesis "" />
|
||||
|
||||
|
||||
<Border Margin="0,2,0,2" BorderThickness="0,2,0,0">
|
||||
@ -117,13 +110,8 @@
|
||||
|
||||
<TextBlock
|
||||
Margin="10,5,0,8"
|
||||
Text="This project is licensed under the GPL 3.0 license"
|
||||
Text="The MIT License (MIT)
Copyright (c) 2021 TINF19C DHBW Stuttgart

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files ('the Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 

 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
|
||||
TextWrapping="Wrap" />
|
||||
<TextBlock
|
||||
Margin="10,5,0,8"
|
||||
TextWrapping="Wrap">
|
||||
Visit our <Hyperlink NavigateUri="https://github.com/H4CK3R-01/TINF20C_ModellingWizard_Devices/blob/main/LICENSE" RequestNavigate="Hyperlink_RequestNavigate">GitHub-Repository</Hyperlink> to learn more about this.
|
||||
</TextBlock>
|
||||
|
||||
|
||||
<Border Margin="0,2,0,2" BorderThickness="0,2,0,0">
|
||||
@ -136,7 +124,7 @@
|
||||
</Border>
|
||||
|
||||
<TextBlock Margin="10,5,0,0" FontWeight="Bold">
|
||||
© TINF20C DHBW Stuttgart 2022
|
||||
© TINF19C DHBW Stuttgart 2021
|
||||
<!-- Copyright symbol -->
|
||||
</TextBlock>
|
||||
|
||||
@ -148,9 +136,13 @@
|
||||
Name="TextBlock2WithHyperlink"
|
||||
Margin="10,5,0,0"
|
||||
TextWrapping="Wrap">
|
||||
Visit <Hyperlink NavigateUri="https://github.com/H4CK3R-01/TINF20C_ModellingWizard_Devices" RequestNavigate="Hyperlink_RequestNavigate">ModellingWizard</Hyperlink>
|
||||
Visit <Hyperlink NavigateUri="https://github.com/DekaAthlos/TINF19C-ModellingWizard" RequestNavigate="Hyperlink_RequestNavigate">ModellingWizard</Hyperlink>
|
||||
on GitHub to get more informations about this project.</TextBlock>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</StackPanel>
|
||||
|
||||
<Border BorderBrush="Gray" BorderThickness="0,0,0,0" Width="491" Height="45">
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
using System.Reflection;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
@ -17,7 +18,7 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
var assembly = Assembly.GetCallingAssembly();
|
||||
|
||||
txtVersion.Text = "Version " + assembly.GetName().Version.ToString();
|
||||
txtVersion.Text = "Version "+ assembly.GetName().Version.ToString();
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,14 @@
|
||||
using Aml.Editor.Plugin.Properties;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Aml.Editor.Plugin.Properties;
|
||||
using System.IO;
|
||||
using System.Drawing;
|
||||
using System.Web;
|
||||
using System.Net;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
{
|
||||
@ -16,7 +22,7 @@ namespace Aml.Editor.Plugin
|
||||
public Button DisplayBtn { get; set; }
|
||||
public DataGridView dataGridView { get; set; }
|
||||
public string words { get; set; }
|
||||
// public TreeNode Node { get; set; }
|
||||
// public TreeNode Node { get; set; }
|
||||
|
||||
|
||||
public AnimationClass()
|
||||
@ -25,7 +31,7 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
|
||||
// Method for window size maximum and minimum
|
||||
public void WindowSizeChanger(Panel panelNumber, Button buttonNumber)
|
||||
public void WindowSizeChanger(Panel panelNumber,Button buttonNumber)
|
||||
{
|
||||
PanelNumber = panelNumber;
|
||||
ButtonNumber = buttonNumber;
|
||||
@ -44,7 +50,7 @@ namespace Aml.Editor.Plugin
|
||||
public void WindowSizeChanger(Panel panelNumber)
|
||||
{
|
||||
PanelNumber = panelNumber;
|
||||
// Node = node;
|
||||
// Node = node;
|
||||
if (panelNumber.Size == panelNumber.MaximumSize)
|
||||
{
|
||||
panelNumber.Size = panelNumber.MinimumSize;
|
||||
@ -87,20 +93,20 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
}
|
||||
}
|
||||
// method for opening IEC-CDD urls
|
||||
public void ManualOpener(string btnText)
|
||||
// method for opening IEC-CDD urls
|
||||
public void ManualOpener(string btnText)
|
||||
{
|
||||
string mainUrl = "https://cdd.iec.ch/CDD/IEC62683/iec62683.nsf/PropertiesAllVersions/0112-2---62683%23";
|
||||
string lastUrl = "?OpenDocument";
|
||||
string midUrl = btnText.Substring(15);
|
||||
string finalUrl = mainUrl + midUrl + lastUrl;
|
||||
string finalUrl = mainUrl +midUrl+ lastUrl;
|
||||
|
||||
System.Diagnostics.Process.Start(finalUrl);
|
||||
}
|
||||
|
||||
|
||||
// Open Dialog Box related method that takes parmeters of textbox name and the picture box number.
|
||||
public void OpenFileDialog(TextBox textboxName, PictureBox pictureBoxNumber)
|
||||
public void OpenFileDialog(TextBox textboxName,PictureBox pictureBoxNumber)
|
||||
{
|
||||
TextboxName = textboxName;
|
||||
PictureboxNumber = pictureBoxNumber;
|
||||
@ -130,7 +136,7 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
|
||||
// this method dispaly all hidden buttons with the Refsemantic Id in them.
|
||||
public void DispalySemanticBtn(Button refSemanticBtn, DataGridView dataGrids, string word)
|
||||
public void DispalySemanticBtn(Button refSemanticBtn, DataGridView dataGrids,string word)
|
||||
{
|
||||
words = word;
|
||||
DisplayBtn = refSemanticBtn;
|
||||
|
@ -1,8 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
{
|
||||
@ -24,7 +27,7 @@ namespace Aml.Editor.Plugin
|
||||
return AMLAttributeParameters;
|
||||
}
|
||||
|
||||
public void CreateDataTableWithColumns(DataTable dataRowName, DataGridView dataGridViewName,
|
||||
public void CreateDataTableWithColumns( DataTable dataRowName, DataGridView dataGridViewName,
|
||||
KeyValuePair<string, List<List<ClassOfListsFromReferencefile>>> pair)
|
||||
{
|
||||
KeyValuePair<string, List<List<ClassOfListsFromReferencefile>>> Pair = pair;
|
||||
@ -108,10 +111,10 @@ namespace Aml.Editor.Plugin
|
||||
{
|
||||
try
|
||||
{
|
||||
/* if (eachrow.Cells[0].Value.Equals(item.Name))
|
||||
{
|
||||
/* if (eachrow.Cells[0].Value.Equals(item.Name))
|
||||
{
|
||||
|
||||
}*/
|
||||
}*/
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
@ -142,7 +145,7 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
|
||||
|
||||
/* break;*/
|
||||
/* break;*/
|
||||
|
||||
|
||||
|
||||
|
@ -1,4 +1,10 @@
|
||||
namespace Aml.Editor.Plugin
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
{
|
||||
class ClassOfListsFromDataGridViews
|
||||
{
|
||||
|
@ -1,4 +1,10 @@
|
||||
using Aml.Engine.CAEX;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Aml.Engine.AmlObjects;
|
||||
using Aml.Engine.CAEX;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
{
|
||||
@ -14,7 +20,7 @@ namespace Aml.Editor.Plugin
|
||||
public string CopyRight { get; set; }
|
||||
public string AttributePath { get; set; }
|
||||
public string RefBaseClassPath { get; set; }
|
||||
public string ID { get; set; }
|
||||
public string ID { get; set; }
|
||||
public string ReferencedClassName { get; set; }
|
||||
public CAEXSequence<RefSemanticType> RefSemanticList { get; set; }
|
||||
public string SupportesRoleClassType { get; set; }
|
||||
@ -25,7 +31,7 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
public ClassOfListsFromReferencefile()
|
||||
{
|
||||
// RefSemanticList = new List<CAEXSequence<RefSemanticType>>();
|
||||
// RefSemanticList = new List<CAEXSequence<RefSemanticType>>();
|
||||
}
|
||||
|
||||
public ClassOfListsFromReferencefile(string name, string value,
|
||||
@ -55,8 +61,8 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "ClassOfListsFromReferencefile(" + Name + "=" + Value + "=" + Default + "=" + Unit + "=" + Reference + "="
|
||||
+ Description + "=" + CopyRight + "=" + Semantic + "=" + AttributePath + "=" + RefBaseClassPath + "=" + ID
|
||||
return "ClassOfListsFromReferencefile("+Name+"="+Value+"="+Default+"="+Unit+"="+Reference+"="
|
||||
+Description+"="+CopyRight+"="+Semantic+"="+AttributePath+ "=" + RefBaseClassPath + "=" + ID
|
||||
+ "=" + ReferencedClassName + "=" + RefSemanticList + "=" + SupportesRoleClassType + "=" + DataType + ")";
|
||||
}
|
||||
}
|
||||
|
1314
SOURCE/Plugin/DeviceDescription.Designer.cs
generated
1314
SOURCE/Plugin/DeviceDescription.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -123,6 +123,54 @@
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>265, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolStrip5.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>273, 146</value>
|
||||
</metadata>
|
||||
<metadata name="deleteRoleClassesButton.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 80</value>
|
||||
</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="dataGridViewTextBoxColumn24.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<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 name="dataGridViewTextBoxColumn24.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<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 name="imageList2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>278, 103</value>
|
||||
</metadata>
|
||||
@ -131,7 +179,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD6
|
||||
DAAAAk1TRnQBSQFMAgEBAwEAAaABBAGgAQQBHAEAARwBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
DAAAAk1TRnQBSQFMAgEBAwEAAcgBAwHIAQMBHAEAARwBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABcAMAARwDAAEBAQABCAUAAUABDBgAAYACAAGAAwACgAEAAYADAAGAAQABgAEAAoACAAPAAQABwAHc
|
||||
AcABAAHwAcoBpgEAATMFAAEzAQABMwEAATMBAAIzAgADFgEAAxwBAAMiAQADKQEAA1UBAANNAQADQgEA
|
||||
AzkBAAGAAXwB/wEAAlAB/wEAAZMBAAHWAQAB/wHsAcwBAAHGAdYB7wEAAdYC5wEAAZABqQGtAgAB/wEz
|
||||
@ -204,8 +252,23 @@
|
||||
<metadata name="dataGridViewCheckBoxColumn2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</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>
|
||||
<metadata name="deleteRoleClassesButton.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>853, 146</value>
|
||||
<value>17, 80</value>
|
||||
</metadata>
|
||||
<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">
|
||||
@ -223,27 +286,24 @@
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="dataGridViewTextBoxColumn24.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>
|
||||
</metadata>
|
||||
<metadata name="dataGridViewTextBoxColumn25.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<metadata name="dataGridViewTextBoxColumn18.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">
|
||||
<metadata name="dataGridViewTextBoxColumn19.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">
|
||||
<metadata name="dataGridViewTextBoxColumn20.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">
|
||||
<metadata name="dataGridViewTextBoxColumn21.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">
|
||||
<metadata name="dataGridViewTextBoxColumn22.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</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="dataGridViewTextBoxColumn17.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@ -262,8 +322,20 @@
|
||||
<metadata name="dataGridViewTextBoxColumn22.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</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 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 name="SerialNumber.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
@ -298,6 +370,18 @@
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</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">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@ -328,6 +412,9 @@
|
||||
<metadata name="toolStrip13.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>729, 60</value>
|
||||
</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">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
@ -336,6 +423,12 @@
|
||||
RgtnViTyCJEC4UCoEdfIj94AAAAASUVORK5CYII=
|
||||
</value>
|
||||
</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">
|
||||
<value>149, 103</value>
|
||||
</metadata>
|
||||
@ -344,7 +437,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABC
|
||||
DQAAAk1TRnQBSQFMAgEBAwEAAaABBAGgAQQBHAEAARwBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
DQAAAk1TRnQBSQFMAgEBAwEAAcgBAwHIAQMBHAEAARwBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABcAMAARwDAAEBAQABCAUAAUABDBgAAYACAAGAAwACgAEAAYADAAGAAQABgAEAAoACAAPAAQABwAHc
|
||||
AcABAAHwAcoBpgEAATMFAAEzAQABMwEAATMBAAIzAgADFgEAAxwBAAMiAQADKQEAA1UBAANNAQADQgEA
|
||||
AzkBAAGAAXwB/wEAAlAB/wEAAZMBAAHWAQAB/wHsAcwBAAHGAdYB7wEAAdYC5wEAAZABqQGtAgAB/wEz
|
||||
@ -417,7 +510,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAC4
|
||||
CQAAAk1TRnQBSQFMAgEBAgEAAZgBBAGYAQQBGQEAARkBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CQAAAk1TRnQBSQFMAgEBAgEAAcABAwHAAQMBGQEAARkBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABZAMAARkDAAEBAQABCAUAAcQBCRgAAYACAAGAAwACgAEAAYADAAGAAQABgAEAAoACAAPAAQABwAHc
|
||||
AcABAAHwAcoBpgEAATMFAAEzAQABMwEAATMBAAIzAgADFgEAAxwBAAMiAQADKQEAA1UBAANNAQADQgEA
|
||||
AzkBAAGAAXwB/wEAAlAB/wEAAZMBAAHWAQAB/wHsAcwBAAHGAdYB7wEAAdYC5wEAAZABqQGtAgAB/wEz
|
||||
@ -472,7 +565,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAA
|
||||
CAAAAk1TRnQBSQFMAwEBAAGgAQQBoAEEARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
|
||||
CAAAAk1TRnQBSQFMAwEBAAHIAQMByAEDARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
|
||||
AUADAAEQAwABAQEAAQgGAAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA
|
||||
AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA
|
||||
AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm
|
||||
|
@ -28,9 +28,12 @@ namespace Aml.Editor.Plugin
|
||||
/// <summary>
|
||||
/// Init the controller and reload all amlx devices
|
||||
/// </summary>
|
||||
public MWController()
|
||||
/// <param name="modellingWizard"></param>
|
||||
public MWController(ModellingWizard modellingWizard)
|
||||
{
|
||||
this.modellingWizard = modellingWizard;
|
||||
mWData = new MWData(this);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -56,14 +59,14 @@ namespace Aml.Editor.Plugin
|
||||
/// <param name="newDevice"></param>
|
||||
/// <param name="isEdit"></param>
|
||||
/// <returns></returns>
|
||||
public String CreateDeviceOnClick(MWDevice newDevice, bool isEdit, bool useCaex2_15)
|
||||
public String CreateDeviceOnClick(MWDevice newDevice, bool isEdit)
|
||||
{
|
||||
string result = "";
|
||||
|
||||
if (newDevice.deviceName != null && newDevice.vendorName != null)
|
||||
{
|
||||
// create the device
|
||||
result = mWData.CreateDevice(newDevice, isEdit, useCaex2_15);
|
||||
result = mWData.CreateDevice(newDevice, isEdit);
|
||||
}
|
||||
|
||||
// update the device list
|
||||
@ -98,7 +101,6 @@ namespace Aml.Editor.Plugin
|
||||
/// <param name="targetGUI">the GUI Type to display</param>
|
||||
public void ChangeGui(MWGUIType targetGUI)
|
||||
{
|
||||
// TODO modellingWizard is null
|
||||
switch (targetGUI)
|
||||
{
|
||||
|
||||
|
@ -7,6 +7,7 @@ using System.IO.Packaging;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
{
|
||||
@ -55,32 +56,49 @@ namespace Aml.Editor.Plugin
|
||||
/// <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>
|
||||
/// <returns></returns>
|
||||
public string CreateDevice(MWDevice device, bool isEdit, bool useCaex2_15)
|
||||
public string CreateDevice(MWDevice device, bool isEdit)
|
||||
{
|
||||
CAEXDocument document;
|
||||
|
||||
CAEXDocument document = null;
|
||||
AutomationMLContainer amlx = null;
|
||||
|
||||
// Init final .amlx Filepath
|
||||
//first of all create a folder on "Vendor Name"
|
||||
string vendorCompanyName = device.vendorName;
|
||||
|
||||
string amlFilePath;
|
||||
|
||||
string fileName = device.fileName;
|
||||
|
||||
amlFilePath = fileName.Contains(".amlx") ? Path.Combine(device.filepath, fileName) : Path.Combine(device.filepath, fileName + ".amlx");
|
||||
if (fileName.Contains(".amlx"))
|
||||
{
|
||||
amlFilePath = System.IO.Path.Combine(device.filepath, fileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
amlFilePath = System.IO.Path.Combine(device.filepath, fileName + ".amlx");
|
||||
}
|
||||
|
||||
|
||||
|
||||
FileInfo file = new FileInfo(amlFilePath);
|
||||
|
||||
|
||||
|
||||
// Create directory if it's not existing
|
||||
file.Directory.Create();
|
||||
|
||||
|
||||
// Init CAEX Document
|
||||
if (isEdit)
|
||||
{
|
||||
// Load the amlx file
|
||||
amlx = new AutomationMLContainer(amlFilePath, FileMode.OpenOrCreate);
|
||||
amlx = new AutomationMLContainer(amlFilePath, FileMode.Open);
|
||||
|
||||
IEnumerable<PackagePart> rootParts = amlx.GetPartsByRelationShipType(AutomationMLContainer.RelationshipType.Root);
|
||||
|
||||
// We expect the aml to only have one root part
|
||||
if (rootParts.Count() != 0 && rootParts.First() != null)
|
||||
if (rootParts.First() != null)
|
||||
{
|
||||
PackagePart part = rootParts.First();
|
||||
|
||||
@ -90,36 +108,37 @@ namespace Aml.Editor.Plugin
|
||||
else
|
||||
{
|
||||
// the amlx contains no aml file
|
||||
if (useCaex2_15) document = CAEXDocument.New_CAEXDocument(CAEXDocument.CAEXSchema.CAEX2_15);
|
||||
else document = CAEXDocument.New_CAEXDocument(CAEXDocument.CAEXSchema.CAEX3_0);
|
||||
document = CAEXDocument.New_CAEXDocument();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// create a new CAEX document
|
||||
if (useCaex2_15) document = CAEXDocument.New_CAEXDocument(CAEXDocument.CAEXSchema.CAEX2_15);
|
||||
else document = CAEXDocument.New_CAEXDocument(CAEXDocument.CAEXSchema.CAEX3_0);
|
||||
|
||||
document = CAEXDocument.New_CAEXDocument();
|
||||
try
|
||||
{
|
||||
amlx = new AutomationMLContainer(amlFilePath, FileMode.OpenOrCreate);
|
||||
amlx = new AutomationMLContainer(amlFilePath, FileMode.Create);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Console.WriteLine("Failed to create AutomationMLContainer object");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Init the default Libs
|
||||
AutomationMLBaseRoleClassLibType.RoleClassLib(document);
|
||||
AutomationMLInterfaceClassLibType.InterfaceClassLib(document);
|
||||
AutomationMLBaseRoleClassLibType.RoleClassLib(document) ;
|
||||
AutomationMLInterfaceClassLibType.InterfaceClassLib(document) ;
|
||||
|
||||
var structureRoleFamilyType = AutomationMLBaseRoleClassLibType.RoleClassLib(document).Structure;
|
||||
|
||||
|
||||
SystemUnitFamilyType systemUnitClass = null;
|
||||
// Create the SystemUnitClass for our device
|
||||
if (!isEdit)
|
||||
if (!isEdit)
|
||||
{
|
||||
systemUnitClass = document.CAEXFile.SystemUnitClassLib.Append("ComponentSystemUnitClassLib").SystemUnitClass.Append(device.deviceName);
|
||||
|
||||
@ -134,9 +153,15 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Boolean myBool;
|
||||
Boolean.TryParse(eachparameter.AddToFile, out myBool);
|
||||
|
||||
if (myBool == true)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Uri eachUri = null;
|
||||
AttachablesDataGridViewParameters par = new AttachablesDataGridViewParameters();
|
||||
eachUri = createPictureRef(eachparameter.FilePath, eachparameter.ElementName.ToString(), "ExternalDataConnector", systemUnitClass);
|
||||
@ -144,11 +169,14 @@ namespace Aml.Editor.Plugin
|
||||
par.FilePath = eachparameter.FilePath;
|
||||
|
||||
device.listWithURIConvertedToString.Add(par);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach (var pair in device.DictionaryForRoleClassofComponent)
|
||||
{
|
||||
|
||||
Match numberfromElectricalConnectorType = Regex.Match(pair.Key.ToString(), @"\((\d+)\)");
|
||||
string initialnumberbetweenparanthesisofElectricalConnectorType =
|
||||
numberfromElectricalConnectorType.Groups[1].Value;
|
||||
@ -258,6 +286,8 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
SRC.RefRoleClassPath = item.SupportesRoleClassType;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -298,14 +328,15 @@ namespace Aml.Editor.Plugin
|
||||
foundSysClassLib = true;
|
||||
}
|
||||
}
|
||||
if (!foundSysClassLib) systemUnitClass = document.CAEXFile.SystemUnitClassLib.Append("ComponentSystemUnitClassLib").SystemUnitClass.Append(device.deviceName);
|
||||
if (!foundSysClassLib)
|
||||
systemUnitClass = document.CAEXFile.SystemUnitClassLib.Append("ComponentSystemUnitClassLib").SystemUnitClass.Append(device.deviceName);
|
||||
}
|
||||
|
||||
// Create the internalElement Interfaces
|
||||
if (device.vendorName != null)
|
||||
{
|
||||
InternalElementType electricalInterface = null;
|
||||
RoleRequirementsType roleRequirements = null;
|
||||
RoleRequirementsType roleRequirements = null ;
|
||||
foreach (var internalElement in systemUnitClass.InternalElement)
|
||||
{
|
||||
if (internalElement.Name.Equals("Interfaces"))
|
||||
@ -318,9 +349,9 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
if (electricalInterface == null)
|
||||
electricalInterface = systemUnitClass.InternalElement.Append("Interfaces");
|
||||
roleRequirements = electricalInterface.RoleRequirements.Append();
|
||||
roleRequirements = electricalInterface.RoleRequirements.Append();
|
||||
|
||||
roleRequirements.RefBaseRoleClassPath = structureRoleFamilyType.CAEXPath();
|
||||
roleRequirements.RefBaseRoleClassPath = structureRoleFamilyType.CAEXPath();
|
||||
|
||||
foreach (var pair in device.DictionaryForInterfaceClassesInElectricalInterfaces)
|
||||
{
|
||||
@ -428,6 +459,9 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
electricalConnectorType.RefBaseClassPath = item.RefBaseClassPath;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -439,7 +473,10 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
string electricalConnectorPinName = Regex.Replace(pairofList.Key.ToString(), @"\(.*?\)", "");
|
||||
electricalConnectorPinName = Regex.Replace(electricalConnectorPinName, @"\{.*?\}", "");
|
||||
electricalConnectorPinName = electricalConnectorPinName.Replace(electricalConnectorTypeName, "");
|
||||
electricalConnectorPinName = electricalConnectorPinName.Replace(electricalConnectorTypeName,"");
|
||||
|
||||
|
||||
|
||||
|
||||
if (initialnumberbetweenparanthesisofElectricalConnectorType == initialnumberbetweenparanthesisElectricalConnectorPins)
|
||||
{
|
||||
@ -563,7 +600,7 @@ namespace Aml.Editor.Plugin
|
||||
PackagePart root = amlx.AddRoot(path, partUri);
|
||||
|
||||
|
||||
if (!isEdit)
|
||||
if (!isEdit)
|
||||
{
|
||||
foreach (AttachablesDataGridViewParameters listWithUri in device.listWithURIConvertedToString)
|
||||
{
|
||||
@ -578,18 +615,25 @@ namespace Aml.Editor.Plugin
|
||||
DirectoryInfo directory = new DirectoryInfo(Path.GetDirectoryName(amlFilePath));
|
||||
|
||||
foreach (FileInfo fileInfos in directory.GetFiles())
|
||||
{
|
||||
if (fileInfos.Extension != ".amlx")
|
||||
{
|
||||
fileInfos.Delete();
|
||||
}
|
||||
}
|
||||
{
|
||||
if (fileInfos.Extension != ".amlx")
|
||||
{
|
||||
fileInfos.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
amlx.Save();
|
||||
amlx.Close();
|
||||
|
||||
return isEdit ? "Sucessfully updated device!\nFilepath " + amlFilePath : "Device description file created!\nFilepath " + amlFilePath;
|
||||
if (isEdit)
|
||||
{
|
||||
return "Sucessfully updated device!\nFilepath " + amlFilePath;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Device description file created!\nFilepath " + amlFilePath;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -851,7 +895,7 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
|
||||
// Load Libary .dll
|
||||
Assembly assembly = Assembly.Load(File.ReadAllBytes("Dd2Aml.Lib.dll"));
|
||||
Assembly assembly = Assembly.Load("Iodd2AmlConverter.Library");
|
||||
Type conversionHandler = null;
|
||||
// Iterate over all Types in the Libary and get the ConversionHandler Type
|
||||
foreach (Type type in assembly.ExportedTypes)
|
||||
@ -902,7 +946,7 @@ namespace Aml.Editor.Plugin
|
||||
// If it is, then it's calling the Convert Function
|
||||
// Gsd2Aml.Lib.Converter.Convert(string inputFilepath, bool strictValidation)
|
||||
|
||||
Assembly assembly = Assembly.Load(File.ReadAllBytes("Gsd2Aml.Lib.dll"));
|
||||
Assembly assembly = Assembly.Load("Gsd2Aml.Lib");
|
||||
Type conversionHandler = null;
|
||||
// Iterate over all Types in the Libary and get the ConversionHandler Type
|
||||
foreach (Type type in assembly.ExportedTypes)
|
||||
@ -956,7 +1000,6 @@ namespace Aml.Editor.Plugin
|
||||
byte[] bytearray = System.Text.Encoding.Unicode.GetBytes(caex);
|
||||
CAEXDocument document = CAEXDocument.LoadFromBinary(bytearray);
|
||||
|
||||
|
||||
// create the amlx file
|
||||
string name = Path.GetFileNameWithoutExtension(filename);
|
||||
|
||||
@ -964,11 +1007,11 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
if (name.Contains(".amlx"))
|
||||
{
|
||||
amlx = new AutomationMLContainer(".\\modellingwizard\\" + name, FileMode.Create);
|
||||
amlx = new AutomationMLContainer(".\\modellingwizard\\" + name, FileMode.Create);
|
||||
}
|
||||
else
|
||||
{
|
||||
amlx = new AutomationMLContainer(".\\modellingwizard\\" + name + ".amlx", FileMode.Create);
|
||||
amlx = new AutomationMLContainer(".\\modellingwizard\\" + name + ".amlx", FileMode.Create);
|
||||
}
|
||||
|
||||
// create the aml package path
|
||||
@ -1002,7 +1045,7 @@ namespace Aml.Editor.Plugin
|
||||
// Just as an interface
|
||||
}
|
||||
|
||||
public void copyFiles(string sourceFilePath, string destinationFilePath)
|
||||
public void copyFiles(string sourceFilePath, string destinationFilePath )
|
||||
{
|
||||
string sourFile = Path.GetFileName(sourceFilePath);
|
||||
string destFile = Path.Combine(destinationFilePath, sourFile);
|
||||
|
@ -1,10 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
{
|
||||
// this class initialize the parameters exclusively for the "Device Identofication", "DataGridViews in "Generic Data Tab" AND "Field Attachables Tab""
|
||||
public class MWDevice : MWData.MWObject
|
||||
public class MWDevice: MWData.MWObject
|
||||
{
|
||||
public string environment { get; set; }
|
||||
public string fileName { get; set; }
|
||||
@ -64,7 +67,7 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
public DataGridParameters(string refSemantic, string attributes, string value)
|
||||
{
|
||||
this.RefSemantics = refSemantic;
|
||||
this.RefSemantics = refSemantic;
|
||||
this.Attributes = attributes;
|
||||
this.Values = value;
|
||||
}
|
||||
@ -100,7 +103,7 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
}
|
||||
|
||||
public ElectricalParameters(string connector, string connectorCode, string connectorType, string pins, string lis)
|
||||
public ElectricalParameters(string connector, string connectorCode, string connectorType,string pins,string lis)
|
||||
|
||||
{
|
||||
this.Connector = connector;
|
||||
@ -121,7 +124,7 @@ namespace Aml.Editor.Plugin
|
||||
public override string ToString()
|
||||
{
|
||||
|
||||
return "ElectricalParameters(" + Connector + "=" + ConnectorCode + "=" + ConnectorType + "=" + Pins + ")";
|
||||
return "ElectricalParameters(" + Connector + "=" + ConnectorCode + "=" + ConnectorType + "="+Pins+")";
|
||||
}
|
||||
|
||||
}
|
||||
@ -149,7 +152,7 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return "ElectricalParametersInElectricalDataDataGridView(" + ReferenceID + "=" + Attributes + "=" + Values + "=" + Units + ")";
|
||||
return "ElectricalParametersInElectricalDataDataGridView("+ ReferenceID + "=" + Attributes + "=" + Values + "=" + Units + ")";
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,7 +168,7 @@ namespace Aml.Editor.Plugin
|
||||
{
|
||||
|
||||
}
|
||||
public PinParametersInPinInfoDataGridView(string pinNumber, string referenceID, string attribute, string values, string units)
|
||||
public PinParametersInPinInfoDataGridView(string pinNumber,string referenceID, string attribute, string values, string units)
|
||||
{
|
||||
this.PinNumber = pinNumber;
|
||||
this.ReferenceID = referenceID;
|
||||
@ -176,7 +179,7 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return "PinParametersInPinInfoDataGridView(" + PinNumber + "=" + ReferenceID + "=" + Attributes + "=" + Values + "=" + Units + ")";
|
||||
return "PinParametersInPinInfoDataGridView(" +PinNumber+"="+ ReferenceID + "=" + Attributes + "=" + Values + "=" + Units + ")";
|
||||
}
|
||||
}
|
||||
|
||||
@ -185,7 +188,7 @@ namespace Aml.Editor.Plugin
|
||||
{
|
||||
public string ElementName { get; set; }
|
||||
public string FilePath { get; set; }
|
||||
public string AddToFile { get; set; }
|
||||
public string AddToFile { get; set; }
|
||||
|
||||
public AttachablesDataGridViewParameters()
|
||||
{
|
||||
@ -199,7 +202,7 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return "AttachablesDataGridViewParameters(" + ElementName + "=" + FilePath + "=" + AddToFile + ")";
|
||||
return "AttachablesDataGridViewParameters(" + ElementName + "=" + FilePath +"="+ AddToFile + ")";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<OutputPath>..\..\TINF20C_ModellingWizard_Devices\SOURCE\bin\Release\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
@ -179,7 +179,6 @@
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="DeviceDescription.resx">
|
||||
<DependentUpon>DeviceDescription.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
@ -231,6 +230,15 @@
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="Microsoft.Vbe.Interop.Forms">
|
||||
<Guid>{0D452EE1-E08F-101A-852E-02608C4D0BB4}</Guid>
|
||||
<VersionMajor>2</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>primary</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
<COMReference Include="stdole">
|
||||
<Guid>{00020430-0000-0000-C000-000000000046}</Guid>
|
||||
<VersionMajor>2</VersionMajor>
|
||||
|
@ -28,7 +28,7 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
public ModellingWizard()
|
||||
{
|
||||
mWController = new MWController();
|
||||
mWController = new MWController(this);
|
||||
|
||||
// Defines the Command list, which will contain user commands, which a user can select
|
||||
// via the PlugIn Menu.
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
@ -9,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("DHBW-Stuttgart")]
|
||||
[assembly: AssemblyProduct("ModellingWizard")]
|
||||
[assembly: AssemblyCopyright("Copyright © DHBW-Stuttgart TINF20C")]
|
||||
[assembly: AssemblyCopyright("Copyright © DHBW-Stuttgart TINF19C")]
|
||||
[assembly: AssemblyTrademark("ModellingWizard")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
26
SOURCE/Plugin/Properties/Settings.Designer.cs
generated
26
SOURCE/Plugin/Properties/Settings.Designer.cs
generated
@ -1,26 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Aml.Editor.Plugin.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
</SettingsFile>
|
@ -1,214 +0,0 @@
|
||||
# Gsd2Aml.Lib
|
||||
|
||||
Welcome to the Gsd2Aml.Lib! This library was developed as a student project by (in alphabetical order)
|
||||
1. Nico Dietz
|
||||
2. Steffen Gerdes
|
||||
3. Constantin Ruhdorfer
|
||||
4. Jonas Komarek
|
||||
5. Phuc Quang Vu
|
||||
6. Michael Weidmann
|
||||
|
||||
at [Cooperate State University Stuttgart](https://www.dhbw-stuttgart.de/home/).
|
||||
This project is distributed via:
|
||||
1. [GitHub](https://github.com/TINF17C/GSD2AML-Converter)
|
||||
2. [NuGet](https://www.nuget.org/packages/Gsd2Aml.Lib)
|
||||
|
||||
We can be found as a [GitHub Team](https://github.com/orgs/TINF17C/teams/gsd2aml).
|
||||
|
||||
## About this project
|
||||
|
||||
This library converts a Profinet (PN-)GSD file to AutomationML.
|
||||
The library can either
|
||||
1. return a string containing the AutomatonML content.
|
||||
2. convert the GSD file to an .aml file and package that, including all its dependencies, into an .amlx package. This process uses the [AML.Engine](https://www.nuget.org/packages/Aml.Engine).
|
||||
|
||||
## Contributing to this project
|
||||
|
||||
Contributions are always welcome!
|
||||
If you want to contribute feel free to fork this repo and later perform a pull request.
|
||||
|
||||
## File structure
|
||||
|
||||
The relevant files and folders are listed here.
|
||||
|
||||
### Logging/
|
||||
Contains the logging service.
|
||||
|
||||
### Models/
|
||||
Contains the classes representing AML and GSD.
|
||||
Also contains the used XSD files.
|
||||
|
||||
### Properties/
|
||||
Contains the assembly info.
|
||||
|
||||
### Compressor.cs
|
||||
Contains all the logic that is required to:
|
||||
1. Create a temporary folder
|
||||
2. Find files and copy them to this folder
|
||||
3. Uses the AML.Engine to build the .amlx package
|
||||
|
||||
### Converter.cs
|
||||
Contains all the logic that traverses the GSD file and uses the rulesset file to translate the GSD file to AML.
|
||||
|
||||
### Util.cs
|
||||
Contains the utility functionality.
|
||||
|
||||
### gsd2aml.xml
|
||||
This is the rulesset file.
|
||||
Please have a look below.
|
||||
|
||||
## GSD2AML Rules
|
||||
|
||||
The rules for conversion are written in XML and are listed here.
|
||||
|
||||
### Tables of Content
|
||||
|
||||
1. [Structure](#structure)
|
||||
2. [References](#references)
|
||||
3. [Reference Types](#reference_types)
|
||||
4. [GUID](#guid)
|
||||
5. [The Rule Element](#rule_element)
|
||||
|
||||
### <a name="structure"></a>Structure
|
||||
|
||||
This section will explain the structure of a gsd2aml rulesset file.
|
||||
|
||||
The gsd2aml file will consist of one, and only one, element, the `<Body>`. Each seperate rule shall be direct child of this element.
|
||||
|
||||
A rule must start with the GSD element, which is to be replaced. It must have a child `<Replacement>` describing the corresponding XML-structure of the AML replacement.
|
||||
|
||||
```xml
|
||||
<ProfileBody>
|
||||
<Replacement>
|
||||
<SystemUnitClassLib Name="ComponentSystemUnitClassLib">
|
||||
<Version>1.0.0</Version>
|
||||
</SystemUnitClassLib>
|
||||
</Replacement>
|
||||
</ProfileBody>
|
||||
```
|
||||
|
||||
Additionally a rule can also have any number of `<Reference>` childs. References will be explained in the following section.
|
||||
|
||||
### <a name="references"></a>References
|
||||
|
||||
#### <a name="references-normal_references"></a>Normal Reference
|
||||
|
||||
It may not be possible to replace a GSD element with a static replacements. Let's look at this example:
|
||||
|
||||
```xml
|
||||
<SubslotItem SubslotNumber="32768" TextId="TOK_Subslot_8000" />
|
||||
```
|
||||
|
||||
This element has a attribute "SubslotNumber". In order to transform this element to AML the attribute "SubslotNumber" should be converted into an `Attribute`, `<Value>` pair.
|
||||
|
||||
```xml
|
||||
<ExternalInterface Name="" ID="">
|
||||
<Attribute Name="SubslotNumber" AttributeDataType="xs:integer">
|
||||
<Value></Value>
|
||||
</Attribute>
|
||||
</ExternalInterface>
|
||||
```
|
||||
|
||||
Unfortunately the converter itself cannot figure out where this information is located. A referece, signaled by a `$` followed by an identifier like `$1`, is necessary.
|
||||
|
||||
The conversion rule for "SubslotItem" may look like this:
|
||||
|
||||
```xml
|
||||
<SubslotItem>
|
||||
<Replacement>
|
||||
<ExternalInterface Name="" ID="">
|
||||
<Attribute Name="SubslotNumber" AttriubteDataType="xs:integer">
|
||||
<Value>$1<Value>
|
||||
</Attribute>
|
||||
</ExternalInterface>
|
||||
</Replacement>
|
||||
<Reference Ref="$1">
|
||||
<ISO15745Profile.ProfileBody.ApplicationProcess.DeviceAccessPointList.DeviceAccessPointItem.SlotList.SlotItem SubslotNumber="" />
|
||||
</Reference>
|
||||
</SubslotItem>
|
||||
```
|
||||
|
||||
Every reference within the replacement element shall have a corresponding reference element. This element must have the attribute `Ref=""` with the identifier. There are different [types](#reference_types) of references. These will be explained later. The content of the reference shall be a the location of the referenced value. A reference only has one child. The child is the full qualified path to the referenced element in a point sepearted list without whitespace.
|
||||
|
||||
The element shall have one attribute, which shall be the same attribute that is being referenced. If the attribute exists, its value will be the return value.
|
||||
|
||||
#### <a name="references-true_references"></a>True Reference
|
||||
|
||||
You may have noticed that the example above never resolved the GSD attribute TextId of the "SubslotItem" element. This is because the TextId attribute in itself is also a reference within the GSD file and as such must be handled differently. To differentiate this case from a normal reference, it shall be named "true reference".
|
||||
|
||||
A true reference within an GSD file will always reference another element within a "List", that has the attribute `ID` or other identifying attribute like `TextId`.
|
||||
|
||||
These references must be handled differently by the GSD2AML Converter. The converter will know of the different "reference lists" (such as `ExternalTextList`) and their location within the GSD. The converter merely needs to know which list to look in and the corresponding id. Therefore each list will receive its own "type" which can be used as an attribute of the reference element. The other way around, this means that the converter __cannot__ handle true references of lists that the converter does not know.
|
||||
|
||||
Consider the example from above. `TextId=TOK_Subslot_8000` signifies that this attribute references an element within a text list with the id `TOK_Subslot_8000`.
|
||||
|
||||
```xml
|
||||
<SubslotItem>
|
||||
<Replacement>
|
||||
<ExternalInterface Name="$1" ID="GUID" RefBaseClassPath="physicalEndPoint/SubSlot">
|
||||
<Attribute Name="SubslotNumber" AttributeDataType="xs:integer">
|
||||
<Value>$2</Value>
|
||||
</Attribute>
|
||||
</ExternalInterface>
|
||||
</Replacement>
|
||||
<Reference Ref="$1" Type="TextRef">
|
||||
<ISO15745Profile.ProfileBody.ApplicationProcess.DeviceAccessPointList.DeviceAccessPointItem.SlotList.SlotItem TextId="" />
|
||||
</Reference>
|
||||
<Reference Ref="$2">
|
||||
<ISO15745Profile.ProfileBody.ApplicationProcess.DeviceAccessPointList.DeviceAccessPointItem.SlotList.SlotItem SubslotNumber="" />
|
||||
</Reference>
|
||||
</SubslotItem>
|
||||
```
|
||||
|
||||
The type `TextRef` will tell the converter to search under `ExternalTextList/PrimaryLanguage`. The content of a true reference is the location of the corresponding id.
|
||||
|
||||
Other languages will be ignored.
|
||||
|
||||
### <a name="reference_types"></a>Reference Types
|
||||
|
||||
This section will list the different reference types and their uses.
|
||||
|
||||
#### <a name="reference_types-Normal-Ref></a>Normal Ref
|
||||
|
||||
No type is specified. The refernced value will be used.
|
||||
|
||||
#### <a name="reference_types-TextRef"></a>TextRef
|
||||
|
||||
A `TextRef` is a true reference. Within the GSD it will reference an element within `<ExternalTextList>`. As the name suggest it will only return a single text. It will only over use the `<PrimaryLanguage>`. The location of the reference __id__ used in the GSD will be given as content of the reference.
|
||||
|
||||
|
||||
#### <a name="reference_types-graphicref"></a>GraphicRef
|
||||
|
||||
A `GraphicRef` is a true reference. Within the GSD it will reference an element within `GraphicsList`. The location of the reference __id__ used in the GSD will be given as content of the reference.
|
||||
|
||||
#### <a name="special_reference_types"></a>RelGsdFilePath
|
||||
|
||||
`RelGsdFilePath` returns a relative path to the original GSD file.
|
||||
|
||||
### <a name="guid"></a>GUID
|
||||
|
||||
Every time the converters reads the string `GUID`, it will be replaced with a real GUID.
|
||||
|
||||
### <a name="rule_element"></a> The Rule Element
|
||||
|
||||
In order to maintain modularity while also providing a way to define the structure of the result aml in terms of parent-child relationships, a `<Rule></Rule>` element is introduced.
|
||||
|
||||
The content of the `<Rule></Rule>` tag shall be a full a string consisting of the relative path from the parent rule element to the GSD element, which should be placed here.
|
||||
|
||||
That path shall a rule of its own and a child of the `<Body>` element.
|
||||
|
||||
Example:
|
||||
|
||||
```xml
|
||||
<InternalElement CAEXObject.Name="LogicalInterface" CAEXObject.ID="GUID">
|
||||
<SystemUnitClassType.InternalElement>
|
||||
<Rule>
|
||||
ProfileBody.ApplicationProcess.DeviceAccessPointList.DeviceAccessPointItem.SystemDefinedSubmoduleList.InterfaceSubmoduleItem
|
||||
</Rule>
|
||||
</SystemUnitClassType.InternalElement>
|
||||
</InternalElement>
|
||||
|
||||
<ProfileBody.ApplicationProcess.DeviceAccessPointList.DeviceAccessPointItem.SystemDefinedSubmoduleList.InterfaceSubmoduleItem>
|
||||
...
|
||||
</ProfileBody.ApplicationProcess.DeviceAccessPointList.DeviceAccessPointItem.SystemDefinedSubmoduleList.InterfaceSubmoduleItem>
|
||||
```
|
@ -1,6 +1,9 @@
|
||||
using Aml.Engine.CAEX;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Aml.Engine.CAEX;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
{
|
||||
@ -27,7 +30,7 @@ namespace Aml.Editor.Plugin
|
||||
foreach (var attribute in externalInterface.Attribute)
|
||||
{
|
||||
StoreEachAttributeValueInListOfExternalIterface(i, attributelist, attribute, externalInterface);
|
||||
CkeckForNestedAttributesOfExternalIterface(i, attribute, externalInterface);
|
||||
CkeckForNestedAttributesOfExternalIterface(i,attribute, externalInterface);
|
||||
|
||||
}
|
||||
|
||||
@ -40,7 +43,7 @@ namespace Aml.Editor.Plugin
|
||||
list.Add(sublist);
|
||||
try
|
||||
{
|
||||
if (DictionaryofElectricalConnectorType.ContainsKey("(" + i + ")" + externalInterface.Name.ToString() + "{" + "Class:" + " " + externalInterface.BaseClass + "}"))
|
||||
if (DictionaryofElectricalConnectorType.ContainsKey( "("+i+")"+ externalInterface.Name.ToString()+ "{" + "Class:" + " " + externalInterface.BaseClass + "}"))
|
||||
{
|
||||
DictionaryofElectricalConnectorType["(" + i + ")" + externalInterface.Name.ToString()
|
||||
+ "{" + "Class:" + " " + externalInterface.BaseClass + "}"].AddRange(list);
|
||||
@ -61,7 +64,7 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
}
|
||||
|
||||
public void CkeckForNestedAttributesOfExternalIterface(int i, AttributeType attributeType, ExternalInterfaceType externalInterface)
|
||||
public void CkeckForNestedAttributesOfExternalIterface(int i, AttributeType attributeType, ExternalInterfaceType externalInterface)
|
||||
{
|
||||
List<List<ClassOfListsFromReferencefile>> attributelist = new List<List<ClassOfListsFromReferencefile>>();
|
||||
if (attributeType.Attribute.Exists)
|
||||
@ -70,7 +73,7 @@ namespace Aml.Editor.Plugin
|
||||
foreach (var attributeinattribute in attributeType.Attribute)
|
||||
{
|
||||
StoreEachAttributeValueInListOfExternalIterface(i, attributelist, attributeinattribute, attributeType, externalInterface);
|
||||
CkeckForNestedAttributesOfExternalIterface(i, attributeinattribute, externalInterface);
|
||||
CkeckForNestedAttributesOfExternalIterface(i,attributeinattribute, externalInterface);
|
||||
|
||||
}
|
||||
|
||||
@ -113,7 +116,7 @@ namespace Aml.Editor.Plugin
|
||||
attributeparameters.CopyRight = attributeType.Copyright;
|
||||
attributeparameters.AttributePath = attributeType.AttributePath;
|
||||
attributeparameters.RefSemanticList = attributeType.RefSemantic;
|
||||
// attributeparameters.ReferencedClassName = externalInterface.BaseClass.ToString();
|
||||
// attributeparameters.ReferencedClassName = externalInterface.BaseClass.ToString();
|
||||
attributeparameters.RefBaseClassPath = externalInterface.RefBaseClassPath;
|
||||
attributeparameters.ID = externalInterface.ID;
|
||||
|
||||
@ -160,7 +163,7 @@ namespace Aml.Editor.Plugin
|
||||
attributeparameters.CopyRight = AttributeInAttribute.Copyright;
|
||||
attributeparameters.AttributePath = AttributeInAttribute.AttributePath;
|
||||
attributeparameters.RefSemanticList = AttributeInAttribute.RefSemantic;
|
||||
// attributeparameters.ReferencedClassName = externalInterface.BaseClass.ToString();
|
||||
// attributeparameters.ReferencedClassName = externalInterface.BaseClass.ToString();
|
||||
attributeparameters.RefBaseClassPath = externalInterface.RefBaseClassPath;
|
||||
attributeparameters.ID = externalInterface.ID;
|
||||
|
||||
@ -276,7 +279,7 @@ namespace Aml.Editor.Plugin
|
||||
attributeparameters.CopyRight = attributeType.Copyright;
|
||||
attributeparameters.AttributePath = attributeType.AttributePath;
|
||||
attributeparameters.RefSemanticList = attributeType.RefSemantic;
|
||||
// attributeparameters.ReferencedClassName = externalInterface.BaseClass.ToString();
|
||||
// attributeparameters.ReferencedClassName = externalInterface.BaseClass.ToString();
|
||||
attributeparameters.RefBaseClassPath = externalInterface.RefBaseClassPath;
|
||||
attributeparameters.ID = externalInterface.ID;
|
||||
|
||||
@ -366,7 +369,7 @@ namespace Aml.Editor.Plugin
|
||||
list.Add(sublist);
|
||||
try
|
||||
{
|
||||
if (DictionaryofRolesforAutomationComponenet.ContainsKey("(" + i + ")" + supportedRoleClass.RoleReference.ToString()))
|
||||
if (DictionaryofRolesforAutomationComponenet.ContainsKey("(" + i + ")" + supportedRoleClass.RoleReference.ToString() ))
|
||||
{
|
||||
DictionaryofRolesforAutomationComponenet["(" + i + ")" + supportedRoleClass.RoleReference.ToString()].AddRange(list);
|
||||
}
|
||||
|
@ -1,8 +1,18 @@
|
||||
using Aml.Engine.CAEX;
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using Aml.Engine.AmlObjects;
|
||||
using Aml.Engine.CAEX;
|
||||
using System.IO;
|
||||
using System.IO.Packaging;
|
||||
using System.Xml;
|
||||
using System.Collections;
|
||||
using System.IO.Compression;
|
||||
using Aml.Editor.Plugin.Contracts;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
{
|
||||
@ -119,7 +129,7 @@ namespace Aml.Editor.Plugin
|
||||
foreach (var item in classTypeSearchForReferencedClassName.InterfaceClass)
|
||||
{
|
||||
//If "Refrenced Class Name" is existing...
|
||||
if (item.Name == referencedClassName)
|
||||
if (item.Name == referencedClassName)
|
||||
{
|
||||
//If external Interface is existing....
|
||||
if (item.ExternalInterface.Exists)
|
||||
@ -149,7 +159,7 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
|
||||
}
|
||||
//If "Interface Class" inside "Interface Class" is existng....
|
||||
//If "Interface Class" inside "Interface Class" is existng....
|
||||
if (item.InterfaceClass.Exists)
|
||||
{
|
||||
//This class is responsible to search for interface classes ´nested inside Interface classes and recursion of
|
||||
@ -181,7 +191,7 @@ namespace Aml.Editor.Plugin
|
||||
list.Add(sublist);
|
||||
try
|
||||
{
|
||||
if (DictionaryForInterfaceClassInstancesAttributes.ContainsKey(classType.Name.ToString() + "{" + "Class:" + " " + classType.ReferencedClassName + "}"))
|
||||
if (DictionaryForInterfaceClassInstancesAttributes.ContainsKey(classType.Name.ToString()+"{"+ "Class:" + " " +classType.ReferencedClassName+"}"))
|
||||
{
|
||||
DictionaryForInterfaceClassInstancesAttributes[classType.Name.ToString() + "{" + "Class:" + " " + classType.ReferencedClassName + "}"].AddRange(list);
|
||||
}
|
||||
@ -318,7 +328,7 @@ namespace Aml.Editor.Plugin
|
||||
List<List<ClassOfListsFromReferencefile>> list = new List<List<ClassOfListsFromReferencefile>>();
|
||||
List<ClassOfListsFromReferencefile> sublist = new List<ClassOfListsFromReferencefile>();
|
||||
|
||||
//Add sublist to list
|
||||
//Add sublist to list
|
||||
list.Add(sublist);
|
||||
//If dictioanry contains key , update the values under the key
|
||||
if (DictionaryForInterfaceClassInstancesAttributes.ContainsKey(classType.Name.ToString() + "{" + "Class:" + " " + classType.ReferencedClassName + "}"))
|
||||
@ -609,7 +619,7 @@ namespace Aml.Editor.Plugin
|
||||
List<List<ClassOfListsFromReferencefile>> list = new List<List<ClassOfListsFromReferencefile>>();
|
||||
List<ClassOfListsFromReferencefile> sublist = new List<ClassOfListsFromReferencefile>();
|
||||
|
||||
//Add sub list to list
|
||||
//Add sub list to list
|
||||
list.Add(sublist);
|
||||
|
||||
//IF dictionary is having the key, the update the values for the key.
|
||||
@ -1039,7 +1049,7 @@ namespace Aml.Editor.Plugin
|
||||
List<ClassOfListsFromReferencefile> sublist = new List<ClassOfListsFromReferencefile>();
|
||||
ClassOfListsFromReferencefile attributeparameters = new ClassOfListsFromReferencefile();
|
||||
|
||||
//Store every parameter value....
|
||||
//Store every parameter value....
|
||||
|
||||
attributeparameters.Name = attributeType.Name;
|
||||
attributeparameters.Value = attributeType.Value;
|
||||
@ -1765,7 +1775,7 @@ namespace Aml.Editor.Plugin
|
||||
foreach (var externalinterfaces in item.ExternalInterface)
|
||||
{
|
||||
TreeNode externalinterafcenode;
|
||||
if (externalinterfaces.BaseClass != null && externalinterfaces.BaseClass.ToString() != externalinterfaces.Name.ToString())
|
||||
if (externalinterfaces.BaseClass != null && externalinterfaces.BaseClass.ToString() != externalinterfaces.Name.ToString() )
|
||||
{
|
||||
referencedClassName = externalinterfaces.BaseClass.ToString();
|
||||
externalinterafcenode = newnode.Nodes.Add(externalinterfaces.ToString(), externalinterfaces.ToString() + "{" + "Class:" + " " + referencedClassName + "}", 2);
|
||||
@ -1825,7 +1835,7 @@ namespace Aml.Editor.Plugin
|
||||
foreach (var externalinterfaces in item.ExternalInterface)
|
||||
{
|
||||
TreeNode externalinterafcenode;
|
||||
if (externalinterfaces.BaseClass != null)
|
||||
if (externalinterfaces.BaseClass!= null)
|
||||
{
|
||||
|
||||
referencedclassName = externalinterfaces.BaseClass.ToString();
|
||||
@ -1842,7 +1852,7 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
|
||||
|
||||
PrintExternalInterfaceNodes(document, externalinterafcenode, externalinterfaces, classType);
|
||||
PrintExternalInterfaceNodes(document,externalinterafcenode, externalinterfaces, classType);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1855,7 +1865,7 @@ namespace Aml.Editor.Plugin
|
||||
/// </summary>
|
||||
/// <param name="oParentNode"></param>
|
||||
/// <param name="classType"></param>
|
||||
public void PrintExternalInterfaceNodes(CAEXDocument document, TreeNode oParentNode, ExternalInterfaceType classType, InterfaceFamilyType InterafceclassType)
|
||||
public void PrintExternalInterfaceNodes(CAEXDocument document,TreeNode oParentNode, ExternalInterfaceType classType, InterfaceFamilyType InterafceclassType)
|
||||
{
|
||||
if (classType.ExternalInterface.Exists)
|
||||
{
|
||||
@ -1863,7 +1873,7 @@ namespace Aml.Editor.Plugin
|
||||
foreach (var item in classType.ExternalInterface)
|
||||
{
|
||||
TreeNode newnode;
|
||||
if (item.BaseClass != null)
|
||||
if (item.BaseClass!= null)
|
||||
{
|
||||
referencedClassName = item.BaseClass.ToString();
|
||||
newnode = oParentNode.Nodes.Add(item.ToString(), item.ToString() + "{" + "Class:" + " " + referencedClassName + "}", 2);
|
||||
@ -1873,7 +1883,7 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
else
|
||||
{
|
||||
newnode = oParentNode.Nodes.Add(item.ToString(), item.ToString(), 2);
|
||||
newnode = oParentNode.Nodes.Add(item.ToString(), item.ToString() , 2);
|
||||
newnode.ForeColor = SystemColors.GrayText;
|
||||
}
|
||||
|
||||
|
@ -10,5 +10,3 @@ Um Änderungen an der Anwendung vorzunehmen muss zuerst Visual Studio 2019 insta
|
||||
In Visual Studio 2019 muss dann die Datei `Application.sln` aus dem `Application`-Ordner geöffnet werden.
|
||||
|
||||
In der Projektmappen-Ansicht ist dann zum einen die Applikation als auch das Plugin (ModellingWizard) zu sehen.
|
||||
|
||||
Um die Anwendung kompilieren zu können, muss über den NuGet-Paketmanager eventuel noch das `AML.Engine`-Paket in der Version 1.5.8 installiert werden.
|
||||
|
Loading…
Reference in New Issue
Block a user