Example #1
0
        public MP3Display(IMP3Player player, IMP3Controller controller)
        {
            InitializeComponent();

            this.player     = player;
            this.controller = controller;

            // Display meldt zich aan als SongObserver en VolumeObserver
            this.player.AddObserver((ISongObserver)this);
            this.player.AddObserver((IVolumeObserver)this);
        }
        public FrmMP3Display(IMP3Player mP3Player, IMP3Controller mP3Controller)
        {
            InitializeComponent();

            _MP3Player     = mP3Player;
            _MP3Controller = mP3Controller;

            _MP3Player.AddObserver((ISongObserver)this);
            _MP3Player.AddObserver((IVolumeObserver)this);

            FrmVolumeDisplay frmVolumeDisplay = new FrmVolumeDisplay(_MP3Player);

            frmVolumeDisplay.Show();

            Update(1);
            Update(null);
        }