Skip to content

Commit 6342e3c

Browse files
authored
Merge pull request #115 from PHOENIXCONTACT/fix/default-machine-location
Port #114 to MORYX 8
2 parents a39df2d + 24d3a26 commit 6342e3c

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

src/Moryx.Factory/MachineLocation.cs

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,55 +13,55 @@
1313

1414
namespace Moryx.Factory
1515
{
16-
/// <summary>
17-
/// Class for MachineLocation in the factory
18-
/// </summary>
19-
[ResourceRegistration]
20-
// TODO: ADD value
21-
[Display(Name = nameof(Strings.MACHINE_LOCATION), ResourceType = typeof(Localizations.Strings))]
22-
public class MachineLocation : Resource, IMachineLocation
23-
{
24-
public IResource Machine => Children.OfType<ICell>().FirstOrDefault();
16+
/// <summary>
17+
/// Class for MachineLocation in the factory
18+
/// </summary>
19+
[ResourceRegistration]
20+
// TODO: ADD value
21+
[Display(Name = nameof(Strings.MACHINE_LOCATION), ResourceType = typeof(Localizations.Strings))]
22+
public class MachineLocation : Resource, IMachineLocation
23+
{
24+
public IResource Machine => Children.OfType<ICell>().FirstOrDefault();
2525

26-
[DataMember, EntrySerialize]
27-
[Display(Name = nameof(Strings.SPECIFIC_ICON), ResourceType = typeof(Localizations.Strings))]
28-
public string SpecificIcon { get; set; }
26+
[DataMember, EntrySerialize]
27+
[Display(Name = nameof(Strings.SPECIFIC_ICON), ResourceType = typeof(Localizations.Strings))]
28+
public string SpecificIcon { get; set; }
2929

30-
[DataMember, EntrySerialize]
31-
[Display(Name = nameof(Strings.IMAGE), ResourceType = typeof(Localizations.Strings))]
32-
public string Image { get; set; }
30+
[DataMember, EntrySerialize]
31+
[Display(Name = nameof(Strings.IMAGE), ResourceType = typeof(Localizations.Strings))]
32+
public string Image { get; set; }
3333

34-
/// <summary>
35-
/// X position of the location
36-
/// </summary>
37-
[DataMember, EntrySerialize, DefaultValue(10)]
38-
[Display(Name = nameof(Strings.POSITION_X), ResourceType = typeof(Localizations.Strings))]
39-
public double PositionX { get; set; }
34+
/// <summary>
35+
/// X position of the location
36+
/// </summary>
37+
[DataMember, EntrySerialize, DefaultValue(0.5)]
38+
[Display(Name = nameof(Strings.POSITION_X), ResourceType = typeof(Localizations.Strings))]
39+
public double PositionX { get; set; }
4040

41-
/// <summary>
42-
/// Y position of the location
43-
/// </summary>
44-
[DataMember, EntrySerialize, DefaultValue(10)]
45-
[Display(Name = nameof(Strings.POSITION_Y), ResourceType = typeof(Localizations.Strings))]
46-
public double PositionY { get; set; }
41+
/// <summary>
42+
/// Y position of the location
43+
/// </summary>
44+
[DataMember, EntrySerialize, DefaultValue(0.5)]
45+
[Display(Name = nameof(Strings.POSITION_Y), ResourceType = typeof(Localizations.Strings))]
46+
public double PositionY { get; set; }
4747

48-
public Position Position
49-
{
50-
get => new() { PositionX = PositionX, PositionY = PositionY };
51-
set
52-
{
53-
PositionX = value.PositionX;
54-
PositionY = value.PositionY;
55-
}
56-
}
48+
public Position Position
49+
{
50+
get => new() { PositionX = PositionX, PositionY = PositionY };
51+
set
52+
{
53+
PositionX = value.PositionX;
54+
PositionY = value.PositionY;
55+
}
56+
}
5757

58-
[ResourceReference(ResourceRelationType.TransportRoute, ResourceReferenceRole.Source)]
59-
public IReferences<ITransportPath> Origins { get; set; }
58+
[ResourceReference(ResourceRelationType.TransportRoute, ResourceReferenceRole.Source)]
59+
public IReferences<ITransportPath> Origins { get; set; }
6060

61-
[ResourceReference(ResourceRelationType.TransportRoute, ResourceReferenceRole.Target)]
62-
public IReferences<ITransportPath> Destinations { get; set; }
61+
[ResourceReference(ResourceRelationType.TransportRoute, ResourceReferenceRole.Target)]
62+
public IReferences<ITransportPath> Destinations { get; set; }
6363

64-
IEnumerable<ITransportPath> ILocation.Origins => Origins;
65-
IEnumerable<ITransportPath> ILocation.Destinations => Destinations;
66-
}
67-
}
64+
IEnumerable<ITransportPath> ILocation.Origins => Origins;
65+
IEnumerable<ITransportPath> ILocation.Destinations => Destinations;
66+
}
67+
}

0 commit comments

Comments
 (0)