Skip to content

Commit 61d7e37

Browse files
authored
Merge pull request #60 from michaelmenzi/inserting_target
Choose target file in inserting/cloning dialog
2 parents db77d81 + 45e1d41 commit 61d7e37

8 files changed

Lines changed: 2398 additions & 2248 deletions

EDSEditorGUI/DeviceODView.cs

Lines changed: 649 additions & 638 deletions
Large diffs are not rendered by default.

EDSEditorGUI/DeviceView.Designer.cs

Lines changed: 35 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

EDSEditorGUI/DeviceView.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License
1818
*/
1919

2020
using System;
21+
using System.Collections.Generic;
2122
using System.Windows.Forms;
2223
using libEDSsharp;
2324

@@ -27,13 +28,20 @@ public partial class DeviceView : MyTabUserControl
2728
{
2829

2930
readonly public EDSsharp eds;
31+
readonly private List<EDSsharp> network;
3032

31-
public DeviceView(EDSsharp eds_target)
33+
public event EventHandler<UpdateODViewEventArgs> UpdateODViewForEDS;
34+
35+
public DeviceView(EDSsharp eds_target, List<EDSsharp> network)
3236
{
3337
eds = eds_target;
38+
this.network = network;
3439

3540
InitializeComponent();
3641

42+
this.deviceODView1.network = network;
43+
this.deviceODView1.UpdateODViewForEDS += DeviceODView1_UpdateODView;
44+
3745
foreach (TabPage tp in tabControl1.TabPages)
3846
{
3947
foreach(Object o in tp.Controls)
@@ -54,6 +62,15 @@ public DeviceView(EDSsharp eds_target)
5462

5563
}
5664

65+
private void DeviceODView1_UpdateODView(object sender, UpdateODViewEventArgs e)
66+
{
67+
EventHandler<UpdateODViewEventArgs> handler = UpdateODViewForEDS;
68+
if(handler != null)
69+
{
70+
handler(this, e);
71+
}
72+
}
73+
5774
#region UpdateDispatchEvents
5875

5976
// This region handles update requests that are dispatched to the various user controls on the tabs

EDSEditorGUI/EDSEditorGUI.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@
152152
<Compile Include="TableLayoutDB.cs">
153153
<SubType>Component</SubType>
154154
</Compile>
155+
<Compile Include="UpdateODViewEventArgs.cs" />
155156
<Compile Include="Warnings.cs">
156157
<SubType>Form</SubType>
157158
</Compile>

0 commit comments

Comments
 (0)