Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
ebc961a
Merge branch 'pr/n22_fix-workflow' into feature
trojanobelix Dec 6, 2022
bd65db6
Merge branch 'pr/n19_bugfix-array-of-strings-export' into feature
trojanobelix Dec 6, 2022
7b8ceba
Extend dirty-notification with an option to save instantly rather tha…
uniederer Dec 15, 2022
5ef3e83
Make message more explicit
uniederer Dec 15, 2022
813788a
Add autosave option
uniederer Dec 15, 2022
6e83ea2
Merge branch 'pr/n44_feature/allow_instant_save' into feature
trojanobelix Dec 15, 2022
bb60e06
Merge branch 'feature' of https://github.com/CANopenNode/CANopenEdito…
trojanobelix Dec 15, 2022
9f5048d
Merge branch 'bugfix' into feature
trojanobelix Jan 10, 2023
44860c7
Merge branch 'bugfix' into feature
trojanobelix Jan 30, 2023
2326320
Merge branch 'bugfix' into feature
trojanobelix Jul 6, 2023
226383f
Bugfix file filter when opening Network XML
trojanobelix Jul 2, 2024
1608e9c
added it back
nimrof Jul 16, 2024
ba45e03
Add/extend some exception catches to provide more information what wa…
trojanobelix Dec 1, 2024
e6472ec
Merge remote-tracking branch 'Github_origin/main' into feature
trojanobelix Jan 14, 2025
0c97545
Merge remote-tracking branch 'Github_origin/ExeptionCatch' into feature
trojanobelix Jan 14, 2025
5cb1bda
Unified header for Exporter legacy/V4
trojanobelix Jan 14, 2025
f959354
Merge remote-tracking branch 'trojanobelix/feature' into ExeptionCatch
trojanobelix Jan 14, 2025
b3baa5d
Merge remote-tracking branch 'Github_origin/main' into feature
trojanobelix Feb 7, 2025
d0b0969
Merge branch 'trojanobelix_main' into feature
trojanobelix Feb 7, 2025
e7e71c2
Merge branch 'added-moduleInfo-tab-back-to-DeviceView' into feature
trojanobelix Feb 7, 2025
b995b39
Update EDSEditorGUI/Form1.cs
trojanobelix Mar 10, 2025
760a177
Update EDSEditorGUI/Form1.cs
trojanobelix Mar 10, 2025
4045605
delete old code fragments
trojanobelix Mar 10, 2025
d7f774b
Merge remote-tracking branch 'trojanobelix/feature' into feature
trojanobelix Mar 25, 2025
bd326c5
Merge remote-tracking branch 'origin/main' into feature
trojanobelix Mar 25, 2025
7937b10
edssharp: add another extension for the EDS file for CountLabel
ckhardin Mar 25, 2025
5a6f7b6
Bugfix for #181
trojanobelix Apr 23, 2025
561b43d
Merge branch 'pr/n181_clonig_crash' into feature
trojanobelix Apr 23, 2025
e0fc09c
Merge remote-tracking branch 'CanopenEditor/feature' into feature
trojanobelix May 12, 2025
55f3d18
Merge remote-tracking branch 'Github_origin/main' into feature
trojanobelix May 12, 2025
5738aa5
Merge branch 'pr/n180_ckhardin/add-countlabel-eds-extension' into fea…
trojanobelix Sep 5, 2025
b4aaa21
Merge remote-tracking branch 'Github_origin/main' into feature
trojanobelix Sep 5, 2025
5be27ef
Increment number in object name when adding new objects
trojanobelix Nov 17, 2025
f50327c
Merge branch 'pr/198' into feature
trojanobelix Nov 21, 2025
062ffcc
Add IncrementNumberAtEnd
trojanobelix Nov 25, 2025
c23a2e4
Merge branch 'IncObjectName' into feature
trojanobelix Nov 25, 2025
e29e2a1
Updates nuget extensions
trojanobelix Nov 27, 2025
7a2de63
Update sourcegrid for .net 8/9
trojanobelix Nov 28, 2025
4017078
Check if the sub index for PDO mapping is still valid (might be deleted)
trojanobelix Nov 28, 2025
4cbf9a3
Merge branch 'updt_sourcegrid' into feature
trojanobelix Nov 28, 2025
8505320
Merge branch 'feat-chkPDOMappingSubValid' into feature
trojanobelix Nov 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion EDSEditorGUI/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

67 changes: 49 additions & 18 deletions EDSEditorGUI/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ You should have received a copy of the GNU General Public License
using System.Windows.Forms;
using System.IO;
using libEDSsharp;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
//using static System.Windows.Forms.VisualStyles.VisualStyleElement;
//using SourceGrid.Cells.Controllers;
//using ToolTip = System.Windows.Forms.ToolTip;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe remove the commented code?


namespace ODEditor
{
Expand Down Expand Up @@ -189,6 +191,12 @@ private void openEDSfile(string path,InfoSection.Filetype ft)
{
EDSsharp eds = new EDSsharp();

if (!File.Exists(path))
{
MessageBox.Show("File " +path + "\ndoes not exist.");
return;
}

eds.Loadfile(path);

DeviceView device = new DeviceView(eds, network);
Expand Down Expand Up @@ -327,6 +335,11 @@ private void openToolStripMenuItem_Click(object sender, EventArgs e)

private void openXDDfile(string path)
{
if (!File.Exists(path))
{
MessageBox.Show("File " + path + "\ndoes not exist.");
return;
}
try
{
EDSsharp eds;
Expand Down Expand Up @@ -449,13 +462,13 @@ private void Eds_onDataDirty(bool dirty, EDSsharp sender)
{
foreach(Control c in page.Controls)
{
if(c.GetType() == typeof(DeviceView))
if (c.GetType() == typeof(DeviceView))
{
DeviceView d = (DeviceView)c;
if (d.eds.Dirty == true)
{
page.BackColor = Color.Tomato;
}
}
else
{
page.BackColor = default(Color);
Expand Down Expand Up @@ -1329,34 +1342,52 @@ private void preferencesToolStripMenuItem_Click(object sender, EventArgs e)

private void tabControl1_MouseClick(object sender, MouseEventArgs e)
{
TabPage tp;
if (e.Button == MouseButtons.Right)
{
for (int i = 0; i <= tabControl1.TabCount - 1; i++)
{
if (tabControl1.GetTabRect(i).Contains(e.Location))
{
tp = tabControl1.TabPages[i];

DialogResult dialogResult = MessageBox.Show(tabControl1.TabPages[i].Text, "Close file?", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.Yes)
{

DeviceView device = (DeviceView)tabControl1.TabPages[i].Controls[0];

if (device.eds.Dirty == true)
{
if (MessageBox.Show("All unsaved changes will be lost\n continue?", "Unsaved changes", MessageBoxButtons.YesNo) == DialogResult.No)
return;
}

network.Remove(device.eds);

tabControl1.TabPages.Remove(tabControl1.TabPages[i]);
DeviceView device = (DeviceView)tabControl1.TabPages[i].Controls[0];
if (device.eds.Dirty == true)
{
if (MessageBox.Show("All unsaved changes will be lost\n continue?", "Unsaved changes", MessageBoxButtons.YesNo) == DialogResult.No)
return;
}
network.Remove(device.eds);
tabControl1.TabPages.Remove(tabControl1.TabPages[i]);
}
}
}
}
}
private void tabControl1_MouseHover(object sender, EventArgs e)
{

TabControl tabControl = sender as TabControl;
Point mousePosition = tabControl.PointToClient(Cursor.Position);
for (int i = 0; i < tabControl.TabCount; i++)
{
Rectangle tabRect = tabControl.GetTabRect(i);
if (tabRect.Contains(mousePosition))
{
ToolTip toolTip = new ToolTip();
// Set up the delays for the ToolTip.

toolTip.AutoPopDelay = 5000;
toolTip.InitialDelay = 1000;
toolTip.ReshowDelay = 500;
// Force the ToolTip text to be displayed whether or not the form is active.
toolTip.ShowAlways = true;
DeviceView device = (DeviceView)tabControl1.TabPages[i].Controls[0];
toolTip.SetToolTip(tabControl, device.eds.projectFilename);
break;
}
}
}

}
}
2 changes: 1 addition & 1 deletion EDSEditorGUI/Form1.resx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
gqUTTxJHNd2gfCHts8Z5i7NeLLN6n/yF4ayxvMR1qkHEsYBFyBChoowNFOEgRrtBio0knUst/AOeXyaX
Sq4NMHLMowQdiucH/4Pfs7VzE+N+UlgC2l9c92MYCO0CtYrrfh+7bu0ECD4DV0bDX6oC05+kVxpa9Ajo
2QYurhuaugdc7gD9T6ZiKZ4UpBJyOeD9jL4pA/TeAp2r/tzq5zh9AFI0q8QNcHAIjOQpe63Fuzua5/bn
HW9+kH4AMgFyjcd8GS4AAAAJcEhZcwAACw4AAAsOAUC+4UEAAAAHdElNRQfkCwILIglO4xvLAAAAD3RF
HW9+kH4AMgFyjcd8GS4AAAAJcEhZcwAACwwAAAsMAT9AIsgAAAAHdElNRQfkCwILIglO4xvLAAAAD3RF
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a little help with the changes here :D

WHRDb21tZW50AENBTm9wZW7cllV1AAAC8UlEQVRYR9WWz2sTQRTHkx6SQy5RxFv1JDGHogiVIkqFEqLE
QigetKY3iSUpPYh/gD8uoQiJIEKJ0UNNRZKjTaQiHozePAk21eagCC20NdW1plTa8X3f7mw3cZNuzSr6
hQ+8zn6/M29nZts6/hWdIu4T4xZJE2cJ23QvGAyKRCJhCXgp80CN2qNxTAyVP5QZZVXhn6H5mRlGCl5k
Expand Down
9 changes: 7 additions & 2 deletions libEDSsharp/CanOpenEDS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
{
public partial class InfoSection
{
public virtual void Parse(Dictionary<string, string> section, string sectionname)

Check warning on line 31 in libEDSsharp/CanOpenEDS.cs

View workflow job for this annotation

GitHub Actions / build (net481, Release)

Missing XML comment for publicly visible type or member 'InfoSection.Parse(Dictionary<string, string>, string)'
{
this.section = section;

Expand Down Expand Up @@ -84,9 +84,9 @@
}
}

public partial class MandatoryObjects : SupportedObjects

Check warning on line 87 in libEDSsharp/CanOpenEDS.cs

View workflow job for this annotation

GitHub Actions / build (net481, Release)

Missing XML comment for publicly visible type or member 'MandatoryObjects'
{
public MandatoryObjects(Dictionary<string, string> section)

Check warning on line 89 in libEDSsharp/CanOpenEDS.cs

View workflow job for this annotation

GitHub Actions / build (net481, Release)

Missing XML comment for publicly visible type or member 'MandatoryObjects.MandatoryObjects(Dictionary<string, string>)'
: this()
{
Parse(section);
Expand Down Expand Up @@ -825,8 +825,13 @@
int lineno = 1;
foreach (string linex in System.IO.File.ReadLines(filename))
{
Parseline(linex, lineno);
lineno++;
try
{
Parseline(linex, lineno);
lineno++;
}
catch (Exception) { Warnings.warning_list.Add("Failed to open file \n" + filename);}

}

di = new DeviceInfo(eds["DeviceInfo"]);
Expand Down
10 changes: 9 additions & 1 deletion libEDSsharp/CanOpenXDD_1_1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,16 @@ public EDSsharp ReadXML(string file)
dev = (ISO15745ProfileContainer)serializer.Deserialize(reader);
reader.Close();
}
catch (Exception)
catch (Exception e)
{
if (e is System.InvalidOperationException)
{
Warnings.warning_list.Add(String.Format("{0} {1} Action aborted!", e.Message, e.InnerException.Message));
}
else
{
Warnings.warning_list.Add(String.Format("{0} Action aborted!", e.ToString()));
}
return null;
}

Expand Down
Loading