示例#1
0
        internal void UpdateAnchorageRepairStatus(bool?rpRepairing)
        {
            if (rpRepairing.GetValueOrDefault())
            {
                State |= ShipState.RepairingInAnchorage;

                if (AnchorageRepairStatus == null)
                {
                    AnchorageRepairStatus = new ShipAnchorageRepairStatus(this);
                }
            }
            else
            {
                State &= ~ShipState.RepairingInAnchorage;

                AnchorageRepairStatus?.Dispose();
                AnchorageRepairStatus = null;
            }
        }
示例#2
0
        internal void UpdateAnchorageRepairStatus(bool rpRepairing)
        {
            if (rpRepairing)
            {
                State |= ShipState.RepairingInAnchorage;

                if (AnchorageRepairStatus == null)
                {
                    AnchorageRepairStatus = new ShipAnchorageRepairStatus(this);
                    OnPropertyChanged(nameof(AnchorageRepairStatus));
                }
            }
            else
            {
                State &= ~ShipState.RepairingInAnchorage;

                if (AnchorageRepairStatus != null)
                {
                    AnchorageRepairStatus.Dispose();
                    AnchorageRepairStatus = null;
                    OnPropertyChanged(nameof(AnchorageRepairStatus));
                }
            }
        }