Пример #1
0
        void ReleaseDesignerOutlets()
        {
            if (FirstCell != null)
            {
                FirstCell.Dispose();
                FirstCell = null;
            }

            if (SecondCell != null)
            {
                SecondCell.Dispose();
                SecondCell = null;
            }

            if (ThirdCell != null)
            {
                ThirdCell.Dispose();
                ThirdCell = null;
            }

            if (PlayIcon != null)
            {
                PlayIcon.Dispose();
                PlayIcon = null;
            }
        }
Пример #2
0
        public override void AwakeFromNib()
        {
            base.AwakeFromNib();

            FirstCell.MockSuggestion();
            SecondCell.MockSuggestion();
            ThirdCell.MockSuggestion();
        }
Пример #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var code = DeckNumber.GetHashCode() + FirstCell.GetHashCode() + Direction.GetHashCode() + base.GetHashCode();
         return(code);
     }
 }
Пример #4
0
        public bool Equals(IShip other)
        {
            if (ReferenceEquals(other, null))
            {
                return(ReferenceEquals(this, null));
            }

            return(DeckNumber.Equals(other.DeckNumber) &&
                   FirstCell.Equals(other.FirstCell) && Direction.Equals(other.Direction));
        }
Пример #5
0
 public TCell GetFirstCell <TCell> () where TCell : Cell
 => FirstCell as TCell ?? FirstCell?.GetNextCell <TCell> ();