Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f959683
Message boxes updated.
Rajkumarpulaparthi Jul 8, 2019
8e9ce58
Create new device basic Interface
Rajkumarpulaparthi Jul 8, 2019
209f682
Created Dictionaries of IRDI and eClass
Rajkumarpulaparthi Aug 7, 2019
9072a28
Dimensional Data for Electrial Connectors Datatables Updated in "Elec…
Rajkumarpulaparthi Aug 13, 2019
23b1dc7
Cable Leads Infromation updated
Rajkumarpulaparthi Aug 14, 2019
2ede870
New IRDI Cable Dimension Dictionary Created
Rajkumarpulaparthi Aug 14, 2019
4805441
Tree View Updated
Rajkumarpulaparthi Aug 19, 2019
ac9b4f6
Tree view update 2
Rajkumarpulaparthi Aug 28, 2019
d18467d
Pdf view updated
Rajkumarpulaparthi Sep 3, 2019
a5de7e8
Integrated Device Description GUI
Rajkumarpulaparthi Sep 19, 2019
8c8a6fc
Till Electrical Interface file writing part 1
Rajkumarpulaparthi Oct 2, 2019
34216ff
New Add documents tab
Rajkumarpulaparthi Oct 25, 2019
0a9b2ac
ElectricalInterface Updated 07.11.2019
Rajkumarpulaparthi Nov 7, 2019
9827ebc
Modelling Wizard Changes 14.11.2019
Rajkumarpulaparthi Nov 14, 2019
527dd00
Modelling wizard chages 20.11.2019
Rajkumarpulaparthi Nov 20, 2019
92e2dba
Modelling Wizard 21.11.2019
Rajkumarpulaparthi Nov 21, 2019
f9c454c
Modelling Wizard 22.11.2019
Rajkumarpulaparthi Nov 22, 2019
6bc8a67
Modelling Wizard 27.11.2019
Rajkumarpulaparthi Nov 27, 2019
4f09df4
Modelling Wizard 28.11.2019
Rajkumarpulaparthi Nov 28, 2019
e932a70
Mpodelling wizard 27.11.2019 (2)
Rajkumarpulaparthi Nov 28, 2019
591c4c2
Modelling Wizard 02.12.2019
Rajkumarpulaparthi Dec 2, 2019
aab4587
Modelling Wizard 03.12.2019
Rajkumarpulaparthi Dec 3, 2019
2d9147f
Modelling Wizard 03.12.2019(2)
Rajkumarpulaparthi Dec 3, 2019
4419e79
Modelling Wizard 05.12.2019
Rajkumarpulaparthi Dec 5, 2019
73c2d33
Modelling Wizard 06.12.2019
Rajkumarpulaparthi Dec 6, 2019
687cc4b
modelling wizard 07.12.2019
Rajkumarpulaparthi Dec 7, 2019
8f30644
ModellingWizard 08.12.2019
Rajkumarpulaparthi Dec 7, 2019
06cbafe
Modelling Wizard 05.12.2019 (2)
Rajkumarpulaparthi Dec 8, 2019
cd18f74
Modelling Wizard 11.12.2019
Rajkumarpulaparthi Dec 11, 2019
0075ea6
Modelling Wizard 12.12.2019
Rajkumarpulaparthi Dec 12, 2019
0d72b6f
Modelling Wizard 13.12.2019
Rajkumarpulaparthi Dec 13, 2019
2fd128d
Modelling Wizard 23.01.2020
Rajkumarpulaparthi Jan 23, 2020
3d296c6
Modeling Wizard 27.01.2020
Rajkumarpulaparthi Jan 27, 2020
52f0c45
Modeling wizard 27.01.2020 (2)
Rajkumarpulaparthi Jan 27, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions About.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,18 @@
<TextBlock Margin="15,0,0,0">
<Run FontWeight="Bold" Text="DHBW Stuttgart" />
</TextBlock>
<TextBlock Margin="15,0,0,0">
<Run Text="and" />
</TextBlock>
<TextBlock Margin="15,0,0,0">
<Run FontWeight="Bold" Text="Master Student Raj Kumar Pulaparthi" />
</TextBlock>
<TextBlock Margin="15,0,0,0">
<Run FontWeight="Bold" Text="Otto-von-Guericke University Magdeburg" />
</TextBlock>

<TextBlock Margin="15,5,0,10" Text="This Plugin was created as a group project in the class &quot;Software Engineering&quot;" />
<TextBlock Margin="15,5,0,10" Text="Later this plugin was developed as a sample tool that create vendor independent &#x0a;automation component, and included as part of Master Thesis &quot;" />


<Border Margin="0,2,0,2" BorderThickness="0,2,0,0">
Expand Down
163 changes: 163 additions & 0 deletions AnimationClass.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
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
{
class AnimationClass
{
public Panel PanelNumber { get; set; }
public Button ButtonNumber { get; set; }
public WebBrowser Webbrowser { get; set; }
public TextBox TextboxName { get; set; }
public PictureBox PictureboxNumber { get; set; }
public Button DisplayBtn { get; set; }
public DataGridView dataGridView { get; set; }
public string words { get; set; }
// public TreeNode Node { get; set; }


public AnimationClass()
{

}
// Method for window size maximum and minimum
public void WindowSizeChanger(Panel panelNumber,Button buttonNumber)
{
PanelNumber = panelNumber;
ButtonNumber = buttonNumber;
if (panelNumber.Size == panelNumber.MaximumSize)
{
panelNumber.Size = panelNumber.MinimumSize;
buttonNumber.Image = Resources.icons8_expand_arrow_24;
}
else
{
panelNumber.Size = panelNumber.MaximumSize;
buttonNumber.Image = Resources.icons8_collapse_arrow_24;
}
}
public void WindowSizeChanger(Panel panelNumber)
{
PanelNumber = panelNumber;
// Node = node;
if (panelNumber.Size == panelNumber.MaximumSize)
{
panelNumber.Size = panelNumber.MinimumSize;
//Node.Image = Resources.icons8_expand_arrow_24;
}
else
{
panelNumber.Size = panelNumber.MaximumSize;
//Node.Image = Resources.icons8_collapse_arrow_24;
}
}
public string OpenFileDialog(TextBox textboxName)
{
TextboxName = textboxName;

OpenFileDialog open = new OpenFileDialog();
open.Filter = "Document Files(*.pdf; *.doc;*.jpg; *.jpeg; *.gif; *.bmp; *.png;)|*.pdf; *.doc;*.jpg; *.jpeg; *.gif; *.bmp; *.png;";
if (open.ShowDialog() == DialogResult.OK)
{
textboxName.Text = open.FileName;

}
string nameOfFile = Path.GetFileName(open.FileName);
return nameOfFile;
}
public void OpenFileDialog(TextBox textboxName, Button pdfDisplayBtn)
{
TextboxName = textboxName;
DisplayBtn = pdfDisplayBtn;
WebBrowser webbrowser = new WebBrowser();
OpenFileDialog open = new OpenFileDialog();
open.Filter = "Files(*.pdf; *.doc;)|*.pdf; *.doc;";
if (open.ShowDialog() == DialogResult.OK)
{
textboxName.Text = open.FileName;
pdfDisplayBtn.Visible = true;
pdfDisplayBtn.Text = Path.GetFileName(open.FileName);

}
}
// 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;

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)
{
TextboxName = textboxName;
PictureboxNumber = pictureBoxNumber;
OpenFileDialog open = new OpenFileDialog();
open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp; *.png;)|*.jpg; *.jpeg; *.gif; *.bmp; *.png;";
if (open.ShowDialog() == DialogResult.OK)
{
textboxName.Text = open.FileName;
pictureBoxNumber.Image = new Bitmap(open.FileName);
}
}
public void OpenFileDialog(TextBox textboxName, PictureBox pictureBoxNumber, Button displayButton)
{
TextboxName = textboxName;
PictureboxNumber = pictureBoxNumber;
DisplayBtn = displayButton;
OpenFileDialog open = new OpenFileDialog();
open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp; *.png;)|*.jpg; *.jpeg; *.gif; *.bmp; *.png;";
if (open.ShowDialog() == DialogResult.OK)
{
textboxName.Text = open.FileName;
pictureBoxNumber.Image = new Bitmap(open.FileName);
displayButton.Visible = true;
displayButton.Text = Path.GetFileName(open.FileName);
}
}
// this method dispaly all hidden buttons with the Refsemantic Id in them.
public void DispalySemanticBtn(Button refSemanticBtn, DataGridView dataGrids,string word)
{
words = word;
DisplayBtn = refSemanticBtn;
dataGridView = dataGrids;

DisplayBtn.Visible = true;
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
try
{
foreach (DataGridViewRow attribute in dataGridView.Rows)
{
if (attribute.Cells[1].Value.ToString().Equals(words))
{
DisplayBtn.Text = attribute.Cells[0].Value.ToString();
break;
}
}
}
catch (Exception exc)
{
MessageBox.Show(exc.Message);
}

}
// this method is responsible to load all the datagrid parameters from the user in to the MWDevice class in to respective lists

}

}
172 changes: 172 additions & 0 deletions AutomationMLDataTables.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
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;

namespace Aml.Editor.Plugin
{
class AutomationMLDataTables
{
public DataTable AMLAttributeParameters()
{
DataTable AMLAttributeParameters = new DataTable();

AMLAttributeParameters.Columns.Add("AttributeName");
AMLAttributeParameters.Columns.Add("Value");
AMLAttributeParameters.Columns.Add("Default");
AMLAttributeParameters.Columns.Add("Unit");
AMLAttributeParameters.Columns.Add("DataType");
AMLAttributeParameters.Columns.Add("Semantic", typeof(ComboBox));
/*AMLAttributeParameters.Columns.Add("Reference");
AMLAttributeParameters.Columns.Add("Description");*/

return AMLAttributeParameters;
}

public void CreateDataTableWithColumns( DataTable dataRowName, DataGridView dataGridViewName,
KeyValuePair<string, List<List<ClassOfListsFromReferencefile>>> pair)
{
KeyValuePair<string, List<List<ClassOfListsFromReferencefile>>> Pair = pair;

DataTable DataRowName = dataRowName;
DataGridView DataGridViewName = dataGridViewName;



foreach (var valueList in Pair.Value)
{


foreach (var item in valueList)
{
List<string> listofRefsemantics = new List<string>();
DataRow row = DataRowName.NewRow();

/*row["AttributeName"] = item.Name;
row["Value"] = item.Value;
row["Default"] = item.Default;
row["Unit"] = item.Unit;
row["DataType"] = null;*/
int num = DataGridViewName.Rows.Add();


if (item.Name == "Manufacturer" || item.Name == "Model")
{
DataGridViewName.Rows[num].Cells[0].Value = item.Name;
DataGridViewName.Rows[num].Cells[0].Style.ForeColor = Color.Red;
}
else
{
DataGridViewName.Rows[num].Cells[0].Value = item.Name;
}

DataGridViewName.Rows[num].Cells[1].Value = item.Value;
DataGridViewName.Rows[num].Cells[2].Value = item.Default;
DataGridViewName.Rows[num].Cells[3].Value = item.Unit;
DataGridViewName.Rows[num].Cells[4].Value = item.DataType;
try
{
foreach (var value in item.RefSemanticList.Elements)
{
listofRefsemantics.Add(value.FirstAttribute.Value.ToString());
}
}
catch (Exception)
{

}

DataGridViewComboBoxCell dgvcbc = (DataGridViewComboBoxCell)DataGridViewName.Rows[num].Cells[5];
dgvcbc.Items.Clear();

foreach (var items in listofRefsemantics)
{
dgvcbc.Items.Add(items);
}




DataRowName.Rows.Add(row);



break;
}


}

}
public void CheckForSameNameTextOfInternalAttributes(DataTable dataRowName, DataGridView dataGridViewName, KeyValuePair<string, List<ClassOfListsFromReferencefile>> pair)
{
KeyValuePair<string, List<ClassOfListsFromReferencefile>> Pair = pair;
DataTable DataRowName = dataRowName;
DataGridView DataGridViewName = dataGridViewName;
foreach (DataGridViewRow eachrow in DataGridViewName.Rows)
{
try
{
/* if (eachrow.Cells[0].Value.Equals(item.Name))
{

}*/
}
catch (Exception) { }
}
}
public void CreateDataTableWithColumns(DataTable dataRowName, DataGridView dataGridViewName, KeyValuePair<string, List<ElectricalInterfaceParameters>> pair)
{
KeyValuePair<string, List<ElectricalInterfaceParameters>> Pair = pair;
DataTable DataRowName = new DataTable();
DataRowName = dataRowName;
DataGridView DataGridViewName = dataGridViewName;

foreach (var item in Pair.Value)
{

DataRow row = DataRowName.NewRow();


row["AttributeName"] = item.AttributeName;
row["Value"] = item.Values;
row["Default"] = item.Default;
row["Unit"] = item.Units;
row["DataType"] = item.DataType;
row["Semantic"] = item.Semantic;
row["Reference"] = item.Reference;
row["Description"] = item.Description;
DataRowName.Rows.Add(row);




/* break;*/



}
foreach (DataRow IDT in DataRowName.Rows)
{

int num = DataGridViewName.Rows.Add();
DataGridViewName.Rows[num].Cells[0].Value = IDT["AttributeName"].ToString();
DataGridViewName.Rows[num].Cells[1].Value = IDT["Value"].ToString();
DataGridViewName.Rows[num].Cells[2].Value = IDT["Default"].ToString();
DataGridViewName.Rows[num].Cells[3].Value = IDT["Unit"].ToString();
DataGridViewName.Rows[num].Cells[4].Value = IDT["DataType"].ToString();
DataGridViewName.Rows[num].Cells[5].Value = IDT["Semantic"].ToString();
DataGridViewName.Rows[num].Cells[6].Value = IDT["Reference"].ToString();
// DataGridViewName.Rows[num].Cells[7].Value = IDT["Description"].ToString();

}
// For each loop creating the rows in the data table

}

}
}
40 changes: 40 additions & 0 deletions ClassDiagram1.cd
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Class Name="Aml.Editor.Plugin.SearchAMLLibraryFile">
<Position X="0.5" Y="0.5" Width="3" />
<TypeIdentifier>
<HashCode>AEAAAAAAACCAAAwEAAAAgABEAASAAAGAAACEAAAEAEE=</HashCode>
<FileName>SearchAMLLibraryFile.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Aml.Editor.Plugin.SearchAMLComponentFile">
<Position X="9.75" Y="2.5" Width="2.5" />
<TypeIdentifier>
<HashCode>AAAAAAgAAAAEAAAAAAABAQBAAgAAEAEBAAAAAEIBACA=</HashCode>
<FileName>SearchAMLComponentFile.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Aml.Editor.Plugin.DeviceDescription" Collapsed="true">
<Position X="5.25" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>fmLfxn8fg3/IWD7rwP335sn/arvH2xLM59r3e+r9h74=</HashCode>
<FileName>DeviceDescription.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="System.Object" Collapsed="true">
<Position X="4.25" Y="6" Width="1.5" />
<TypeIdentifier />
</Class>
<Class Name="System.Windows.Forms.UserControl" Collapsed="true">
<Position X="13.25" Y="1.5" Width="1.5" />
<TypeIdentifier />
</Class>
<Class Name="Aml.Editor.Plugin.MWData" Collapsed="true">
<Position X="5.25" Y="2" Width="1.5" />
<TypeIdentifier>
<HashCode>SAAAAAAAAKgCAAAAAAAAEIAAAAABAAAAJEAAAAAAAAA=</HashCode>
<FileName>MWData.cs</FileName>
</TypeIdentifier>
</Class>
<Font Name="Segoe UI" Size="9" />
</ClassDiagram>
Loading