Exemple #1
0
        public Player()
        {
            InitializeComponent();

            MusicNameLbl.Text                   = string.Empty;
            VolLbl.Text                         = string.Empty;
            VolLbl.Text                         = VolBar.Value.ToString();
            imageList1.ImageSize                = new Size(100, 100);
            PlayingNowLbl.ForeColor             = Color.White;
            MinhasMusicasLbl.Enabled            = false;
            MinhasMusicasLbl.ForeColor          = Color.White;
            PlaylistListBox.ScrollAlwaysVisible = false;
            LibraryListBox.ScrollAlwaysVisible  = false;

            #region SetVolume

            string tempPath = Path.GetPathRoot(Environment.SystemDirectory) /*<- Retorna "C:\\"*/ + "Users\\" + Environment.UserName + "\\AppData\\Local\\Temp\\darkplayer.tmp";
            var    volume   = 100;

            try
            {
                volume = int.Parse(File.ReadAllText(tempPath));
            }
            catch (Exception)
            {
                volume = 100;
            }
            finally
            {
                VolBar.Value = volume;
                VolLbl.Text  = volume.ToString();
            }
            #endregion

            GetMusicFiles();
            GetArtists();
            GetAlbuns();

            MainLibPanel.BringToFront();
            MusicasSelectedLbl.Visible = true;
            _proc = Process.GetCurrentProcess();
        }
Exemple #2
0
 private void MinhasMusicasPanel_Click(object sender, EventArgs e)
 {
     MainLibPanel.BringToFront();
 }