Open a .chi file which contains a component with s time horizon starting before 1753, e.g.:
<argument key="FluidEarth2.Sdk.BaseComponentTimeWithEngine.TimeHorizon" value="Closed^-100000.0^56813.4898263889" readonly="false"></argument>
Click on the component properties then click on the Time Horizon button. An exception is logged:
<exception type="System.ArgumentOutOfRangeException" time="2014-07-21 10:25:02Z" message="Value of '01/02/1585 00:00:00' is not valid for 'Value'. 'Value' should be between 'MinDate' and 'MaxDate'.
Parameter name: Value" target="Void set_Value(System.DateTime)" source="System.Windows.Forms"><![CDATA[ at System.Windows.Forms.DateTimePicker.set_Value(DateTime value)
at FluidEarth2.Pipistrelle.ArgumentTypes.TimeForm.set_StartTimeLocal(DateTime value) in c:\Source\FluidEarth2_Pipistrelle_ArgumentTypes\TimeForm.cs:line 37
at FluidEarth2.Pipistrelle.ArgumentTypes.TimeForm.Initialise(Time time) in c:\Source\FluidEarth2_Pipistrelle_ArgumentTypes\TimeForm.cs:line 195</exception>
MinDate is DateTimePicker.MinDate which defaults to 1/1/1753 at 00:00:00.
A related problem is that if the component has a start time year value 1753 or later, attempts to edit the year number to an earlier value are silently ignored.
Anonymous
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I think this is an innate problem of using DateTimePicker (or rather the inbuild DateTime class) as the basis of all dates in FluidEarth (see http://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.mindate(v=vs.110).aspx)
Is this problem not just related to the display and editing of dates - i.e. it is a DateTimePicker problem only - and can be worked-around by setting a suitably early value for the MinDate property in the code?
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
No – it seems to be an inherent limitation of the C# DateTime class
From: John Barnes [mailto:johnbarnes4@users.sf.net]
Sent: Monday, August 04, 2014 2:55 PM
To: [fluidearth:bugs]
Subject: [fluidearth:bugs] #64 Pipistrelle does not support editing of dates before 1753
Is this problem not just related to the display and editing of dates - i.e. it is a DateTimePicker problem only - and can be worked-around by setting a suitably early value for the MinDate property in the code?
[bugs:#64]http://sourceforge.net/p/fluidearth/bugs/64 Pipistrelle does not support editing of dates before 1753
Status: open
Group: Pipistrelle 2.1
Created: Mon Jul 21, 2014 09:33 AM UTC by John Barnes
Last Updated: Fri Aug 01, 2014 09:18 AM UTC
Owner: nobody
Open a .chi file which contains a component with s time horizon starting before 1753, e.g.:
<argument key="FluidEarth2.Sdk.BaseComponentTimeWithEngine.TimeHorizon" value="Closed^-100000.0^56813.4898263889" readonly="false"></argument>
Click on the component properties then click on the Time Horizon button. An exception is logged:
<exception type="System.ArgumentOutOfRangeException" time="2014-07-21 10:25:02Z" message="Value of '01/02/1585 00:00:00' is not valid for 'Value'. 'Value' should be between 'MinDate' and 'MaxDate'. Parameter name: Value" target="Void set_Value(System.DateTime)" source="System.Windows.Forms"><![CDATA[ at System.Windows.Forms.DateTimePicker.set_Value(DateTime value)
at FluidEarth2.Pipistrelle.ArgumentTypes.TimeForm.set_StartTimeLocal(DateTime value) in c:\Source\FluidEarth2_Pipistrelle_ArgumentTypes\TimeForm.cs:line 37
at FluidEarth2.Pipistrelle.ArgumentTypes.TimeForm.Initialise(Time time) in c:\Source\FluidEarth2_Pipistrelle_ArgumentTypes\TimeForm.cs:line 195</exception>
MinDate is DateTimePicker.MinDate which defaults to 1/1/1753 at 00:00:00.
A related problem is that if the component has a start time year value 1753 or later, attempts to edit the year number to an earlier value are silently ignored.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/fluidearth/bugs/64/https://sourceforge.net/p/fluidearth/bugs/64
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/https://sourceforge.net/auth/subscriptions
This message has been scanned for viruses by MailControlhttp://www.mailcontrol.com/, a service from BlackSpider Technology
Click herehttps://www.mailcontrol.com/sr/kgzqy2R5HhrGX2PQPOmvUj!GOBh06pKKMIA1DMrXGXi29MLt8oVhY5Mo6Cl2EgPialPjxinsAkBzr!jqbv!p6A== to report this email as spam.
HR Wallingford and its subsidiaries uses faxes and emails for confidential and legally privileged business communications. They do not of themselves create legal commitments. Disclosure to parties other than addressees requires our specific consent. We are not liable for unauthorised disclosures nor reliance upon them.
If you have received this message in error please advise us immediately and destroy all copies of it.
HR Wallingford Limited
Howbery Park, Wallingford, Oxfordshire, OX10 8BA, United Kingdom
Registered in England No. 02562099
Related
Bugs: #64