diff --git a/MusicPlayer/MusicPlayer/APIHandler.cs b/MusicPlayer/MusicPlayer/APIHandler.cs index cc2dc1f..a6baa0e 100644 --- a/MusicPlayer/MusicPlayer/APIHandler.cs +++ b/MusicPlayer/MusicPlayer/APIHandler.cs @@ -13,10 +13,11 @@ namespace MusicPlayer public class APIHandler { private NetworkHandler nw; - + private Image defaultCover; public APIHandler(NetworkHandler nw) { this.nw = nw; + defaultCover = Image.FromStream(nw.downloadArtwork("default-cover.png")); } public string GetSongURLByID(string id) @@ -94,26 +95,26 @@ namespace MusicPlayer return artistlist; } + public Image getAlbumCover(string album) + { + MemoryStream stream = nw.downloadArtwork(album + ".jpg"); + if(stream != null) + { + return Image.FromStream(stream); + } + return defaultCover; + } + public List GetAlbums() { List albumlist = new List(); - return albumlist; - Image def = Image.FromStream(nw.downloadArtwork("default-cover.png")); JObject o = nw.SendString("getalbums?id=hallo"); if (o["result"].ToString() == "OK") { for (int i = 0; i < o["albums"].Count(); i++) { - MemoryStream stream = nw.downloadArtwork(o["albums"][i][0].ToString() + ".jpg"); - if (stream != null) { - albumlist.Add(new Album(o["albums"][i][0].ToString(), Image.FromStream(stream))); - stream.Close(); - } - else - { - albumlist.Add(new Album(o["albums"][i][0].ToString(), def)); - } + albumlist.Add(new Album(o["albums"][i][0].ToString())); } } diff --git a/MusicPlayer/MusicPlayer/Album.cs b/MusicPlayer/MusicPlayer/Album.cs index 4d0103e..e4d3329 100644 --- a/MusicPlayer/MusicPlayer/Album.cs +++ b/MusicPlayer/MusicPlayer/Album.cs @@ -6,12 +6,10 @@ namespace MusicPlayer public class Album { public string albumnaam { get; set; } - public Image cover; - public Album(string albumnaam, Image c) + public Album(string albumnaam) { this.albumnaam = albumnaam; - this.cover = c; } } } \ No newline at end of file diff --git a/MusicPlayer/MusicPlayer/Main.cs b/MusicPlayer/MusicPlayer/Main.cs index bcc0b90..6c2e833 100644 --- a/MusicPlayer/MusicPlayer/Main.cs +++ b/MusicPlayer/MusicPlayer/Main.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -16,8 +17,7 @@ namespace MusicPlayer public AudioHandler audio; public SongsTable table; - private ImageList imagelist; - + private List genres; private List artists; @@ -33,7 +33,6 @@ namespace MusicPlayer audio = new AudioHandler(this); table = new SongsTable(); - imagelist = new ImageList(); form.SongsTableView.DataSource = table; form.SongsTableView.Columns[5].Visible = false; @@ -45,13 +44,53 @@ namespace MusicPlayer Populate(); } + public void SwitchServer(string server) + { + Clear(); + nw.ip = server; + Populate(); + } + + private void Clear() + { + form.GenreListBox.Items.Clear(); + form.ArtistListBox.Items.Clear(); + form.AlbumListView.Items.Clear(); + form.PlaylistBox.Items.Clear(); + table.Clear(); + + genres = new List(); + artists = new List(); + + currentPlayingList = new List(); + } + private void Populate() { - form.AlbumListView.LargeImageList = imagelist; - this.api.GetAlbums().ForEach(a => { var item = form.AlbumListView.Items.Add(a.albumnaam); imagelist.Images.Add(a.albumnaam, a.cover); item.ImageKey = a.albumnaam;}); + this.api.GetAlbums().ForEach(a => { form.AlbumListView.Items.Add(a.albumnaam);}); this.api.GetArtists().ForEach(a => { artists.Add(a.naam); form.ArtistListBox.Items.Add(a.naam); }); this.api.GetGenres().ForEach(g => { genres.Add(g.name); form.GenreListBox.Items.Add(g.name); }); this.pl.GetPlaylists().ForEach(p => form.PlaylistBox.Items.Add(p.name)); + BackgroundWorker bw = new BackgroundWorker(); + bw.DoWork += new DoWorkEventHandler( + delegate (object o, DoWorkEventArgs args) + { + BackgroundWorker b = o as BackgroundWorker; + ImageList imagelist = new ImageList(); + foreach (ListViewItem item in form.AlbumListView.Items) + { + imagelist.Images.Add(item.ToString(), api.getAlbumCover(item.Text)); + } + Action action = () => { + form.AlbumListView.LargeImageList = imagelist; + foreach (ListViewItem item in form.AlbumListView.Items) + { + item.ImageKey = item.ToString(); + } + }; + form.Invoke(action); + }); + bw.RunWorkerAsync(); } public void Repopulate() diff --git a/MusicPlayer/MusicPlayer/MainForm.Designer.cs b/MusicPlayer/MusicPlayer/MainForm.Designer.cs index 6fc508d..0ca4874 100644 --- a/MusicPlayer/MusicPlayer/MainForm.Designer.cs +++ b/MusicPlayer/MusicPlayer/MainForm.Designer.cs @@ -40,10 +40,10 @@ namespace MusicPlayer this.MainPanel = new System.Windows.Forms.Panel(); this.SplitContainer = new System.Windows.Forms.SplitContainer(); this.PlaylistBox = new System.Windows.Forms.ListBox(); - this.PlaylistListLabel = new System.Windows.Forms.Label(); this.AlbumListLabel = new System.Windows.Forms.Label(); this.ArtistListLabel = new System.Windows.Forms.Label(); this.GenreListLabel = new System.Windows.Forms.Label(); + this.PlaylistListLabel = new System.Windows.Forms.Label(); this.MenuStrip = new System.Windows.Forms.MenuStrip(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); @@ -66,6 +66,9 @@ namespace MusicPlayer this.SearchArtistToolStripLabel = new System.Windows.Forms.ToolStripMenuItem(); this.SearchArtistsTextBox = new System.Windows.Forms.ToolStripTextBox(); this.ClearArtistSearchButton = 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(); this.ControlsPanel = new System.Windows.Forms.Panel(); this.NextButton = new System.Windows.Forms.Button(); this.PreviousButton = new System.Windows.Forms.Button(); @@ -129,6 +132,9 @@ namespace MusicPlayer this.SongsTableView.Size = new System.Drawing.Size(760, 174); this.SongsTableView.TabIndex = 0; this.SongsTableView.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.SongsTableView_CellDoubleClick); + this.SongsTableView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SongsTableView_MouseDown); + this.SongsTableView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.SongsTableView_MouseMove); + this.SongsTableView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.SongsTableView_MouseUp); // // GenreListBox // @@ -136,7 +142,7 @@ namespace MusicPlayer | System.Windows.Forms.AnchorStyles.Left))); this.GenreListBox.BackColor = System.Drawing.SystemColors.Control; this.GenreListBox.FormattingEnabled = true; - this.GenreListBox.Location = new System.Drawing.Point(3, 3); + this.GenreListBox.Location = new System.Drawing.Point(0, 0); this.GenreListBox.Name = "GenreListBox"; this.GenreListBox.Size = new System.Drawing.Size(150, 121); this.GenreListBox.Sorted = true; @@ -149,10 +155,10 @@ namespace MusicPlayer | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.AlbumListView.BackColor = System.Drawing.SystemColors.Control; - this.AlbumListView.Location = new System.Drawing.Point(309, 3); + this.AlbumListView.Location = new System.Drawing.Point(312, 0); this.AlbumListView.MultiSelect = false; this.AlbumListView.Name = "AlbumListView"; - this.AlbumListView.Size = new System.Drawing.Size(451, 121); + this.AlbumListView.Size = new System.Drawing.Size(448, 121); this.AlbumListView.Sorting = System.Windows.Forms.SortOrder.Ascending; this.AlbumListView.TabIndex = 2; this.AlbumListView.TileSize = new System.Drawing.Size(140, 30); @@ -166,7 +172,7 @@ namespace MusicPlayer | System.Windows.Forms.AnchorStyles.Left))); this.ArtistListBox.BackColor = System.Drawing.SystemColors.Control; this.ArtistListBox.FormattingEnabled = true; - this.ArtistListBox.Location = new System.Drawing.Point(156, 3); + this.ArtistListBox.Location = new System.Drawing.Point(156, 0); this.ArtistListBox.Name = "ArtistListBox"; this.ArtistListBox.Size = new System.Drawing.Size(150, 121); this.ArtistListBox.Sorted = true; @@ -180,10 +186,10 @@ namespace MusicPlayer | System.Windows.Forms.AnchorStyles.Right))); this.MainPanel.BackColor = System.Drawing.SystemColors.Window; this.MainPanel.Controls.Add(this.SplitContainer); - this.MainPanel.Controls.Add(this.PlaylistListLabel); this.MainPanel.Controls.Add(this.AlbumListLabel); this.MainPanel.Controls.Add(this.ArtistListLabel); this.MainPanel.Controls.Add(this.GenreListLabel); + this.MainPanel.Controls.Add(this.PlaylistListLabel); this.MainPanel.Location = new System.Drawing.Point(0, 24); this.MainPanel.Name = "MainPanel"; this.MainPanel.Size = new System.Drawing.Size(784, 351); @@ -215,6 +221,7 @@ namespace MusicPlayer // // PlaylistBox // + this.PlaylistBox.BackColor = System.Drawing.SystemColors.Control; this.PlaylistBox.Dock = System.Windows.Forms.DockStyle.Fill; this.PlaylistBox.FormattingEnabled = true; this.PlaylistBox.Location = new System.Drawing.Point(0, 0); @@ -224,20 +231,10 @@ namespace MusicPlayer this.PlaylistBox.Visible = false; this.PlaylistBox.SelectedIndexChanged += new System.EventHandler(this.PlaylistBox_SelectedIndexChanged); // - // PlaylistListLabel - // - this.PlaylistListLabel.AutoSize = true; - this.PlaylistListLabel.Location = new System.Drawing.Point(12, 8); - this.PlaylistListLabel.Name = "PlaylistListLabel"; - this.PlaylistListLabel.Size = new System.Drawing.Size(39, 13); - this.PlaylistListLabel.TabIndex = 7; - this.PlaylistListLabel.Text = "Playlist"; - this.PlaylistListLabel.Visible = false; - // // AlbumListLabel // this.AlbumListLabel.AutoSize = true; - this.AlbumListLabel.Location = new System.Drawing.Point(321, 9); + this.AlbumListLabel.Location = new System.Drawing.Point(321, 8); this.AlbumListLabel.Name = "AlbumListLabel"; this.AlbumListLabel.Size = new System.Drawing.Size(36, 13); this.AlbumListLabel.TabIndex = 6; @@ -246,7 +243,7 @@ namespace MusicPlayer // ArtistListLabel // this.ArtistListLabel.AutoSize = true; - this.ArtistListLabel.Location = new System.Drawing.Point(165, 9); + this.ArtistListLabel.Location = new System.Drawing.Point(165, 8); this.ArtistListLabel.Name = "ArtistListLabel"; this.ArtistListLabel.Size = new System.Drawing.Size(30, 13); this.ArtistListLabel.TabIndex = 5; @@ -255,12 +252,22 @@ namespace MusicPlayer // GenreListLabel // this.GenreListLabel.AutoSize = true; - this.GenreListLabel.Location = new System.Drawing.Point(12, 9); + this.GenreListLabel.Location = new System.Drawing.Point(9, 8); this.GenreListLabel.Name = "GenreListLabel"; this.GenreListLabel.Size = new System.Drawing.Size(36, 13); this.GenreListLabel.TabIndex = 4; this.GenreListLabel.Text = "Genre"; // + // PlaylistListLabel + // + this.PlaylistListLabel.AutoSize = true; + this.PlaylistListLabel.Location = new System.Drawing.Point(12, 9); + this.PlaylistListLabel.Name = "PlaylistListLabel"; + this.PlaylistListLabel.Size = new System.Drawing.Size(39, 13); + this.PlaylistListLabel.TabIndex = 7; + this.PlaylistListLabel.Text = "Playlist"; + this.PlaylistListLabel.Visible = false; + // // MenuStrip // this.MenuStrip.BackColor = System.Drawing.SystemColors.WindowFrame; @@ -269,7 +276,8 @@ namespace MusicPlayer this.viewToolStripMenuItem, this.playbackToolStripMenuItem, this.playlistToolStripMenuItem, - this.searchToolStripMenuItem}); + this.searchToolStripMenuItem, + this.serverToolStripMenuItem}); this.MenuStrip.Location = new System.Drawing.Point(0, 0); this.MenuStrip.Name = "MenuStrip"; this.MenuStrip.Size = new System.Drawing.Size(784, 24); @@ -440,6 +448,29 @@ namespace MusicPlayer this.ClearArtistSearchButton.Text = "Clear Search"; this.ClearArtistSearchButton.Click += new System.EventHandler(this.ClearArtistSearchButton_Click); // + // serverToolStripMenuItem + // + this.serverToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.SelectServerJancoButton, + this.SelectServerYorickButton}); + this.serverToolStripMenuItem.Name = "serverToolStripMenuItem"; + this.serverToolStripMenuItem.Size = new System.Drawing.Size(51, 20); + this.serverToolStripMenuItem.Text = "Server"; + // + // SelectServerJancoButton + // + this.SelectServerJancoButton.Name = "SelectServerJancoButton"; + this.SelectServerJancoButton.Size = new System.Drawing.Size(148, 22); + this.SelectServerJancoButton.Text = "jancokock.me"; + this.SelectServerJancoButton.Click += new System.EventHandler(this.SelectServerJancoButton_Click); + // + // SelectServerYorickButton + // + this.SelectServerYorickButton.Name = "SelectServerYorickButton"; + this.SelectServerYorickButton.Size = new System.Drawing.Size(148, 22); + this.SelectServerYorickButton.Text = "imegumii.nl"; + this.SelectServerYorickButton.Click += new System.EventHandler(this.SelectServerYorickButton_Click); + // // ControlsPanel // this.ControlsPanel.BackColor = System.Drawing.SystemColors.WindowFrame; @@ -754,6 +785,9 @@ namespace MusicPlayer private System.Windows.Forms.ToolStripMenuItem NotifyMenuStripPreviousButton; private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; private System.Windows.Forms.ToolStripMenuItem ViewCurrentPlaylistButton; + private System.Windows.Forms.ToolStripMenuItem serverToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem SelectServerJancoButton; + private System.Windows.Forms.ToolStripMenuItem SelectServerYorickButton; } } diff --git a/MusicPlayer/MusicPlayer/MainForm.cs b/MusicPlayer/MusicPlayer/MainForm.cs index 18679ea..e003ed0 100644 --- a/MusicPlayer/MusicPlayer/MainForm.cs +++ b/MusicPlayer/MusicPlayer/MainForm.cs @@ -19,6 +19,10 @@ namespace MusicPlayer public partial class MainForm : Form { bool songFinished; + bool draggedstarted = false; + bool draggedcompleted = false; + int startx = 0; + int starty = 0; public Main main { @@ -85,7 +89,7 @@ namespace MusicPlayer else PositionTrackBar.Enabled = false; if (!clicked) - PositionTrackBar.Value = main.audio.Position; + PositionTrackBar.Value = Math.Max(main.audio.Position, 0); //Buffer display BufferBar.Value = main.audio.Buffered / 10; @@ -99,7 +103,11 @@ namespace MusicPlayer if (main.audio.CurrentSong == null) CurrentSongLabel.Text = "Not playing any songs"; else + { + if (main.audio.CurrentSong.Seconds < 1) + PositionTrackBar.Enabled = false; CurrentSongLabel.Text = "Currently playing: " + main.audio.CurrentSong.Name; + } //Buttons and context menu if (main.audio.AState == AudioHandler.AudioState.PLAYING) @@ -118,6 +126,16 @@ namespace MusicPlayer NotifyMenuStripPlayingSongLabel.Visible = false; } + if (main.nw.ip == "http://jancokock.me") + SelectServerJancoButton.Enabled = false; + else + SelectServerJancoButton.Enabled = true; + + if (main.nw.ip == "http://imegumii.nl") + SelectServerYorickButton.Enabled = false; + else + SelectServerYorickButton.Enabled = true; + if (main.audio.AState == AudioHandler.AudioState.PAUSED) { PauseButton.Enabled = false; @@ -440,7 +458,69 @@ namespace MusicPlayer { main.FilterCurrentPlaying(); int selected = main.currentPlayingList.IndexOf(main.audio.CurrentSong); - SongsTableView.CurrentCell = SongsTableView.Rows[selected].Cells[0]; + if(main.currentPlayingList.Count >= 1) + SongsTableView.CurrentCell = SongsTableView.Rows[selected].Cells[0]; + } + + + private void SongsTableView_MouseDown(object sender, MouseEventArgs e) + { + draggedstarted = true; + draggedcompleted = false; + startx = e.X; + starty = e.Y; + } + + private void SongsTableView_MouseUp(object sender, MouseEventArgs e) + { + if (draggedcompleted) + { + Cursor.Current = Cursors.Default; + Point point = PlaylistBox.PointToClient(Cursor.Position); + int index = PlaylistBox.IndexFromPoint(point); + if (index < 0) //nope, niet op een playlist gesleept + { + draggedstarted = false; + draggedcompleted = false; + return; + } + Playlist currentPlaylist = main.pl.GetPlaylistByName(PlaylistBox.Items[index].ToString()); + SongsTable s = new SongsTable(); + if (SongsTableView.SelectedRows.Count > 0) + { + var drv = SongsTableView.SelectedRows[0].DataBoundItem as DataRowView; + var row = drv.Row as DataRow; + s.ImportRow(row); + currentPlaylist.AddSong((s.Rows[0][5] as Song)); + currentPlaylist.WriteToFile(); + } + } + + draggedcompleted = false; + draggedstarted = false; + } + + private void SongsTableView_MouseMove(object sender, MouseEventArgs e) + { + int deltax = Math.Abs(startx - e.X); + int deltay = Math.Abs(starty - e.Y); + + if ((deltax > 5 || deltay > 5) && draggedstarted && !draggedcompleted) + { + draggedcompleted = true; + playlistsToolStripMenuItem_Click(this, new EventArgs()); + Cursor.Current = Cursors.Hand; + } + } + + private void SelectServerJancoButton_Click(object sender, EventArgs e) + { + main.SwitchServer("http://jancokock.me"); + } + + private void SelectServerYorickButton_Click(object sender, EventArgs e) + { + main.SwitchServer("http://imegumii.nl"); } } } diff --git a/MusicPlayer/MusicPlayer/NetworkHandler.cs b/MusicPlayer/MusicPlayer/NetworkHandler.cs index f67ad32..70d8dbe 100644 --- a/MusicPlayer/MusicPlayer/NetworkHandler.cs +++ b/MusicPlayer/MusicPlayer/NetworkHandler.cs @@ -14,7 +14,7 @@ namespace MusicPlayer public class NetworkHandler { private int port = 8585; - private string ip; + public string ip { get; set; } public NetworkHandler(string ip) { diff --git a/MusicPlayer/MusicPlayer/PlaylistMaker.Designer.cs b/MusicPlayer/MusicPlayer/PlaylistMaker.Designer.cs index dd9d26f..5fa3ff3 100644 --- a/MusicPlayer/MusicPlayer/PlaylistMaker.Designer.cs +++ b/MusicPlayer/MusicPlayer/PlaylistMaker.Designer.cs @@ -109,6 +109,7 @@ namespace MusicPlayer this.PlaylistNewInputfield.Name = "PlaylistNewInputfield"; this.PlaylistNewInputfield.Size = new System.Drawing.Size(225, 20); this.PlaylistNewInputfield.TabIndex = 5; + this.PlaylistNewInputfield.KeyUp += new System.Windows.Forms.KeyEventHandler(this.PlaylistNewInputfield_KeyUp); // // label1 // diff --git a/MusicPlayer/MusicPlayer/PlaylistMaker.cs b/MusicPlayer/MusicPlayer/PlaylistMaker.cs index 176562e..bd4a079 100644 --- a/MusicPlayer/MusicPlayer/PlaylistMaker.cs +++ b/MusicPlayer/MusicPlayer/PlaylistMaker.cs @@ -120,7 +120,11 @@ namespace MusicPlayer private void PlaylistNewButton_Click(object sender, EventArgs e) { - pl.MakeNewPlaylistByName(PlaylistNewInputfield.Text); + string name = PlaylistNewInputfield.Text; + PlaylistNewInputfield.Text = ""; + name = name.Replace('/', '-'); + name = name.Replace('\\', '-'); + pl.MakeNewPlaylistByName(name); Repopulate(true); } @@ -133,5 +137,13 @@ namespace MusicPlayer { SearchAllSongs(FilterTextBox.Text); } + + private void PlaylistNewInputfield_KeyUp(object sender, KeyEventArgs e) + { + if(e.KeyCode == Keys.Enter) + { + PlaylistNewButton_Click(sender, new EventArgs()); + } + } } } diff --git a/MusicPlayer/MusicPlayer/Program.cs b/MusicPlayer/MusicPlayer/Program.cs index 385aa17..a16a3fc 100644 --- a/MusicPlayer/MusicPlayer/Program.cs +++ b/MusicPlayer/MusicPlayer/Program.cs @@ -17,7 +17,8 @@ namespace MusicPlayer Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - NetworkHandler nw = new NetworkHandler("http://imegumii.nl"); + NetworkHandler nw = new NetworkHandler("http://jancokock.me"); + //NetworkHandler nw = new NetworkHandler("http://imegumii.nl"); APIHandler api = new APIHandler(nw); MainForm form = new MainForm(); PlaylistHandler pl = new PlaylistHandler(api); diff --git a/MusicPlayer/MusicPlayer/Properties/Resources.Designer.cs b/MusicPlayer/MusicPlayer/Properties/Resources.Designer.cs index e3ad06c..ebc59d9 100755 --- a/MusicPlayer/MusicPlayer/Properties/Resources.Designer.cs +++ b/MusicPlayer/MusicPlayer/Properties/Resources.Designer.cs @@ -8,10 +8,10 @@ // //------------------------------------------------------------------------------ -namespace MusicPlayer.Properties -{ - - +namespace MusicPlayer.Properties { + using System; + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -22,48 +22,40 @@ namespace MusicPlayer.Properties [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MusicPlayer.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } diff --git a/MusicPlayer/MusicPlayer/Properties/Resources.resx b/MusicPlayer/MusicPlayer/Properties/Resources.resx old mode 100755 new mode 100644 index af7dbeb..1af7de1 --- a/MusicPlayer/MusicPlayer/Properties/Resources.resx +++ b/MusicPlayer/MusicPlayer/Properties/Resources.resx @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : and then encoded with base64 encoding. --> + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,9 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file