From: <sa...@us...> - 2007-02-21 20:13:56
|
Revision: 129 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=129&view=rev Author: saamand Date: 2007-02-21 12:13:55 -0800 (Wed, 21 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MyLyrics/LRC/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/LyricsEngine/Setup.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.resx trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/LyricSiteTestUC.Designer.cs trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/LyricSiteTestUC.cs trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/LyricsEngine Tester.cs trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/MyLyric Windows Application.csproj trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs Modified: trunk/plugins/MyLyrics/LRC/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/LRC/Properties/AssemblyInfo.cs 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/LRC/Properties/AssemblyInfo.cs 2007-02-21 20:13:55 UTC (rev 129) @@ -29,5 +29,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.14")] -[assembly: AssemblyFileVersion("0.14")] +[assembly: AssemblyVersion("0.15")] +[assembly: AssemblyFileVersion("0.15")] Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs 2007-02-21 20:13:55 UTC (rev 129) @@ -79,7 +79,7 @@ } } eastSites = (string[])easySitesArrayList.ToArray(typeof(string)); - LyricSearch_EasySites.EasySites = eastSites; + LyricSearch.EasySites = eastSites; // initialize events m_EventStop_LyricController = eventStopThread; @@ -88,7 +88,7 @@ m_EventStop_LyricSearches = new ManualResetEvent(false); m_EventStop_LyricSearches.Set(); - LyricSearch_EasySites.Abort = false; + LyricSearch.Abort = false; } @@ -167,7 +167,7 @@ ThreadStart easySitesThreadInstance = delegate { - LyricSearch_EasySites lyricSearch_EasySites = new LyricSearch_EasySites(m_EventStop_LyricController, m_EventStopped_LyricController, this); + LyricSearch lyricSearch_EasySites = new LyricSearch(m_EventStop_LyricController, m_EventStopped_LyricController, this); lyricSearch_EasySites.setLyricInfo(artist, title); lyricSearch_EasySites.Run(); }; @@ -266,14 +266,14 @@ { m_StopSearches = true; m_EventStop_LyricSearches.Reset(); - LyricSearch_EasySites.Abort = true; + LyricSearch.Abort = true; //StopTheSearchAndAbort.Invoke(this, EventArgs.Empty); } else { m_StopSearches = false; m_EventStop_LyricSearches.Set(); - LyricSearch_EasySites.Abort = false; + LyricSearch.Abort = false; } } } Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs =================================================================== (Binary files differ) Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs 2007-02-21 20:13:55 UTC (rev 129) @@ -8,7 +8,7 @@ { static string[] parenthesesAndAlike = new string[6] { "(album", "(acoustic", "(live", "(radio", "[", "{" }; - static string[] charsToDelete = new string[11] { ".", ",", "&", "'", "!", "\"", "&", "?", "(", ")", "+" }; + static string[] charsToDelete = new string[11] { ".", ",", "&", "'", "!", "\"", "&", "?", "(", ")", "+" /*, "ä", "ö", "ü", "Ä", "Ö", "Ü", "ß" */ }; // capatalize string and make ready for XML @@ -28,7 +28,7 @@ { capatalizedTitle += words[i].Substring(0, 1).ToUpper() + (words[i].Length > 1 ? words[i].Substring(1, words[i].Length - 1).ToLower() : "") + " "; } - return capatalizedTitle.Trim(); ; + return capatalizedTitle.Trim(); } public static string removeFeatComment(string str) Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2007-02-21 20:13:55 UTC (rev 129) @@ -40,8 +40,9 @@ <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> - <Compile Include="LyricSearch_EasySites.cs" /> + <Compile Include="LyricSearch.cs" /> <Compile Include="LyricDiagnostics.cs" /> + <Compile Include="LyricSites\HotLyrics.cs" /> <Compile Include="LyricSites\EvilLabs.cs" /> <Compile Include="LyricSites\Lyrics007.cs" /> <Compile Include="LyricSites\LyricsOnDemand.cs" /> Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2007-02-21 20:13:55 UTC (rev 129) @@ -26,7 +26,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.14")] +[assembly: AssemblyVersion("0.15")] // // In order to sign your assembly you must specify a key to use. Refer to the Modified: trunk/plugins/MyLyrics/LyricsEngine/Setup.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2007-02-21 20:13:55 UTC (rev 129) @@ -12,7 +12,8 @@ //"EvilLabs", "Lyrics007", "LyricsOnDemand", - "SeekLyrics" + "HotLyrics" + //"SeekLyrics" }; @@ -26,12 +27,12 @@ public static bool IsMember(string value) { - return System.Array.IndexOf(Setup.EasySites, value) != -1; + return System.Array.IndexOf<string>(Setup.EasySites, value) != -1; } public static bool IsMemberOfEasySites(string value) { - return System.Array.IndexOf(Setup.EasySites, value) != -1; + return System.Array.IndexOf<string>(Setup.EasySites, value) != -1; } public static int NoOfSites() Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-02-21 20:13:55 UTC (rev 129) @@ -214,7 +214,22 @@ StopThread(); m_Path = g_Player.CurrentFile; MusicTag tag = MediaPortal.TagReader.TagReader.ReadTag(m_Path); - findLyric(tag); + + if (!m_Path.Equals("")) + { + findLyric(tag); + } + else + { + m_artist = ""; + m_title = ""; + m_TrackText = ""; + GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_LBTrack, m_StatusText); + m_StatusText = "No music file playing"; + GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_LBStatus, m_StatusText); + m_LyricText = ""; + GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_Lyric, m_LyricText); + } } base.Process(); } @@ -234,7 +249,7 @@ GUIControl.ClearControl(GetID, (int)Controls.CONTROL_Lyric); GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_Lyric, m_LyricText); - bool useLyricWiki, useEvilLabs, useLyrics007, useLyricsOnDemand, useSeekLyrics; + bool useLyricWiki, useEvilLabs, useLyrics007, useLyricsOnDemand, useSeekLyrics, useHotLyrics; using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) { @@ -243,6 +258,7 @@ useLyrics007 = ((string)xmlreader.GetValueAsString("myLyrics", "useLyrics007", "True")).ToString().Equals("True") ? true : false; useLyricsOnDemand = ((string)xmlreader.GetValueAsString("myLyrics", "useLyricsOnDemand", "True")).ToString().Equals("True") ? true : false; useSeekLyrics = ((string)xmlreader.GetValueAsString("myLyrics", "useSeekLyrics", "True")).ToString().Equals("True") ? true : false; + useHotLyrics = ((string)xmlreader.GetValueAsString("myLyrics", "useHotLyrics", "True")).ToString().Equals("True") ? true : false; } ArrayList sitesToSearch = new ArrayList(); @@ -266,6 +282,10 @@ { sitesToSearch.Add("SeekLyrics"); } + if (useHotLyrics && Setup.IsMember("HotLyrics")) + { + sitesToSearch.Add("HotLyrics"); + } m_sitesToSearch = (string[])sitesToSearch.ToArray(typeof(string)); } @@ -284,12 +304,13 @@ m_EventStopThread.Reset(); m_EventThreadStopped.Reset(); + GUIControl.ClearControl(GetID, (int)Controls.CONTROL_Lyric); GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_Lyric, ""); if (tag != null && tag.Artist != "") { - m_artist = tag.Artist; - m_title = tag.Title; + m_artist = tag.Artist.Trim(); + m_title = tag.Title.Trim(); m_TrackText = m_artist + " - " + m_title; GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_LBTrack, m_TrackText); m_StatusText = "Searching for a matching lyric. Please wait a moment..."; @@ -394,7 +415,7 @@ { m_TrackText = ""; GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_LBTrack, m_StatusText); - m_StatusText = "No music file playing"; + m_StatusText = "The music tag isn't complete"; GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_LBStatus, m_StatusText); return; } Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-02-21 20:13:55 UTC (rev 129) @@ -32,6 +32,7 @@ this.tabPageLyricsDatabase = new MediaPortal.UserInterface.Controls.MPTabPage(); this.tabPageSetup = new MediaPortal.UserInterface.Controls.MPTabPage(); this.gbLyricSites = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.cbHotLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbSeekLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyricsOnDemand = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbLyrics007 = new MediaPortal.UserInterface.Controls.MPCheckBox(); @@ -43,12 +44,19 @@ this.btCancel = new MediaPortal.UserInterface.Controls.MPButton(); this.mpLabel3 = new MediaPortal.UserInterface.Controls.MPLabel(); this.gbGenerel = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.cbDisregardSongWithLyricInTag = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbDisregardVariousArtist = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbDisregardSongsWithNoLyric = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbMarkSongsWithNoLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbDisconsiderTitlesWithLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.lbSongsLimitNote = new MediaPortal.UserInterface.Controls.MPLabel(); this.lbLimit = new MediaPortal.UserInterface.Controls.MPTextBox(); this.lbSongsLimit = new MediaPortal.UserInterface.Controls.MPLabel(); this.gbMessages = new MediaPortal.UserInterface.Controls.MPGroupBox(); this.lbMessage = new MediaPortal.UserInterface.Controls.MPLabel(); this.gbProgress = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.lbTimer = new MediaPortal.UserInterface.Controls.MPLabel(); + this.lbTimeElapsed = new MediaPortal.UserInterface.Controls.MPLabel(); this.lbLastActivity2 = new MediaPortal.UserInterface.Controls.MPLabel(); this.lbLastActivity = new MediaPortal.UserInterface.Controls.MPLabel(); this.lbStep2a = new MediaPortal.UserInterface.Controls.MPLabel(); @@ -74,11 +82,7 @@ this.btSave = new MediaPortal.UserInterface.Controls.MPButton(); this.btClose = new MediaPortal.UserInterface.Controls.MPButton(); this.bgWorkerSearch = new System.ComponentModel.BackgroundWorker(); - this.cbDisregardSongWithLyricInTag = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbDisregardVariousArtist = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbDisregardSongsWithNoLyric = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbMarkSongsWithNoLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbDisconsiderTitlesWithLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.tbNote = new MediaPortal.UserInterface.Controls.MPLabel(); this.tabControl.SuspendLayout(); this.tabPageSetup.SuspendLayout(); this.gbLyricSites.SuspendLayout(); @@ -98,7 +102,7 @@ this.tabControl.Location = new System.Drawing.Point(12, 12); this.tabControl.Name = "tabControl"; this.tabControl.SelectedIndex = 0; - this.tabControl.Size = new System.Drawing.Size(528, 476); + this.tabControl.Size = new System.Drawing.Size(528, 495); this.tabControl.TabIndex = 1; // // tabPageLyricsDatabase @@ -106,18 +110,19 @@ this.tabPageLyricsDatabase.Location = new System.Drawing.Point(4, 22); this.tabPageLyricsDatabase.Name = "tabPageLyricsDatabase"; this.tabPageLyricsDatabase.Padding = new System.Windows.Forms.Padding(3); - this.tabPageLyricsDatabase.Size = new System.Drawing.Size(520, 450); + this.tabPageLyricsDatabase.Size = new System.Drawing.Size(520, 469); this.tabPageLyricsDatabase.TabIndex = 1; this.tabPageLyricsDatabase.Text = "Lyrics database"; this.tabPageLyricsDatabase.UseVisualStyleBackColor = true; // // tabPageSetup // + this.tabPageSetup.Controls.Add(this.tbNote); this.tabPageSetup.Controls.Add(this.gbLyricSites); this.tabPageSetup.Location = new System.Drawing.Point(4, 22); this.tabPageSetup.Name = "tabPageSetup"; this.tabPageSetup.Padding = new System.Windows.Forms.Padding(3); - this.tabPageSetup.Size = new System.Drawing.Size(520, 450); + this.tabPageSetup.Size = new System.Drawing.Size(520, 469); this.tabPageSetup.TabIndex = 2; this.tabPageSetup.Text = "General setup"; this.tabPageSetup.UseVisualStyleBackColor = true; @@ -125,6 +130,7 @@ // gbLyricSites // this.gbLyricSites.AutoSize = true; + this.gbLyricSites.Controls.Add(this.cbHotLyrics); this.gbLyricSites.Controls.Add(this.cbSeekLyrics); this.gbLyricSites.Controls.Add(this.cbLyricsOnDemand); this.gbLyricSites.Controls.Add(this.cbLyrics007); @@ -138,13 +144,26 @@ this.gbLyricSites.TabStop = false; this.gbLyricSites.Text = "Lyric sites to search"; // + // cbHotLyrics + // + this.cbHotLyrics.AutoSize = true; + this.cbHotLyrics.Checked = true; + this.cbHotLyrics.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbHotLyrics.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbHotLyrics.Location = new System.Drawing.Point(148, 21); + this.cbHotLyrics.Name = "cbHotLyrics"; + this.cbHotLyrics.Size = new System.Drawing.Size(71, 17); + this.cbHotLyrics.TabIndex = 7; + this.cbHotLyrics.Text = "Hot Lyrics"; + this.cbHotLyrics.UseVisualStyleBackColor = true; + // // cbSeekLyrics // this.cbSeekLyrics.AutoSize = true; this.cbSeekLyrics.Checked = true; this.cbSeekLyrics.CheckState = System.Windows.Forms.CheckState.Checked; this.cbSeekLyrics.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbSeekLyrics.Location = new System.Drawing.Point(148, 21); + this.cbSeekLyrics.Location = new System.Drawing.Point(148, 43); this.cbSeekLyrics.Name = "cbSeekLyrics"; this.cbSeekLyrics.Size = new System.Drawing.Size(79, 17); this.cbSeekLyrics.TabIndex = 6; @@ -183,7 +202,7 @@ this.cbEvilLabs.Checked = true; this.cbEvilLabs.CheckState = System.Windows.Forms.CheckState.Checked; this.cbEvilLabs.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbEvilLabs.Location = new System.Drawing.Point(148, 44); + this.cbEvilLabs.Location = new System.Drawing.Point(148, 66); this.cbEvilLabs.Name = "cbEvilLabs"; this.cbEvilLabs.Size = new System.Drawing.Size(67, 17); this.cbEvilLabs.TabIndex = 3; @@ -213,7 +232,7 @@ this.tabPageDatabase.Location = new System.Drawing.Point(4, 22); this.tabPageDatabase.Name = "tabPageDatabase"; this.tabPageDatabase.Padding = new System.Windows.Forms.Padding(3); - this.tabPageDatabase.Size = new System.Drawing.Size(520, 450); + this.tabPageDatabase.Size = new System.Drawing.Size(520, 469); this.tabPageDatabase.TabIndex = 2; this.tabPageDatabase.Text = "Search music database"; this.tabPageDatabase.UseVisualStyleBackColor = true; @@ -226,7 +245,7 @@ this.mpGroupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.mpGroupBox1.Location = new System.Drawing.Point(2, 133); this.mpGroupBox1.Name = "mpGroupBox1"; - this.mpGroupBox1.Size = new System.Drawing.Size(509, 52); + this.mpGroupBox1.Size = new System.Drawing.Size(509, 53); this.mpGroupBox1.TabIndex = 32; this.mpGroupBox1.TabStop = false; this.mpGroupBox1.Text = "Search music database"; @@ -280,6 +299,71 @@ this.gbGenerel.TabStop = false; this.gbGenerel.Text = "Music database search setup"; // + // cbDisregardSongWithLyricInTag + // + this.cbDisregardSongWithLyricInTag.AutoSize = true; + this.cbDisregardSongWithLyricInTag.Checked = true; + this.cbDisregardSongWithLyricInTag.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbDisregardSongWithLyricInTag.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbDisregardSongWithLyricInTag.Location = new System.Drawing.Point(15, 68); + this.cbDisregardSongWithLyricInTag.Name = "cbDisregardSongWithLyricInTag"; + this.cbDisregardSongWithLyricInTag.Size = new System.Drawing.Size(202, 17); + this.cbDisregardSongWithLyricInTag.TabIndex = 18; + this.cbDisregardSongWithLyricInTag.Text = "Disregard songs with lyric in music tag"; + this.cbDisregardSongWithLyricInTag.UseVisualStyleBackColor = true; + // + // cbDisregardVariousArtist + // + this.cbDisregardVariousArtist.AutoSize = true; + this.cbDisregardVariousArtist.Checked = true; + this.cbDisregardVariousArtist.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbDisregardVariousArtist.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbDisregardVariousArtist.Location = new System.Drawing.Point(15, 91); + this.cbDisregardVariousArtist.Name = "cbDisregardVariousArtist"; + this.cbDisregardVariousArtist.Size = new System.Drawing.Size(191, 17); + this.cbDisregardVariousArtist.TabIndex = 17; + this.cbDisregardVariousArtist.Text = "Disregard songs by \"various artists\""; + this.cbDisregardVariousArtist.UseVisualStyleBackColor = true; + // + // cbDisregardSongsWithNoLyric + // + this.cbDisregardSongsWithNoLyric.AutoSize = true; + this.cbDisregardSongsWithNoLyric.Checked = true; + this.cbDisregardSongsWithNoLyric.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbDisregardSongsWithNoLyric.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbDisregardSongsWithNoLyric.Location = new System.Drawing.Point(245, 68); + this.cbDisregardSongsWithNoLyric.Name = "cbDisregardSongsWithNoLyric"; + this.cbDisregardSongsWithNoLyric.Size = new System.Drawing.Size(246, 17); + this.cbDisregardSongsWithNoLyric.TabIndex = 16; + this.cbDisregardSongsWithNoLyric.Text = "Disregard previously marked songs (only batch)"; + this.cbDisregardSongsWithNoLyric.UseVisualStyleBackColor = true; + // + // cbMarkSongsWithNoLyrics + // + this.cbMarkSongsWithNoLyrics.AutoSize = true; + this.cbMarkSongsWithNoLyrics.Checked = true; + this.cbMarkSongsWithNoLyrics.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbMarkSongsWithNoLyrics.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbMarkSongsWithNoLyrics.Location = new System.Drawing.Point(245, 45); + this.cbMarkSongsWithNoLyrics.Name = "cbMarkSongsWithNoLyrics"; + this.cbMarkSongsWithNoLyrics.Size = new System.Drawing.Size(224, 17); + this.cbMarkSongsWithNoLyrics.TabIndex = 15; + this.cbMarkSongsWithNoLyrics.Text = "Mark songs to which no lyric can be found"; + this.cbMarkSongsWithNoLyrics.UseVisualStyleBackColor = true; + // + // cbDisconsiderTitlesWithLyrics + // + this.cbDisconsiderTitlesWithLyrics.AutoSize = true; + this.cbDisconsiderTitlesWithLyrics.Checked = true; + this.cbDisconsiderTitlesWithLyrics.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbDisconsiderTitlesWithLyrics.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbDisconsiderTitlesWithLyrics.Location = new System.Drawing.Point(15, 45); + this.cbDisconsiderTitlesWithLyrics.Name = "cbDisconsiderTitlesWithLyrics"; + this.cbDisconsiderTitlesWithLyrics.Size = new System.Drawing.Size(201, 17); + this.cbDisconsiderTitlesWithLyrics.TabIndex = 14; + this.cbDisconsiderTitlesWithLyrics.Text = "Disregard songs with lyric in database"; + this.cbDisconsiderTitlesWithLyrics.UseVisualStyleBackColor = true; + // // lbSongsLimitNote // this.lbSongsLimitNote.AutoSize = true; @@ -312,7 +396,7 @@ // this.gbMessages.Controls.Add(this.lbMessage); this.gbMessages.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.gbMessages.Location = new System.Drawing.Point(257, 317); + this.gbMessages.Location = new System.Drawing.Point(257, 334); this.gbMessages.Name = "gbMessages"; this.gbMessages.Size = new System.Drawing.Size(255, 127); this.gbMessages.TabIndex = 28; @@ -328,6 +412,8 @@ // // gbProgress // + this.gbProgress.Controls.Add(this.lbTimer); + this.gbProgress.Controls.Add(this.lbTimeElapsed); this.gbProgress.Controls.Add(this.lbLastActivity2); this.gbProgress.Controls.Add(this.lbLastActivity); this.gbProgress.Controls.Add(this.lbStep2a); @@ -336,24 +422,40 @@ this.gbProgress.Controls.Add(this.progressBar); this.gbProgress.Controls.Add(this.lbStep1); this.gbProgress.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.gbProgress.Location = new System.Drawing.Point(2, 191); + this.gbProgress.Location = new System.Drawing.Point(2, 192); this.gbProgress.Name = "gbProgress"; - this.gbProgress.Size = new System.Drawing.Size(509, 120); + this.gbProgress.Size = new System.Drawing.Size(509, 136); this.gbProgress.TabIndex = 18; this.gbProgress.TabStop = false; this.gbProgress.Text = "Progress"; // + // lbTimer + // + this.lbTimer.Location = new System.Drawing.Point(86, 88); + this.lbTimer.Name = "lbTimer"; + this.lbTimer.Size = new System.Drawing.Size(135, 15); + this.lbTimer.TabIndex = 25; + this.lbTimer.Text = "-"; + // + // lbTimeElapsed + // + this.lbTimeElapsed.Location = new System.Drawing.Point(12, 88); + this.lbTimeElapsed.Name = "lbTimeElapsed"; + this.lbTimeElapsed.Size = new System.Drawing.Size(77, 17); + this.lbTimeElapsed.TabIndex = 24; + this.lbTimeElapsed.Text = "Time elapsed:"; + // // lbLastActivity2 // - this.lbLastActivity2.Location = new System.Drawing.Point(82, 92); + this.lbLastActivity2.Location = new System.Drawing.Point(86, 108); this.lbLastActivity2.Name = "lbLastActivity2"; - this.lbLastActivity2.Size = new System.Drawing.Size(427, 25); + this.lbLastActivity2.Size = new System.Drawing.Size(420, 25); this.lbLastActivity2.TabIndex = 23; this.lbLastActivity2.Text = "-"; // // lbLastActivity // - this.lbLastActivity.Location = new System.Drawing.Point(12, 92); + this.lbLastActivity.Location = new System.Drawing.Point(12, 108); this.lbLastActivity.Name = "lbLastActivity"; this.lbLastActivity.Size = new System.Drawing.Size(77, 18); this.lbLastActivity.TabIndex = 22; @@ -386,7 +488,7 @@ // progressBar // this.progressBar.Enabled = false; - this.progressBar.Location = new System.Drawing.Point(28, 64); + this.progressBar.Location = new System.Drawing.Point(28, 62); this.progressBar.Name = "progressBar"; this.progressBar.Size = new System.Drawing.Size(466, 20); this.progressBar.Step = 1; @@ -417,7 +519,7 @@ this.gbMusicDBSearchStats.Controls.Add(this.lbLyricsFound2); this.gbMusicDBSearchStats.Controls.Add(this.lbLyricsFound); this.gbMusicDBSearchStats.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.gbMusicDBSearchStats.Location = new System.Drawing.Point(2, 317); + this.gbMusicDBSearchStats.Location = new System.Drawing.Point(2, 334); this.gbMusicDBSearchStats.Name = "gbMusicDBSearchStats"; this.gbMusicDBSearchStats.Size = new System.Drawing.Size(249, 127); this.gbMusicDBSearchStats.TabIndex = 12; @@ -538,7 +640,7 @@ // // btSave // - this.btSave.Location = new System.Drawing.Point(356, 494); + this.btSave.Location = new System.Drawing.Point(356, 513); this.btSave.Name = "btSave"; this.btSave.Size = new System.Drawing.Size(78, 23); this.btSave.TabIndex = 16; @@ -548,7 +650,7 @@ // // btClose // - this.btClose.Location = new System.Drawing.Point(440, 494); + this.btClose.Location = new System.Drawing.Point(440, 513); this.btClose.Name = "btClose"; this.btClose.Size = new System.Drawing.Size(78, 23); this.btClose.TabIndex = 99; @@ -563,76 +665,20 @@ this.bgWorkerSearch.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bgWorkerSearch_RunWorkerCompleted); this.bgWorkerSearch.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bgWorkerSearch_ProgressChanged); // - // cbDisregardSongWithLyricInTag + // tbNote // - this.cbDisregardSongWithLyricInTag.AutoSize = true; - this.cbDisregardSongWithLyricInTag.Checked = true; - this.cbDisregardSongWithLyricInTag.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbDisregardSongWithLyricInTag.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbDisregardSongWithLyricInTag.Location = new System.Drawing.Point(15, 68); - this.cbDisregardSongWithLyricInTag.Name = "cbDisregardSongWithLyricInTag"; - this.cbDisregardSongWithLyricInTag.Size = new System.Drawing.Size(202, 17); - this.cbDisregardSongWithLyricInTag.TabIndex = 18; - this.cbDisregardSongWithLyricInTag.Text = "Disregard songs with lyric in music tag"; - this.cbDisregardSongWithLyricInTag.UseVisualStyleBackColor = true; + this.tbNote.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tbNote.Location = new System.Drawing.Point(17, 111); + this.tbNote.Name = "tbNote"; + this.tbNote.Size = new System.Drawing.Size(377, 18); + this.tbNote.TabIndex = 19; + this.tbNote.Text = "(Seek Lyrics and Evil Labs are currently disabled due to instable servers)"; // - // cbDisregardVariousArtist - // - this.cbDisregardVariousArtist.AutoSize = true; - this.cbDisregardVariousArtist.Checked = true; - this.cbDisregardVariousArtist.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbDisregardVariousArtist.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbDisregardVariousArtist.Location = new System.Drawing.Point(15, 91); - this.cbDisregardVariousArtist.Name = "cbDisregardVariousArtist"; - this.cbDisregardVariousArtist.Size = new System.Drawing.Size(191, 17); - this.cbDisregardVariousArtist.TabIndex = 17; - this.cbDisregardVariousArtist.Text = "Disregard songs by \"various artists\""; - this.cbDisregardVariousArtist.UseVisualStyleBackColor = true; - // - // cbDisregardSongsWithNoLyric - // - this.cbDisregardSongsWithNoLyric.AutoSize = true; - this.cbDisregardSongsWithNoLyric.Checked = true; - this.cbDisregardSongsWithNoLyric.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbDisregardSongsWithNoLyric.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbDisregardSongsWithNoLyric.Location = new System.Drawing.Point(245, 68); - this.cbDisregardSongsWithNoLyric.Name = "cbDisregardSongsWithNoLyric"; - this.cbDisregardSongsWithNoLyric.Size = new System.Drawing.Size(246, 17); - this.cbDisregardSongsWithNoLyric.TabIndex = 16; - this.cbDisregardSongsWithNoLyric.Text = "Disregard previously marked songs (only batch)"; - this.cbDisregardSongsWithNoLyric.UseVisualStyleBackColor = true; - // - // cbMarkSongsWithNoLyrics - // - this.cbMarkSongsWithNoLyrics.AutoSize = true; - this.cbMarkSongsWithNoLyrics.Checked = true; - this.cbMarkSongsWithNoLyrics.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbMarkSongsWithNoLyrics.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbMarkSongsWithNoLyrics.Location = new System.Drawing.Point(245, 45); - this.cbMarkSongsWithNoLyrics.Name = "cbMarkSongsWithNoLyrics"; - this.cbMarkSongsWithNoLyrics.Size = new System.Drawing.Size(224, 17); - this.cbMarkSongsWithNoLyrics.TabIndex = 15; - this.cbMarkSongsWithNoLyrics.Text = "Mark songs to which no lyric can be found"; - this.cbMarkSongsWithNoLyrics.UseVisualStyleBackColor = true; - // - // cbDisconsiderTitlesWithLyrics - // - this.cbDisconsiderTitlesWithLyrics.AutoSize = true; - this.cbDisconsiderTitlesWithLyrics.Checked = true; - this.cbDisconsiderTitlesWithLyrics.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbDisconsiderTitlesWithLyrics.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbDisconsiderTitlesWithLyrics.Location = new System.Drawing.Point(15, 45); - this.cbDisconsiderTitlesWithLyrics.Name = "cbDisconsiderTitlesWithLyrics"; - this.cbDisconsiderTitlesWithLyrics.Size = new System.Drawing.Size(201, 17); - this.cbDisconsiderTitlesWithLyrics.TabIndex = 14; - this.cbDisconsiderTitlesWithLyrics.Text = "Disregard songs with lyric in database"; - this.cbDisconsiderTitlesWithLyrics.UseVisualStyleBackColor = true; - // // MyLyricsSetup // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(546, 520); + this.ClientSize = new System.Drawing.Size(541, 539); this.ControlBox = false; this.Controls.Add(this.btClose); this.Controls.Add(this.tabControl); @@ -714,5 +760,9 @@ private MediaPortal.UserInterface.Controls.MPCheckBox cbDisregardSongsWithNoLyric; private MediaPortal.UserInterface.Controls.MPCheckBox cbMarkSongsWithNoLyrics; private MediaPortal.UserInterface.Controls.MPCheckBox cbDisconsiderTitlesWithLyrics; + private MediaPortal.UserInterface.Controls.MPLabel lbTimer; + private MediaPortal.UserInterface.Controls.MPLabel lbTimeElapsed; + internal MediaPortal.UserInterface.Controls.MPCheckBox cbHotLyrics; + private MediaPortal.UserInterface.Controls.MPLabel tbNote; } } \ No newline at end of file Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-02-21 20:13:55 UTC (rev 129) @@ -76,7 +76,7 @@ bool m_DisregardMarkedLyric = true; int m_noOfCurrentlySearches = 0; - const int m_NoOfCurrentSearchesAllowed = 5; + const int m_NoOfCurrentSearchesAllowed = 4; int m_Limit = 100; ArrayList songs = new ArrayList(); @@ -93,7 +93,15 @@ MusicDatabase dbs; + // Timer variables + int hour = 0; + int min = 0; + int sec = 0; + System.Windows.Forms.Timer timer; + StopWatch stopwatch = new StopWatch(); + + public MyLyricsSetup() { InitializeComponent(); @@ -127,6 +135,7 @@ cbLyrics007.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useLyrics007", "True")).ToString().Equals("True") ? true : false; cbLyricsOnDemand.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useLyricsOnDemand", "True")).ToString().Equals("True") ? true : false; cbSeekLyrics.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useSeekLyrics", "True")).ToString().Equals("True") ? true : false; + cbHotLyrics.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useHotLyrics", "True")).ToString().Equals("True") ? true : false; if (Setup.IsMember("LyricWiki") == false) { @@ -148,6 +157,10 @@ { cbSeekLyrics.Visible = false; } + if (Setup.IsMember("HotLyrics") == false) + { + cbHotLyrics.Visible = false; + } } catch { MessageBox.Show("Something has gone wrong when reading Mediaportal.xml"); @@ -197,6 +210,7 @@ xmlwriter.SetValue("myLyrics", "useLyrics007", cbLyrics007.Checked.ToString()); xmlwriter.SetValue("myLyrics", "useLyricOnDemand", cbLyricsOnDemand.Checked.ToString()); xmlwriter.SetValue("myLyrics", "useSeekLyrics", cbSeekLyrics.Checked.ToString()); + xmlwriter.SetValue("myLyrics", "useHotLyrics", cbHotLyrics.Checked.ToString()); } } @@ -229,6 +243,14 @@ private void btImportAll_Click(object sender, System.EventArgs e) { + stopwatch.StartZero(); + lbTimer.Text = "00:00.00"; + timer = new System.Windows.Forms.Timer(); + timer.Enabled = true; + timer.Interval = 1000; + timer.Tick += new EventHandler(timer_Tick); + timer.Start(); + isSearching(true); lbStep1a.Text = "The collecting of songs has started."; lbStep2a.Text = ""; @@ -271,7 +293,6 @@ m_MarkSongsWhenNoLyricFound = cbMarkSongsWithNoLyrics.Checked; m_DisregardMarkedLyric = cbDisregardSongsWithNoLyric.Checked; - m_TotalTitles = 0; m_SongsNotKnown = 0; m_SongsWithLyric = 0; m_SongsWithMark = 0; @@ -298,6 +319,8 @@ sitesToSearch.Add("LyricsOnDemand"); if (cbSeekLyrics.Checked) sitesToSearch.Add("SeekLyrics"); + if (cbHotLyrics.Checked) + sitesToSearch.Add("HotLyrics"); sitesToSearchArray = (string[])sitesToSearch.ToArray(typeof(string)); @@ -385,6 +408,15 @@ // Called from worker thread using delegate and Control.Invoke private void ThreadFinishedMethod(String artist, String title, String message, String site) { + if (timer != null) + { + timer.Enabled = false; + timer.Stop(); + timer.Dispose(); + timer = null; + hour = 0; min = 0; sec = 0; + } + if (lc != null) { lc.StopSearches = true; @@ -396,6 +428,7 @@ lbStep2a.Text = "Completed"; lbMessage.Text = "#" + ((int)(++m_noOfMessages)).ToString() + " - " + message + "\r\n" + lbMessage.Text + "\r\n"; btImportAll.Enabled = true; + btCancel.Enabled = false; isSearching(false); lyricUC.updateLyricsTree(); } @@ -597,7 +630,6 @@ { if (lc != null) { - btCancel.Enabled = false; lc.finishThread(m_artist, m_track, "The search has been cancelled by the user.", "none"); lc.Dispose(); lc = null; @@ -608,9 +640,6 @@ //bgWorkerSearch.Dispose(); //bgWorkerSearch = null; - - //bgWorkerTestWebservices.Dispose(); - //bgWorkerTestWebservices = null; } } @@ -618,5 +647,21 @@ { LyricDiagnostics.Dispose(); } + + private void timer_Tick(object sender, EventArgs e) + { + int t = (int)stopwatch.ElapsedMilliseconds; + sec = (t /= 1000); + + int secOverflow = sec / 60; + sec -= (secOverflow * 60); + min = secOverflow; + + int minOverflow = min / 60; + min -= (minOverflow * 60); + hour = minOverflow; + + lbTimer.Text = (hour < 10 ? "0" + hour.ToString() : hour.ToString()) + ":" + (min < 10 ? "0" + min.ToString() : min.ToString()) + "." + (sec < 10 ? "0" + sec.ToString() : sec.ToString()); + } } } \ No newline at end of file Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.resx =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.resx 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.resx 2007-02-21 20:13:55 UTC (rev 129) @@ -118,7 +118,7 @@ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <metadata name="bgWorkerSearch.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>200, 17</value> + <value>94, 17</value> </metadata> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>51</value> Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs 2007-02-21 20:13:55 UTC (rev 129) @@ -255,7 +255,8 @@ lbTitle.Text = ""; tbLyrics.Enabled = false; - + + // Selected a title if (treeView.SelectedNode != null && treeView.SelectedNode.Parent != null) { string artist = treeView.SelectedNode.Parent.Text; @@ -281,6 +282,12 @@ lbTitle.Text = m_CurrentArtist + " - " + m_CurrentTitle; } } + // Selected an artist + else if (treeView.SelectedNode != null) + { + string artist = treeView.SelectedNode.Text; + m_CurrentArtist = LyricUtil.capatalizeString(artist); + } } private MusicTag GetTag(Song song) Modified: trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2007-02-21 20:13:55 UTC (rev 129) @@ -31,5 +31,5 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.14")] -[assembly: AssemblyFileVersion("0.14")] +[assembly: AssemblyVersion("0.15")] +[assembly: AssemblyFileVersion("0.15")] Modified: trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/LyricSiteTestUC.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/LyricSiteTestUC.Designer.cs 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/LyricSiteTestUC.Designer.cs 2007-02-21 20:13:55 UTC (rev 129) @@ -35,11 +35,13 @@ this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.button1 = new System.Windows.Forms.Button(); this.groupBox1.SuspendLayout(); this.SuspendLayout(); // // groupBox1 // + this.groupBox1.Controls.Add(this.button1); this.groupBox1.Controls.Add(this.textBox1); this.groupBox1.Controls.Add(this.label4); this.groupBox1.Controls.Add(this.label3); @@ -103,12 +105,22 @@ this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBox1.Location = new System.Drawing.Point(16, 3); this.checkBox1.Name = "checkBox1"; - this.checkBox1.Size = new System.Drawing.Size(139, 17); + this.checkBox1.Size = new System.Drawing.Size(97, 17); this.checkBox1.TabIndex = 1; this.checkBox1.Text = "Enable test for "; this.checkBox1.UseVisualStyleBackColor = true; this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); // + // button1 + // + this.button1.Location = new System.Drawing.Point(240, 15); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 5; + this.button1.Text = "Show lyric"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // // LyricSiteTestUC // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -133,5 +145,6 @@ private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label2; private System.Windows.Forms.CheckBox checkBox1; + private System.Windows.Forms.Button button1; } } Modified: trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/LyricSiteTestUC.cs =================================================================== --- trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/LyricSiteTestUC.cs 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/LyricSiteTestUC.cs 2007-02-21 20:13:55 UTC (rev 129) @@ -94,5 +94,10 @@ { isSiteSelected = this.checkBox1.Checked; } + + private void button1_Click(object sender, EventArgs e) + { + MessageBox.Show(textBox1.Text); + } } } Modified: trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/LyricsEngine Tester.cs =================================================================== --- trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/LyricsEngine Tester.cs 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/LyricsEngine Tester.cs 2007-02-21 20:13:55 UTC (rev 129) @@ -128,33 +128,19 @@ m_EventStopThread.Reset(); m_EventThreadStopped.Reset(); - //resetGui(); - //LyricController lc = new LyricController(this, m_EventStopThread, m_EventThreadStopped, false); - //// create worker thread instance - //ThreadStart job = delegate - //{ - // lc.Run(); - //}; + ArrayList sites = new ArrayList(); - //m_LyricControllerThread = new Thread(job); - //m_LyricControllerThread.Name = "lyricSearch Thread"; // looks nice in Output window - //m_LyricControllerThread.Start(); - - //lc.GoogleLicenseKey = tbLicenseKey.Text; - - //ArrayList lyricStrings = new ArrayList(); - foreach (LyricSiteTestUC lyricSite in lyricSiteArray) { if (lyricSite.IsSiteSelected) { - //lyricStrings.Add(lyricSite.LyricSiteName); lyricSite.start(); + sites.Add(lyricSite.LyricSiteName); } } - LyricController lc = new LyricController(this, m_EventStopThread, m_EventThreadStopped, Setup.AllSites()); + LyricController lc = new LyricController(this, m_EventStopThread, m_EventThreadStopped, (string[])sites.ToArray(typeof(string))); ThreadStart job = delegate { @@ -189,7 +175,7 @@ private void updateStringMethod(String message, String site) { string m_message = message.ToString(); - int siteIndex = System.Array.IndexOf(Setup.AllSites(), site); + int siteIndex = System.Array.IndexOf<string>(Setup.AllSites(), site); lyricSiteArray[siteIndex].Lyric = m_message; lyricSiteArray[siteIndex].stop(); } @@ -201,7 +187,7 @@ private void lyricFoundMethod(String lyricStrings, String artist, String title, String site) { - int siteIndex = System.Array.IndexOf(Setup.AllSites(), site); + int siteIndex = System.Array.IndexOf<string>(Setup.AllSites(), site); lyricSiteArray[siteIndex].Lyric = lyricStrings; lyricSiteArray[siteIndex].stop(); setMark(artist, title, siteIndex, true); @@ -209,16 +195,13 @@ private void lyricNotFoundMethod(String artist, String title, String message, String site) { - int siteIndex = System.Array.IndexOf(Setup.AllSites(), site); + int siteIndex = System.Array.IndexOf<string>(Setup.AllSites(), site); if (lyricSiteArray[siteIndex].Lyric.Equals("")) { lyricSiteArray[siteIndex].Lyric = message; lyricSiteArray[siteIndex].stop(); } setMark(artist, title, siteIndex, false); - - - } Modified: trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/MyLyric Windows Application.csproj =================================================================== --- trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/MyLyric Windows Application.csproj 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/MyLyric Windows Application.csproj 2007-02-21 20:13:55 UTC (rev 129) @@ -9,8 +9,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>MyLyric_Windows_Application</RootNamespace> <AssemblyName>MyLyric Windows Application</AssemblyName> - <StartupObject> - </StartupObject> + <StartupObject>MyLyric_Windows_Application.Class1</StartupObject> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> Modified: trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs 2007-02-20 22:44:49 UTC (rev 128) +++ trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs 2007-02-21 20:13:55 UTC (rev 129) @@ -29,5 +29,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.14")] -[assembly: AssemblyFileVersion("0.14")] +[assembly: AssemblyVersion("0.15")] +[assembly: AssemblyFileVersion("0.15")] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |