Fixed Drag&Drop
Fixed delete button
This commit is contained in:
parent
1251cb5a72
commit
696b81e436
40
SOURCE/Plugin/DeviceDescription.Designer.cs
generated
40
SOURCE/Plugin/DeviceDescription.Designer.cs
generated
@ -55,6 +55,8 @@ namespace Aml.Editor.Plugin
|
||||
this.automationComponentLibraryv100FullCAEX3BETAToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.electricConnectorLibraryv100ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.industrialSensorLibraryv100ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.advancedModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpButton = new System.Windows.Forms.ToolStripDropDownButton();
|
||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.manualToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@ -226,8 +228,6 @@ namespace Aml.Editor.Plugin
|
||||
this.toolStripButton13 = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButton14 = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButton15 = new System.Windows.Forms.ToolStripButton();
|
||||
this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.advancedModeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.Page0_FullWindow.SuspendLayout();
|
||||
this.Page0_FullWindowPanel2.SuspendLayout();
|
||||
@ -442,6 +442,21 @@ namespace Aml.Editor.Plugin
|
||||
this.industrialSensorLibraryv100ToolStripMenuItem.Text = "IndustrialSensorLibrary_v1_0_0";
|
||||
this.industrialSensorLibraryv100ToolStripMenuItem.Click += new System.EventHandler(this.industrialSensorLibraryv100ToolStripMenuItem_Click);
|
||||
//
|
||||
// viewToolStripMenuItem
|
||||
//
|
||||
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.advancedModeToolStripMenuItem});
|
||||
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
|
||||
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 23);
|
||||
this.viewToolStripMenuItem.Text = "View";
|
||||
//
|
||||
// advancedModeToolStripMenuItem
|
||||
//
|
||||
this.advancedModeToolStripMenuItem.Name = "advancedModeToolStripMenuItem";
|
||||
this.advancedModeToolStripMenuItem.Size = new System.Drawing.Size(161, 22);
|
||||
this.advancedModeToolStripMenuItem.Text = "Advanced Mode";
|
||||
this.advancedModeToolStripMenuItem.Click += new System.EventHandler(this.advancedModeToolStripMenuItem_Click);
|
||||
//
|
||||
// helpButton
|
||||
//
|
||||
this.helpButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@ -471,6 +486,7 @@ namespace Aml.Editor.Plugin
|
||||
//
|
||||
this.vendorNameTextBox.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
||||
this.vendorNameTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.vendorNameTextBox.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
this.vendorNameTextBox.Name = "vendorNameTextBox";
|
||||
this.vendorNameTextBox.Size = new System.Drawing.Size(150, 23);
|
||||
this.vendorNameTextBox.TextChanged += new System.EventHandler(this.vendorNameTextBox_TextChanged);
|
||||
@ -487,6 +503,7 @@ namespace Aml.Editor.Plugin
|
||||
//
|
||||
this.deviceNameTextBox.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
||||
this.deviceNameTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.deviceNameTextBox.Font = new System.Drawing.Font("Segoe UI", 9F);
|
||||
this.deviceNameTextBox.Name = "deviceNameTextBox";
|
||||
this.deviceNameTextBox.Size = new System.Drawing.Size(150, 23);
|
||||
this.deviceNameTextBox.TextChanged += new System.EventHandler(this.deviceNameTextBox_TextChanged);
|
||||
@ -676,6 +693,7 @@ namespace Aml.Editor.Plugin
|
||||
this.genericInformationDataGridView.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.genericInformationDataGridView.Size = new System.Drawing.Size(1325, 176);
|
||||
this.genericInformationDataGridView.TabIndex = 5;
|
||||
this.genericInformationDataGridView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.genericInformationDataGridView_MouseUp);
|
||||
//
|
||||
// dataGridViewTextBoxColumn31
|
||||
//
|
||||
@ -756,6 +774,7 @@ namespace Aml.Editor.Plugin
|
||||
this.deleteRoleClassButton.Name = "deleteRoleClassButton";
|
||||
this.deleteRoleClassButton.Size = new System.Drawing.Size(49, 22);
|
||||
this.deleteRoleClassButton.Text = "Delete";
|
||||
this.deleteRoleClassButton.Click += new System.EventHandler(this.deleteRoleClassButton_Click_1);
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
@ -1932,7 +1951,7 @@ namespace Aml.Editor.Plugin
|
||||
this.treeViewRoleClassLib.Size = new System.Drawing.Size(414, 394);
|
||||
this.treeViewRoleClassLib.TabIndex = 9;
|
||||
this.treeViewRoleClassLib.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.treeViewRoleClassLib_ItemDrag);
|
||||
this.treeViewRoleClassLib.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeViewRoleClassLib_AfterSelect);
|
||||
this.treeViewRoleClassLib.DragOver += new System.Windows.Forms.DragEventHandler(this.treeViewRoleClassLib_DragOver);
|
||||
//
|
||||
// imageList1
|
||||
//
|
||||
@ -2376,21 +2395,6 @@ namespace Aml.Editor.Plugin
|
||||
this.toolStripButton15.Size = new System.Drawing.Size(44, 24);
|
||||
this.toolStripButton15.Text = "Save";
|
||||
//
|
||||
// viewToolStripMenuItem
|
||||
//
|
||||
this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.advancedModeToolStripMenuItem});
|
||||
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
|
||||
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 23);
|
||||
this.viewToolStripMenuItem.Text = "View";
|
||||
//
|
||||
// advancedModeToolStripMenuItem
|
||||
//
|
||||
this.advancedModeToolStripMenuItem.Name = "advancedModeToolStripMenuItem";
|
||||
this.advancedModeToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
||||
this.advancedModeToolStripMenuItem.Text = "Advanced Mode";
|
||||
this.advancedModeToolStripMenuItem.Click += new System.EventHandler(this.advancedModeToolStripMenuItem_Click);
|
||||
//
|
||||
// DeviceDescription
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
||||
|
@ -346,9 +346,7 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
private void treeViewInterfaceClassLib_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
|
||||
//this.treeViewInterfaceClassLib.MouseDown += new MouseEventHandler(this.tree_MouseDown);
|
||||
|
||||
}
|
||||
|
||||
private void treeViewInterfaceClassLib_DragOver(object sender, DragEventArgs e)
|
||||
@ -362,6 +360,17 @@ namespace Aml.Editor.Plugin
|
||||
treeViewInterfaceClassLib.SelectedNode = treeViewInterfaceClassLib.GetNodeAt(targetPoint);
|
||||
}
|
||||
|
||||
private void treeViewRoleClassLib_DragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
// this.treeViewInterfaceClassLib.DragOver += new DragEventHandler(this.tree_DragOver);
|
||||
|
||||
// Retrieve the client coordinates of the mouse position.
|
||||
Point targetPoint = treeViewRoleClassLib.PointToClient(new Point(e.X, e.Y));
|
||||
|
||||
// Select the node at the mouse position.
|
||||
treeViewRoleClassLib.SelectedNode = treeViewRoleClassLib.GetNodeAt(targetPoint);
|
||||
}
|
||||
|
||||
private void treeViewInterfaceClassLib_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
|
||||
@ -395,6 +404,8 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
else
|
||||
{
|
||||
Cursor = Cursors.Hand;
|
||||
|
||||
if (treeViewInterfaceClassLib.SelectedNode.ImageIndex == 2)
|
||||
{
|
||||
return;
|
||||
@ -419,10 +430,6 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void treeViewRoleClassLib_ItemDrag(object sender, ItemDragEventArgs e)
|
||||
{
|
||||
if (treeViewRoleClassLib.SelectedNode == null)
|
||||
@ -431,6 +438,8 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
else
|
||||
{
|
||||
Cursor = Cursors.Hand;
|
||||
|
||||
if (treeViewRoleClassLib.SelectedNode.ImageIndex == 2)
|
||||
{
|
||||
return;
|
||||
@ -983,14 +992,14 @@ namespace Aml.Editor.Plugin
|
||||
}
|
||||
}
|
||||
dragging = false;
|
||||
//set your cursor back to the deafault
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
dragging = false;
|
||||
return;
|
||||
}
|
||||
|
||||
Cursor = Cursors.Default;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1007,6 +1016,7 @@ namespace Aml.Editor.Plugin
|
||||
|
||||
private void genericInformationDataGridView_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
|
||||
if (dragging)
|
||||
{
|
||||
try
|
||||
@ -1062,6 +1072,8 @@ namespace Aml.Editor.Plugin
|
||||
dragging = false;
|
||||
return;
|
||||
}
|
||||
|
||||
Cursor = Cursors.Default;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1427,12 +1439,18 @@ namespace Aml.Editor.Plugin
|
||||
{
|
||||
try
|
||||
{
|
||||
if (electricalInterfacesCollectionDataGridView.CurrentCell != null)
|
||||
if (electricalInterfacesCollectionDataGridView.CurrentCell != null && electricalInterfacesCollectionDataGridView.Rows.Count != 0)
|
||||
{
|
||||
int rowIndex = electricalInterfacesCollectionDataGridView.CurrentCell.RowIndex;
|
||||
electricalInterfacesCollectionDataGridView.CurrentRow.Selected = true;
|
||||
string interfaceSerialNumber = electricalInterfacesCollectionDataGridView.Rows[rowIndex].Cells[0].Value.ToString();
|
||||
string interfaceClass = electricalInterfacesCollectionDataGridView.Rows[rowIndex].Cells[1].Value.ToString();
|
||||
|
||||
DataGridViewCell dataGridCell0 = electricalInterfacesCollectionDataGridView.Rows[rowIndex].Cells[0];
|
||||
DataGridViewCell dataGridCell1 = electricalInterfacesCollectionDataGridView.Rows[rowIndex].Cells[1];
|
||||
|
||||
if (dataGridCell0.Value != null && dataGridCell1.Value != null)
|
||||
{
|
||||
string interfaceSerialNumber = dataGridCell0.Value.ToString();
|
||||
string interfaceClass = dataGridCell1.Value.ToString();
|
||||
|
||||
try
|
||||
{
|
||||
@ -1468,6 +1486,7 @@ namespace Aml.Editor.Plugin
|
||||
electricalInterfacesCollectionDataGridView.Rows.RemoveAt(rowIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
|
||||
@ -4730,5 +4749,70 @@ namespace Aml.Editor.Plugin
|
||||
elecInterAttDataGridView.Columns[5].Visible = expertMode;
|
||||
|
||||
}
|
||||
|
||||
private void deleteRoleClassButton_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (genericInformationDataGridView.CurrentCell != null)
|
||||
{
|
||||
int rowIndex = genericInformationDataGridView.CurrentCell.RowIndex;
|
||||
genericInformationDataGridView.CurrentRow.Selected = true;
|
||||
|
||||
DataGridViewCell dataGridCell0 = genericInformationDataGridView.Rows[rowIndex].Cells[0];
|
||||
DataGridViewCell dataGridCell1 = genericInformationDataGridView.Rows[rowIndex].Cells[1];
|
||||
|
||||
if (dataGridCell0.Value != null && dataGridCell1.Value != null)
|
||||
{
|
||||
string interfaceSerialNumber = dataGridCell0.Value.ToString();
|
||||
string interfaceClass = dataGridCell1.Value.ToString();
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
if (device.DictionaryForRoleClassofComponent.ContainsKey("(" + interfaceSerialNumber + ")" + interfaceClass))
|
||||
{
|
||||
device.DictionaryForRoleClassofComponent.Remove("(" + interfaceSerialNumber + ")" + interfaceClass);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
foreach (var pair in searchAMLLibraryFile.DictionaryForExternalInterfacesInstancesAttributesOfRoleClassLib)
|
||||
{
|
||||
if (pair.Key.Contains(interfaceClass))
|
||||
{
|
||||
try
|
||||
{
|
||||
if (device.DictionaryForExternalInterfacesUnderRoleClassofComponent.ContainsKey("(" + interfaceSerialNumber + ")" + pair.Key.ToString()))
|
||||
{
|
||||
device.DictionaryForExternalInterfacesUnderRoleClassofComponent.Remove("(" + interfaceSerialNumber + ")" + pair.Key.ToString());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
genericInformationDataGridView.Rows.RemoveAt(rowIndex);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception) { }
|
||||
}
|
||||
}
|
||||
}
|
@ -137,7 +137,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD6
|
||||
DAAAAk1TRnQBSQFMAgEBAwEAASABBAEgAQQBHAEAARwBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
DAAAAk1TRnQBSQFMAgEBAwEAAUABBAFAAQQBHAEAARwBAAT/AQkBAAj/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||
AUADAAEQAwABAQEAAQgGAAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA
|
||||
AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA
|
||||
AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm
|
||||
|
Loading…
Reference in New Issue
Block a user