/// <summary>
        /// sets the selected side
        /// </summary>
        /// <param name="side"></param>
        void SetSelectedSide(Side side)
        {
            if (side is Fryceritops fry)
            {
                Fryceritops.Background = new SolidColorBrush(Colors.LightBlue);
                Triceritots.ClearValue(Button.BackgroundProperty);
                MeteorMacAndCheese.ClearValue(Button.BackgroundProperty);
                MezzorellaSticks.ClearValue(Button.BackgroundProperty);
            }
            else if (side is Triceritots tots)
            {
                Fryceritops.ClearValue(Button.BackgroundProperty);
                Triceritots.Background = new SolidColorBrush(Colors.LightBlue);
                MeteorMacAndCheese.ClearValue(Button.BackgroundProperty);
                MezzorellaSticks.ClearValue(Button.BackgroundProperty);
            }
            else if (side is MeteorMacAndCheese mac)
            {
                Fryceritops.ClearValue(Button.BackgroundProperty);
                Triceritots.ClearValue(Button.BackgroundProperty);
                MeteorMacAndCheese.Background = new SolidColorBrush(Colors.LightBlue);
                MezzorellaSticks.ClearValue(Button.BackgroundProperty);
            }
            else if (side is MezzorellaSticks sticks)
            {
                Fryceritops.ClearValue(Button.BackgroundProperty);
                Triceritots.ClearValue(Button.BackgroundProperty);
                MeteorMacAndCheese.ClearValue(Button.BackgroundProperty);
                MezzorellaSticks.Background = new SolidColorBrush(Colors.LightBlue);
            }

            switch (side.Size)
            {
            case DinoDiner.Menu.Size.Small:
                SmallButton.Background = new SolidColorBrush(Colors.LightBlue);
                MediumButton.ClearValue(Button.BackgroundProperty);
                LargeButton.ClearValue(Button.BackgroundProperty);
                break;

            case DinoDiner.Menu.Size.Medium:
                MediumButton.Background = new SolidColorBrush(Colors.LightBlue);
                SmallButton.ClearValue(Button.BackgroundProperty);
                LargeButton.ClearValue(Button.BackgroundProperty);
                break;

            case DinoDiner.Menu.Size.Large:
                LargeButton.Background = new SolidColorBrush(Colors.LightBlue);
                SmallButton.ClearValue(Button.BackgroundProperty);
                MediumButton.ClearValue(Button.BackgroundProperty);
                break;
            }
        }
Beispiel #2
0
    void Start()
    {
        SlowArrow   = SlowButton.GetComponent <Image> ();
        MediumArrow = MediumButton.GetComponent <Image> ();
        FastArrow   = FastButton.GetComponent <Image> ();

        if (OscarSpeed.Instance.Speed == OscarSpeed.Slow)
        {
            slowChanges();
        }
        else if (OscarSpeed.Instance.Speed == OscarSpeed.Medium)
        {
            mediumChanges();
        }
        else if (OscarSpeed.Instance.Speed == OscarSpeed.Fast)
        {
            fastChanges();
        }
    }
Beispiel #3
0
        /// <summary>
        /// sets combo size
        /// </summary>
        void SetSelectedSize()
        {
            switch (_combo.Size)
            {
            case DinoDiner.Menu.Size.Small:
                SmallButton.Background = new SolidColorBrush(Colors.LightBlue);
                MediumButton.ClearValue(Button.BackgroundProperty);
                LargeButton.ClearValue(Button.BackgroundProperty);
                break;

            case DinoDiner.Menu.Size.Medium:
                MediumButton.Background = new SolidColorBrush(Colors.LightBlue);
                SmallButton.ClearValue(Button.BackgroundProperty);
                LargeButton.ClearValue(Button.BackgroundProperty);
                break;

            case DinoDiner.Menu.Size.Large:
                LargeButton.Background = new SolidColorBrush(Colors.LightBlue);
                SmallButton.ClearValue(Button.BackgroundProperty);
                MediumButton.ClearValue(Button.BackgroundProperty);
                break;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (CleanAllButton != null)
            {
                CleanAllButton.Dispose();
                CleanAllButton = null;
            }

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

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

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

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

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

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

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

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

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