Ejemplo n.º 1
0
        public ActionResult Create([Bind(Include = "SerialId,Make,Model,CreationDate,PriceExBtw,BtwPercentage,MbSize,DisplayWidth,DisplayHeight")] VmMp3Player vmMp3Player)
        {
            if (ModelState.IsValid)
            {
                var device = new AudioDevice()
                {
                    Make          = vmMp3Player.Make,
                    Model         = vmMp3Player.Model,
                    PriceExBtw    = vmMp3Player.PriceExBtw,
                    BtwPercentage = (decimal)vmMp3Player.BtwPercentage,
                    CreationDate  = vmMp3Player.CreationDate,
                    SerialId      = vmMp3Player.SerialId
                };

                var player = new Mp3Player()
                {
                    AudioDevice = device
                };
                db.AudioDevice.Add(device);
                db.Mp3Player.Add(player);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(vmMp3Player));
        }
Ejemplo n.º 2
0
        public static List <Mp3Player> GetDefaultMp3Players()
        {
            List <Mp3Player> mp3Players = new List <Mp3Player>();
            Mp3Player        mp1        = new Mp3Player();

            mp1.MbSize        = 100;
            mp1.DisplayHeight = 10;
            mp1.DisplayWidth  = 10;
            Mp3Player mp2 = new Mp3Player();

            mp2.MbSize        = 200;
            mp2.DisplayHeight = 15;
            mp2.DisplayWidth  = 15;
            Mp3Player mp3 = new Mp3Player();

            mp3.MbSize        = 300;
            mp3.DisplayHeight = 15;
            mp3.DisplayWidth  = 15;
            Mp3Player mp4 = new Mp3Player();

            mp4.MbSize        = 400;
            mp4.DisplayHeight = 20;
            mp4.DisplayWidth  = 20;
            mp3Players.Add(mp1);
            mp3Players.Add(mp2);
            mp3Players.Add(mp3);
            mp3Players.Add(mp4);
            return(mp3Players);
        }
Ejemplo n.º 3
0
        protected void addCommonActions()
        {
            var l = new List <CharmAction>
            {
                new CharmAction("取消选择", "\xE10E", this.btn_cancel_selection_Click, isMultiSelect),
                new CharmAction("播放/暂停", "\xE102", this.btn_play_Click, (s) => {
                    string id = null;
                    var song  = SelectedSongs.FirstOrDefault();
                    if (song != null)
                    {
                        id = song.Id;
                    }
                    this.actions["播放/暂停"].Icon = Mp3Player.GetPlayOrPause(id) ? "\xE102":"\xE103";
                    return(true);
                }),
                new CharmAction("选中正在播放", "\xE18B", this.btn_select_nowplaying_Click, (s) => false),
                new CharmAction("下一首", "\xE101", this.btn_next_Click, (s) => false),
                new CharmAction("收藏", "\xE0A5", this.btn_fav_Click, canFav),
                new CharmAction("不再收藏", "\xE007", this.btn_unfav_Click, canUnfav),
                new CharmAction("查看专辑", "\xE1d2", link_album, IsOnlyType <IHasAlbum>),
                new CharmAction("查看艺术家", "\xe13d", link_artist, IsOnlyType <IHasArtist>),
                new CharmAction("查看精选集的歌曲", "\xE189", link_collection, IsOnlyType <CollectViewModel>),
                new CharmAction("查看艺术家的最受欢迎歌曲", "\xE189", link_artist, IsOnlyType <ArtistViewModel>),
                new CharmAction("查看艺术家的专辑", "\xE1d2", link_artist_album, IsOnlyType <ArtistViewModel>),
                new CharmAction("查看艺术家的相似艺人", "\xE125", link_similar_artist, IsOnlyType <ArtistViewModel>),
                new CharmAction("在浏览器中打开", "\xE12B", this.btn_browse_Click, IsOnlyType <MusicViewModel>),
            };

            foreach (var item in l)
            {
                actions[item.Label] = item;
            }
        }
Ejemplo n.º 4
0
        protected virtual void btn_play_Click(object sender, RoutedEventArgs e)
        {
            var item = SelectedSongs.FirstOrDefault() ?? Items.OfType <SongViewModel>().FirstOrDefault();

            if (item == null)
            {
                return;
            }
            var location = item.Song.DownloadState == "complete" ? item.Song.FilePath : item.Song.UrlMp3;

            if (string.IsNullOrEmpty(location))
            {
                return;
            }
            if (Mp3Player.GetPlayOrPause(item.Id))
            {
                if (!PlayList.Contains(item))
                {
                    PlayList.NeedsRefresh();
                    PlayList.Refresh(Items.OfType <SongViewModel>());
                }
                else if (isMultiSelect(this))
                {
                    PlayList.NeedsRefresh();
                    PlayList.Refresh(SelectedSongs);
                }
            }
            Mp3Player.Play(location, item.Id);
            ActionBarService.Refresh();
        }
        public ActionResult Create([Bind(Include = "SerialId,Make,Model,PriceExBtw,BtwPercentage,CreationDate,TracklistId,MbSize,DisplayWidth,DisplayHeight")] VMMp3Player vMMp3Player)
        {
            if (ModelState.IsValid)
            {
                var device = new AudioDevices.AudioDevice()
                {
                    Make          = vMMp3Player.Make,
                    Model         = vMMp3Player.Model,
                    CreationDate  = vMMp3Player.CreationDate,
                    PriceExBtw    = vMMp3Player.PriceExBtw,
                    BtwPrecentage = (decimal)vMMp3Player.BtwPercentage,
                    SerialId      = vMMp3Player.SerialId
                };

                var recorder = new Mp3Player()
                {
                    MbSize        = vMMp3Player.MbSize,
                    DisplayWidth  = vMMp3Player.DisplayWidth,
                    DisplayHeight = vMMp3Player.DisplayHeight,
                    TrackList     = vMMp3Player.TrackListId,
                    AudioDevice   = device
                };
                db.AudioDevice.Add(device);
                db.Mp3Player.Add(recorder);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            ViewBag.TracklistId = new SelectList(db.TrackList, "ID", "Name", vMMp3Player.TrackListId);
            return(View(vMMp3Player));
        }
Ejemplo n.º 6
0
 private void btnOn_Click(object sender, EventArgs e)
 {
     btnOn.Visible     = false;
     btnOff.Visible    = true;
     Systeminfo.Status = false;
     Status            = false;
     Mp3Player.Pause();
 }
Ejemplo n.º 7
0
        private void btnAritmetikCaldir_Click(object sender, EventArgs e)
        {
            List <int> sayilar    = new List <int>();
            List <int> uzunluklar = new List <int>();


            if (txtCaldirmaSirasi.Text.Replace("-", "").Length != txtOlcuSirasi.TextLength)
            {
                MessageBox.Show("verilen caldirma sirasiyle ölçü sayıları eşit olmalı"); return;
            }

            bool eksi_var = false;

            for (int i = 0; i < txtCaldirmaSirasi.TextLength; i++) // caldirma sirasi girildi
            {
                string gelen_karakter = txtCaldirmaSirasi.Text.Substring(i, 1);
                if (eksi_var) // eksi varsa sıradaki eleman -1 ile çarpılıp diziye eklenir, ve el pas geçilir
                {
                    int sayi_ = Convert.ToInt16(gelen_karakter) * -1;
                    sayilar.Add(sayi_);
                    eksi_var = false;
                    continue;
                }
                if (gelen_karakter == "-")
                {
                    eksi_var = true; // eksi varsa bool true yapılır, ilerde sayımızı eksi yaparız
                    continue;
                }
                //eksi yoksa, gelen karakter - değil ise, düz sayıdır, ekleriz.
                int sayi = Convert.ToInt16(gelen_karakter);
                sayilar.Add(sayi);
            }
            for (int i = 0; i < txtOlcuSirasi.TextLength; i++) // caldirilacak siraların ölçüleri girildi
            {
                int sayi = Convert.ToInt16(txtOlcuSirasi.Text.Substring(i, 1));
                if (sayi == 1)
                {
                    uzunluklar.Add(1000);
                }
                else if (sayi == 2)
                {
                    uzunluklar.Add(500);
                }
                else if (sayi == 4)
                {
                    uzunluklar.Add(250);
                }
                else if (sayi == 8)
                {
                    uzunluklar.Add(200);
                }
                else
                {
                    uzunluklar.Add(1000);
                }
            }
            Mp3Player.gamCal(gam, sayilar, uzunluklar);
        }
Ejemplo n.º 8
0
 private static void RaiseVolume(Mp3Player player)
 {
     for (int i = 0; i < 10; i++)
     {
         player.Volume += ((double)1 / 10);
         Thread.Sleep(150);
     }
     player.Volume = 1;
 }
Ejemplo n.º 9
0
 private static void LowerVolume(Mp3Player player, int max = 10, int sleepTime = 150)
 {
     player.Volume = 1;
     for (int i = 0; i < max; i++)
     {
         player.Volume -= ((double)1 / 10);
         Thread.Sleep(sleepTime);
     }
 }
Ejemplo n.º 10
0
        public void DisplayStorageCapacityTest()
        {
            Mp3Player Playertest1 = new Mp3Player();

            Playertest1.MbSize = 100;
            Assert.AreEqual("100 mB.", Playertest1.DisplayStorageCapacity());
            Mp3Player Playertest2 = new Mp3Player();

            Playertest2.MbSize = 0;
            Assert.AreEqual("Storage capacity unknown", Playertest2.DisplayStorageCapacity());
        }
Ejemplo n.º 11
0
        static void Main()
        {
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            IMP3Player     _MP3Player     = new Mp3Player();
            IMP3Controller _MP3Controller = new MP3Controller(_MP3Player);

            Application.Run(new FrmMP3Display(_MP3Player, _MP3Controller));
        }
Ejemplo n.º 12
0
        public FrmMusic()
        {
            this.DoubleBuffered = true;
            InitializeComponent();

            this.label1.Text = dir;
            this.dataGridView1.MouseWheel += DataGridView1_MouseWheel;

            this.Mp3Player    = new Mp3Player(this.Handle, this.pictureBox1);
            this.Music_Source = new Music_Source();
            this.Music_Source.OnMuicFinded += Music_Source_OnMuicFinded;
        }
Ejemplo n.º 13
0
        private void ListView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            ListView lv = sender as ListView;

            if (lv.SelectedItems.Count > 0)
            {
                fileName = "DataMedia/Music/" + lv.SelectedItems[0].Text;
                Mp3Player.Exit();
                Mp3Player.open(fileName);
                Mp3Player.Volume(trackBar.Value * 10);
                Mp3Player.play();
            }
        }
Ejemplo n.º 14
0
        public MainWindowViewModel(string access_token)
        {
            vkAPI = new VkAPI(VkAPI.BASE_URL, access_token);
            player = new Mp3Player();
            player.OnPlaybackEnded += Player_OnPlaybackEnded;
            player.OnPlaybackStateChanged += Player_OnPlaybackStateChanged;
            player.OnPlaybackPositionUpdated += PlayerOnPlaybackPositionUpdated;

            SearchResults = new Playlist("Search results");
            Queue = new Playlist("Queue");
            Favorites = new Playlist("Favorites");
            Playlists = new ObservableCollection<Playlist>();
        }
Ejemplo n.º 15
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     if (fileName != null)
     {
         DialogResult res = MessageBox.Show("Bạn có muốn xóa file " + fileName + " Không ?", "Thông Báo", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
         if (res == DialogResult.OK)
         {
             Mp3Player.Exit();
             File.Delete(fileName);
             LoadListview();
         }
     }
 }
Ejemplo n.º 16
0
        public void GetResolutionInfoTest()
        {
            Mp3Player Resolutiontest1 = new Mp3Player();

            Resolutiontest1.DisplayHeight = 5;
            Resolutiontest1.DisplayWidth  = 5;
            Assert.AreEqual("Resolution: 25 pixels", Resolutiontest1.GetResolutionInfo());
            Mp3Player Resolutiontest2 = new Mp3Player();

            Resolutiontest2.DisplayHeight = 10;
            Resolutiontest2.DisplayWidth  = 10;
            Assert.AreEqual("Resolution: 100 pixels", Resolutiontest2.GetResolutionInfo());
        }
Ejemplo n.º 17
0
        public MainWindowViewModel()
        {
            vkAPI = new VkAPI();
            albumArtProvider = new BingAlbumArtProvider();
            player = new Mp3Player();
            player.OnPlaybackEnded += Player_OnPlaybackEnded;
            player.OnPlaybackStateChanged += Player_OnPlaybackStateChanged;
            player.OnPlaybackPositionUpdated += PlayerOnPlaybackPositionUpdated;

            SearchResults = new Playlist("Search results");
            Queue = new Playlist("Queue");
            Favorites = new Playlist("Favorites");
            Playlists = new ObservableCollection<Playlist>();
        }
Ejemplo n.º 18
0
 private void Speek_OnExecute(string audioPath)
 {
     if (File.Exists(audioPath))
     {
         if (_mp3Player == null)
         {
             _mp3Player = new Mp3Player();
         }
         else
         {
             _mp3Player.Pause();
         }
         _mp3Player.FilePath = audioPath;
         _mp3Player.Play();
     }
 }
Ejemplo n.º 19
0
 private void OnAppbarPlayAndPauseClick(Object sender, EventArgs args)
 {
     if (!isPlayClicked)
     {
         Mp3Player.Play();
         appbarPlayAndPauseButton.IconUri = new Uri("Images/appbar.transport.pause.rest.png", UriKind.Relative);
         appbarPlayAndPauseButton.Text    = "Play";
         isPlayClicked = true;
     }
     else
     {
         Mp3Player.Pause();
         appbarPlayAndPauseButton.IconUri = new Uri("Images/appbar.transport.play.rest.png", UriKind.Relative);
         appbarPlayAndPauseButton.Text    = "Pause";
         isPlayClicked = false;
     }
 }
Ejemplo n.º 20
0
 public ActionResult Create(FormCollection collection)
 {
     try
     {
         Mp3Player player = new Mp3Player();
         player.MbSize        = int.Parse(collection["MbSize"]);
         player.DisplayHeight = int.Parse(collection["DisplayHeight"]);
         player.DisplayWidth  = int.Parse(collection["DisplayWidth"]);
         player.TotalPixels   = int.Parse(collection["TotalPixels"]);
         mp3Player.Add(player);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Ejemplo n.º 21
0
        private void setMp3Scope()
        {

            string root = Path.GetPathRoot(path);
            string indicator = @"C:\";


            if (root.Equals(indicator))
            {
                _mp3Player = new Mp3Player(path);
                _mp3Player.Repeat = true;
                local = true;
            }
            else
            {
                source = path;
                local = false;
            }
        }
Ejemplo n.º 22
0
        private void Form1_Load(object sender, EventArgs e)
        {
            Mp3Player mp3 = new Mp3Player();

            mp3.FileName = "ini/音乐.mp3";
            mp3.play();

            string desktop = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);

            CreateShortcut(desktop + @"\玄鸟刀剑2.lnk", "");


            //var request = (HttpWebRequest)WebRequest.Create("http://254595754.qzone.qq.com");


            //var response = (HttpWebResponse)request.GetResponse();
            //var responseString = new StreamReader(response.GetResponseStream()).ReadToEnd();
            //linkLabel1.Text = responseString.ToString();
        }
Ejemplo n.º 23
0
 private void Sound_Load(object sender, EventArgs e)
 {
     WinAPI.AnimateWindow(this.Handle, 300, WinAPI.Ver_positive);
     if (Systeminfo.Status == true)
     {
         btnOn.Visible  = true;
         btnOff.Visible = false;
         Status         = true;
     }
     else
     {
         btnOn.Visible  = false;
         btnOff.Visible = true;
     }
     LoadListview();
     if (Systeminfo.Volume != 0)
     {
         trackBar.Value = Systeminfo.Volume / 10;
     }
     else
     {
         Mp3Player.Volume(trackBar.Value * 10);
     }
 }
Ejemplo n.º 24
0
        public static void Main(string[] args)
        {
            // Opdracht 10 en 13. Dit is een voorbeeld over hoe je het kan doen.

            // lijst aanmaken
            List <Mp3Player> mp3Players = new List <Mp3Player>();

            // lijst vullen
            mp3Players = Mp3Player.Init();

            // stats, Linq manier
            int    total_players = mp3Players.Sum(m => m.stock);
            double total_value   = mp3Players.Sum(m => m.stock * m.price);
            double avarage_value = mp3Players.Average(m => m.price);

            // Om deze functie te gebruiken, moet je via NuGet (tool window) MoreLinq installeren en toevoegen
            // aan je project.
            Mp3Player bestPriceMb = mp3Players.MinBy(m => m.price / m.mbSize).First();

            Console.WriteLine($"Totaal aantal spelers op voorraad: {total_players}");
            Console.WriteLine($"Totale waarde van de voorraad: {total_value}");
            Console.WriteLine($"Gemiddelde prijs: {avarage_value}");
            Console.WriteLine($"Mp3 speler met de beste prijs per Mb: {bestPriceMb.id}: {bestPriceMb.make} - {bestPriceMb.model}");
        }
Ejemplo n.º 25
0
 public void PlayMix(string fileName)
 {
     _mp3Player = new Mp3Player(fileName);
     _mp3Player.Play();
 }
Ejemplo n.º 26
0
 private void trackBar_Scroll(object sender, ScrollEventArgs e)
 {
     Mp3Player.Volume(trackBar.Value * 10);
     Systeminfo.Volume = trackBar.Value * 10;
 }
Ejemplo n.º 27
0
        private void setMp3Scope()
        {
            //source = getPath();  --> La idea es obtener a partir de la estructura el path de la cancion seleccionada por el usuario.
            // string path = "https://nyportalvhds1vwfglv3fyfp.blob.core.windows.net/odysseycloudmusiclibrary/Skyjelly_-_09_-_Sixes_Are_Silent_Alternate_Version%20(1).mp3";
            //string path = "http://odysseycollection.blob.core.windows.net/odysseymusic/1bbe27bd-164f-4798-9e15-6f4fb2f4bbab/09 Eclipse.mp3";
             string path = @"C:\romanticas\ahora tu - malu(2).mp3";

            string root = System.IO.Path.GetPathRoot(path);
            string indicator = @"C:\";

            if (root.Equals(indicator))
            {
                _mp3Player = new Mp3Player(path);
                _mp3Player.Repeat = true;
                local = true;
            }
            else
            {
                source = path;
                local = false;
            }
        }
Ejemplo n.º 28
0
 public Form1()
 {
     InitializeComponent();
     mp3 = new Mp3Player();
 }
Ejemplo n.º 29
0
        private void buton_Click(object sender, EventArgs e)
        {
            Button tiklananButon = sender as Button;

            Mp3Player.notaCal((Nota)tiklananButon.Tag, 250);
        }
Ejemplo n.º 30
0
 public void StopMix()
 {
     _mp3Player?.Stop();
     _mp3Player = null;
 }
        static void Main(string[] args)
        {
            Track t1 = new Track(1, "Prince", "Guitar");

            t1.Length = new Time(4, 12);
            Track t2 = new Track(2, "Nelly Furtado", "Say it Right");

            t2.Length = new Time(4, 41);
            Track t3 = new Track(3, "David Guetta & Chris Willis", "Love is gone");

            t3.Length = new Time(3, 50);
            TrackList trackList = new TrackList();

            trackList.Add(t1);
            trackList.Add(t2);
            trackList.Add(t3);
            Console.WriteLine("Aantal tracks: {0}", trackList.Count);

            trackList.Remove(t3);
            Console.WriteLine("Aantal tracks: {0}", trackList.Count);

            trackList.Add(t3);
            Console.WriteLine("Totale tijd tracklist: {0}", trackList.TotalTime.ToString());
            Console.WriteLine();
            Console.WriteLine("Random lijst:");
            List <Track> shuffled = trackList.GetShuffledList();

            foreach (Track t in shuffled)
            {
                Console.WriteLine(t.Id + " " + t.DisplayName);
            }
            Console.ReadLine();

            MemoRecorder memo = new MemoRecorder(1000);

            memo.MaxCartridgeType = MemoCartridgeType.C90;
            memo.Make             = "Sony";
            memo.Model            = "FE190";
            memo.PriceExBtw       = 129.95M;
            memo.CreationDate     = DateTime.Now.AddMonths(-6);
            Console.WriteLine(memo.DisplayIdentity(true, true));
            Console.WriteLine(memo.DisplayStorageCapacity());
            Console.WriteLine("Consumer price: {0:f2}", memo.ConsumerPrice);
            Console.WriteLine(memo.GetDeviceLifeTime());
            Console.ReadLine();

            CdDiscMan discman = new CdDiscMan(1000);

            discman.Make          = "JVC";
            discman.Model         = "HG-410";
            discman.PriceExBtw    = 149.00M;
            discman.DisplayWidth  = 320;
            discman.DisplayHeight = 160;
            discman.CreationDate  = DateTime.Parse("12-2-2006");
            Console.WriteLine(discman.DisplayIdentity(true, true));
            Console.WriteLine("Opslag capacity {0}", discman.DisplayStorageCapacity());
            Console.WriteLine("Display resolution {0} pixels", discman.TotalPixels);
            Console.WriteLine(discman.GetResolutionInfo());
            Console.WriteLine("Consumer price: {0:f2}", discman.ConsumerPrice);
            Console.WriteLine(discman.GetDeviceLifeTime());
            Console.WriteLine("Eject status: {0}", discman.IsEjected);
            discman.Eject();
            Console.WriteLine("Eject status: {0}", discman.IsEjected);
            Console.ReadLine();

            Mp3Player player = new Mp3Player(1000);

            player.Make          = "Creative";
            player.Model         = "Alpha";
            player.PriceExBtw    = 99.00M;
            player.DisplayWidth  = 120;
            player.DisplayHeight = 80;
            player.CreationDate  = DateTime.Parse("1-1-2007");
            player.MbSize        = 1024;
            Track ta = new Track(1, "Prince", "Guitar");

            ta.Length = new Time(4, 12);
            Track tb = new Track(2, "Nelly Furtado", "Say it Right");

            tb.Length = new Time(4, 41);
            Track tc = new Track(3, "David Guetta & Chris Willis", "Love is gone");

            tc.Length = new Time(3, 50);
            TrackList trackLista = new TrackList();

            trackLista.Add(ta);
            trackLista.Add(tb);
            trackLista.Add(tc);

            player.AddTrackList(trackLista);
            Console.WriteLine(player.DisplayIdentity(true, true));
            Console.WriteLine("Capacity {0}", player.DisplayStorageCapacity());
            Console.WriteLine("Display resolution {0} pixels", player.TotalPixels);
            Console.WriteLine("Consumer price: {0:f2}", player.ConsumerPrice);
            Console.WriteLine(player.GetDeviceLifeTime());
            if (player.HasTracks())
            {
                Console.WriteLine("The TrackList of this player has {0} tracks",
                                  player.TrackList.Count);

                foreach (Track t in player.TrackList.GetAllTracks())
                {
                    Console.WriteLine(t.DisplayName);
                }

                player.RemoveTrackList();
                Console.WriteLine("The TrackList of this player has now {0} tracks",
                                  player.TrackList.Count);
            }
            Console.ReadLine();
        }
Ejemplo n.º 32
0
        static void Main(string[] args)
        {
            //opdracht 1
            //Track t1 = new Track(1, "Nelly Furtado", "Maneater");
            //t1.ALBUMSOURCE = "Loose";
            //t1.LENGTH = new Time(4, 31);
            //t1.STYLE = catogorie.Pop;

            //Console.WriteLine(t1.DISPLAYNAME);
            //Console.WriteLine(t1.DISPLAYLENGTH);
            //Console.WriteLine("Tijd in seconden: {0}", t1.GetLengthInSeconds());
            //Console.WriteLine("Category: {0}", t1.STYLE.ToString());
            //Console.ReadLine();



            //opdracht 2
            //Track t1 = new Track(1, "Prince", "Guitar");
            //t1.LENGTH = new Time(4, 12);

            //Track t2 = new Track(2, "Nelly Furtado", "Say it Right");
            //t2.LENGTH = new Time(4, 41);

            //Track t3 = new Track(3, "David Guetta & Chris Willis", "Love is gone");
            //t3.LENGTH = new Time(3, 50);

            //TrackList trackList = new TrackList();
            //trackList.Addthatshit(t1);
            //trackList.Addthatshit(t2);
            //trackList.Addthatshit(t3);
            //Console.WriteLine("Aantal tracks: {0}", trackList.countthatshit);

            //trackList.Removethatshit(t3);
            //Console.WriteLine("Aantal tracks: {0}", trackList.countthatshit);

            //trackList.Addthatshit(t3);
            //Console.WriteLine("Totale tijd tracklist: {0}", trackList.totaltime);

            //Console.WriteLine();
            //Console.WriteLine("Random lijst:");
            //List<Track> shuffled = trackList.shufflethatshit();
            //foreach (Track t in shuffled)
            //    Console.WriteLine(t.ID + " " + t.DISPLAYNAME);

            //Console.ReadLine();



            //opdracht 3?/4
            //MemoRecorder memo = new MemoRecorder(1000);
            //memo.MaxCartridgeType = MaxCartridgeType.C90;
            //memo.MAKE = "Sony";
            //memo.MODEL = "FE190";
            //memo.PRICEEXBTW = 129.95M;
            //memo.CREATIONDATE = DateTime.Now.AddMonths(-6);

            //Console.WriteLine(memo.DisplayIdentity(true, true));
            //Console.WriteLine(memo.DisplayStorageCapacity());
            //Console.WriteLine("Consumer price: {0:f2}", memo.CONSUMERPRICE);
            //Console.WriteLine(memo.GetDeviceLifeTime());
            //Console.ReadLine();



            //opdracht 5
            //CdDiscMan discman = new CdDiscMan(1000);
            //discman.MAKE = "JVC";
            //discman.MODEL = "HG-410";
            //discman.PRICEEXBTW = 149.00M;
            //discman.DisplayWidth = 320;
            //discman.DisplayHeight = 160;
            //discman.CREATIONDATE = DateTime.Parse("12-2-2006");

            //Console.WriteLine(discman.DisplayIdentity(true, true));
            //Console.WriteLine("Opslag capacity {0}", discman.DisplayStorageCapacity());
            //Console.WriteLine("Display resolution {0} pixels", discman.TotalPixels);
            //Console.WriteLine(discman.GetResolutionInfo());
            //Console.WriteLine("Consumer price: {0:f2}", discman.CONSUMERPRICE);
            //Console.WriteLine(discman.GetDeviceLifeTime());
            //Console.WriteLine("Eject status: {0}", discman.IsEjected);
            //discman.Eject();
            //Console.WriteLine("Eject status: {0}", discman.IsEjected);

            //Console.ReadLine();

            //opdracht 6
            Mp3Player player = new Mp3Player(1000);

            player.MAKE          = "Creative";
            player.MODEL         = "Alpha";
            player.PRICEEXBTW    = 99.00M;
            player.DisplayWidth  = 120;
            player.DisplayHeight = 80;
            player.CREATIONDATE  = DateTime.Parse("1-1-2007");
            player.MbSize        = 1024;

            Track t1 = new Track(1, "Prince", "Guitar");

            t1.LENGTH = new Time(4, 12);

            Track t2 = new Track(2, "Nelly Furtado", "Say it Right");

            t2.LENGTH = new Time(4, 41);

            Track t3 = new Track(3, "David Guetta & Chris Willis", "Love is gone");

            t3.LENGTH = new Time(3, 50);

            TrackList trackList = new TrackList();

            trackList.Addthatshit(t1);
            trackList.Addthatshit(t2);
            trackList.Addthatshit(t3);

            player.AddTrackList(trackList);

            Console.WriteLine(player.DisplayIdentity(true, true));
            Console.WriteLine("Capacity {0}", player.DisplayStorageCapacity());
            Console.WriteLine("Display resolution {0} pixels", player.TotalPixels);
            Console.WriteLine("Consumer price: {0:f2}", player.CONSUMERPRICE);
            Console.WriteLine(player.GetDeviceLifeTime());

            if (player.HasTracks())
            {
                Console.WriteLine("The TrackList of this player has {0} tracks", player.TrackList.countthatshit);

                player.TrackList.getthatshit();

                player.RemoveTrackList();
                Console.WriteLine("The TrackList of this player has now {0} tracks", player.TrackList.countthatshit);
            }
            Console.ReadLine();
        }