Esempio n. 1
0
        public static Ceil Create(Color background)
        {
            var ceil = new Ceil();

            ceil.BorderBrush     = new SolidColorBrush(Colors.White);
            ceil.BorderThickness = new Thickness(PlayGrid.ThicknessBetweenWidth);
            ceil.Child           = new StackPanel
            {
                Width      = PlayGrid.CeilSize,
                Height     = PlayGrid.CeilSize,
                Background = new SolidColorBrush(background)
            };

            return(ceil);
        }
Esempio n. 2
0
        public Ceil Clone()
        {
            var ceil       = new Ceil();
            var stackPanel = (StackPanel)Child;

            ceil.Column          = Column;
            ceil.Row             = Row;
            ceil.BorderBrush     = BorderBrush.Clone();
            ceil.BorderThickness = BorderThickness;
            ceil.Child           = new StackPanel
            {
                Width      = stackPanel.Width,
                Height     = stackPanel.Height,
                Background = stackPanel.Background.Clone()
            };

            return(ceil);
        }
Esempio n. 3
0
 public bool IsInNextColumn(Ceil ceil)
 {
     return(ceil.Column == Column + 1);
 }
Esempio n. 4
0
 public bool IsInSameColumn(Ceil ceil)
 {
     return(ceil.Column == Column);
 }
Esempio n. 5
0
 public bool IsInPrevColumn(Ceil ceil)
 {
     return(ceil.Column == Column - 1);
 }
Esempio n. 6
0
 public bool IsOnNextRow(Ceil ceil)
 {
     return(ceil.Row == Row + 1);
 }
Esempio n. 7
0
 public bool IsOnSameRow(Ceil ceil)
 {
     return(ceil.Row == Row);
 }
Esempio n. 8
0
 public bool IsOnPrevRow(Ceil ceil)
 {
     return(ceil.Row == Row - 1);
 }