G
Guest
S Name Microsoft Windows XP Professional
Version 5.1.2600 Service Pack 2 Build 2600
Total Physical Memory 1,024.00 MB
MDE 2003 Version 7.1.3008
..NET Framework 1.1 Version 1.1.4322 SP1
Microsoft Visual C# .NET 69462-335-0000007-18707
Crystal Reports for Visual Studio .NET AAP50-GS0000S-WCK00C3
The code below shows the instantiation of multiple V47 objects. These
objects have several delegates that are fired by private V47 methods. These
private methods run on timers. In the code below, as well as instantiating
multilpe V47 objects I have instantiated an event handler
(V47.WTGDataRowReady_10) for each V47 object. Apperarently, one handler for
each V47 object. IS THIS THE CORRECT WAY TO DO THIS?
foreach ( DataRow TagNameRow in DSTagNames.Tables["TagNames"].Rows )
{
// only one row!
foreach ( DataRow ConfigRow in
DSWTG.Tables["TurbineConfiguration"].Rows )
{
switch ( ConfigRow["Turbine Type"].ToString())
{
case "V47":
// instantiate a new turbine
VestasWTG V47 = new VestasWTG( TagNameRow, ConfigRow);
// There are several other delegates instantiated that are
not shown
// 10 min datarow delegate
V47.WTGDataRowReady_10 += new
Trillium.WindSpace.VestasWTG.WTGDataRowReady10Delegate(WTGDataRowReady10Handler); break;
default: break;
}
}
}
Version 5.1.2600 Service Pack 2 Build 2600
Total Physical Memory 1,024.00 MB
MDE 2003 Version 7.1.3008
..NET Framework 1.1 Version 1.1.4322 SP1
Microsoft Visual C# .NET 69462-335-0000007-18707
Crystal Reports for Visual Studio .NET AAP50-GS0000S-WCK00C3
The code below shows the instantiation of multiple V47 objects. These
objects have several delegates that are fired by private V47 methods. These
private methods run on timers. In the code below, as well as instantiating
multilpe V47 objects I have instantiated an event handler
(V47.WTGDataRowReady_10) for each V47 object. Apperarently, one handler for
each V47 object. IS THIS THE CORRECT WAY TO DO THIS?
foreach ( DataRow TagNameRow in DSTagNames.Tables["TagNames"].Rows )
{
// only one row!
foreach ( DataRow ConfigRow in
DSWTG.Tables["TurbineConfiguration"].Rows )
{
switch ( ConfigRow["Turbine Type"].ToString())
{
case "V47":
// instantiate a new turbine
VestasWTG V47 = new VestasWTG( TagNameRow, ConfigRow);
// There are several other delegates instantiated that are
not shown
// 10 min datarow delegate
V47.WTGDataRowReady_10 += new
Trillium.WindSpace.VestasWTG.WTGDataRowReady10Delegate(WTGDataRowReady10Handler); break;
default: break;
}
}
}