Inheritance: CountdownModelBase
コード例 #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
ファイル: Ship.cs プロジェクト: NeetSonic/IntelligentNavalGun
        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));
                }
            }
        }