Exemplo n.º 1
0
        internal void ShowDotPlacement(int hCoord, int vCoord, PieceColor clr)
        {
            switch (GetDotNameFromIndices(hCoord, vCoord))
            {
            case "NWDot":
                NWDot.ShowDotPlacement(clr);
                break;

            case "NDot":
                NDot.ShowDotPlacement(clr);
                break;

            case "NEDot":
                NEDot.ShowDotPlacement(clr);
                break;

            case "WDot":
                WDot.ShowDotPlacement(clr);
                break;

            case "CenterDot":
                CenterDot.ShowDotPlacement(clr);
                break;

            case "EDot":
                EDot.ShowDotPlacement(clr);
                break;

            case "SWDot":
                SWDot.ShowDotPlacement(clr);
                break;

            case "SDot":
                SDot.ShowDotPlacement(clr);
                break;

            case "SEDot":
                SEDot.ShowDotPlacement(clr);
                break;

            case null:
                //  Debug.Assert(false, "Invalid dot name");
                break;
            }
        }
Exemplo n.º 2
0
        public void Reset()
        {
            ((DoubleAnimation)QuadrantRotation.Children[0]).From     = 0;
            ((DoubleAnimation)QuadrantRotation.Children[0]).To       = 0;
            ((DoubleAnimation)QuadrantRotation.Children[0]).Duration = new Duration(TimeSpan.FromSeconds(0.1));
            QuadrantRotation.ClearValue(Storyboard.BeginTimeProperty);
            QuadrantRotation.Begin();

            NWDot.Reset();
            NDot.Reset();
            NEDot.Reset();
            WDot.Reset();
            CenterDot.Reset();
            EDot.Reset();
            SWDot.Reset();
            SDot.Reset();
            SEDot.Reset();
        }
Exemplo n.º 3
0
        public void SetColorTheme(PentagoAg.WinPhone.ColorTheme theme)
        {
            if (theme == ColorTheme.Natural)
            {
                DisplayRect.Fill = (Brush)this.Resources["NaturalFill"];
            }
            else if (theme == ColorTheme.Red)
            {
                DisplayRect.Fill = (Brush)this.Resources["RedFill"];
            }

            NWDot.SetColorTheme(theme);
            NDot.SetColorTheme(theme);
            NEDot.SetColorTheme(theme);
            WDot.SetColorTheme(theme);
            CenterDot.SetColorTheme(theme);
            EDot.SetColorTheme(theme);
            SWDot.SetColorTheme(theme);
            SDot.SetColorTheme(theme);
            SEDot.SetColorTheme(theme);
        }