From 8d7d8eaabc7aeb7c58e2566e6499836259a7497c Mon Sep 17 00:00:00 2001 From: Janco Kock Date: Mon, 2 Nov 2015 20:37:39 +0100 Subject: [PATCH 1/3] Some album art edits, bigger covers and current playing cover --- MusicPlayer/MusicPlayer/Main.cs | 3 + MusicPlayer/MusicPlayer/MainForm.Designer.cs | 63 ++++++++++++-------- MusicPlayer/MusicPlayer/MainForm.cs | 11 +++- MusicPlayer/MusicPlayer/Program.cs | 1 - 4 files changed, 50 insertions(+), 28 deletions(-) diff --git a/MusicPlayer/MusicPlayer/Main.cs b/MusicPlayer/MusicPlayer/Main.cs index d383a36..1896ffd 100644 --- a/MusicPlayer/MusicPlayer/Main.cs +++ b/MusicPlayer/MusicPlayer/Main.cs @@ -95,6 +95,9 @@ namespace MusicPlayer } action = () => { + imagelist.ImageSize = new System.Drawing.Size(64,64); + imagelist.ColorDepth = ColorDepth.Depth32Bit; + form.AlbumListView.View = View.LargeIcon; form.AlbumListView.LargeImageList = imagelist; foreach (ListViewItem item in form.AlbumListView.Items) { diff --git a/MusicPlayer/MusicPlayer/MainForm.Designer.cs b/MusicPlayer/MusicPlayer/MainForm.Designer.cs index c24dcf3..1544b4b 100644 --- a/MusicPlayer/MusicPlayer/MainForm.Designer.cs +++ b/MusicPlayer/MusicPlayer/MainForm.Designer.cs @@ -31,7 +31,7 @@ namespace MusicPlayer private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); this.SongsTableView = new System.Windows.Forms.DataGridView(); this.GenreListBox = new System.Windows.Forms.ListBox(); @@ -71,6 +71,8 @@ namespace MusicPlayer this.songsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.SearchSongsTextBox = new System.Windows.Forms.ToolStripTextBox(); this.SearchSongsButton = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); + this.AdvancedSearchButton = new System.Windows.Forms.ToolStripMenuItem(); this.serverToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.SelectServerJancoButton = new System.Windows.Forms.ToolStripMenuItem(); this.SelectServerYorickButton = new System.Windows.Forms.ToolStripMenuItem(); @@ -107,8 +109,7 @@ namespace MusicPlayer this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.NotifyMenuStripNextButton = new System.Windows.Forms.ToolStripMenuItem(); this.NotifyMenuStripPreviousButton = new System.Windows.Forms.ToolStripMenuItem(); - this.AdvancedSearchButton = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); ((System.ComponentModel.ISupportInitialize)(this.SongsTableView)).BeginInit(); this.MainPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).BeginInit(); @@ -119,6 +120,7 @@ namespace MusicPlayer this.ControlsPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.PositionTrackBar)).BeginInit(); this.NotifyMenuStrip.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // SongsTableView @@ -128,14 +130,14 @@ namespace MusicPlayer this.SongsTableView.AllowUserToResizeRows = false; this.SongsTableView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.SongsTableView.BackgroundColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.ControlLight; - dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.SongsTableView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.ControlLight; + dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.SongsTableView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.SongsTableView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.SongsTableView.Dock = System.Windows.Forms.DockStyle.Fill; this.SongsTableView.Location = new System.Drawing.Point(0, 0); @@ -442,7 +444,7 @@ namespace MusicPlayer this.SearchGenresTextBox, this.ClearGenreSearchButton}); this.SearchGenresToolStripLabel.Name = "SearchGenresToolStripLabel"; - this.SearchGenresToolStripLabel.Size = new System.Drawing.Size(152, 22); + this.SearchGenresToolStripLabel.Size = new System.Drawing.Size(127, 22); this.SearchGenresToolStripLabel.Text = "Genres"; // // SearchGenresTextBox @@ -465,7 +467,7 @@ namespace MusicPlayer this.SearchArtistsTextBox, this.ClearArtistSearchButton}); this.SearchArtistToolStripLabel.Name = "SearchArtistToolStripLabel"; - this.SearchArtistToolStripLabel.Size = new System.Drawing.Size(152, 22); + this.SearchArtistToolStripLabel.Size = new System.Drawing.Size(127, 22); this.SearchArtistToolStripLabel.Text = "Artists"; // // SearchArtistsTextBox @@ -488,7 +490,7 @@ namespace MusicPlayer this.SearchSongsTextBox, this.SearchSongsButton}); this.songsToolStripMenuItem.Name = "songsToolStripMenuItem"; - this.songsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.songsToolStripMenuItem.Size = new System.Drawing.Size(127, 22); this.songsToolStripMenuItem.Text = "Songs"; // // SearchSongsTextBox @@ -504,6 +506,18 @@ namespace MusicPlayer this.SearchSongsButton.Text = "Search"; this.SearchSongsButton.Click += new System.EventHandler(this.SearchSongsButton_Click); // + // toolStripSeparator7 + // + this.toolStripSeparator7.Name = "toolStripSeparator7"; + this.toolStripSeparator7.Size = new System.Drawing.Size(124, 6); + // + // AdvancedSearchButton + // + this.AdvancedSearchButton.Name = "AdvancedSearchButton"; + this.AdvancedSearchButton.Size = new System.Drawing.Size(127, 22); + this.AdvancedSearchButton.Text = "Advanced"; + this.AdvancedSearchButton.Click += new System.EventHandler(this.AdvancedSearchButton_Click); + // // serverToolStripMenuItem // this.serverToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -597,6 +611,7 @@ namespace MusicPlayer // ControlsPanel // this.ControlsPanel.BackColor = System.Drawing.SystemColors.GrayText; + this.ControlsPanel.Controls.Add(this.pictureBox1); this.ControlsPanel.Controls.Add(this.NextButton); this.ControlsPanel.Controls.Add(this.PreviousButton); this.ControlsPanel.Controls.Add(this.CurrentSongLabel); @@ -637,7 +652,7 @@ namespace MusicPlayer // CurrentSongLabel // this.CurrentSongLabel.AutoSize = true; - this.CurrentSongLabel.Location = new System.Drawing.Point(256, 56); + this.CurrentSongLabel.Location = new System.Drawing.Point(311, 56); this.CurrentSongLabel.Name = "CurrentSongLabel"; this.CurrentSongLabel.Size = new System.Drawing.Size(111, 13); this.CurrentSongLabel.TabIndex = 11; @@ -816,17 +831,13 @@ namespace MusicPlayer this.NotifyMenuStripPreviousButton.Text = "Previous"; this.NotifyMenuStripPreviousButton.Click += new System.EventHandler(this.NotifyMenuStripPreviousButton_Click); // - // AdvancedSearchButton + // pictureBox1 // - this.AdvancedSearchButton.Name = "AdvancedSearchButton"; - this.AdvancedSearchButton.Size = new System.Drawing.Size(152, 22); - this.AdvancedSearchButton.Text = "Advanced"; - this.AdvancedSearchButton.Click += new System.EventHandler(this.AdvancedSearchButton_Click); - // - // toolStripSeparator7 - // - this.toolStripSeparator7.Name = "toolStripSeparator7"; - this.toolStripSeparator7.Size = new System.Drawing.Size(149, 6); + this.pictureBox1.Location = new System.Drawing.Point(251, 26); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(54, 54); + this.pictureBox1.TabIndex = 14; + this.pictureBox1.TabStop = false; // // MainForm // @@ -856,6 +867,7 @@ namespace MusicPlayer this.ControlsPanel.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.PositionTrackBar)).EndInit(); this.NotifyMenuStrip.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -939,6 +951,7 @@ namespace MusicPlayer private System.Windows.Forms.ToolStripMenuItem SearchSongsButton; private System.Windows.Forms.ToolStripSeparator toolStripSeparator7; private System.Windows.Forms.ToolStripMenuItem AdvancedSearchButton; + private System.Windows.Forms.PictureBox pictureBox1; } } diff --git a/MusicPlayer/MusicPlayer/MainForm.cs b/MusicPlayer/MusicPlayer/MainForm.cs index 783ad21..c7d00fd 100644 --- a/MusicPlayer/MusicPlayer/MainForm.cs +++ b/MusicPlayer/MusicPlayer/MainForm.cs @@ -110,8 +110,15 @@ namespace MusicPlayer CurrentSongLabel.Text = "Currently playing: " + main.audio.CurrentSong.Name; } - //Buttons and context menu - if (main.audio.AState == AudioHandler.AudioState.PLAYING) + //image box + if (AlbumListView.LargeImageList != null && main.audio.CurrentSong != null) + { + //Console.WriteLine(AlbumListView.LargeImageList.Images["Get Wet"]); + pictureBox1.Image = AlbumListView.LargeImageList.Images[main.audio.CurrentSong.Album]; + } + + //Buttons and context menu + if (main.audio.AState == AudioHandler.AudioState.PLAYING) { PlayButton.Enabled = false; NotifyMenuStripPlayButton.Enabled = false; diff --git a/MusicPlayer/MusicPlayer/Program.cs b/MusicPlayer/MusicPlayer/Program.cs index 6e1e41d..8e238a2 100644 --- a/MusicPlayer/MusicPlayer/Program.cs +++ b/MusicPlayer/MusicPlayer/Program.cs @@ -17,7 +17,6 @@ namespace MusicPlayer Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); -// NetworkHandler nw = new NetworkHandler("http://jancokock.me"); NetworkHandler nw = new NetworkHandler("http://imegumii.nl"); APIHandler api = new APIHandler(nw); MainForm form = new MainForm(); From 292405cf4d842af4ce47afad22192afe7410317b Mon Sep 17 00:00:00 2001 From: Kenneth van Ewijk Date: Mon, 2 Nov 2015 21:15:24 +0100 Subject: [PATCH 2/3] Remove playlist and songs from playlist --- MusicPlayer/MusicPlayer/Playlist.cs | 16 ++++++++ MusicPlayer/MusicPlayer/PlaylistHandler.cs | 17 ++++++++ .../MusicPlayer/PlaylistMaker.Designer.cs | 33 ++++++++++++++- MusicPlayer/MusicPlayer/PlaylistMaker.cs | 40 ++++++++++++++++++- MusicPlayer/MusicPlayer/Song.cs | 24 +++++++++++ 5 files changed, 127 insertions(+), 3 deletions(-) diff --git a/MusicPlayer/MusicPlayer/Playlist.cs b/MusicPlayer/MusicPlayer/Playlist.cs index d009a98..a75fadc 100644 --- a/MusicPlayer/MusicPlayer/Playlist.cs +++ b/MusicPlayer/MusicPlayer/Playlist.cs @@ -71,5 +71,21 @@ namespace MusicPlayer stw.Flush(); } } + + public void Delete() + { + try { + System.IO.File.Move(basedir + name + ".txt", basedir + name + ".txt.old"); + } + catch(Exception) + { + //Already removed. + } + } + + internal void RemoveSong(Song s) + { + this.songs.Remove(s); + } } } \ No newline at end of file diff --git a/MusicPlayer/MusicPlayer/PlaylistHandler.cs b/MusicPlayer/MusicPlayer/PlaylistHandler.cs index 8b151a0..b6fbf90 100644 --- a/MusicPlayer/MusicPlayer/PlaylistHandler.cs +++ b/MusicPlayer/MusicPlayer/PlaylistHandler.cs @@ -20,6 +20,8 @@ namespace MusicPlayer public void Populate() { + playlists.Clear(); + try { Directory.GetFiles(basedir).ToList().ForEach(f => { @@ -63,5 +65,20 @@ namespace MusicPlayer } return currentPlaylists; } + + internal void RemovePlaylistByName(string name) + { + Playlist toRemove = null; + playlists.ForEach(p => + { + if (p.name == name) { toRemove = p; } + }); + + if(toRemove != null) + { + toRemove.Delete(); + playlists.Remove(toRemove); + } + } } } \ No newline at end of file diff --git a/MusicPlayer/MusicPlayer/PlaylistMaker.Designer.cs b/MusicPlayer/MusicPlayer/PlaylistMaker.Designer.cs index 5fa3ff3..dfffd4c 100644 --- a/MusicPlayer/MusicPlayer/PlaylistMaker.Designer.cs +++ b/MusicPlayer/MusicPlayer/PlaylistMaker.Designer.cs @@ -43,6 +43,8 @@ namespace MusicPlayer this.label4 = new System.Windows.Forms.Label(); this.FilterTextBox = new System.Windows.Forms.TextBox(); this.label5 = new System.Windows.Forms.Label(); + this.DeletePlaylistButton = new System.Windows.Forms.Button(); + this.DeleteSongsButton = new System.Windows.Forms.Button(); this.SuspendLayout(); // // PlaylistSelectBox @@ -87,6 +89,7 @@ namespace MusicPlayer this.PlaylistSongContainer.FormattingEnabled = true; this.PlaylistSongContainer.Location = new System.Drawing.Point(10, 319); this.PlaylistSongContainer.Name = "PlaylistSongContainer"; + this.PlaylistSongContainer.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; this.PlaylistSongContainer.Size = new System.Drawing.Size(306, 82); this.PlaylistSongContainer.TabIndex = 3; // @@ -123,7 +126,7 @@ namespace MusicPlayer // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(10, 80); + this.label2.Location = new System.Drawing.Point(8, 75); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(97, 13); this.label2.TabIndex = 7; @@ -133,7 +136,7 @@ namespace MusicPlayer // this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(7, 303); + this.label3.Location = new System.Drawing.Point(11, 297); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(82, 13); this.label3.TabIndex = 8; @@ -165,11 +168,35 @@ namespace MusicPlayer this.label5.TabIndex = 11; this.label5.Text = "Filter"; // + // DeletePlaylistButton + // + this.DeletePlaylistButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.DeletePlaylistButton.Location = new System.Drawing.Point(225, 70); + this.DeletePlaylistButton.Name = "DeletePlaylistButton"; + this.DeletePlaylistButton.Size = new System.Drawing.Size(92, 23); + this.DeletePlaylistButton.TabIndex = 12; + this.DeletePlaylistButton.Text = "Delete Playlist"; + this.DeletePlaylistButton.UseVisualStyleBackColor = true; + this.DeletePlaylistButton.Click += new System.EventHandler(this.DeletePlaylistButton_Click); + // + // DeleteSongsButton + // + this.DeleteSongsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.DeleteSongsButton.Location = new System.Drawing.Point(172, 292); + this.DeleteSongsButton.Name = "DeleteSongsButton"; + this.DeleteSongsButton.Size = new System.Drawing.Size(143, 23); + this.DeleteSongsButton.TabIndex = 13; + this.DeleteSongsButton.Text = "Delete Selected Songs"; + this.DeleteSongsButton.UseVisualStyleBackColor = true; + this.DeleteSongsButton.Click += new System.EventHandler(this.DeleteSongsButton_Click); + // // PlaylistMaker // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(334, 411); + this.Controls.Add(this.DeleteSongsButton); + this.Controls.Add(this.DeletePlaylistButton); this.Controls.Add(this.label5); this.Controls.Add(this.FilterTextBox); this.Controls.Add(this.label4); @@ -206,5 +233,7 @@ namespace MusicPlayer private Label label4; private TextBox FilterTextBox; private Label label5; + private Button DeletePlaylistButton; + private Button DeleteSongsButton; } } \ No newline at end of file diff --git a/MusicPlayer/MusicPlayer/PlaylistMaker.cs b/MusicPlayer/MusicPlayer/PlaylistMaker.cs index bd4a079..5267b6f 100644 --- a/MusicPlayer/MusicPlayer/PlaylistMaker.cs +++ b/MusicPlayer/MusicPlayer/PlaylistMaker.cs @@ -47,12 +47,17 @@ namespace MusicPlayer PlaylistSelectBox.SelectedIndex = PlaylistSelectBox.Items.Count - 1; else PlaylistSelectBox.SelectedIndex = selection; + PlaylistSongContainer.Items.Clear(); if (PlaylistSelectBox.SelectedItem != null) { - PlaylistSongContainer.Items.Clear(); allPlaylistSongs = pl.GetPlaylistByName(PlaylistSelectBox.SelectedItem.ToString()).GetSongs(); allPlaylistSongs.ForEach(s => PlaylistSongContainer.Items.Add(s.Name)); } + else + { + PlaylistSelectBox.SelectedIndex = -1; + PlaylistSelectBox.Text = ""; + } } public void Repopulate() @@ -145,5 +150,38 @@ namespace MusicPlayer PlaylistNewButton_Click(sender, new EventArgs()); } } + + private void DeletePlaylistButton_Click(object sender, EventArgs e) + { + if (PlaylistSelectBox.SelectedItem != null) + if (MessageBox.Show("Are you sure to delete " + PlaylistSelectBox.SelectedItem.ToString() + "?", "Confirm Delete!", MessageBoxButtons.YesNo) == DialogResult.Yes) + { + pl.RemovePlaylistByName(PlaylistSelectBox.SelectedItem.ToString()); + Repopulate(true); + } + } + + private void DeleteSongsButton_Click(object sender, EventArgs e) + { + if (PlaylistSelectBox.SelectedItem != null) + { + Playlist currentPlaylist = pl.GetPlaylistByName(PlaylistSelectBox.SelectedItem.ToString()); + foreach (string song in PlaylistSongSelector.SelectedItems) + { + for (int i = currentPlaylist.GetSongs().Count - 1; i > 0; i--) + { + Song s = currentPlaylist.GetSongs()[i]; + if (s.Name == song) + { + currentPlaylist.RemoveSong(s); + break; + } + } + } + currentPlaylist.WriteToFile(); + } + Thread.Sleep(10); + Repopulate(); + } } } diff --git a/MusicPlayer/MusicPlayer/Song.cs b/MusicPlayer/MusicPlayer/Song.cs index 59e87d4..10d6798 100644 --- a/MusicPlayer/MusicPlayer/Song.cs +++ b/MusicPlayer/MusicPlayer/Song.cs @@ -53,5 +53,29 @@ namespace MusicPlayer { return $"{this.SongID}|{this.Name}|{this.Album}|{this.Artist}|{this.Genre}|{this.Seconds}"; } + + public override bool Equals(System.Object obj) + { + // If parameter is null return false. + if (obj == null) + { + return false; + } + + // If parameter cannot be cast to Point return false. + Song s = obj as Song; + if ((System.Object)s == null) + { + return false; + } + + // Return true if the fields match: + return (s.Name == Name) && (s.SongID == SongID); + } + + public override int GetHashCode() + { + return int.Parse(this.SongID); + } } } From 0d0a92f33a4273273eddb6a6c2dc302e581c99fc Mon Sep 17 00:00:00 2001 From: Kenneth van Ewijk Date: Mon, 2 Nov 2015 21:27:33 +0100 Subject: [PATCH 3/3] Fix albumart interface --- MusicPlayer/MusicPlayer/MainForm.Designer.cs | 60 ++++++++++---------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/MusicPlayer/MusicPlayer/MainForm.Designer.cs b/MusicPlayer/MusicPlayer/MainForm.Designer.cs index 1544b4b..074ee58 100644 --- a/MusicPlayer/MusicPlayer/MainForm.Designer.cs +++ b/MusicPlayer/MusicPlayer/MainForm.Designer.cs @@ -31,7 +31,7 @@ namespace MusicPlayer private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); this.SongsTableView = new System.Windows.Forms.DataGridView(); this.GenreListBox = new System.Windows.Forms.ListBox(); @@ -86,6 +86,7 @@ namespace MusicPlayer this.RadioStationTextBox = new System.Windows.Forms.ToolStripTextBox(); this.SetRadioStationButton = new System.Windows.Forms.ToolStripMenuItem(); this.ControlsPanel = new System.Windows.Forms.Panel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.NextButton = new System.Windows.Forms.Button(); this.PreviousButton = new System.Windows.Forms.Button(); this.CurrentSongLabel = new System.Windows.Forms.Label(); @@ -109,7 +110,6 @@ namespace MusicPlayer this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.NotifyMenuStripNextButton = new System.Windows.Forms.ToolStripMenuItem(); this.NotifyMenuStripPreviousButton = new System.Windows.Forms.ToolStripMenuItem(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); ((System.ComponentModel.ISupportInitialize)(this.SongsTableView)).BeginInit(); this.MainPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).BeginInit(); @@ -118,9 +118,9 @@ namespace MusicPlayer this.SplitContainer.SuspendLayout(); this.MenuStrip.SuspendLayout(); this.ControlsPanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.PositionTrackBar)).BeginInit(); this.NotifyMenuStrip.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // SongsTableView @@ -130,14 +130,14 @@ namespace MusicPlayer this.SongsTableView.AllowUserToResizeRows = false; this.SongsTableView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.SongsTableView.BackgroundColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.ControlLight; - dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.SongsTableView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.ControlLight; + dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.SongsTableView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; this.SongsTableView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.SongsTableView.Dock = System.Windows.Forms.DockStyle.Fill; this.SongsTableView.Location = new System.Drawing.Point(0, 0); @@ -629,9 +629,19 @@ namespace MusicPlayer this.ControlsPanel.Size = new System.Drawing.Size(784, 83); this.ControlsPanel.TabIndex = 4; // + // pictureBox1 + // + this.pictureBox1.BackColor = System.Drawing.SystemColors.Control; + this.pictureBox1.Location = new System.Drawing.Point(5, 5); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(72, 72); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.TabIndex = 14; + this.pictureBox1.TabStop = false; + // // NextButton // - this.NextButton.Location = new System.Drawing.Point(214, 51); + this.NextButton.Location = new System.Drawing.Point(295, 54); this.NextButton.Name = "NextButton"; this.NextButton.Size = new System.Drawing.Size(31, 23); this.NextButton.TabIndex = 13; @@ -641,7 +651,7 @@ namespace MusicPlayer // // PreviousButton // - this.PreviousButton.Location = new System.Drawing.Point(177, 51); + this.PreviousButton.Location = new System.Drawing.Point(258, 54); this.PreviousButton.Name = "PreviousButton"; this.PreviousButton.Size = new System.Drawing.Size(31, 23); this.PreviousButton.TabIndex = 12; @@ -652,7 +662,7 @@ namespace MusicPlayer // CurrentSongLabel // this.CurrentSongLabel.AutoSize = true; - this.CurrentSongLabel.Location = new System.Drawing.Point(311, 56); + this.CurrentSongLabel.Location = new System.Drawing.Point(338, 59); this.CurrentSongLabel.Name = "CurrentSongLabel"; this.CurrentSongLabel.Size = new System.Drawing.Size(111, 13); this.CurrentSongLabel.TabIndex = 11; @@ -671,7 +681,7 @@ namespace MusicPlayer // LabelCurrentTime // this.LabelCurrentTime.AutoSize = true; - this.LabelCurrentTime.Location = new System.Drawing.Point(12, 26); + this.LabelCurrentTime.Location = new System.Drawing.Point(93, 29); this.LabelCurrentTime.Name = "LabelCurrentTime"; this.LabelCurrentTime.Size = new System.Drawing.Size(49, 13); this.LabelCurrentTime.TabIndex = 8; @@ -682,10 +692,10 @@ namespace MusicPlayer this.PositionTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.PositionTrackBar.Enabled = false; - this.PositionTrackBar.Location = new System.Drawing.Point(3, 3); + this.PositionTrackBar.Location = new System.Drawing.Point(83, 3); this.PositionTrackBar.Maximum = 1000; this.PositionTrackBar.Name = "PositionTrackBar"; - this.PositionTrackBar.Size = new System.Drawing.Size(778, 45); + this.PositionTrackBar.Size = new System.Drawing.Size(698, 45); this.PositionTrackBar.TabIndex = 7; this.PositionTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; this.PositionTrackBar.MouseDown += new System.Windows.Forms.MouseEventHandler(this.PositionTrackBar_MouseDown); @@ -711,7 +721,7 @@ namespace MusicPlayer // StopButton // this.StopButton.Enabled = false; - this.StopButton.Location = new System.Drawing.Point(122, 51); + this.StopButton.Location = new System.Drawing.Point(203, 54); this.StopButton.Name = "StopButton"; this.StopButton.Size = new System.Drawing.Size(49, 23); this.StopButton.TabIndex = 2; @@ -722,7 +732,7 @@ namespace MusicPlayer // PauseButton // this.PauseButton.Enabled = false; - this.PauseButton.Location = new System.Drawing.Point(67, 51); + this.PauseButton.Location = new System.Drawing.Point(148, 54); this.PauseButton.Name = "PauseButton"; this.PauseButton.Size = new System.Drawing.Size(49, 23); this.PauseButton.TabIndex = 1; @@ -732,7 +742,7 @@ namespace MusicPlayer // // PlayButton // - this.PlayButton.Location = new System.Drawing.Point(12, 51); + this.PlayButton.Location = new System.Drawing.Point(93, 54); this.PlayButton.Name = "PlayButton"; this.PlayButton.Size = new System.Drawing.Size(49, 23); this.PlayButton.TabIndex = 0; @@ -831,14 +841,6 @@ namespace MusicPlayer this.NotifyMenuStripPreviousButton.Text = "Previous"; this.NotifyMenuStripPreviousButton.Click += new System.EventHandler(this.NotifyMenuStripPreviousButton_Click); // - // pictureBox1 - // - this.pictureBox1.Location = new System.Drawing.Point(251, 26); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(54, 54); - this.pictureBox1.TabIndex = 14; - this.pictureBox1.TabStop = false; - // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -865,9 +867,9 @@ namespace MusicPlayer this.MenuStrip.PerformLayout(); this.ControlsPanel.ResumeLayout(false); this.ControlsPanel.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.PositionTrackBar)).EndInit(); this.NotifyMenuStrip.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); this.PerformLayout();