Ejemplo n.º 1
0
        public TV()
        {
            ChannelSwitcher.TrySwitching(0);
            if (!(ChannelSwitcher is IParentalControl parentalControl))
            {
                throw new ApplicationException("Parental control is expected to be integrated within Channel Switcher!");
            }

            parentalControl.Add(new List <Channel> {
                new Channel(41), new Channel(69), new Channel(111)
            });
            const string lastPassword = "******";

            parentalControl.Set(lastPassword);
        }
Ejemplo n.º 2
0
        public TV()
        {
            PictureSettings.Switch(new Sports());
            PictureSettings.SetBrightness(50);
            PictureSettings.SetSharpness(50);
            PictureSettings.SetContrast(50);

            ChannelSwitcher.TrySwitching(0);
            if (!(ChannelSwitcher is IParentalControl parentalControl))
            {
                throw new ApplicationException("Parental control is expected to be integrated within Channel Switcher!");
            }

            parentalControl.Add(new List <Channel> {
                new Channel(41), new Channel(69), new Channel(111)
            });
            const string lastPassword = "******";

            parentalControl.Set(lastPassword);
        }