Exemple #1
0
 public void TurnOnOff(Enums.Hide Hide, bool Value)
 {
     if (Hide == Enums.Hide.Both)
     {
         Enable = Value;
     }
 }
        public void TurnOnOff(Enums.Hide Hide, bool Value)
        {
            switch (Hide)
            {
            case Enums.Hide.Both:
                if (!Value)
                {
                    Timer.IsEnabled = false;
                    for (int i = 0; i < SpectrumBarsLeft.Count; i++)
                    {
                        SpectrumBarsLeft[i].Value = SpectrumBarsRight[i].Value = 0;
                    }
                }

                break;

            case Enums.Hide.Left:
                if (Value)
                {
                    LeftSide = Visibility.Visible;
                }
                else
                {
                    LeftSide = Visibility.Hidden;
                }
                break;

            case Enums.Hide.Right:
                if (Value)
                {
                    RightSide = Visibility.Visible;
                }
                else
                {
                    RightSide = Visibility.Hidden;
                }
                break;

            case Enums.Hide.Close:
                Timer.IsEnabled = false;
                this.TryClose();
                break;
            }
        }