1313
1414namespace 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