Cleaned up code

This commit is contained in:
Administrator 2022-04-07 08:37:54 +02:00
parent 39c0720683
commit 1251cb5a72
16 changed files with 230 additions and 282 deletions

View File

@ -1,11 +1,4 @@
using System; 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; using System.Windows.Forms;
namespace App namespace App

View File

@ -1,7 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
namespace App namespace App

View File

@ -1,5 +1,4 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden // Allgemeine Informationen über eine Assembly werden über die folgenden

View File

@ -1,7 +1,6 @@
 
using System.Reflection; using System.Reflection;
using System.Windows; using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation; using System.Windows.Navigation;
namespace Aml.Editor.Plugin namespace Aml.Editor.Plugin
@ -18,10 +17,10 @@ namespace Aml.Editor.Plugin
var assembly = Assembly.GetCallingAssembly(); var assembly = Assembly.GetCallingAssembly();
txtVersion.Text = "Version "+ assembly.GetName().Version.ToString(); txtVersion.Text = "Version " + assembly.GetName().Version.ToString();
} }
private void Close_Click(object sender, RoutedEventArgs e) private void Close_Click(object sender, RoutedEventArgs e)
{ {

View File

@ -1,14 +1,8 @@
using System; using Aml.Editor.Plugin.Properties;
using System.Collections.Generic; using System;
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.Drawing;
using System.Web; using System.IO;
using System.Net; using System.Windows.Forms;
namespace Aml.Editor.Plugin namespace Aml.Editor.Plugin
{ {
@ -22,7 +16,7 @@ namespace Aml.Editor.Plugin
public Button DisplayBtn { get; set; } public Button DisplayBtn { get; set; }
public DataGridView dataGridView { get; set; } public DataGridView dataGridView { get; set; }
public string words { get; set; } public string words { get; set; }
// public TreeNode Node { get; set; } // public TreeNode Node { get; set; }
public AnimationClass() public AnimationClass()
@ -31,7 +25,7 @@ namespace Aml.Editor.Plugin
} }
// Method for window size maximum and minimum // Method for window size maximum and minimum
public void WindowSizeChanger(Panel panelNumber,Button buttonNumber) public void WindowSizeChanger(Panel panelNumber, Button buttonNumber)
{ {
PanelNumber = panelNumber; PanelNumber = panelNumber;
ButtonNumber = buttonNumber; ButtonNumber = buttonNumber;
@ -50,7 +44,7 @@ namespace Aml.Editor.Plugin
public void WindowSizeChanger(Panel panelNumber) public void WindowSizeChanger(Panel panelNumber)
{ {
PanelNumber = panelNumber; PanelNumber = panelNumber;
// Node = node; // Node = node;
if (panelNumber.Size == panelNumber.MaximumSize) if (panelNumber.Size == panelNumber.MaximumSize)
{ {
panelNumber.Size = panelNumber.MinimumSize; panelNumber.Size = panelNumber.MinimumSize;
@ -66,13 +60,13 @@ namespace Aml.Editor.Plugin
public string OpenFileDialog(TextBox textboxName) public string OpenFileDialog(TextBox textboxName)
{ {
TextboxName = textboxName; TextboxName = textboxName;
OpenFileDialog open = new OpenFileDialog(); OpenFileDialog open = new OpenFileDialog();
open.Filter = "Document Files(*.pdf; *.doc;*.jpg; *.jpeg; *.gif; *.bmp; *.png;)|*.pdf; *.doc;*.jpg; *.jpeg; *.gif; *.bmp; *.png;"; open.Filter = "Document Files(*.pdf; *.doc;*.jpg; *.jpeg; *.gif; *.bmp; *.png;)|*.pdf; *.doc;*.jpg; *.jpeg; *.gif; *.bmp; *.png;";
if (open.ShowDialog() == DialogResult.OK) if (open.ShowDialog() == DialogResult.OK)
{ {
textboxName.Text = open.FileName; textboxName.Text = open.FileName;
} }
string nameOfFile = Path.GetFileName(open.FileName); string nameOfFile = Path.GetFileName(open.FileName);
return nameOfFile; return nameOfFile;
@ -90,23 +84,23 @@ namespace Aml.Editor.Plugin
textboxName.Text = open.FileName; textboxName.Text = open.FileName;
pdfDisplayBtn.Visible = true; pdfDisplayBtn.Visible = true;
pdfDisplayBtn.Text = Path.GetFileName(open.FileName); pdfDisplayBtn.Text = Path.GetFileName(open.FileName);
} }
} }
// method for opening IEC-CDD urls // method for opening IEC-CDD urls
public void ManualOpener(string btnText) public void ManualOpener(string btnText)
{ {
string mainUrl = "https://cdd.iec.ch/CDD/IEC62683/iec62683.nsf/PropertiesAllVersions/0112-2---62683%23"; string mainUrl = "https://cdd.iec.ch/CDD/IEC62683/iec62683.nsf/PropertiesAllVersions/0112-2---62683%23";
string lastUrl = "?OpenDocument"; string lastUrl = "?OpenDocument";
string midUrl = btnText.Substring(15); string midUrl = btnText.Substring(15);
string finalUrl = mainUrl +midUrl+ lastUrl; string finalUrl = mainUrl + midUrl + lastUrl;
System.Diagnostics.Process.Start(finalUrl); System.Diagnostics.Process.Start(finalUrl);
} }
// Open Dialog Box related method that takes parmeters of textbox name and the picture box number. // 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; TextboxName = textboxName;
PictureboxNumber = pictureBoxNumber; PictureboxNumber = pictureBoxNumber;
@ -136,7 +130,7 @@ namespace Aml.Editor.Plugin
} }
// this method dispaly all hidden buttons with the Refsemantic Id in them. // 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; words = word;
DisplayBtn = refSemanticBtn; DisplayBtn = refSemanticBtn;

View File

@ -1,20 +1,17 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data; using System.Data;
using System.Windows.Forms;
using System.Drawing; using System.Drawing;
using System.Windows.Forms;
namespace Aml.Editor.Plugin namespace Aml.Editor.Plugin
{ {
class AutomationMLDataTables class AutomationMLDataTables
{ {
public DataTable AMLAttributeParameters() public DataTable AMLAttributeParameters()
{ {
DataTable AMLAttributeParameters = new DataTable(); DataTable AMLAttributeParameters = new DataTable();
AMLAttributeParameters.Columns.Add("AttributeName"); AMLAttributeParameters.Columns.Add("AttributeName");
AMLAttributeParameters.Columns.Add("Value"); AMLAttributeParameters.Columns.Add("Value");
AMLAttributeParameters.Columns.Add("Default"); AMLAttributeParameters.Columns.Add("Default");
@ -27,19 +24,19 @@ namespace Aml.Editor.Plugin
return AMLAttributeParameters; 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)
{ {
KeyValuePair<string, List<List<ClassOfListsFromReferencefile>>> Pair = pair; KeyValuePair<string, List<List<ClassOfListsFromReferencefile>>> Pair = pair;
DataTable DataRowName = dataRowName; DataTable DataRowName = dataRowName;
DataGridView DataGridViewName = dataGridViewName; DataGridView DataGridViewName = dataGridViewName;
foreach (var valueList in Pair.Value) foreach (var valueList in Pair.Value)
{ {
foreach (var item in valueList) foreach (var item in valueList)
{ {
@ -63,7 +60,7 @@ namespace Aml.Editor.Plugin
{ {
DataGridViewName.Rows[num].Cells[0].Value = item.Name; DataGridViewName.Rows[num].Cells[0].Value = item.Name;
} }
DataGridViewName.Rows[num].Cells[1].Value = item.Value; DataGridViewName.Rows[num].Cells[1].Value = item.Value;
DataGridViewName.Rows[num].Cells[2].Value = item.Default; DataGridViewName.Rows[num].Cells[2].Value = item.Default;
DataGridViewName.Rows[num].Cells[3].Value = item.Unit; DataGridViewName.Rows[num].Cells[3].Value = item.Unit;
@ -88,19 +85,19 @@ namespace Aml.Editor.Plugin
dgvcbc.Items.Add(items); dgvcbc.Items.Add(items);
} }
DataRowName.Rows.Add(row); DataRowName.Rows.Add(row);
break; break;
} }
} }
} }
public void CheckForSameNameTextOfInternalAttributes(DataTable dataRowName, DataGridView dataGridViewName, KeyValuePair<string, List<ClassOfListsFromReferencefile>> pair) public void CheckForSameNameTextOfInternalAttributes(DataTable dataRowName, DataGridView dataGridViewName, KeyValuePair<string, List<ClassOfListsFromReferencefile>> pair)
{ {
@ -111,10 +108,10 @@ namespace Aml.Editor.Plugin
{ {
try try
{ {
/* if (eachrow.Cells[0].Value.Equals(item.Name)) /* if (eachrow.Cells[0].Value.Equals(item.Name))
{ {
}*/ }*/
} }
catch (Exception) { } catch (Exception) { }
} }
@ -128,9 +125,9 @@ namespace Aml.Editor.Plugin
foreach (var item in Pair.Value) foreach (var item in Pair.Value)
{ {
DataRow row = DataRowName.NewRow(); DataRow row = DataRowName.NewRow();
row["AttributeName"] = item.AttributeName; row["AttributeName"] = item.AttributeName;
row["Value"] = item.Values; row["Value"] = item.Values;
@ -143,10 +140,10 @@ namespace Aml.Editor.Plugin
DataRowName.Rows.Add(row); DataRowName.Rows.Add(row);
/* break;*/
/* break;*/
} }

View File

@ -1,10 +1,4 @@
using System; namespace Aml.Editor.Plugin
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Aml.Editor.Plugin
{ {
class ClassOfListsFromDataGridViews class ClassOfListsFromDataGridViews
{ {
@ -23,7 +17,7 @@ namespace Aml.Editor.Plugin
//public CAEXSequence<RefSemanticType> RefSemanticList { get; set; } //public CAEXSequence<RefSemanticType> RefSemanticList { get; set; }
public ClassOfListsFromDataGridViews() public ClassOfListsFromDataGridViews()
{ {

View File

@ -1,10 +1,4 @@
using System; using Aml.Engine.CAEX;
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 namespace Aml.Editor.Plugin
{ {
@ -20,7 +14,7 @@ namespace Aml.Editor.Plugin
public string CopyRight { get; set; } public string CopyRight { get; set; }
public string AttributePath { get; set; } public string AttributePath { get; set; }
public string RefBaseClassPath { get; set; } public string RefBaseClassPath { get; set; }
public string ID { get; set; } public string ID { get; set; }
public string ReferencedClassName { get; set; } public string ReferencedClassName { get; set; }
public CAEXSequence<RefSemanticType> RefSemanticList { get; set; } public CAEXSequence<RefSemanticType> RefSemanticList { get; set; }
public string SupportesRoleClassType { get; set; } public string SupportesRoleClassType { get; set; }
@ -31,14 +25,14 @@ namespace Aml.Editor.Plugin
public ClassOfListsFromReferencefile() public ClassOfListsFromReferencefile()
{ {
// RefSemanticList = new List<CAEXSequence<RefSemanticType>>(); // RefSemanticList = new List<CAEXSequence<RefSemanticType>>();
} }
public ClassOfListsFromReferencefile(string name, string value, public ClassOfListsFromReferencefile(string name, string value,
string _default, string unit, string _default, string unit,
string reference, string description, string reference, string description,
string copyRight, string semantic, string string copyRight, string semantic, string
attributePath, string refBaseClassPath, attributePath, string refBaseClassPath,
string id, string referencedClassName, CAEXSequence<RefSemanticType> refSemanticList, string supportesRoleClassType, string dataType) string id, string referencedClassName, CAEXSequence<RefSemanticType> refSemanticList, string supportesRoleClassType, string dataType)
: this() : this()
{ {
@ -61,8 +55,8 @@ namespace Aml.Editor.Plugin
public override string ToString() public override string ToString()
{ {
return "ClassOfListsFromReferencefile("+Name+"="+Value+"="+Default+"="+Unit+"="+Reference+"=" return "ClassOfListsFromReferencefile(" + Name + "=" + Value + "=" + Default + "=" + Unit + "=" + Reference + "="
+Description+"="+CopyRight+"="+Semantic+"="+AttributePath+ "=" + RefBaseClassPath + "=" + ID + Description + "=" + CopyRight + "=" + Semantic + "=" + AttributePath + "=" + RefBaseClassPath + "=" + ID
+ "=" + ReferencedClassName + "=" + RefSemanticList + "=" + SupportesRoleClassType + "=" + DataType + ")"; + "=" + ReferencedClassName + "=" + RefSemanticList + "=" + SupportesRoleClassType + "=" + DataType + ")";
} }
} }

View File

@ -8,7 +8,6 @@ using System.IO;
using System.IO.Packaging; using System.IO.Packaging;
using System.Linq; using System.Linq;
using System.Windows.Forms; using System.Windows.Forms;
using Aml.Engine.AmlObjects.Extensions;
/// <summary> /// <summary>

View File

@ -9,11 +9,11 @@ namespace Aml.Editor.Plugin
public class MWController public class MWController
{ {
// the (initialised) GUIs // the (initialised) GUIs
private DeviceDescription deviceDescriptionForm; private DeviceDescription deviceDescriptionForm;
// the interface class to the AML Editor // the interface class to the AML Editor
private ModellingWizard modellingWizard; private ModellingWizard modellingWizard;
@ -37,7 +37,7 @@ namespace Aml.Editor.Plugin
/// Create the new CreateDevice GUI or return the previously created GUI /// Create the new CreateDevice GUI or return the previously created GUI
/// </summary> /// </summary>
/// <returns>the CreateDevice GUI for this session</returns> /// <returns>the CreateDevice GUI for this session</returns>
/// <summary> /// <summary>
/// create the new DeviceDescription GUI or return the previously created GUI /// create the new DeviceDescription GUI or return the previously created GUI
/// </summary> /// </summary>
@ -63,21 +63,21 @@ namespace Aml.Editor.Plugin
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);
} }
// update the device list // update the device list
if (isEdit) if (isEdit)
{ {
} }
else else
{ {
devices.Add(newDevice); devices.Add(newDevice);
} }
return result; return result;
} }
@ -86,11 +86,11 @@ namespace Aml.Editor.Plugin
/// Show the correct GUI for the selected device /// Show the correct GUI for the selected device
/// </summary> /// </summary>
/// <param name="selectedIndex">The index of the selected item in the dropdown</param> /// <param name="selectedIndex">The index of the selected item in the dropdown</param>
/// <summary> /// <summary>
/// Reload all .amlx files in ./modellingwizard/ and update the dropdown. /// Reload all .amlx files in ./modellingwizard/ and update the dropdown.
/// </summary> /// </summary>
/// <summary> /// <summary>
/// Switch the displayed /// Switch the displayed
@ -101,7 +101,7 @@ namespace Aml.Editor.Plugin
// TODO modellingWizard is null // TODO modellingWizard is null
switch (targetGUI) switch (targetGUI)
{ {
case MWGUIType.DeviceDescription: case MWGUIType.DeviceDescription:
modellingWizard.changeGUI(GetDeviceDescriptionForm()); modellingWizard.changeGUI(GetDeviceDescriptionForm());
break; break;
@ -137,7 +137,7 @@ namespace Aml.Editor.Plugin
result = "Invalid Filetype"; result = "Invalid Filetype";
break; break;
} }
return result; return result;
} }
} }

View File

@ -7,7 +7,6 @@ using System.IO.Packaging;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace Aml.Editor.Plugin namespace Aml.Editor.Plugin
{ {
@ -16,7 +15,7 @@ namespace Aml.Editor.Plugin
// holds the controller to report created devices to // holds the controller to report created devices to
private readonly MWController mWController; private readonly MWController mWController;
/// <summary> /// <summary>
/// Create the MWData Object /// Create the MWData Object
/// </summary> /// </summary>
@ -58,7 +57,7 @@ namespace Aml.Editor.Plugin
/// <returns></returns> /// <returns></returns>
public string CreateDevice(MWDevice device, bool isEdit) public string CreateDevice(MWDevice device, bool isEdit)
{ {
CAEXDocument document = null; CAEXDocument document = null;
AutomationMLContainer amlx = null; AutomationMLContainer amlx = null;
@ -76,18 +75,18 @@ namespace Aml.Editor.Plugin
} }
else else
{ {
amlFilePath = System.IO.Path.Combine(device.filepath, fileName + ".amlx"); 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)
@ -123,22 +122,22 @@ namespace Aml.Editor.Plugin
{ {
} }
} }
// Init the default Libs // Init the default Libs
AutomationMLBaseRoleClassLibType.RoleClassLib(document) ; AutomationMLBaseRoleClassLibType.RoleClassLib(document);
AutomationMLInterfaceClassLibType.InterfaceClassLib(document) ; AutomationMLInterfaceClassLibType.InterfaceClassLib(document);
var structureRoleFamilyType = AutomationMLBaseRoleClassLibType.RoleClassLib(document).Structure; var structureRoleFamilyType = AutomationMLBaseRoleClassLibType.RoleClassLib(document).Structure;
SystemUnitFamilyType systemUnitClass = null; SystemUnitFamilyType systemUnitClass = null;
// Create the SystemUnitClass for our device // Create the SystemUnitClass for our device
if (!isEdit) if (!isEdit)
{ {
systemUnitClass = document.CAEXFile.SystemUnitClassLib.Append("ComponentSystemUnitClassLib").SystemUnitClass.Append(device.deviceName); systemUnitClass = document.CAEXFile.SystemUnitClassLib.Append("ComponentSystemUnitClassLib").SystemUnitClass.Append(device.deviceName);
@ -153,13 +152,13 @@ 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) if (myBool == true)
{ {
} }
Uri eachUri = null; Uri eachUri = null;
@ -171,7 +170,7 @@ namespace Aml.Editor.Plugin
device.listWithURIConvertedToString.Add(par); device.listWithURIConvertedToString.Add(par);
} }
} }
foreach (var pair in device.DictionaryForRoleClassofComponent) foreach (var pair in device.DictionaryForRoleClassofComponent)
@ -336,7 +335,7 @@ namespace Aml.Editor.Plugin
if (device.vendorName != null) if (device.vendorName != null)
{ {
InternalElementType electricalInterface = null; InternalElementType electricalInterface = null;
RoleRequirementsType roleRequirements = null ; RoleRequirementsType roleRequirements = null;
foreach (var internalElement in systemUnitClass.InternalElement) foreach (var internalElement in systemUnitClass.InternalElement)
{ {
if (internalElement.Name.Equals("Interfaces")) if (internalElement.Name.Equals("Interfaces"))
@ -349,9 +348,9 @@ namespace Aml.Editor.Plugin
} }
if (electricalInterface == null) if (electricalInterface == null)
electricalInterface = systemUnitClass.InternalElement.Append("Interfaces"); 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) foreach (var pair in device.DictionaryForInterfaceClassesInElectricalInterfaces)
{ {
@ -461,7 +460,7 @@ namespace Aml.Editor.Plugin
} }
} }
} }
@ -473,9 +472,9 @@ namespace Aml.Editor.Plugin
string electricalConnectorPinName = Regex.Replace(pairofList.Key.ToString(), @"\(.*?\)", ""); string electricalConnectorPinName = Regex.Replace(pairofList.Key.ToString(), @"\(.*?\)", "");
electricalConnectorPinName = Regex.Replace(electricalConnectorPinName, @"\{.*?\}", ""); electricalConnectorPinName = Regex.Replace(electricalConnectorPinName, @"\{.*?\}", "");
electricalConnectorPinName = electricalConnectorPinName.Replace(electricalConnectorTypeName,""); electricalConnectorPinName = electricalConnectorPinName.Replace(electricalConnectorTypeName, "");
if (initialnumberbetweenparanthesisofElectricalConnectorType == initialnumberbetweenparanthesisElectricalConnectorPins) if (initialnumberbetweenparanthesisofElectricalConnectorType == initialnumberbetweenparanthesisElectricalConnectorPins)
@ -590,7 +589,7 @@ namespace Aml.Editor.Plugin
{ {
// delete the old aml file // delete the old aml file
amlx.Package.DeletePart(partUri); amlx.Package.DeletePart(partUri);
// delete all files in the amlx package. // delete all files in the amlx package.
// Directory.Delete(Path.GetFullPath(amlx.ContainerFilename), true); // Directory.Delete(Path.GetFullPath(amlx.ContainerFilename), true);
@ -598,9 +597,9 @@ namespace Aml.Editor.Plugin
// write the new aml file into the package // write the new aml file into the package
PackagePart root = amlx.AddRoot(path, partUri); PackagePart root = amlx.AddRoot(path, partUri);
if (!isEdit) if (!isEdit)
{ {
foreach (AttachablesDataGridViewParameters listWithUri in device.listWithURIConvertedToString) foreach (AttachablesDataGridViewParameters listWithUri in device.listWithURIConvertedToString)
{ {
@ -612,16 +611,16 @@ namespace Aml.Editor.Plugin
} }
} }
} }
DirectoryInfo directory = new DirectoryInfo(Path.GetDirectoryName(amlFilePath)); DirectoryInfo directory = new DirectoryInfo(Path.GetDirectoryName(amlFilePath));
foreach (FileInfo fileInfos in directory.GetFiles()) foreach (FileInfo fileInfos in directory.GetFiles())
{ {
if (fileInfos.Extension != ".amlx") if (fileInfos.Extension != ".amlx")
{ {
fileInfos.Delete(); fileInfos.Delete();
} }
} }
amlx.Save(); amlx.Save();
amlx.Close(); amlx.Close();
@ -634,7 +633,7 @@ namespace Aml.Editor.Plugin
{ {
return "Device description file created!\nFilepath " + amlFilePath; return "Device description file created!\nFilepath " + amlFilePath;
} }
} }
public void SearchForAttributesInsideAttributesofAutomationComponent(string searchName, AttributeType attribute, ClassOfListsFromReferencefile item, SupportedRoleClassType SRC) public void SearchForAttributesInsideAttributesofAutomationComponent(string searchName, AttributeType attribute, ClassOfListsFromReferencefile item, SupportedRoleClassType SRC)
@ -667,14 +666,14 @@ namespace Aml.Editor.Plugin
SearchForAttributesInsideAttributesofAutomationComponent(searchName, nestedAttribute, item, SRC); SearchForAttributesInsideAttributesofAutomationComponent(searchName, nestedAttribute, item, SRC);
} }
} }
} }
public void SearchAttributesInsideAttributesOFElectricConnectorType(string searchName, AttributeType attribute, ClassOfListsFromReferencefile item, ExternalInterfaceType electricConnectorType) public void SearchAttributesInsideAttributesOFElectricConnectorType(string searchName, AttributeType attribute, ClassOfListsFromReferencefile item, ExternalInterfaceType electricConnectorType)
{ {
foreach (var nestedAttribute in attribute.Attribute) foreach (var nestedAttribute in attribute.Attribute)
{ {
if (nestedAttribute.Name == searchName) if (nestedAttribute.Name == searchName)
{ {
var eachattribute = nestedAttribute.Attribute.Append(item.Name.ToString()); var eachattribute = nestedAttribute.Attribute.Append(item.Name.ToString());
@ -697,14 +696,14 @@ namespace Aml.Editor.Plugin
electricConnectorType.RefBaseClassPath = item.RefBaseClassPath; electricConnectorType.RefBaseClassPath = item.RefBaseClassPath;
} }
if (nestedAttribute.Attribute.Exists) if (nestedAttribute.Attribute.Exists)
{ {
SearchAttributesInsideAttributesOFElectricConnectorType(searchName, nestedAttribute, item, electricConnectorType); SearchAttributesInsideAttributesOFElectricConnectorType(searchName, nestedAttribute, item, electricConnectorType);
} }
} }
} }
/// <summary> /// <summary>
/// Takes the url of the picture and setup in the value attribute of the corresponding internal element <paramref name="pic"/>. /// Takes the url of the picture and setup in the value attribute of the corresponding internal element <paramref name="pic"/>.
/// </summary> /// </summary>
@ -753,7 +752,7 @@ namespace Aml.Editor.Plugin
} }
urlAtt.AttributeDataType = "xs:anyURI"; urlAtt.AttributeDataType = "xs:anyURI";
urlAtt.Value = url.ToString(); urlAtt.Value = url.ToString();
} }
/// <summary> /// <summary>
@ -809,7 +808,7 @@ namespace Aml.Editor.Plugin
} }
pictureAtt.AttributeDataType = "xs:anyURI"; pictureAtt.AttributeDataType = "xs:anyURI";
pictureAtt.Value = picturePart.ToString(); pictureAtt.Value = picturePart.ToString();
return picturePart; return picturePart;
} }
@ -1007,11 +1006,11 @@ namespace Aml.Editor.Plugin
if (name.Contains(".amlx")) if (name.Contains(".amlx"))
{ {
amlx = new AutomationMLContainer(".\\modellingwizard\\" + name, FileMode.Create); amlx = new AutomationMLContainer(".\\modellingwizard\\" + name, FileMode.Create);
} }
else else
{ {
amlx = new AutomationMLContainer(".\\modellingwizard\\" + name + ".amlx", FileMode.Create); amlx = new AutomationMLContainer(".\\modellingwizard\\" + name + ".amlx", FileMode.Create);
} }
// create the aml package path // create the aml package path
@ -1045,7 +1044,7 @@ namespace Aml.Editor.Plugin
// Just as an interface // Just as an interface
} }
public void copyFiles(string sourceFilePath, string destinationFilePath ) public void copyFiles(string sourceFilePath, string destinationFilePath)
{ {
string sourFile = Path.GetFileName(sourceFilePath); string sourFile = Path.GetFileName(sourceFilePath);
string destFile = Path.Combine(destinationFilePath, sourFile); string destFile = Path.Combine(destinationFilePath, sourFile);

View File

@ -1,26 +1,23 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Aml.Editor.Plugin namespace Aml.Editor.Plugin
{ {
// this class initialize the parameters exclusively for the "Device Identofication", "DataGridViews in "Generic Data Tab" AND "Field Attachables Tab"" // 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 environment { get; set; }
public string fileName { get; set; } public string fileName { get; set; }
public string filepath { get; set; } public string filepath { get; set; }
public string vendorName { get; set; } public string vendorName { get; set; }
public string deviceName { get; set; } public string deviceName { get; set; }
// Can contain letters: // Can contain letters:
public List<DataGridParameters> dataGridParametersLists { get; set; } public List<DataGridParameters> dataGridParametersLists { get; set; }
//Properties for Electrical Interface //Properties for Electrical Interface
public List<ElectricalParameters> ElectricalInterfaces { get; set; } public List<ElectricalParameters> ElectricalInterfaces { get; set; }
@ -61,13 +58,13 @@ namespace Aml.Editor.Plugin
public string RefSemantics { get; set; } public string RefSemantics { get; set; }
public string Attributes { get; set; } public string Attributes { get; set; }
public string Values { get; set; } public string Values { get; set; }
public DataGridParameters() { } public DataGridParameters() { }
public DataGridParameters(string refSemantic, string attributes, string value) public DataGridParameters(string refSemantic, string attributes, string value)
{ {
this.RefSemantics = refSemantic; this.RefSemantics = refSemantic;
this.Attributes = attributes; this.Attributes = attributes;
this.Values = value; this.Values = value;
} }
@ -76,8 +73,8 @@ namespace Aml.Editor.Plugin
return "DataGridParameters(" + RefSemantics + "=" + Attributes + "=" + Values + ")"; return "DataGridParameters(" + RefSemantics + "=" + Attributes + "=" + Values + ")";
} }
} }
/// <summary> /// <summary>
@ -98,19 +95,19 @@ namespace Aml.Editor.Plugin
//public string Units { get; set; } //public string Units { get; set; }
public ElectricalParameters() public ElectricalParameters()
{ {
} }
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; this.Connector = connector;
this.ConnectorCode = connectorCode; this.ConnectorCode = connectorCode;
this.ConnectorType = connectorType; this.ConnectorType = connectorType;
this.Pins = pins; this.Pins = pins;
} }
//public ElectricalParameters(string referenceID, string attribute, string values, string units, string pins) //public ElectricalParameters(string referenceID, string attribute, string values, string units, string pins)
//{ //{
@ -120,19 +117,19 @@ namespace Aml.Editor.Plugin
// this.Units = units; // this.Units = units;
// this.Pins = pins; // this.Pins = pins;
//} //}
public override string ToString() public override string ToString()
{ {
return "ElectricalParameters(" + Connector + "=" + ConnectorCode + "=" + ConnectorType + "="+Pins+")"; return "ElectricalParameters(" + Connector + "=" + ConnectorCode + "=" + ConnectorType + "=" + Pins + ")";
} }
} }
//This Class is responsible to hold the parameters in "ElectricalDataDataGrid View" //This Class is responsible to hold the parameters in "ElectricalDataDataGrid View"
public class ElectricalParametersInElectricalDataDataGridView public class ElectricalParametersInElectricalDataDataGridView
{ {
public string ReferenceID { get; set; } public string ReferenceID { get; set; }
public string Attributes { get; set; } public string Attributes { get; set; }
public string Values { get; set; } public string Values { get; set; }
@ -148,11 +145,11 @@ namespace Aml.Editor.Plugin
this.Attributes = attribute; this.Attributes = attribute;
this.Values = values; this.Values = values;
this.Units = units; this.Units = units;
} }
public override string ToString() public override string ToString()
{ {
return "ElectricalParametersInElectricalDataDataGridView("+ ReferenceID + "=" + Attributes + "=" + Values + "=" + Units + ")"; return "ElectricalParametersInElectricalDataDataGridView(" + ReferenceID + "=" + Attributes + "=" + Values + "=" + Units + ")";
} }
} }
@ -168,7 +165,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.PinNumber = pinNumber;
this.ReferenceID = referenceID; this.ReferenceID = referenceID;
@ -179,7 +176,7 @@ namespace Aml.Editor.Plugin
} }
public override string ToString() public override string ToString()
{ {
return "PinParametersInPinInfoDataGridView(" +PinNumber+"="+ ReferenceID + "=" + Attributes + "=" + Values + "=" + Units + ")"; return "PinParametersInPinInfoDataGridView(" + PinNumber + "=" + ReferenceID + "=" + Attributes + "=" + Values + "=" + Units + ")";
} }
} }
@ -188,7 +185,7 @@ namespace Aml.Editor.Plugin
{ {
public string ElementName { get; set; } public string ElementName { get; set; }
public string FilePath { get; set; } public string FilePath { get; set; }
public string AddToFile { get; set; } public string AddToFile { get; set; }
public AttachablesDataGridViewParameters() public AttachablesDataGridViewParameters()
{ {
@ -202,7 +199,7 @@ namespace Aml.Editor.Plugin
} }
public override string ToString() public override string ToString()
{ {
return "AttachablesDataGridViewParameters(" + ElementName + "=" + FilePath +"="+ AddToFile + ")"; return "AttachablesDataGridViewParameters(" + ElementName + "=" + FilePath + "=" + AddToFile + ")";
} }
} }

View File

@ -29,7 +29,7 @@ namespace Aml.Editor.Plugin
public ModellingWizard() public ModellingWizard()
{ {
mWController = new MWController(); mWController = new MWController();
// Defines the Command list, which will contain user commands, which a user can select // Defines the Command list, which will contain user commands, which a user can select
// via the PlugIn Menu. // via the PlugIn Menu.
Commands = new List<PluginCommand>(); Commands = new List<PluginCommand>();
@ -38,7 +38,7 @@ namespace Aml.Editor.Plugin
// Every PlugIn needs at least an Activation command, which will be called by a user to activate the PlugIn. // Every PlugIn needs at least an Activation command, which will be called by a user to activate the PlugIn.
ActivatePlugin = new PluginCommand() ActivatePlugin = new PluginCommand()
{ {
Command = new RelayCommand<object>(this.StartCommandExecute, Command = new RelayCommand<object>(this.StartCommandExecute,
this.StartCommandCanExecute), this.StartCommandCanExecute),
CommandName = "Start", CommandName = "Start",
CommandToolTip = "Start the PlugIn" CommandToolTip = "Start the PlugIn"
@ -92,7 +92,7 @@ namespace Aml.Editor.Plugin
private void ReloadObjectsExecute(object obj) private void ReloadObjectsExecute(object obj)
{ {
} }
/// <summary> /// <summary>
@ -105,7 +105,7 @@ namespace Aml.Editor.Plugin
/// <see cref="StopCommand"/> ). /// <see cref="StopCommand"/> ).
/// </summary> /// </summary>
public event EventHandler PluginTerminated; public event EventHandler PluginTerminated;
/// <summary> /// <summary>
/// The AboutCommand - Command /// The AboutCommand - Command
/// </summary> /// </summary>
@ -294,7 +294,7 @@ namespace Aml.Editor.Plugin
/// <param name="selectedObject">The selected object, may be null.</param> /// <param name="selectedObject">The selected object, may be null.</param>
public void PublishAutomationMLFileAndObject(string amlFilePath, CAEXBasicObject selectedObject) public void PublishAutomationMLFileAndObject(string amlFilePath, CAEXBasicObject selectedObject)
{ {
} }
/// <summary> /// <summary>
@ -337,7 +337,7 @@ namespace Aml.Editor.Plugin
private void StartCommandExecute(object parameter) private void StartCommandExecute(object parameter)
{ {
this.IsActive = true; this.IsActive = true;
// create the new PlugInUI and add it to the forms host // create the new PlugInUI and add it to the forms host
mWController.ChangeGui(MWController.MWGUIType.DeviceDescription); mWController.ChangeGui(MWController.MWGUIType.DeviceDescription);

View File

@ -1,5 +1,4 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden // Allgemeine Informationen über eine Assembly werden über die folgenden

View File

@ -1,9 +1,6 @@
using System; using Aml.Engine.CAEX;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Aml.Engine.CAEX;
namespace Aml.Editor.Plugin namespace Aml.Editor.Plugin
{ {
@ -19,7 +16,7 @@ namespace Aml.Editor.Plugin
public SearchAMLComponentFile() public SearchAMLComponentFile()
{ {
} }
public void CheckForAttributesOfExternalIterface(int i, ExternalInterfaceType externalInterface) public void CheckForAttributesOfExternalIterface(int i, ExternalInterfaceType externalInterface)
@ -30,8 +27,8 @@ namespace Aml.Editor.Plugin
foreach (var attribute in externalInterface.Attribute) foreach (var attribute in externalInterface.Attribute)
{ {
StoreEachAttributeValueInListOfExternalIterface(i, attributelist, attribute, externalInterface); StoreEachAttributeValueInListOfExternalIterface(i, attributelist, attribute, externalInterface);
CkeckForNestedAttributesOfExternalIterface(i,attribute, externalInterface); CkeckForNestedAttributesOfExternalIterface(i, attribute, externalInterface);
} }
} }
@ -43,7 +40,7 @@ namespace Aml.Editor.Plugin
list.Add(sublist); list.Add(sublist);
try 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() DictionaryofElectricalConnectorType["(" + i + ")" + externalInterface.Name.ToString()
+ "{" + "Class:" + " " + externalInterface.BaseClass + "}"].AddRange(list); + "{" + "Class:" + " " + externalInterface.BaseClass + "}"].AddRange(list);
@ -63,8 +60,8 @@ 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>>(); List<List<ClassOfListsFromReferencefile>> attributelist = new List<List<ClassOfListsFromReferencefile>>();
if (attributeType.Attribute.Exists) if (attributeType.Attribute.Exists)
@ -73,8 +70,8 @@ namespace Aml.Editor.Plugin
foreach (var attributeinattribute in attributeType.Attribute) foreach (var attributeinattribute in attributeType.Attribute)
{ {
StoreEachAttributeValueInListOfExternalIterface(i, attributelist, attributeinattribute, attributeType, externalInterface); StoreEachAttributeValueInListOfExternalIterface(i, attributelist, attributeinattribute, attributeType, externalInterface);
CkeckForNestedAttributesOfExternalIterface(i,attributeinattribute, externalInterface); CkeckForNestedAttributesOfExternalIterface(i, attributeinattribute, externalInterface);
} }
} }
@ -116,7 +113,7 @@ namespace Aml.Editor.Plugin
attributeparameters.CopyRight = attributeType.Copyright; attributeparameters.CopyRight = attributeType.Copyright;
attributeparameters.AttributePath = attributeType.AttributePath; attributeparameters.AttributePath = attributeType.AttributePath;
attributeparameters.RefSemanticList = attributeType.RefSemantic; attributeparameters.RefSemanticList = attributeType.RefSemantic;
// attributeparameters.ReferencedClassName = externalInterface.BaseClass.ToString(); // attributeparameters.ReferencedClassName = externalInterface.BaseClass.ToString();
attributeparameters.RefBaseClassPath = externalInterface.RefBaseClassPath; attributeparameters.RefBaseClassPath = externalInterface.RefBaseClassPath;
attributeparameters.ID = externalInterface.ID; attributeparameters.ID = externalInterface.ID;
@ -163,7 +160,7 @@ namespace Aml.Editor.Plugin
attributeparameters.CopyRight = AttributeInAttribute.Copyright; attributeparameters.CopyRight = AttributeInAttribute.Copyright;
attributeparameters.AttributePath = AttributeInAttribute.AttributePath; attributeparameters.AttributePath = AttributeInAttribute.AttributePath;
attributeparameters.RefSemanticList = AttributeInAttribute.RefSemantic; attributeparameters.RefSemanticList = AttributeInAttribute.RefSemantic;
// attributeparameters.ReferencedClassName = externalInterface.BaseClass.ToString(); // attributeparameters.ReferencedClassName = externalInterface.BaseClass.ToString();
attributeparameters.RefBaseClassPath = externalInterface.RefBaseClassPath; attributeparameters.RefBaseClassPath = externalInterface.RefBaseClassPath;
attributeparameters.ID = externalInterface.ID; attributeparameters.ID = externalInterface.ID;
@ -193,7 +190,7 @@ namespace Aml.Editor.Plugin
{ {
StoreEachAttributeValueInListOfElectricalConnectorPins(i, attributelist, attribute, externalInterface, classType); StoreEachAttributeValueInListOfElectricalConnectorPins(i, attributelist, attribute, externalInterface, classType);
CkeckForNestedAttributesOfElectricalConnectorPins(i, attribute, externalInterface, classType); CkeckForNestedAttributesOfElectricalConnectorPins(i, attribute, externalInterface, classType);
} }
} }
@ -226,7 +223,7 @@ namespace Aml.Editor.Plugin
} }
public void CkeckForNestedAttributesOfElectricalConnectorPins(int i, AttributeType attributeType, ExternalInterfaceType externalInterface, ExternalInterfaceType classType) public void CkeckForNestedAttributesOfElectricalConnectorPins(int i, AttributeType attributeType, ExternalInterfaceType externalInterface, ExternalInterfaceType classType)
{ {
List<List<ClassOfListsFromReferencefile>> attributelist = new List<List<ClassOfListsFromReferencefile>>(); List<List<ClassOfListsFromReferencefile>> attributelist = new List<List<ClassOfListsFromReferencefile>>();
@ -237,7 +234,7 @@ namespace Aml.Editor.Plugin
{ {
StoreEachAttributeValueInListOfElectricalConnectorPins(i, attributelist, attributeinattribute, attributeType, externalInterface, classType); StoreEachAttributeValueInListOfElectricalConnectorPins(i, attributelist, attributeinattribute, attributeType, externalInterface, classType);
CkeckForNestedAttributesOfElectricalConnectorPins(i, attributeinattribute, externalInterface, classType); CkeckForNestedAttributesOfElectricalConnectorPins(i, attributeinattribute, externalInterface, classType);
} }
} }
@ -279,7 +276,7 @@ namespace Aml.Editor.Plugin
attributeparameters.CopyRight = attributeType.Copyright; attributeparameters.CopyRight = attributeType.Copyright;
attributeparameters.AttributePath = attributeType.AttributePath; attributeparameters.AttributePath = attributeType.AttributePath;
attributeparameters.RefSemanticList = attributeType.RefSemantic; attributeparameters.RefSemanticList = attributeType.RefSemantic;
// attributeparameters.ReferencedClassName = externalInterface.BaseClass.ToString(); // attributeparameters.ReferencedClassName = externalInterface.BaseClass.ToString();
attributeparameters.RefBaseClassPath = externalInterface.RefBaseClassPath; attributeparameters.RefBaseClassPath = externalInterface.RefBaseClassPath;
attributeparameters.ID = externalInterface.ID; attributeparameters.ID = externalInterface.ID;
@ -357,7 +354,7 @@ namespace Aml.Editor.Plugin
{ {
StoreEachAttributeValueInListOfComponent(i, attributelist, attribute, supportedRoleClass, classType); StoreEachAttributeValueInListOfComponent(i, attributelist, attribute, supportedRoleClass, classType);
CkeckForNestedAttributesOfComponent(i, attribute, supportedRoleClass, classType); CkeckForNestedAttributesOfComponent(i, attribute, supportedRoleClass, classType);
} }
} }
@ -369,7 +366,7 @@ namespace Aml.Editor.Plugin
list.Add(sublist); list.Add(sublist);
try try
{ {
if (DictionaryofRolesforAutomationComponenet.ContainsKey("(" + i + ")" + supportedRoleClass.RoleReference.ToString() )) if (DictionaryofRolesforAutomationComponenet.ContainsKey("(" + i + ")" + supportedRoleClass.RoleReference.ToString()))
{ {
DictionaryofRolesforAutomationComponenet["(" + i + ")" + supportedRoleClass.RoleReference.ToString()].AddRange(list); DictionaryofRolesforAutomationComponenet["(" + i + ")" + supportedRoleClass.RoleReference.ToString()].AddRange(list);
} }
@ -387,7 +384,7 @@ namespace Aml.Editor.Plugin
} }
public void CkeckForNestedAttributesOfComponent(int i, AttributeType attributeType, SupportedRoleClassType supportedRoleClass, SystemUnitFamilyType classType) public void CkeckForNestedAttributesOfComponent(int i, AttributeType attributeType, SupportedRoleClassType supportedRoleClass, SystemUnitFamilyType classType)
{ {
List<List<ClassOfListsFromReferencefile>> attributelist = new List<List<ClassOfListsFromReferencefile>>(); List<List<ClassOfListsFromReferencefile>> attributelist = new List<List<ClassOfListsFromReferencefile>>();
@ -398,7 +395,7 @@ namespace Aml.Editor.Plugin
{ {
StoreEachAttributeValueInListOfComponent(i, attributelist, attributeinattribute, attributeType, supportedRoleClass, classType); StoreEachAttributeValueInListOfComponent(i, attributelist, attributeinattribute, attributeType, supportedRoleClass, classType);
CkeckForNestedAttributesOfComponent(i, attributeinattribute, supportedRoleClass, classType); CkeckForNestedAttributesOfComponent(i, attributeinattribute, supportedRoleClass, classType);
} }
} }

View File

@ -1,18 +1,8 @@
using System; using Aml.Engine.CAEX;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing; using System.Drawing;
using System.Windows.Forms; 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 namespace Aml.Editor.Plugin
{ {
@ -85,7 +75,7 @@ namespace Aml.Editor.Plugin
//This method search for "Referenced Class" of "External Interface" //This method search for "Referenced Class" of "External Interface"
SearchForReferencedClassNameofExternalIterface(doc, referencedClassName, classType, externalInterface); SearchForReferencedClassNameofExternalIterface(doc, referencedClassName, classType, externalInterface);
} }
} }
} }
@ -107,7 +97,7 @@ namespace Aml.Editor.Plugin
} }
} }
} }
@ -129,7 +119,7 @@ namespace Aml.Editor.Plugin
foreach (var item in classTypeSearchForReferencedClassName.InterfaceClass) foreach (var item in classTypeSearchForReferencedClassName.InterfaceClass)
{ {
//If "Refrenced Class Name" is existing... //If "Refrenced Class Name" is existing...
if (item.Name == referencedClassName) if (item.Name == referencedClassName)
{ {
//If external Interface is existing.... //If external Interface is existing....
if (item.ExternalInterface.Exists) if (item.ExternalInterface.Exists)
@ -144,7 +134,7 @@ namespace Aml.Editor.Plugin
//This method search for "Referenced Class" of "External Interface" //This method search for "Referenced Class" of "External Interface"
SearchForReferencedClassNameofExternalIterface(doc, referencedClassName, classType, externalInterface); SearchForReferencedClassNameofExternalIterface(doc, referencedClassName, classType, externalInterface);
} }
} }
} }
@ -159,7 +149,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) if (item.InterfaceClass.Exists)
{ {
//This class is responsible to search for interface classes ´nested inside Interface classes and recursion of //This class is responsible to search for interface classes ´nested inside Interface classes and recursion of
@ -179,7 +169,7 @@ namespace Aml.Editor.Plugin
{ {
StoreEachAttributeValueInListOfReferencedClassName(attributelist, classType, attribute); StoreEachAttributeValueInListOfReferencedClassName(attributelist, classType, attribute);
CkeckForNestedAttributesOfReferencedClassName(attribute, classType); CkeckForNestedAttributesOfReferencedClassName(attribute, classType);
} }
} }
@ -191,7 +181,7 @@ namespace Aml.Editor.Plugin
list.Add(sublist); list.Add(sublist);
try 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); DictionaryForInterfaceClassInstancesAttributes[classType.Name.ToString() + "{" + "Class:" + " " + classType.ReferencedClassName + "}"].AddRange(list);
} }
@ -206,7 +196,7 @@ namespace Aml.Editor.Plugin
throw; throw;
} }
} }
} }
@ -220,7 +210,7 @@ namespace Aml.Editor.Plugin
{ {
StoreEachAttributeValueInListOfReferencedClassName(attributelist, attributeinattribute, classType, attributeType); StoreEachAttributeValueInListOfReferencedClassName(attributelist, attributeinattribute, classType, attributeType);
CkeckForNestedAttributesOfReferencedClassName(attributeinattribute, classType); CkeckForNestedAttributesOfReferencedClassName(attributeinattribute, classType);
} }
} }
@ -239,7 +229,7 @@ namespace Aml.Editor.Plugin
DictionaryForInterfaceClassInstancesAttributes.Add(classType.Name.ToString() + "{" + "Class:" + " " + classType.ReferencedClassName + "}", list); DictionaryForInterfaceClassInstancesAttributes.Add(classType.Name.ToString() + "{" + "Class:" + " " + classType.ReferencedClassName + "}", list);
} }
} }
} }
/// <summary> /// <summary>
@ -261,7 +251,7 @@ namespace Aml.Editor.Plugin
StoreEachAttributeValueInListOfReferencedClassName(attributelist, classType, attribute); StoreEachAttributeValueInListOfReferencedClassName(attributelist, classType, attribute);
//This method is responsible to check nested attributes of "Referenced Class Name" //This method is responsible to check nested attributes of "Referenced Class Name"
CkeckForNestedAttributesOfReferencedClassName(classTypeSearchForReferencedClassName, attribute, classType); CkeckForNestedAttributesOfReferencedClassName(classTypeSearchForReferencedClassName, attribute, classType);
} }
} }
@ -296,7 +286,7 @@ namespace Aml.Editor.Plugin
} }
} }
/// <summary> /// <summary>
/// This method is responsible to check nested attributes of "Referenced Class Name" /// This method is responsible to check nested attributes of "Referenced Class Name"
/// </summary> /// </summary>
@ -317,7 +307,7 @@ namespace Aml.Editor.Plugin
StoreEachAttributeValueInListOfReferencedClassName(attributelist, attributeinattribute, classType, attributeType); StoreEachAttributeValueInListOfReferencedClassName(attributelist, attributeinattribute, classType, attributeType);
//This method is recursion of it self. //This method is recursion of it self.
CkeckForNestedAttributesOfReferencedClassName(classTypeSearchForReferencedClassName, attributeinattribute, classType); CkeckForNestedAttributesOfReferencedClassName(classTypeSearchForReferencedClassName, attributeinattribute, classType);
} }
} }
@ -328,7 +318,7 @@ namespace Aml.Editor.Plugin
List<List<ClassOfListsFromReferencefile>> list = new List<List<ClassOfListsFromReferencefile>>(); List<List<ClassOfListsFromReferencefile>> list = new List<List<ClassOfListsFromReferencefile>>();
List<ClassOfListsFromReferencefile> sublist = new List<ClassOfListsFromReferencefile>(); List<ClassOfListsFromReferencefile> sublist = new List<ClassOfListsFromReferencefile>();
//Add sublist to list //Add sublist to list
list.Add(sublist); list.Add(sublist);
//If dictioanry contains key , update the values under the key //If dictioanry contains key , update the values under the key
if (DictionaryForInterfaceClassInstancesAttributes.ContainsKey(classType.Name.ToString() + "{" + "Class:" + " " + classType.ReferencedClassName + "}")) if (DictionaryForInterfaceClassInstancesAttributes.ContainsKey(classType.Name.ToString() + "{" + "Class:" + " " + classType.ReferencedClassName + "}"))
@ -396,7 +386,7 @@ namespace Aml.Editor.Plugin
} }
/// <summary> /// <summary>
/// This method store nested attributes of each attribute of "Referenced CLASS name" in the dictionary. /// This method store nested attributes of each attribute of "Referenced CLASS name" in the dictionary.
/// </summary> /// </summary>
@ -547,7 +537,7 @@ namespace Aml.Editor.Plugin
//This method check for the "Nested Attributes" inside the "Attribute" of "External Interface". //This method check for the "Nested Attributes" inside the "Attribute" of "External Interface".
CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(attribute, classType, externalInterface); CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(attribute, classType, externalInterface);
} }
} }
@ -557,7 +547,7 @@ namespace Aml.Editor.Plugin
//Initiate empty list of "Attributes values"..... //Initiate empty list of "Attributes values".....
List<List<ClassOfListsFromReferencefile>> list = new List<List<ClassOfListsFromReferencefile>>(); List<List<ClassOfListsFromReferencefile>> list = new List<List<ClassOfListsFromReferencefile>>();
List<ClassOfListsFromReferencefile> sublist = new List<ClassOfListsFromReferencefile>(); List<ClassOfListsFromReferencefile> sublist = new List<ClassOfListsFromReferencefile>();
list.Add(sublist); list.Add(sublist);
try try
{ {
@ -584,10 +574,10 @@ namespace Aml.Editor.Plugin
throw; throw;
} }
} }
} }
/// <summary> /// <summary>
/// This method is responsible to check "Nested ATtributes" of "External Interface's Attribute " /// This method is responsible to check "Nested ATtributes" of "External Interface's Attribute "
/// </summary> /// </summary>
@ -608,7 +598,7 @@ namespace Aml.Editor.Plugin
StoreEachAttributeValueInListOfReferencedClassNameofExternalIterface(attributelist, attributeinattribute, classType, attributeType, externalInterface); StoreEachAttributeValueInListOfReferencedClassNameofExternalIterface(attributelist, attributeinattribute, classType, attributeType, externalInterface);
//This method is recursion of itself. //This method is recursion of itself.
CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(attributeinattribute, classType, externalInterface); CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(attributeinattribute, classType, externalInterface);
} }
} }
@ -619,12 +609,12 @@ namespace Aml.Editor.Plugin
List<List<ClassOfListsFromReferencefile>> list = new List<List<ClassOfListsFromReferencefile>>(); List<List<ClassOfListsFromReferencefile>> list = new List<List<ClassOfListsFromReferencefile>>();
List<ClassOfListsFromReferencefile> sublist = new List<ClassOfListsFromReferencefile>(); List<ClassOfListsFromReferencefile> sublist = new List<ClassOfListsFromReferencefile>();
//Add sub list to list //Add sub list to list
list.Add(sublist); list.Add(sublist);
//IF dictionary is having the key, the update the values for the key. //IF dictionary is having the key, the update the values for the key.
if (DictionaryForExternalInterfacesInstanceAttributesofInterfaceClassLib.ContainsKey(classType.Name.ToString() if (DictionaryForExternalInterfacesInstanceAttributesofInterfaceClassLib.ContainsKey(classType.Name.ToString()
+ "{" + "Class:" + " " + classType.ReferencedClassName + "}" + externalInterface.Name.ToString() + "{" + "Class:" + " " + classType.ReferencedClassName + "}" + externalInterface.Name.ToString()
+ "{" + "Class:" + " " + externalInterface.BaseClass + "}")) + "{" + "Class:" + " " + externalInterface.BaseClass + "}"))
{ {
DictionaryForExternalInterfacesInstanceAttributesofInterfaceClassLib[classType.Name.ToString() DictionaryForExternalInterfacesInstanceAttributesofInterfaceClassLib[classType.Name.ToString()
@ -663,7 +653,7 @@ namespace Aml.Editor.Plugin
StoreEachAttributeValueInListOfReferencedClassNameofExternalIterface(attributelist, classType, attribute, externalInterface); StoreEachAttributeValueInListOfReferencedClassNameofExternalIterface(attributelist, classType, attribute, externalInterface);
// This method is responsible to check the "Nested Attributes" of "Attributes" of"Interface Class's External interafce" // This method is responsible to check the "Nested Attributes" of "Attributes" of"Interface Class's External interafce"
CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(classTypeSearchForReferencedClassName, attribute, classType, externalInterface); CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(classTypeSearchForReferencedClassName, attribute, classType, externalInterface);
} }
} }
@ -703,7 +693,7 @@ namespace Aml.Editor.Plugin
} }
} }
/// <summary> /// <summary>
/// This method is responsible to check the "Nested Attributes" of "Attributes" of"Interface Class's External interafce" /// This method is responsible to check the "Nested Attributes" of "Attributes" of"Interface Class's External interafce"
/// </summary> /// </summary>
@ -725,7 +715,7 @@ namespace Aml.Editor.Plugin
StoreEachAttributeValueInListOfReferencedClassNameofExternalIterface(attributelist, attributeinattribute, classType, attributeType, externalInterface); StoreEachAttributeValueInListOfReferencedClassNameofExternalIterface(attributelist, attributeinattribute, classType, attributeType, externalInterface);
//This method is the recursion of itself.... //This method is the recursion of itself....
CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(classTypeSearchForReferencedClassName, attributeinattribute, classType, externalInterface); CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(classTypeSearchForReferencedClassName, attributeinattribute, classType, externalInterface);
} }
} }
@ -814,7 +804,7 @@ namespace Aml.Editor.Plugin
} }
/// <summary> /// <summary>
/// This method stores "Attributes" of "Referenced Class's External Interface" /// This method stores "Attributes" of "Referenced Class's External Interface"
/// </summary> /// </summary>
@ -908,7 +898,7 @@ namespace Aml.Editor.Plugin
SearchForReferencedClassNameofExternalIterface(doc, referencedClassName, classType, externalInterface); SearchForReferencedClassNameofExternalIterface(doc, referencedClassName, classType, externalInterface);
// This function is responsible to search for "Attributes" inside the "Referencd Class Name" of "eXTERNAL iNTERFACE" // This function is responsible to search for "Attributes" inside the "Referencd Class Name" of "eXTERNAL iNTERFACE"
CheckForAttributesOfReferencedClassNameofExternalIterface(classType, externalInterface); CheckForAttributesOfReferencedClassNameofExternalIterface(classType, externalInterface);
} }
} }
} }
@ -936,7 +926,7 @@ namespace Aml.Editor.Plugin
} }
} }
/// <summary> /// <summary>
/// This method is responsible for checking "Attributes" under "Referenced Class Name" /// This method is responsible for checking "Attributes" under "Referenced Class Name"
/// </summary> /// </summary>
@ -956,7 +946,7 @@ namespace Aml.Editor.Plugin
StoreEachAttributeValueInListOfReferencedClassName(attributelist, classType, attribute); StoreEachAttributeValueInListOfReferencedClassName(attributelist, classType, attribute);
//This function check for nested attributes in the attributes of "Refernced Class Name" //This function check for nested attributes in the attributes of "Refernced Class Name"
CkeckForNestedAttributesOfReferencedClassName(classTypeSearchForReferencedClassName, attribute, classType); CkeckForNestedAttributesOfReferencedClassName(classTypeSearchForReferencedClassName, attribute, classType);
} }
} }
@ -990,7 +980,7 @@ namespace Aml.Editor.Plugin
} }
} }
/// <summary> /// <summary>
/// This method check for nested attributes under attributes of "Referenced Class Name" /// This method check for nested attributes under attributes of "Referenced Class Name"
/// </summary> /// </summary>
@ -1011,7 +1001,7 @@ namespace Aml.Editor.Plugin
StoreEachAttributeValueInListOfReferencedClassName(attributelist, attributeinattribute, classType, attributeType); StoreEachAttributeValueInListOfReferencedClassName(attributelist, attributeinattribute, classType, attributeType);
//This method is recursion of itself //This method is recursion of itself
CkeckForNestedAttributesOfReferencedClassName(classTypeSearchForReferencedClassName, attributeinattribute, classType); CkeckForNestedAttributesOfReferencedClassName(classTypeSearchForReferencedClassName, attributeinattribute, classType);
} }
} }
@ -1049,7 +1039,7 @@ namespace Aml.Editor.Plugin
List<ClassOfListsFromReferencefile> sublist = new List<ClassOfListsFromReferencefile>(); List<ClassOfListsFromReferencefile> sublist = new List<ClassOfListsFromReferencefile>();
ClassOfListsFromReferencefile attributeparameters = new ClassOfListsFromReferencefile(); ClassOfListsFromReferencefile attributeparameters = new ClassOfListsFromReferencefile();
//Store every parameter value.... //Store every parameter value....
attributeparameters.Name = attributeType.Name; attributeparameters.Name = attributeType.Name;
attributeparameters.Value = attributeType.Value; attributeparameters.Value = attributeType.Value;
@ -1108,8 +1098,8 @@ namespace Aml.Editor.Plugin
// In the following parameters on right hand side "attributeType" has been changed to "AttributeInAttribute" this has been repeated to all // In the following parameters on right hand side "attributeType" has been changed to "AttributeInAttribute" this has been repeated to all
// methods of name "StoreEachAttributeValuesInList" with four parameters. // methods of name "StoreEachAttributeValuesInList" with four parameters.
attributeparameters.Name = AttributeInAttribute.Name; attributeparameters.Name = AttributeInAttribute.Name;
attributeparameters.Value = AttributeInAttribute.Value; attributeparameters.Value = AttributeInAttribute.Value;
@ -1162,7 +1152,7 @@ namespace Aml.Editor.Plugin
// This method look for nested attributes. // This method look for nested attributes.
CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(attribute, classType, externalInterface); CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(attribute, classType, externalInterface);
} }
} }
@ -1202,7 +1192,7 @@ namespace Aml.Editor.Plugin
} }
} }
/// <summary> /// <summary>
/// This function is responsible for checking "nested attributes" under "attributes" of the "External Interface" /// This function is responsible for checking "nested attributes" under "attributes" of the "External Interface"
/// </summary> /// </summary>
@ -1223,7 +1213,7 @@ namespace Aml.Editor.Plugin
StoreEachAttributeValueInListOfReferencedClassNameofExternalIterface(attributelist, attributeinattribute, classType, attributeType, externalInterface); StoreEachAttributeValueInListOfReferencedClassNameofExternalIterface(attributelist, attributeinattribute, classType, attributeType, externalInterface);
// This method allows tocheck for nested attribute inside attributes i.e. recursion of this own method. // This method allows tocheck for nested attribute inside attributes i.e. recursion of this own method.
CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(attributeinattribute, classType, externalInterface); CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(attributeinattribute, classType, externalInterface);
} }
} }
@ -1278,7 +1268,7 @@ namespace Aml.Editor.Plugin
// This method looks for "nested attributes" under each "attribute" // This method looks for "nested attributes" under each "attribute"
CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(classTypeSearchForReferencedClassName, attribute, classType, externalInterface); CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(classTypeSearchForReferencedClassName, attribute, classType, externalInterface);
} }
} }
@ -1345,7 +1335,7 @@ namespace Aml.Editor.Plugin
//Do recursion of this method untill the nested attributes were ended //Do recursion of this method untill the nested attributes were ended
CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(classTypeSearchForReferencedClassName, attributeinattribute, classType, externalInterface); CkeckForNestedAttributesOfReferencedClassNameofExternalIterface(classTypeSearchForReferencedClassName, attributeinattribute, classType, externalInterface);
} }
} }
@ -1393,7 +1383,7 @@ namespace Aml.Editor.Plugin
List<ClassOfListsFromReferencefile> sublist = new List<ClassOfListsFromReferencefile>(); List<ClassOfListsFromReferencefile> sublist = new List<ClassOfListsFromReferencefile>();
ClassOfListsFromReferencefile attributeparameters = new ClassOfListsFromReferencefile(); ClassOfListsFromReferencefile attributeparameters = new ClassOfListsFromReferencefile();
attributeparameters.Name = attributeType.Name; attributeparameters.Name = attributeType.Name;
attributeparameters.Value = attributeType.Value; attributeparameters.Value = attributeType.Value;
@ -1440,7 +1430,7 @@ namespace Aml.Editor.Plugin
} }
/// <summary> /// <summary>
/// This method stores the nested attributes in "DictionaryForExternalInterfacesInstancesAttributesOfRoleClassLib" /// This method stores the nested attributes in "DictionaryForExternalInterfacesInstancesAttributesOfRoleClassLib"
/// </summary> /// </summary>
@ -1459,7 +1449,7 @@ namespace Aml.Editor.Plugin
// In the following parameters on right hand side "attributeType" has been changed to "AttributeInAttribute" this has been repeated to all // In the following parameters on right hand side "attributeType" has been changed to "AttributeInAttribute" this has been repeated to all
// methods of name "StoreEachAttributeValuesInList" with four parameters. // methods of name "StoreEachAttributeValuesInList" with four parameters.
attributeparameters.Name = AttributeInAttribute.Name; attributeparameters.Name = AttributeInAttribute.Name;
attributeparameters.Value = AttributeInAttribute.Value; attributeparameters.Value = AttributeInAttribute.Value;
@ -1577,7 +1567,7 @@ namespace Aml.Editor.Plugin
SearchForReferencedClassNameofExternalIterface(doc, referencedClassName, classType, externalInterface); SearchForReferencedClassNameofExternalIterface(doc, referencedClassName, classType, externalInterface);
//This Function is responsible to search attributes under the "Referenced Classs Name" i.e. in this part "RoleFamilyType" //This Function is responsible to search attributes under the "Referenced Classs Name" i.e. in this part "RoleFamilyType"
CheckForAttributesOfReferencedClassNameofExternalIterface(classType, externalInterface); CheckForAttributesOfReferencedClassNameofExternalIterface(classType, externalInterface);
} }
} }
} }
@ -1644,7 +1634,7 @@ namespace Aml.Editor.Plugin
} }
} }
/// <summary> /// <summary>
/// This method is responsible for checking attributes under "Referenced Class Name" /// This method is responsible for checking attributes under "Referenced Class Name"
/// </summary> /// </summary>
@ -1663,7 +1653,7 @@ namespace Aml.Editor.Plugin
StoreEachAttributeValueInListOfReferencedClassName(attributelist, classType, attribute); StoreEachAttributeValueInListOfReferencedClassName(attributelist, classType, attribute);
//This function check for nested attributes of referenced Class Name. //This function check for nested attributes of referenced Class Name.
CkeckForNestedAttributesOfReferencedClassName(attribute, classType); CkeckForNestedAttributesOfReferencedClassName(attribute, classType);
} }
} }
@ -1697,7 +1687,7 @@ namespace Aml.Editor.Plugin
} }
} }
/// <summary> /// <summary>
/// This method check for "nested attributes" of "referenced class name" /// This method check for "nested attributes" of "referenced class name"
/// </summary> /// </summary>
@ -1717,7 +1707,7 @@ namespace Aml.Editor.Plugin
StoreEachAttributeValueInListOfReferencedClassName(attributelist, attributeinattribute, classType, attributeType); StoreEachAttributeValueInListOfReferencedClassName(attributelist, attributeinattribute, classType, attributeType);
//This method is recursion of itself... //This method is recursion of itself...
CkeckForNestedAttributesOfReferencedClassName(attributeinattribute, classType); CkeckForNestedAttributesOfReferencedClassName(attributeinattribute, classType);
} }
} }
@ -1762,20 +1752,20 @@ namespace Aml.Editor.Plugin
//This method is responsible for checking attributes under "Referenced Class Name" //This method is responsible for checking attributes under "Referenced Class Name"
CheckForAttributesOfReferencedClassName(classType); CheckForAttributesOfReferencedClassName(classType);
} }
else else
{ {
newnode = oParentNode.Nodes.Add(item.ToString(), item.ToString(), 1); newnode = oParentNode.Nodes.Add(item.ToString(), item.ToString(), 1);
} }
if (item.ExternalInterface.Exists) if (item.ExternalInterface.Exists)
{ {
foreach (var externalinterfaces in item.ExternalInterface) foreach (var externalinterfaces in item.ExternalInterface)
{ {
TreeNode externalinterafcenode; 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(); referencedClassName = externalinterfaces.BaseClass.ToString();
externalinterafcenode = newnode.Nodes.Add(externalinterfaces.ToString(), externalinterfaces.ToString() + "{" + "Class:" + " " + referencedClassName + "}", 2); externalinterafcenode = newnode.Nodes.Add(externalinterfaces.ToString(), externalinterfaces.ToString() + "{" + "Class:" + " " + referencedClassName + "}", 2);
@ -1786,7 +1776,7 @@ namespace Aml.Editor.Plugin
//This Function is responsible to search attributes under the "Referenced Classs Name" i.e. in this part "RoleFamilyType" //This Function is responsible to search attributes under the "Referenced Classs Name" i.e. in this part "RoleFamilyType"
CheckForAttributesOfReferencedClassNameofExternalIterface(item, externalinterfaces); CheckForAttributesOfReferencedClassNameofExternalIterface(item, externalinterfaces);
} }
else else
{ {
@ -1816,7 +1806,7 @@ namespace Aml.Editor.Plugin
TreeNode newnode; TreeNode newnode;
if (item.ReferencedClassName != "") if (item.ReferencedClassName != "")
{ {
referencedclassName = item.ReferencedClassName; referencedclassName = item.ReferencedClassName;
newnode = oParentNode.Nodes.Add(item.ToString(), item.ToString() + "{" + "Class:" + " " + referencedclassName + "}", 1); newnode = oParentNode.Nodes.Add(item.ToString(), item.ToString() + "{" + "Class:" + " " + referencedclassName + "}", 1);
CheckForAttributesOfReferencedClassName(item); CheckForAttributesOfReferencedClassName(item);
@ -1835,9 +1825,9 @@ namespace Aml.Editor.Plugin
foreach (var externalinterfaces in item.ExternalInterface) foreach (var externalinterfaces in item.ExternalInterface)
{ {
TreeNode externalinterafcenode; TreeNode externalinterafcenode;
if (externalinterfaces.BaseClass!= null) if (externalinterfaces.BaseClass != null)
{ {
referencedclassName = externalinterfaces.BaseClass.ToString(); referencedclassName = externalinterfaces.BaseClass.ToString();
externalinterafcenode = newnode.Nodes.Add(externalinterfaces.ToString(), externalinterfaces.ToString() + "{" + "Class:" + " " + referencedclassName + "}", 2); externalinterafcenode = newnode.Nodes.Add(externalinterfaces.ToString(), externalinterfaces.ToString() + "{" + "Class:" + " " + referencedclassName + "}", 2);
externalinterafcenode.ForeColor = SystemColors.GrayText; externalinterafcenode.ForeColor = SystemColors.GrayText;
@ -1852,7 +1842,7 @@ namespace Aml.Editor.Plugin
} }
PrintExternalInterfaceNodes(document,externalinterafcenode, externalinterfaces, classType); PrintExternalInterfaceNodes(document, externalinterafcenode, externalinterfaces, classType);
} }
} }
@ -1865,15 +1855,15 @@ namespace Aml.Editor.Plugin
/// </summary> /// </summary>
/// <param name="oParentNode"></param> /// <param name="oParentNode"></param>
/// <param name="classType"></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) if (classType.ExternalInterface.Exists)
{ {
foreach (var item in classType.ExternalInterface) foreach (var item in classType.ExternalInterface)
{ {
TreeNode newnode; TreeNode newnode;
if (item.BaseClass!= null) if (item.BaseClass != null)
{ {
referencedClassName = item.BaseClass.ToString(); referencedClassName = item.BaseClass.ToString();
newnode = oParentNode.Nodes.Add(item.ToString(), item.ToString() + "{" + "Class:" + " " + referencedClassName + "}", 2); newnode = oParentNode.Nodes.Add(item.ToString(), item.ToString() + "{" + "Class:" + " " + referencedClassName + "}", 2);
@ -1883,17 +1873,17 @@ namespace Aml.Editor.Plugin
} }
else else
{ {
newnode = oParentNode.Nodes.Add(item.ToString(), item.ToString() , 2); newnode = oParentNode.Nodes.Add(item.ToString(), item.ToString(), 2);
newnode.ForeColor = SystemColors.GrayText; newnode.ForeColor = SystemColors.GrayText;
} }
PrintExternalInterfaceNodes(document, newnode, item, InterafceclassType); PrintExternalInterfaceNodes(document, newnode, item, InterafceclassType);
} }
} }
} }
/// <summary> /// <summary>
/// This method is called to print "External Interfaces" in both "Role class Library and Interface Class Library" in the plugin. /// This method is called to print "External Interfaces" in both "Role class Library and Interface Class Library" in the plugin.
/// </summary> /// </summary>
@ -1907,7 +1897,7 @@ namespace Aml.Editor.Plugin
foreach (var item in classType.ExternalInterface) foreach (var item in classType.ExternalInterface)
{ {
TreeNode newnode; TreeNode newnode;
if (item.BaseClass != null) if (item.BaseClass != null)
{ {
@ -1925,9 +1915,9 @@ namespace Aml.Editor.Plugin
{ {
newnode = oParentNode.Nodes.Add(item.ToString(), item.ToString(), 2); newnode = oParentNode.Nodes.Add(item.ToString(), item.ToString(), 2);
newnode.ForeColor = SystemColors.GrayText; newnode.ForeColor = SystemColors.GrayText;
} }
//This is a recursion of this method itself... //This is a recursion of this method itself...
PrintExternalInterfaceNodes(document, newnode, item, RoleclassType); PrintExternalInterfaceNodes(document, newnode, item, RoleclassType);
} }