From: <sa...@us...> - 2007-02-11 09:17:52
|
Revision: 111 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=111&view=rev Author: saamand Date: 2007-02-11 01:17:50 -0800 (Sun, 11 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.settings 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/MyLyric Windows Application/MyLyric Windows Application/LyricsEngine Tester.cs Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs 2007-02-10 10:47:10 UTC (rev 110) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricController.cs 2007-02-11 09:17:50 UTC (rev 111) @@ -55,7 +55,6 @@ // Lyric sites private string[] lyricSites; private string[] eastSites; - private string[] googleSites; public LyricController(ILyricForm mainForm, ManualResetEvent eventStopThread, ManualResetEvent eventThreadStopped, @@ -70,25 +69,17 @@ this.lyricSites = lyricSites; - // Sort the sites in easy and google sites ArrayList easySitesArrayList = new ArrayList(); - ArrayList googleArrayList = new ArrayList(); + foreach (string site in lyricSites) { if (Setup.IsMemberOfEasySites(site)) { easySitesArrayList.Add(site); } - if (Setup.IsMemberOfGoogleSites(site)) - { - googleArrayList.Add(site); - } } eastSites = (string[])easySitesArrayList.ToArray(typeof(string)); LyricSearch_EasySites.EasySites = eastSites; - - googleSites = (string[])googleArrayList.ToArray(typeof(string)); - LyricSearch_GoogleSites.GoogleSites = googleSites; // initialize events m_EventStop_LyricController = eventStopThread; @@ -97,7 +88,7 @@ m_EventStop_LyricSearches = new ManualResetEvent(false); m_EventStop_LyricSearches.Set(); - LyricSearch_GoogleSites.Abort = false; + LyricSearch_EasySites.Abort = false; } @@ -168,7 +159,7 @@ this.m_EventStopped_LyricController = eventThreadStopped; } - public void addNewLyricSearch(LyricConfigInfo lyricConfigInfo) + public void addNewLyricSearch(string artist, string title) { if (eastSites.Length > 0) { @@ -177,32 +168,16 @@ { LyricSearch_EasySites lyricSearch_EasySites = new LyricSearch_EasySites(m_EventStop_LyricController, m_EventStopped_LyricController, this); - lyricSearch_EasySites.setLyricInfo(lyricConfigInfo.artist, lyricConfigInfo.track, lyricConfigInfo.extra); + lyricSearch_EasySites.setLyricInfo(artist, title); lyricSearch_EasySites.Run(); }; Thread lyricSearchThread = new Thread(easySitesThreadInstance); - lyricSearchThread.Name = "BasicSearch for " + lyricConfigInfo.artist + " - " + lyricConfigInfo.track; // looks nice in Output window + lyricSearchThread.Name = "BasicSearch for " + artist + " - " + title; // looks nice in Output window lyricSearchThread.IsBackground = true; lyricSearchThread.Start(); threadList.Add(lyricSearchThread); } - - //if (googleSites.Length > 0) - //{ - // ThreadStart googleSitesThreadInstance = delegate - // { - // LyricSearch_GoogleSites lyricSearch_GoogleSites = new LyricSearch_GoogleSites(m_EventStop_LyricController, m_EventStopped_LyricController, this); - // lyricSearch_GoogleSites.setLyricInfo(lyricConfigInfo.artist, lyricConfigInfo.track, lyricConfigInfo.extra); - // lyricSearch_GoogleSites.Run(); - // }; - - // Thread lyricSearchThread = new Thread(googleSitesThreadInstance); - // lyricSearchThread.Name = "GoogleSearch for " + lyricConfigInfo.artist + " - " + lyricConfigInfo.track; // looks nice in Output window - // lyricSearchThread.IsBackground = true; - // lyricSearchThread.Start(); - // threadList.Add(lyricSearchThread); - //} } public void suspendAllSearchThreadsExceptMe(int managedThreadId) @@ -223,27 +198,6 @@ m_EventStop_LyricSearches.Reset(); } - public static object isLicenseKeyWorking(string licenseKey) - { - Google.GoogleSearchService s = new Google.GoogleSearchService(); - Google.GoogleSearchResult searchResults = new Google.GoogleSearchResult(); - - try - { - //MessageBox.Show("licenseKey: " + licenseKey); - searchResults = s.doGoogleSearch(licenseKey, "this is a test", 0, 3, false, "", false, "", "", ""); - return true; - } - catch (System.Net.WebException webExc) - { - return webExc;// true; //todo - } - catch (System.Web.Services.Protocols.SoapException) - { - return false; - } - } - internal void updateString(String message, String site) { m_Form.UpdateString = new Object[] { message, site }; @@ -312,14 +266,14 @@ { m_StopSearches = true; m_EventStop_LyricSearches.Reset(); - LyricSearch_GoogleSites.Abort = true; + LyricSearch_EasySites.Abort = true; //StopTheSearchAndAbort.Invoke(this, EventArgs.Empty); } else { m_StopSearches = false; m_EventStop_LyricSearches.Set(); - LyricSearch_GoogleSites.Abort = false; + LyricSearch_EasySites.Abort = false; } } } Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs 2007-02-10 10:47:10 UTC (rev 110) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs 2007-02-11 09:17:50 UTC (rev 111) @@ -8,6 +8,7 @@ { static string[] parenthesesAndAlike = new string[6] { "(album", "(acoustic", "(live", "(radio", "[", "{" }; + static string[] charsToDelete = new string[11] { ".", ",", "&", "'", "!", "\"", "&", "?", "(", ")", "+" }; // capatalize string and make ready for XML @@ -38,7 +39,7 @@ return str; } - public static bool trimForParenthesis(ref string str) + public static void trimForParenthesis(ref string str) { for (int i = 0; i < parenthesesAndAlike.Length; i++) { @@ -46,12 +47,18 @@ if (index != -1) { str = str.Substring(0, index).Trim(); - return true; } } - return false; } + public static void deleteSpecificChars(ref string str) + { + for (int i = 0; i < charsToDelete.Length; i++) + { + str = str.Replace(charsToDelete[i], ""); + } + } + public static string changeAnd_and_and(string str) { string strTemp = str; Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2007-02-10 10:47:10 UTC (rev 110) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2007-02-11 09:17:50 UTC (rev 111) @@ -42,11 +42,13 @@ <ItemGroup> <Compile Include="LyricSearch_EasySites.cs" /> <Compile Include="LyricDiagnostics.cs" /> + <Compile Include="LyricSites\EvilLabs.cs" /> + <Compile Include="LyricSites\Lyrics007.cs" /> + <Compile Include="LyricSites\LyricsOnDemand.cs" /> + <Compile Include="LyricSites\SeekLyrics.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="GetGoogleSearchResult.cs" /> <Compile Include="ICommand.cs" /> <Compile Include="ILyricForm.cs" /> - <Compile Include="LyricConfigInfo.cs" /> <Compile Include="LyricController.cs" /> <Compile Include="LyricSiteInfo.cs" /> <EmbeddedResource Include="Properties\Resources.resx"> @@ -54,26 +56,16 @@ <LastGenOutput>Resources.Designer.cs</LastGenOutput> <SubType>Designer</SubType> </EmbeddedResource> - <Compile Include="LyricSearch_GoogleSites.cs" /> <Compile Include="LyricUtil.cs" /> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Resources.resx</DependentUpon> <DesignTime>True</DesignTime> </Compile> - <None Include="app.config" /> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> - <None Include="Web References\Google\GoogleSearch.wsdl" /> - <None Include="Web References\Google\GoogleSearchResult.datasource"> - <DependentUpon>Reference.map</DependentUpon> - </None> - <None Include="Web References\Google\Reference.map"> - <Generator>MSDiscoCodeGenerator</Generator> - <LastGenOutput>Reference.cs</LastGenOutput> - </None> <None Include="Web References\org.lyricwiki\LyricsResult.datasource"> <DependentUpon>Reference.map</DependentUpon> </None> @@ -94,33 +86,17 @@ <DesignTimeSharedInput>True</DesignTimeSharedInput> </Compile> <Compile Include="Setup.cs" /> - <Compile Include="Web References\Google\Reference.cs"> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - <DependentUpon>Reference.map</DependentUpon> - </Compile> <Compile Include="Web References\org.lyricwiki\Reference.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Reference.map</DependentUpon> </Compile> - <Compile Include="Wiki.cs" /> + <Compile Include="LyricSites\Wiki.cs" /> </ItemGroup> <ItemGroup> <WebReferences Include="Web References\" /> </ItemGroup> <ItemGroup> - <WebReferenceUrl Include="http://api.google.com/GoogleSearch.wsdl"> - <UrlBehavior>Dynamic</UrlBehavior> - <RelPath>Web References\Google\</RelPath> - <UpdateFromURL>http://api.google.com/GoogleSearch.wsdl</UpdateFromURL> - <ServiceLocationURL> - </ServiceLocationURL> - <CachedDynamicPropName> - </CachedDynamicPropName> - <CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName> - <CachedSettingsPropName>MyLyrics_Google_GoogleSearchService</CachedSettingsPropName> - </WebReferenceUrl> <WebReferenceUrl Include="http://lyricwiki.org/server.php%3fwsdl"> <UrlBehavior>Dynamic</UrlBehavior> <RelPath>Web References\org.lyricwiki\</RelPath> Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs 2007-02-10 10:47:10 UTC (rev 110) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.Designer.cs 2007-02-11 09:17:50 UTC (rev 111) @@ -26,31 +26,11 @@ [global::System.Configuration.ApplicationScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)] - [global::System.Configuration.DefaultSettingValueAttribute("http://api.google.com/search/beta2")] - public string Google_GoogleSearchService { - get { - return ((string)(this["Google_GoogleSearchService"])); - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)] [global::System.Configuration.DefaultSettingValueAttribute("http://lyricwiki.org/server.php")] public string LyricsEngine_org_lyricwiki_LyricWiki { get { return ((string)(this["LyricsEngine_org_lyricwiki_LyricWiki"])); } } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)] - [global::System.Configuration.DefaultSettingValueAttribute("http://api.google.com/search/beta2")] - public string MyLyrics_Google_GoogleSearchService { - get { - return ((string)(this["MyLyrics_Google_GoogleSearchService"])); - } - } } } Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.settings =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.settings 2007-02-10 10:47:10 UTC (rev 110) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/Settings.settings 2007-02-11 09:17:50 UTC (rev 111) @@ -2,14 +2,8 @@ <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="LyricsEngine.Properties" GeneratedClassName="Settings"> <Profiles /> <Settings> - <Setting Name="Google_GoogleSearchService" Type="(Web Service URL)" Scope="Application"> - <Value Profile="(Default)">http://api.google.com/search/beta2</Value> - </Setting> <Setting Name="LyricsEngine_org_lyricwiki_LyricWiki" Type="(Web Service URL)" Scope="Application"> <Value Profile="(Default)">http://lyricwiki.org/server.php</Value> </Setting> - <Setting Name="MyLyrics_Google_GoogleSearchService" Type="(Web Service URL)" Scope="Application"> - <Value Profile="(Default)">http://api.google.com/search/beta2</Value> - </Setting> </Settings> </SettingsFile> \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/Setup.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2007-02-10 10:47:10 UTC (rev 110) +++ trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2007-02-11 09:17:50 UTC (rev 111) @@ -6,37 +6,27 @@ { public static class Setup { - public static string[] EasySites = new string[2] + public static string[] EasySites = new string[4] { "LyricWiki", - "EvilLabs" - }; - - public static string[] GoogleSites = new string[8 - 2] - { - "Sing365", - "LyricsMania", + //"EvilLabs", "Lyrics007", - "LeosLyrics", - "LyricsFreak", - "SongMeanings" - //"LyricsHosting", - //"MusicMadeMe", + "LyricsOnDemand", + "SeekLyrics" }; + public static string[] AllSites() { ArrayList allSites = new ArrayList(); allSites.AddRange(EasySites); - allSites.AddRange(GoogleSites); string[] allSitesArray = (string[])allSites.ToArray(typeof(string)); return allSitesArray; } public static bool IsMember(string value) { - return (System.Array.IndexOf(Setup.EasySites, value) != -1 - || System.Array.IndexOf(Setup.GoogleSites, value) != -1); + return System.Array.IndexOf(Setup.EasySites, value) != -1; } public static bool IsMemberOfEasySites(string value) @@ -44,14 +34,9 @@ return System.Array.IndexOf(Setup.EasySites, value) != -1; } - public static bool IsMemberOfGoogleSites(string value) - { - return System.Array.IndexOf(Setup.GoogleSites, value) != -1; - } - public static int NoOfSites() { - return EasySites.Length + GoogleSites.Length; + return EasySites.Length; } } } Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-02-10 10:47:10 UTC (rev 110) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-02-11 09:17:50 UTC (rev 111) @@ -33,13 +33,13 @@ const int MAX_NO_OF_LICENSE_KEYS = 5; string[] m_GoogleLicenseKeys = new String[5] { "", "", "", "", "" }; int startingScrollSpeedVertical = 2; - bool googlePopUpMessageShown = false; const int SHIFT_WHEN_HIT = 10; #endregion #region Fields related to the skin engine [SkinControlAttribute(20)] - protected GUITextScrollUpControl CONTROL_Lyric = null; + //protected GUITextScrollUpControl CONTROL_Lyric = null; + protected GUITextControl CONTROL_Lyric = null; enum Controls { CONTROL_BACKGROUND = 1, @@ -234,69 +234,37 @@ GUIControl.ClearControl(GetID, (int)Controls.CONTROL_Lyric); GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_Lyric, m_LyricText); - bool useSing365, useLyricsHosting, useLyricsMania, useSongMeanings, useLyricsFreak, useMMMD, useLeosLyrics, useLyrics007, useLyricWiki, useEvilLabs; + bool useLyricWiki, useEvilLabs, useLyrics007, useLyricsOnDemand, useSeekLyrics; using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) { - m_GoogleLicenseKeys[0] = xmlreader.GetValueAsString("myLyrics", "googleLicenseKey1", "zhQlW3ZQFHLE2dibwGRcpcDJvThQ/TTU"); - m_GoogleLicenseKeys[1] = xmlreader.GetValueAsString("myLyrics", "googleLicenseKey2", ""); - m_GoogleLicenseKeys[2] = xmlreader.GetValueAsString("myLyrics", "googleLicenseKey3", ""); - m_GoogleLicenseKeys[3] = xmlreader.GetValueAsString("myLyrics", "googleLicenseKey4", ""); - m_GoogleLicenseKeys[4] = xmlreader.GetValueAsString("myLyrics", "googleLicenseKey5", ""); - - useSing365 = ((string)xmlreader.GetValueAsString("myLyrics", "useSing365", "False")).ToString().Equals("True") ? true : false; - useLyricsHosting = ((string)xmlreader.GetValueAsString("myLyrics", "useLyricsHosting", "False")).ToString().Equals("True") ? true : false; - useLyricsMania = ((string)xmlreader.GetValueAsString("myLyrics", "useLyricsMania", "False")).ToString().Equals("True") ? true : false; - useSongMeanings = ((string)xmlreader.GetValueAsString("myLyrics", "useSongMeaning", "False")).ToString().Equals("True") ? true : false; - useLyricsFreak = ((string)xmlreader.GetValueAsString("myLyrics", "useLyricsFreak", "False")).ToString().Equals("True") ? true : false; - useMMMD = ((string)xmlreader.GetValueAsString("myLyrics", "useMMMD", "False")).ToString().Equals("True") ? true : false; - useLeosLyrics = ((string)xmlreader.GetValueAsString("myLyrics", "useLeosLyrics", "False")).ToString().Equals("True") ? true : false; - useLyrics007 = ((string)xmlreader.GetValueAsString("myLyrics", "useLyrics007", "False")).ToString().Equals("True") ? true : false; useLyricWiki = ((string)xmlreader.GetValueAsString("myLyrics", "useLyricWiki", "True")).ToString().Equals("True") ? true : false; useEvilLabs = ((string)xmlreader.GetValueAsString("myLyrics", "useEvilLabs", "True")).ToString().Equals("True") ? true : false; + 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; } ArrayList sitesToSearch = new ArrayList(); - - if (useSing365 && Setup.IsMember("Sing365")) + if (useLyricWiki && Setup.IsMember("LyricWiki")) { - sitesToSearch.Add("Sing365"); + sitesToSearch.Add("LyricWiki"); } - if (useLyricsHosting && Setup.IsMember("LyricsHosting")) + if (useEvilLabs && Setup.IsMember("EvilLabs")) { - sitesToSearch.Add("LyricsHosting"); + sitesToSearch.Add("EvilLabs"); } - if (useLyricsMania && Setup.IsMember("LyricsMania")) - { - sitesToSearch.Add("LyricsMania"); - } - if (useSongMeanings && Setup.IsMember("SongMeanings")) - { - sitesToSearch.Add("SongMeanings"); - } - if (useLyricsFreak && Setup.IsMember("LyricsFreak")) - { - sitesToSearch.Add("LyricsFreak"); - } - if (useMMMD && Setup.IsMember("MusicMadeMe")) - { - sitesToSearch.Add("MusicMadeMe"); - } - if (useLeosLyrics && Setup.IsMember("LeosLyrics")) - { - sitesToSearch.Add("LeosLyrics"); - } if (useLyrics007 && Setup.IsMember("Lyrics007")) { sitesToSearch.Add("Lyrics007"); } - if (useLyricWiki && Setup.IsMember("LyricWiki")) + if (useLyricsOnDemand && Setup.IsMember("LyricsOnDemand")) { - sitesToSearch.Add("LyricWiki"); + sitesToSearch.Add("LyricsOnDemand"); } - if (useEvilLabs && Setup.IsMember("EvilLabs")) + if (useSeekLyrics && Setup.IsMember("SeekLyrics")) { - sitesToSearch.Add("EvilLabs"); + sitesToSearch.Add("SeekLyrics"); } m_sitesToSearch = (string[])sitesToSearch.ToArray(typeof(string)); @@ -418,8 +386,7 @@ lc.GoogleLicenseKey = m_GoogleLicenseKeys[m_GoogleLicenseKeyIndex]; - LyricConfigInfo lyricConfigInfo = new LyricConfigInfo(lc.GoogleLicenseKey, m_artist, m_title, "lyrics"); - lc.addNewLyricSearch(lyricConfigInfo); + lc.addNewLyricSearch(m_artist, m_title); } } @@ -576,12 +543,6 @@ { ShowLyricOnScreen(lyricText, site); SaveLyricToDatabase(); - - // if not found by LyricWiki, write which license key was used - if (lc != null && !site.Equals("LyricWiki")) - { - LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + (lc.GoogleLicenseKey.Equals("") ? "empty key" : lc.GoogleLicenseKey)); - } } } } @@ -616,60 +577,11 @@ set { string message = (string)value; - LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Warning, 0, LyricDiagnostics.elapsedTimeString() + "Exception: " + message); - - // GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_LBStatus, message.ToString()); - - string[] entries = message.Split(' '); - string currentKey = entries[entries.Length - 1]; - - bool keyLicensedAlreadyIn = lc.GoogleLicenseKeysUsed.Contains(currentKey); - - // if first time the current licensekey failed - if (!keyLicensedAlreadyIn) - { - lc.addToGoogleLicenseKeysUsed(currentKey); - int nextGoogleLicenseKeyIndex = ++m_GoogleLicenseKeyIndex; - if (nextGoogleLicenseKeyIndex < MAX_NO_OF_LICENSE_KEYS && !m_GoogleLicenseKeys[m_GoogleLicenseKeyIndex].Equals("")) - { - // new license key is used - int nextNextGoogleLicenseKeyIndex = nextGoogleLicenseKeyIndex + 1; - - m_StatusText = "All queries of key license number " + nextGoogleLicenseKeyIndex.ToString() + " has been used, so number " + nextNextGoogleLicenseKeyIndex.ToString() + " is used instead."; - //GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_LBStatus, m_StatusText); - lc.GoogleLicenseKey = m_GoogleLicenseKeys[nextGoogleLicenseKeyIndex]; - - LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + "Exception: " + m_StatusText); - } - else - { - string noValidKeysMessage = "The search has ended due to no more valid license keys entries today."; - ThreadFinished = new String[] { m_artist, m_title, message, "" }; - if (googlePopUpMessageShown == false) - { - LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Warning, 0, LyricDiagnostics.elapsedTimeString() + noValidKeysMessage); - PopUpMessage("LyricWiki only valid source", "Your google license keys don't hold any valid query entries", "Therefore only LyricWiki will be searched.", ""); - googlePopUpMessageShown = true; - lc.NoMoreValidLicenseKeys = true; - } - } - } } } #endregion - - private void PopUpMessage(string header, string line1, string line2, string line3) - { - GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); - dlg.SetHeading(header); - dlg.SetLine(1, line1); - dlg.SetLine(2, line2); - dlg.SetLine(3, line3); - dlg.DoModal(GUIWindowManager.ActiveWindow); - } - #region ISetup Interface methods /// <summary> Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-02-10 10:47:10 UTC (rev 110) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-02-11 09:17:50 UTC (rev 111) @@ -28,23 +28,24 @@ /// </summary> private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MyLyricsSetup)); this.tabControl = new MediaPortal.UserInterface.Controls.MPTabControl(); this.tabPageLyricsDatabase = new MediaPortal.UserInterface.Controls.MPTabPage(); + this.tabPageSetup = new MediaPortal.UserInterface.Controls.MPTabPage(); + this.gbLyricSites = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.cbSeekLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbLyricsOnDemand = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbLyrics007 = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbEvilLabs = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbLyricWiki = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.tabPageDatabase = new MediaPortal.UserInterface.Controls.MPTabPage(); - this.gbGoogleLicKeyStatuses = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.lbOverallWsStatusa = new MediaPortal.UserInterface.Controls.MPLabel(); - this.lbOverallWsStatus = new MediaPortal.UserInterface.Controls.MPLabel(); - this.lbWsStatus4a = new MediaPortal.UserInterface.Controls.MPLabel(); - this.lbWsStatus4 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.lbWsStatus3a = new MediaPortal.UserInterface.Controls.MPLabel(); - this.lbWsStatus3 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.lbWsStatus2a = new MediaPortal.UserInterface.Controls.MPLabel(); - this.lbWsStatus2 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.lbWsStatus1a = new MediaPortal.UserInterface.Controls.MPLabel(); - this.lbWsStatus1 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.lbWsStatus5a = new MediaPortal.UserInterface.Controls.MPLabel(); - this.lbWsStatus5 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.mpGroupBox1 = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.btImportAll = new MediaPortal.UserInterface.Controls.MPButton(); + this.btCancel = new MediaPortal.UserInterface.Controls.MPButton(); + this.mpLabel3 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.gbGenerel = new MediaPortal.UserInterface.Controls.MPGroupBox(); + 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(); @@ -70,74 +71,34 @@ this.lbTotalSongs = new MediaPortal.UserInterface.Controls.MPLabel(); this.lbLyricsFound2 = new MediaPortal.UserInterface.Controls.MPLabel(); this.lbLyricsFound = new MediaPortal.UserInterface.Controls.MPLabel(); - this.gbMusicDBSearch = new MediaPortal.UserInterface.Controls.MPGroupBox(); + 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.btCancel = new MediaPortal.UserInterface.Controls.MPButton(); 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.mpLabel1 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.btImportAll = new MediaPortal.UserInterface.Controls.MPButton(); - this.tabPageSetup = new MediaPortal.UserInterface.Controls.MPTabPage(); - this.gbSettings = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.tbLicenseKey5 = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.mpLabel5 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.tbLicenseKey4 = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.mpLabel4 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.tbLicenseKey3 = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.mpLabel3 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.tbLicenseKey2 = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.mpLabel2 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.tbLicenseKey1 = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.lbGoogleLicenceKey = new MediaPortal.UserInterface.Controls.MPLabel(); - this.gbLyricSites = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.cbEvilLabs = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbLyricWiki = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.gbGenerel = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.lbLimit = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.lbSongsLimit = new MediaPortal.UserInterface.Controls.MPLabel(); - this.gbLicenseKeyHelp = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.mpLabel6 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.lbGoogleNotice = new MediaPortal.UserInterface.Controls.MPLabel(); - this.labelPluginBannerHint = new MediaPortal.UserInterface.Controls.MPLabel(); - this.btSave = new MediaPortal.UserInterface.Controls.MPButton(); - this.btClose = new MediaPortal.UserInterface.Controls.MPButton(); - this.bgWorkerTestWebservices = new System.ComponentModel.BackgroundWorker(); - this.bgWorkerSearch = new System.ComponentModel.BackgroundWorker(); - this.mpGroupBox1 = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.cbLyricsHosting = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbLeosLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbLyricsMania = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbLyrics007 = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbSing365 = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbSongMeaning = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbLyricsFreak = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbMMMD = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.tabControl.SuspendLayout(); + this.tabPageSetup.SuspendLayout(); + this.gbLyricSites.SuspendLayout(); this.tabPageDatabase.SuspendLayout(); - this.gbGoogleLicKeyStatuses.SuspendLayout(); + this.mpGroupBox1.SuspendLayout(); + this.gbGenerel.SuspendLayout(); this.gbMessages.SuspendLayout(); this.gbProgress.SuspendLayout(); this.gbMusicDBSearchStats.SuspendLayout(); - this.gbMusicDBSearch.SuspendLayout(); - this.tabPageSetup.SuspendLayout(); - this.gbSettings.SuspendLayout(); - this.gbLyricSites.SuspendLayout(); - this.gbGenerel.SuspendLayout(); - this.gbLicenseKeyHelp.SuspendLayout(); - this.mpGroupBox1.SuspendLayout(); this.SuspendLayout(); // // tabControl // this.tabControl.Controls.Add(this.tabPageLyricsDatabase); - this.tabControl.Controls.Add(this.tabPageDatabase); this.tabControl.Controls.Add(this.tabPageSetup); - this.tabControl.Location = new System.Drawing.Point(5, 4); + this.tabControl.Controls.Add(this.tabPageDatabase); + 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, 528); + this.tabControl.Size = new System.Drawing.Size(528, 476); this.tabControl.TabIndex = 1; // // tabPageLyricsDatabase @@ -145,160 +106,224 @@ 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, 502); + this.tabPageLyricsDatabase.Size = new System.Drawing.Size(520, 450); this.tabPageLyricsDatabase.TabIndex = 1; this.tabPageLyricsDatabase.Text = "Lyrics database"; this.tabPageLyricsDatabase.UseVisualStyleBackColor = true; // - // tabPageDatabase + // tabPageSetup // - this.tabPageDatabase.Controls.Add(this.gbGoogleLicKeyStatuses); - this.tabPageDatabase.Controls.Add(this.gbMessages); - this.tabPageDatabase.Controls.Add(this.gbProgress); - this.tabPageDatabase.Controls.Add(this.gbMusicDBSearchStats); - this.tabPageDatabase.Controls.Add(this.gbMusicDBSearch); - 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, 502); - this.tabPageDatabase.TabIndex = 2; - this.tabPageDatabase.Text = "Music database"; - this.tabPageDatabase.UseVisualStyleBackColor = true; + 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.TabIndex = 2; + this.tabPageSetup.Text = "General setup"; + this.tabPageSetup.UseVisualStyleBackColor = true; // - // gbGoogleLicKeyStatuses + // gbLyricSites // - this.gbGoogleLicKeyStatuses.Controls.Add(this.lbOverallWsStatusa); - this.gbGoogleLicKeyStatuses.Controls.Add(this.lbOverallWsStatus); - this.gbGoogleLicKeyStatuses.Controls.Add(this.lbWsStatus4a); - this.gbGoogleLicKeyStatuses.Controls.Add(this.lbWsStatus4); - this.gbGoogleLicKeyStatuses.Controls.Add(this.lbWsStatus3a); - this.gbGoogleLicKeyStatuses.Controls.Add(this.lbWsStatus3); - this.gbGoogleLicKeyStatuses.Controls.Add(this.lbWsStatus2a); - this.gbGoogleLicKeyStatuses.Controls.Add(this.lbWsStatus2); - this.gbGoogleLicKeyStatuses.Controls.Add(this.lbWsStatus1a); - this.gbGoogleLicKeyStatuses.Controls.Add(this.lbWsStatus1); - this.gbGoogleLicKeyStatuses.Controls.Add(this.lbWsStatus5a); - this.gbGoogleLicKeyStatuses.Controls.Add(this.lbWsStatus5); - this.gbGoogleLicKeyStatuses.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.gbGoogleLicKeyStatuses.Location = new System.Drawing.Point(254, 276); - this.gbGoogleLicKeyStatuses.Name = "gbGoogleLicKeyStatuses"; - this.gbGoogleLicKeyStatuses.Size = new System.Drawing.Size(263, 126); - this.gbGoogleLicKeyStatuses.TabIndex = 30; - this.gbGoogleLicKeyStatuses.TabStop = false; - this.gbGoogleLicKeyStatuses.Text = "Google license key status"; + this.gbLyricSites.AutoSize = true; + this.gbLyricSites.Controls.Add(this.cbSeekLyrics); + this.gbLyricSites.Controls.Add(this.cbLyricsOnDemand); + this.gbLyricSites.Controls.Add(this.cbLyrics007); + this.gbLyricSites.Controls.Add(this.cbEvilLabs); + this.gbLyricSites.Controls.Add(this.cbLyricWiki); + this.gbLyricSites.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.gbLyricSites.Location = new System.Drawing.Point(4, 6); + this.gbLyricSites.Name = "gbLyricSites"; + this.gbLyricSites.Size = new System.Drawing.Size(510, 102); + this.gbLyricSites.TabIndex = 28; + this.gbLyricSites.TabStop = false; + this.gbLyricSites.Text = "Lyric sites to search"; // - // lbOverallWsStatusa + // cbSeekLyrics // - this.lbOverallWsStatusa.Location = new System.Drawing.Point(94, 95); - this.lbOverallWsStatusa.Name = "lbOverallWsStatusa"; - this.lbOverallWsStatusa.Size = new System.Drawing.Size(160, 15); - this.lbOverallWsStatusa.TabIndex = 31; - this.lbOverallWsStatusa.Text = "-"; + 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.Name = "cbSeekLyrics"; + this.cbSeekLyrics.Size = new System.Drawing.Size(79, 17); + this.cbSeekLyrics.TabIndex = 6; + this.cbSeekLyrics.Text = "Seek Lyrics"; + this.cbSeekLyrics.UseVisualStyleBackColor = true; // - // lbOverallWsStatus + // cbLyricsOnDemand // - this.lbOverallWsStatus.Location = new System.Drawing.Point(12, 95); - this.lbOverallWsStatus.Name = "lbOverallWsStatus"; - this.lbOverallWsStatus.Size = new System.Drawing.Size(91, 15); - this.lbOverallWsStatus.TabIndex = 30; - this.lbOverallWsStatus.Text = "Overall status:"; + this.cbLyricsOnDemand.AutoSize = true; + this.cbLyricsOnDemand.Checked = true; + this.cbLyricsOnDemand.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbLyricsOnDemand.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbLyricsOnDemand.Location = new System.Drawing.Point(16, 43); + this.cbLyricsOnDemand.Name = "cbLyricsOnDemand"; + this.cbLyricsOnDemand.Size = new System.Drawing.Size(108, 17); + this.cbLyricsOnDemand.TabIndex = 5; + this.cbLyricsOnDemand.Text = "Lyrics OnDemand"; + this.cbLyricsOnDemand.UseVisualStyleBackColor = true; // - // lbWsStatus4a + // cbLyrics007 // - this.lbWsStatus4a.Location = new System.Drawing.Point(94, 63); - this.lbWsStatus4a.Name = "lbWsStatus4a"; - this.lbWsStatus4a.Size = new System.Drawing.Size(160, 15); - this.lbWsStatus4a.TabIndex = 29; - this.lbWsStatus4a.Text = "-"; + this.cbLyrics007.AutoSize = true; + this.cbLyrics007.Checked = true; + this.cbLyrics007.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbLyrics007.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbLyrics007.Location = new System.Drawing.Point(16, 66); + this.cbLyrics007.Name = "cbLyrics007"; + this.cbLyrics007.Size = new System.Drawing.Size(72, 17); + this.cbLyrics007.TabIndex = 4; + this.cbLyrics007.Text = "Lyrics 007"; + this.cbLyrics007.UseVisualStyleBackColor = true; // - // lbWsStatus4 + // cbEvilLabs // - this.lbWsStatus4.Location = new System.Drawing.Point(12, 62); - this.lbWsStatus4.Name = "lbWsStatus4"; - this.lbWsStatus4.Size = new System.Drawing.Size(91, 16); - this.lbWsStatus4.TabIndex = 28; - this.lbWsStatus4.Text = "License key 4:"; + this.cbEvilLabs.AutoSize = true; + 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.Name = "cbEvilLabs"; + this.cbEvilLabs.Size = new System.Drawing.Size(67, 17); + this.cbEvilLabs.TabIndex = 3; + this.cbEvilLabs.Text = "Evil Labs"; + this.cbEvilLabs.UseVisualStyleBackColor = true; // - // lbWsStatus3a + // cbLyricWiki // - this.lbWsStatus3a.Location = new System.Drawing.Point(94, 47); - this.lbWsStatus3a.Name = "lbWsStatus3a"; - this.lbWsStatus3a.Size = new System.Drawing.Size(160, 15); - this.lbWsStatus3a.TabIndex = 25; - this.lbWsStatus3a.Text = "-"; + this.cbLyricWiki.AutoSize = true; + this.cbLyricWiki.Checked = true; + this.cbLyricWiki.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbLyricWiki.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbLyricWiki.Location = new System.Drawing.Point(16, 21); + this.cbLyricWiki.Name = "cbLyricWiki"; + this.cbLyricWiki.Size = new System.Drawing.Size(67, 17); + this.cbLyricWiki.TabIndex = 2; + this.cbLyricWiki.Text = "LyricWiki"; + this.cbLyricWiki.UseVisualStyleBackColor = true; // - // lbWsStatus3 + // tabPageDatabase // - this.lbWsStatus3.Location = new System.Drawing.Point(12, 46); - this.lbWsStatus3.Name = "lbWsStatus3"; - this.lbWsStatus3.Size = new System.Drawing.Size(91, 16); - this.lbWsStatus3.TabIndex = 24; - this.lbWsStatus3.Text = "License key 3:"; + this.tabPageDatabase.Controls.Add(this.mpGroupBox1); + this.tabPageDatabase.Controls.Add(this.gbGenerel); + this.tabPageDatabase.Controls.Add(this.gbMessages); + this.tabPageDatabase.Controls.Add(this.gbProgress); + this.tabPageDatabase.Controls.Add(this.gbMusicDBSearchStats); + 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.TabIndex = 2; + this.tabPageDatabase.Text = "Search music database"; + this.tabPageDatabase.UseVisualStyleBackColor = true; // - // lbWsStatus2a + // mpGroupBox1 // - this.lbWsStatus2a.Location = new System.Drawing.Point(94, 31); - this.lbWsStatus2a.Name = "lbWsStatus2a"; - this.lbWsStatus2a.Size = new System.Drawing.Size(160, 15); - this.lbWsStatus2a.TabIndex = 23; - this.lbWsStatus2a.Text = "-"; + this.mpGroupBox1.Controls.Add(this.btImportAll); + this.mpGroupBox1.Controls.Add(this.btCancel); + this.mpGroupBox1.Controls.Add(this.mpLabel3); + 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.TabIndex = 32; + this.mpGroupBox1.TabStop = false; + this.mpGroupBox1.Text = "Search music database"; // - // lbWsStatus2 + // btImportAll // - this.lbWsStatus2.Location = new System.Drawing.Point(12, 31); - this.lbWsStatus2.Name = "lbWsStatus2"; - this.lbWsStatus2.Size = new System.Drawing.Size(91, 15); - this.lbWsStatus2.TabIndex = 22; - this.lbWsStatus2.Text = "License key 2:"; + this.btImportAll.Location = new System.Drawing.Point(338, 19); + this.btImportAll.Name = "btImportAll"; + this.btImportAll.Size = new System.Drawing.Size(78, 23); + this.btImportAll.TabIndex = 32; + this.btImportAll.Text = "Start"; + this.btImportAll.UseVisualStyleBackColor = true; + this.btImportAll.Click += new System.EventHandler(this.btImportAll_Click); // - // lbWsStatus1a + // btCancel // - this.lbWsStatus1a.Location = new System.Drawing.Point(94, 16); - this.lbWsStatus1a.Name = "lbWsStatus1a"; - this.lbWsStatus1a.Size = new System.Drawing.Size(160, 15); - this.lbWsStatus1a.TabIndex = 21; - this.lbWsStatus1a.Text = "-"; + this.btCancel.Enabled = false; + this.btCancel.Location = new System.Drawing.Point(422, 19); + this.btCancel.Name = "btCancel"; + this.btCancel.Size = new System.Drawing.Size(78, 23); + this.btCancel.TabIndex = 33; + this.btCancel.Text = "Stop"; + this.btCancel.UseVisualStyleBackColor = true; + this.btCancel.Click += new System.EventHandler(this.btCancel_Click); // - // lbWsStatus1 + // mpLabel3 // - this.lbWsStatus1.Location = new System.Drawing.Point(12, 16); - this.lbWsStatus1.Name = "lbWsStatus1"; - this.lbWsStatus1.Size = new System.Drawing.Size(91, 15); - this.lbWsStatus1.TabIndex = 20; - this.lbWsStatus1.Text = "License key 1:"; + this.mpLabel3.AutoSize = true; + this.mpLabel3.Location = new System.Drawing.Point(12, 16); + this.mpLabel3.Name = "mpLabel3"; + this.mpLabel3.Size = new System.Drawing.Size(304, 26); + this.mpLabel3.TabIndex = 12; + this.mpLabel3.Text = "Press \'Start\' to fetch lyrics matching content of music database.\r\nPress \'Stop\' t" + + "o stop an ongoing lyrics search."; // - // lbWsStatus5a + // gbGenerel // - this.lbWsStatus5a.Location = new System.Drawing.Point(94, 78); - this.lbWsStatus5a.Name = "lbWsStatus5a"; - this.lbWsStatus5a.Size = new System.Drawing.Size(160, 15); - this.lbWsStatus5a.TabIndex = 15; - this.lbWsStatus5a.Text = "-"; + this.gbGenerel.Controls.Add(this.cbDisregardSongWithLyricInTag); + this.gbGenerel.Controls.Add(this.cbDisregardVariousArtist); + this.gbGenerel.Controls.Add(this.cbDisregardSongsWithNoLyric); + this.gbGenerel.Controls.Add(this.cbMarkSongsWithNoLyrics); + this.gbGenerel.Controls.Add(this.cbDisconsiderTitlesWithLyrics); + this.gbGenerel.Controls.Add(this.lbSongsLimitNote); + this.gbGenerel.Controls.Add(this.lbLimit); + this.gbGenerel.Controls.Add(this.lbSongsLimit); + this.gbGenerel.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.gbGenerel.Location = new System.Drawing.Point(3, 6); + this.gbGenerel.Name = "gbGenerel"; + this.gbGenerel.Size = new System.Drawing.Size(509, 121); + this.gbGenerel.TabIndex = 32; + this.gbGenerel.TabStop = false; + this.gbGenerel.Text = "Music database search setup"; // - // lbWsStatus5 + // lbSongsLimitNote // - this.lbWsStatus5.Location = new System.Drawing.Point(12, 78); - this.lbWsStatus5.Name = "lbWsStatus5"; - this.lbWsStatus5.Size = new System.Drawing.Size(91, 15); - this.lbWsStatus5.TabIndex = 14; - this.lbWsStatus5.Text = "License key 5:"; + this.lbSongsLimitNote.AutoSize = true; + this.lbSongsLimitNote.Location = new System.Drawing.Point(208, 22); + this.lbSongsLimitNote.Name = "lbSongsLimitNote"; + this.lbSongsLimitNote.Size = new System.Drawing.Size(82, 13); + this.lbSongsLimitNote.TabIndex = 13; + this.lbSongsLimitNote.Text = "(1000 is default)"; // + // lbLimit + // + this.lbLimit.BorderColor = System.Drawing.Color.Empty; + this.lbLimit.Location = new System.Drawing.Point(158, 19); + this.lbLimit.Name = "lbLimit"; + this.lbLimit.Size = new System.Drawing.Size(44, 20); + this.lbLimit.TabIndex = 1; + this.lbLimit.Text = "1000"; + this.lbLimit.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + // + // lbSongsLimit + // + this.lbSongsLimit.AutoSize = true; + this.lbSongsLimit.Location = new System.Drawing.Point(12, 22); + this.lbSongsLimit.Name = "lbSongsLimit"; + this.lbSongsLimit.Size = new System.Drawing.Size(139, 13); + this.lbSongsLimit.TabIndex = 12; + this.lbSongsLimit.Text = "Top limit of songs to search:"; + // // gbMessages // this.gbMessages.Controls.Add(this.lbMessage); this.gbMessages.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.gbMessages.Location = new System.Drawing.Point(2, 409); + this.gbMessages.Location = new System.Drawing.Point(257, 317); this.gbMessages.Name = "gbMessages"; - this.gbMessages.Size = new System.Drawing.Size(515, 85); + this.gbMessages.Size = new System.Drawing.Size(255, 127); this.gbMessages.TabIndex = 28; this.gbMessages.TabStop = false; this.gbMessages.Text = "Messages"; // // lbMessage // - this.lbMessage.Location = new System.Drawing.Point(6, 16); + this.lbMessage.Location = new System.Drawing.Point(6, 18); this.lbMessage.Name = "lbMessage"; - this.lbMessage.Size = new System.Drawing.Size(504, 65); + this.lbMessage.Size = new System.Drawing.Size(245, 106); this.lbMessage.TabIndex = 28; // // gbProgress @@ -311,24 +336,24 @@ 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, 150); + this.gbProgress.Location = new System.Drawing.Point(2, 191); this.gbProgress.Name = "gbProgress"; - this.gbProgress.Size = new System.Drawing.Size(515, 120); + this.gbProgress.Size = new System.Drawing.Size(509, 120); this.gbProgress.TabIndex = 18; this.gbProgress.TabStop = false; this.gbProgress.Text = "Progress"; // // lbLastActivity2 // - this.lbLastActivity2.Location = new System.Drawing.Point(82, 95); + this.lbLastActivity2.Location = new System.Drawing.Point(82, 92); this.lbLastActivity2.Name = "lbLastActivity2"; - this.lbLastActivity2.Size = new System.Drawing.Size(427, 18); + this.lbLastActivity2.Size = new System.Drawing.Size(427, 25); this.lbLastActivity2.TabIndex = 23; this.lbLastActivity2.Text = "-"; // // lbLastActivity // - this.lbLastActivity.Location = new System.Drawing.Point(12, 95); + this.lbLastActivity.Location = new System.Drawing.Point(12, 92); this.lbLastActivity.Name = "lbLastActivity"; this.lbLastActivity.Size = new System.Drawing.Size(77, 18); this.lbLastActivity.TabIndex = 22; @@ -392,7 +417,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, 276); + this.gbMusicDBSearchStats.Location = new System.Drawing.Point(2, 317); this.gbMusicDBSearchStats.Name = "gbMusicDBSearchStats"; this.gbMusicDBSearchStats.Size = new System.Drawing.Size(249, 127); this.gbMusicDBSearchStats.TabIndex = 12; @@ -511,58 +536,56 @@ this.lbLyricsFound.TabIndex = 14; this.lbLyricsFound.Text = "Lyrics found (during search):"; // - // gbMusicDBSearch + // btSave // - this.gbMusicDBSearch.Controls.Add(this.cbDisregardSongWithLyricInTag); - this.gbMusicDBSearch.Controls.Add(this.btCancel); - this.gbMusicDBSearch.Controls.Add(this.cbDisregardVariousArtist); - this.gbMusicDBSearch.Controls.Add(this.cbDisregardSongsWithNoLyric); - this.gbMusicDBSearch.Controls.Add(this.cbMarkSongsWithNoLyrics); - this.gbMusicDBSearch.Controls.Add(this.cbDisconsiderTitlesWithLyrics); - this.gbMusicDBSearch.Controls.Add(this.mpLabel1); - this.gbMusicDBSearch.Controls.Add(this.btImportAll); - this.gbMusicDBSearch.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.gbMusicDBSearch.Location = new System.Drawing.Point(2, 6); - this.gbMusicDBSearch.Name = "gbMusicDBSearch"; - this.gbMusicDBSearch.Size = new System.Drawing.Size(515, 138); - this.gbMusicDBSearch.TabIndex = 11; - this.gbMusicDBSearch.TabStop = false; - this.gbMusicDBSearch.Text = "Search Music database"; + this.btSave.Location = new System.Drawing.Point(356, 494); + this.btSave.Name = "btSave"; + this.btSave.Size = new System.Drawing.Size(78, 23); + this.btSave.TabIndex = 16; + this.btSave.Text = "&Save"; + this.btSave.UseVisualStyleBackColor = true; + this.btSave.Click += new System.EventHandler(this.btSave_Click); // + // btClose + // + this.btClose.Location = new System.Drawing.Point(440, 494); + this.btClose.Name = "btClose"; + this.btClose.Size = new System.Drawing.Size(78, 23); + this.btClose.TabIndex = 99; + this.btClose.Text = "Close"; + this.btClose.UseVisualStyleBackColor = true; + this.btClose.Click += new System.EventHandler(this.button1_Click); + // + // bgWorkerSearch + // + this.bgWorkerSearch.WorkerReportsProgress = true; + this.bgWorkerSearch.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bgWorkerSearch_DoWork); + this.bgWorkerSearch.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.bgWorkerSearch_RunWorkerCompleted); + this.bgWorkerSearch.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.bgWorkerSearch_ProgressChanged); + // // cbDisregardSongWithLyricInTag // this.cbDisregardSongWithLyricInTag.AutoSize = true; this.cbDisregardSongWithLyricInTag.Checked = true; this.cbDisregardSongWithLyricInTag.CheckState = System.Windows.Forms.CheckState.Checked; thi... [truncated message content] |