Last change
on this file since 17530 was
17519,
checked in by dpiringe, 5 years ago
|
#3026:
- added error output for failed runner initialization
- reorganised some final view models
- TargetedJsonItemType (in JsonItemVMBase) now automatically returns the type of the defined JsonItem
- code cleanup
- refactored RegressionProblemDataConverter
- added lots of comments
- added new view for StringArrayJsonItem
- added new UI component for concrete restricted items and used it in JsonItemConcreteItemArrayControl and JsonItemValidValuesControl
|
File size:
668 bytes
|
Rev | Line | |
---|
[17446] | 1 | using System;
|
---|
[17477] | 2 | using Newtonsoft.Json.Linq;
|
---|
[17446] | 3 |
|
---|
| 4 | namespace HeuristicLab.JsonInterface {
|
---|
[17473] | 5 | public class DateTimeJsonItem : IntervalRestrictedValueJsonItem<DateTime> {
|
---|
[17477] | 6 |
|
---|
| 7 | public override JObject GenerateJObject() {
|
---|
| 8 | var obj = base.GenerateJObject();
|
---|
| 9 |
|
---|
| 10 | if (Minimum.CompareTo(DateTime.MinValue) == 0)
|
---|
| 11 | obj.Property("Minimum").Remove();
|
---|
| 12 |
|
---|
| 13 | if (Maximum.CompareTo(DateTime.MaxValue) == 0)
|
---|
| 14 | obj.Property("Maximum").Remove();
|
---|
| 15 |
|
---|
| 16 | return obj;
|
---|
| 17 | }
|
---|
| 18 |
|
---|
| 19 | public override void SetJObject(JObject jObject) {
|
---|
| 20 | Minimum = DateTime.MinValue;
|
---|
| 21 | Maximum = DateTime.MaxValue;
|
---|
| 22 | base.SetJObject(jObject);
|
---|
| 23 | }
|
---|
[17473] | 24 | }
|
---|
[17446] | 25 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.