----- Frans Bouma [C# MVP] wrote: ----
Richard Abraham wrote
I have created a new class ServiceTimer based upon the .NE
System.Timers.T imer class. This has a new propert
CollectionInter valMinutes which I expected to be added to the 'Behavior
section of the class properties and also to be available as a 'Dynamic
property so that I could control it from the application config file. Th
new property is not shown, but the properties inherited from the base clas
are I cannot find any reference to how to do this in the help. I have trie
creating the new class as both a standard class and a component class How should I declare properties in the new class so that they are include
in 'Behavior' and ensure they are available as 'Dynamic' properties
It's perhaps wise to post your property's declaration, so we can see whic
attributes you have applied to the property
Also consider that VS.NET-related issues like the one you're having are mor
at home in the vs.net related newsgroups
F
--
Get LLBLGen Pro, the new O/R mapper for .NET:
http://www.llblgen.co
My .NET Blog:
http://weblogs.asp.net/fboum
Microsoft C# MV
Sorry, bit of a newbie here. Not sure which VS newsgroup would be appropriate
My C# code is below, hope that helps
=============== =============== =============== =============== =============== ==
using System
using System.Timers
using System.Componen tModel
namespace EA_Read_Event_L ogs_Servic
/// <summary
/// Summary description for ServiceTimer
/// </summary
public class ServiceTimer: System.Timers.T ime
public ServiceTimer(
/
// TODO: Add constructor logic her
/
public void ScheduleNext(
DateTime d1 = DateTime.Now
Enabled = true
Interval = (CollectionInte rval * 60 * 1000) -
((((d1.Hour * 60) + d1.Minute) * 60 + d1.Second) * 1000 + d1.Millisecond) % (CollectionInte rval * 60 * 1000)
/// <summary
/// Interval between log collections, maximum value one day, units are minute
/// </summary
public double CollectionInter valMinute
ge
return CollectionInter val
se
if ((value <= 60 * 24) & (value > 0)
CollectionInter val = value
els
throw new ArgumentOutOfRa ngeException("C ollectionInterv al", value, "Collection Interval must be less than 1440 (1 day) and greater than 0")
}
/// <summary
/// Minutes to wait between collection
/// </summary
private double CollectionInter val = 60