Cleaned up code
This commit is contained in:
parent
39c0720683
commit
1251cb5a72
@ -1,11 +1,4 @@
|
||||
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
|
||||
|
@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace App
|
||||
|
@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
|
@ -1,7 +1,6 @@
|
||||
|
||||
using System.Reflection;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
@ -18,7 +17,7 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
var assembly = Assembly.GetCallingAssembly();
|
||||
|
||||
txtVersion.Text = "Version "+ assembly.GetName().Version.ToString();
|
||||
txtVersion.Text = "Version " + assembly.GetName().Version.ToString();
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,14 +1,8 @@
|
||||
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 Aml.Editor.Plugin.Properties;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Web;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
{
|
||||
@ -31,7 +25,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;
|
||||
@ -99,14 +93,14 @@ namespace Aml.Editor.Plugin
|
||||
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;
|
||||
@ -136,7 +130,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,11 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Data;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
{
|
||||
@ -27,7 +24,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;
|
||||
|
@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
namespace Aml.Editor.Plugin
|
||||
{
|
||||
class ClassOfListsFromDataGridViews
|
||||
{
|
||||
|
@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Aml.Engine.AmlObjects;
|
||||
using Aml.Engine.CAEX;
|
||||
using Aml.Engine.CAEX;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
{
|
||||
@ -61,8 +55,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 + ")";
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ using System.IO;
|
||||
using System.IO.Packaging;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using Aml.Engine.AmlObjects.Extensions;
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
@ -7,7 +7,6 @@ using System.IO.Packaging;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
{
|
||||
@ -130,8 +129,8 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
|
||||
// Init the default Libs
|
||||
AutomationMLBaseRoleClassLibType.RoleClassLib(document) ;
|
||||
AutomationMLInterfaceClassLibType.InterfaceClassLib(document) ;
|
||||
AutomationMLBaseRoleClassLibType.RoleClassLib(document);
|
||||
AutomationMLInterfaceClassLibType.InterfaceClassLib(document);
|
||||
|
||||
var structureRoleFamilyType = AutomationMLBaseRoleClassLibType.RoleClassLib(document).Structure;
|
||||
|
||||
@ -336,7 +335,7 @@ namespace Aml.Editor.Plugin
|
||||
if (device.vendorName != null)
|
||||
{
|
||||
InternalElementType electricalInterface = null;
|
||||
RoleRequirementsType roleRequirements = null ;
|
||||
RoleRequirementsType roleRequirements = null;
|
||||
foreach (var internalElement in systemUnitClass.InternalElement)
|
||||
{
|
||||
if (internalElement.Name.Equals("Interfaces"))
|
||||
@ -473,7 +472,7 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
string electricalConnectorPinName = Regex.Replace(pairofList.Key.ToString(), @"\(.*?\)", "");
|
||||
electricalConnectorPinName = Regex.Replace(electricalConnectorPinName, @"\{.*?\}", "");
|
||||
electricalConnectorPinName = electricalConnectorPinName.Replace(electricalConnectorTypeName,"");
|
||||
electricalConnectorPinName = electricalConnectorPinName.Replace(electricalConnectorTypeName, "");
|
||||
|
||||
|
||||
|
||||
@ -1045,7 +1044,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,13 +1,10 @@
|
||||
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; }
|
||||
@ -103,7 +100,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;
|
||||
@ -124,7 +121,7 @@ namespace Aml.Editor.Plugin
|
||||
public override string ToString()
|
||||
{
|
||||
|
||||
return "ElectricalParameters(" + Connector + "=" + ConnectorCode + "=" + ConnectorType + "="+Pins+")";
|
||||
return "ElectricalParameters(" + Connector + "=" + ConnectorCode + "=" + ConnectorType + "=" + Pins + ")";
|
||||
}
|
||||
|
||||
}
|
||||
@ -152,7 +149,7 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
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.ReferenceID = referenceID;
|
||||
@ -179,7 +176,7 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return "PinParametersInPinInfoDataGridView(" +PinNumber+"="+ ReferenceID + "=" + Attributes + "=" + Values + "=" + Units + ")";
|
||||
return "PinParametersInPinInfoDataGridView(" + PinNumber + "=" + ReferenceID + "=" + Attributes + "=" + Values + "=" + Units + ")";
|
||||
}
|
||||
}
|
||||
|
||||
@ -202,7 +199,7 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return "AttachablesDataGridViewParameters(" + ElementName + "=" + FilePath +"="+ AddToFile + ")";
|
||||
return "AttachablesDataGridViewParameters(" + ElementName + "=" + FilePath + "=" + AddToFile + ")";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
|
@ -1,9 +1,6 @@
|
||||
using System;
|
||||
using Aml.Engine.CAEX;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Aml.Engine.CAEX;
|
||||
|
||||
namespace Aml.Editor.Plugin
|
||||
{
|
||||
@ -30,7 +27,7 @@ namespace Aml.Editor.Plugin
|
||||
foreach (var attribute in externalInterface.Attribute)
|
||||
{
|
||||
StoreEachAttributeValueInListOfExternalIterface(i, attributelist, attribute, externalInterface);
|
||||
CkeckForNestedAttributesOfExternalIterface(i,attribute, externalInterface);
|
||||
CkeckForNestedAttributesOfExternalIterface(i, attribute, externalInterface);
|
||||
|
||||
}
|
||||
|
||||
@ -43,7 +40,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);
|
||||
@ -73,7 +70,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);
|
||||
|
||||
}
|
||||
|
||||
@ -369,7 +366,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,18 +1,8 @@
|
||||
using System;
|
||||
using Aml.Engine.CAEX;
|
||||
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
|
||||
{
|
||||
@ -191,7 +181,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);
|
||||
}
|
||||
@ -1775,7 +1765,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);
|
||||
@ -1835,7 +1825,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();
|
||||
@ -1852,7 +1842,7 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
|
||||
|
||||
PrintExternalInterfaceNodes(document,externalinterafcenode, externalinterfaces, classType);
|
||||
PrintExternalInterfaceNodes(document, externalinterafcenode, externalinterfaces, classType);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1865,7 +1855,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)
|
||||
{
|
||||
@ -1873,7 +1863,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);
|
||||
@ -1883,7 +1873,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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user