From: <sa...@us...> - 2007-04-27 16:26:28
|
Revision: 347 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=347&view=rev Author: saamand Date: 2007-04-27 09:26:25 -0700 (Fri, 27 Apr 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRC.cs trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCFormat.cs trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs trunk/plugins/MyLyrics/MyLyrics.suo Modified: trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRC.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRC.cs 2007-04-26 15:16:31 UTC (rev 346) +++ trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRC.cs 2007-04-27 16:26:25 UTC (rev 347) @@ -81,7 +81,7 @@ { System.Text.RegularExpressions.Match m; - if ((m = LRC.SimpleLRCFormat.Line_Line_Regex.Match(line)).Success) + if ((m = LRC.SimpleLRCFormat.LineLineRegex.Match(line)).Success) { line = line.Trim(); int index; @@ -134,45 +134,32 @@ string lineTemp = lineWithNewLine; bool done = true; - while ((m = LRC.SimpleLRCFormat.Line_Line_Regex.Match(lineTemp)).Success) + while ((m = LRC.SimpleLRCFormat.LineLineRegex.Match(lineTemp)).Success) { lineTemp = lineTemp.Replace(m.Value, ""); done = false; } - //System.Text.RegularExpressions.Match firstMatch; - //while ((firstMatch = LRC.SimpleLRCFormat.Line_Line_Regex.Match(lineTemp)).Success) - //{ - // System.Text.RegularExpressions.Match lastMatch = firstMatch; - // while (lastMatch.NextMatch().Length > 0) - // { - // lastMatch = (System.Text.RegularExpressions.Match)lastMatch.NextMatch(); - // } - - // lineTemp = lineTemp.Replace(lastMatch.Value, ""); - // done = false; - //} - simpleLRCTimeAndLineArray.Add(new SimpleLRCTimeAndLine(min, sec, msec, lineTemp)); return done; } - else if ((m = LRC.SimpleLRCFormat.Artist_LineStart_Regex.Match(line)).Success) + else if ((m = LRC.SimpleLRCFormat.ArtistLineStartRegex.Match(line)).Success) { artist = line.Substring(m.Index + m.Length); artist = LyricsEngine.LyricUtil.CapatalizeString(artist.Substring(0, artist.LastIndexOf("]"))); return true; } - else if ((m = LRC.SimpleLRCFormat.Title_LineStart_Regex.Match(line)).Success) + else if ((m = LRC.SimpleLRCFormat.TitleLineStartRegex.Match(line)).Success) { title = line.Substring(m.Index + m.Length); title = LyricsEngine.LyricUtil.CapatalizeString(title.Substring(0, title.LastIndexOf("]"))); return true; } - else if ((m = LRC.SimpleLRCFormat.Album_LineStart_Regex.Match(line)).Success) + else if ((m = LRC.SimpleLRCFormat.AlbumLineStartRegex.Match(line)).Success) { album = line.Substring(m.Index + m.Length); album = LyricsEngine.LyricUtil.CapatalizeString((album.Substring(0, album.LastIndexOf("]")))); Modified: trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCFormat.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCFormat.cs 2007-04-26 15:16:31 UTC (rev 346) +++ trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCFormat.cs 2007-04-27 16:26:25 UTC (rev 347) @@ -7,19 +7,9 @@ { public static class SimpleLRCFormat { - public static Regex Artist_LineStart_Regex; - public static Regex Title_LineStart_Regex; - public static Regex Album_LineStart_Regex; - public static Regex Line_Line_Regex; - - static SimpleLRCFormat() - { - Artist_LineStart_Regex = new Regex(@"\[ar\w*\:", RegexOptions.IgnoreCase); - Title_LineStart_Regex = new Regex(@"\[ti\w*\:", RegexOptions.IgnoreCase); - Album_LineStart_Regex = new Regex(@"\[al\w*\:", RegexOptions.IgnoreCase); - Line_Line_Regex = new Regex(@"\[\d+:\d+\.*\d*\]"); - } + public static Regex ArtistLineStartRegex = new Regex(@"\[ar\w*\:", RegexOptions.IgnoreCase); + public static Regex TitleLineStartRegex = new Regex(@"\[ti\w*\:", RegexOptions.IgnoreCase); + public static Regex AlbumLineStartRegex = new Regex(@"\[al\w*\:", RegexOptions.IgnoreCase); + public static Regex LineLineRegex = new Regex(@"\[\d+:\d+\.*\d*\]"); } - - } \ No newline at end of file Modified: trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs 2007-04-26 15:16:31 UTC (rev 346) +++ trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs 2007-04-27 16:26:25 UTC (rev 347) @@ -15,6 +15,44 @@ Sort(items); } + public int GetSimpleLRCTimeAndLineIndex(long time) + { + if (time < ((SimpleLRCTimeAndLine)items[0]).Time) + { + return 0; + } + + for (int i = 1; i < items.Length; i++) + { + if (((SimpleLRCTimeAndLine)items[i - 1]).Time < time && time <= ((SimpleLRCTimeAndLine)items[i]).Time) + { + return i; + } + } + + if (time > ((SimpleLRCTimeAndLine)items[items.Length - 1]).Time) + { + return items.Length - 1; + } + else + { + throw (new IndexOutOfRangeException("IndexOutOfRangeException in GetSimpleLRCTimeAndLineIndex")); + } + } + + public SimpleLRCTimeAndLine this[int index] + { + get + { + if (index < items.Length) + { + return (SimpleLRCTimeAndLine)items[index]; + } + else + return null; + } + } + #region IEnumerable implementation public IEnumerator GetEnumerator() { @@ -48,7 +86,7 @@ private class Enumerator : IEnumerator { private int cursor; - private object[] elements = null; + private object[] elements; public Enumerator(object[] items) { @@ -91,7 +129,7 @@ #endregion #region SortAfterTimeClass class, IComparer implementation - public class SortAfterTimeClass : IComparer + private class SortAfterTimeClass : IComparer { // Calls CaseInsensitiveComparer.Compare with the parameters reversed. int IComparer.Compare(Object x, Object y) Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs 2007-04-26 15:16:31 UTC (rev 346) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs 2007-04-27 16:26:25 UTC (rev 347) @@ -55,7 +55,7 @@ return str; } - public static string ChangeAnd_and_and(string str) + public static string ChangeAnds(string str) { string strTemp = str; if (str.Contains("&")) Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs 2007-04-26 15:16:31 UTC (rev 346) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs 2007-04-27 16:26:25 UTC (rev 347) @@ -9,6 +9,7 @@ using System.Diagnostics; using LyricsEngine; +[assembly: CLSCompliant(true)] namespace LyricsEngine { public class LyricsController : IDisposable Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-04-26 15:16:31 UTC (rev 346) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-04-27 16:26:25 UTC (rev 347) @@ -132,19 +132,15 @@ internal const int BASIC_WIDE_LIMIT = 45; SimpleLRC lrc; - IEnumerator enumerator; - System.Windows.Forms.Timer timer; + SimpleLRCTimeAndLineCollection lrcTimeCollection; Stopwatch stopwatch; - string nextTimeToShow; - string nextLineToShow; - bool shiftPageNextTime = false; #endregion #region Fields releated to the editor mode internal const int TAG_IN_ROUND = 13; - internal int currentLRCLine = 0; + internal int currentLRCLineIndex = 0; internal int LRCLinesTotal = 0; internal int tagRoundFinished = 0; internal int min = 0; @@ -169,7 +165,6 @@ public override bool Init() { - timer = new System.Windows.Forms.Timer(); selectedScreen = (int)MyLyricsSettings.Screen.LYRICS_BASIC; return Load(GUIGraphicsContext.Skin + @"\" + lyricsScreenXML); } @@ -216,6 +211,9 @@ else if (selectedScreen == (int)MyLyricsSettings.Screen.LRC_EDITOR) { newTrack = false; + currentLRCLineIndex = 0; + LRCLinesTotal = 0; + tagRoundFinished = 0; m_artist = LyricUtil.CapatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Artist")); m_title = LyricUtil.CapatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Title")); @@ -237,6 +235,12 @@ startSearch(); } } + + if (lyricsFound) + { + CalculateNextInterval(); + } + base.Process(); } @@ -269,21 +273,24 @@ { alreadyValidLRC = true; lines = new string[1] { "This track already has a valid LRC!" }; + + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + 0, lines[0]); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + 0, lines[0]); } else { lines = m_LyricText.Split(new string[1] { "\n" }, StringSplitOptions.None); - } - try - { - for (int i = tagRoundFinished * TAG_IN_ROUND; i < (tagRoundFinished + 1) * TAG_IN_ROUND; i++) + try { - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i, lines[i]); - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, lines[i]); + for (int i = tagRoundFinished * TAG_IN_ROUND; i < (tagRoundFinished + 1) * TAG_IN_ROUND; i++) + { + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i, lines[i]); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, lines[i]); + } } + catch { ;} } - catch { ;} } void LoadSettings() @@ -405,6 +412,7 @@ case Action.ActionType.ACTION_PREVIOUS_MENU: { GUIWindowManager.ShowPreviousWindow(); + base.OnAction(action); break; } case Action.ActionType.ACTION_KEY_PRESSED: @@ -426,7 +434,7 @@ // parameter could be anything but LRC_EDITOR. Will find correct type when running findLyric(). resetGUI((int)MyLyricsSettings.Screen.LYRICS_BASIC); } - + newTrack = true; Process(); } @@ -437,12 +445,14 @@ basicScreenSelected = false; resetGUI((int)MyLyricsSettings.Screen.LYRICS_WIDE); GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide, m_LyricText); + GUIControl.FocusControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide); } else if (selectedScreen == (int)MyLyricsSettings.Screen.LYRICS_WIDE) { basicScreenSelected = true; resetGUI((int)MyLyricsSettings.Screen.LYRICS_BASIC); GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric, m_LyricText); + GUIControl.FocusControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); } else if (selectedScreen == (int)MyLyricsSettings.Screen.LRC_BASIC) { @@ -457,6 +467,16 @@ } break; } + case Action.ActionType.ACTION_REWIND: + case Action.ActionType.ACTION_FORWARD: + case Action.ActionType.ACTION_MUSIC_FORWARD: + case Action.ActionType.ACTION_MUSIC_PLAY: + case Action.ActionType.ACTION_MUSIC_REWIND: + case Action.ActionType.ACTION_PAUSE: + case Action.ActionType.ACTION_PLAY: + { + break; + } } base.OnAction(action); } @@ -469,6 +489,7 @@ if (value.Length != 0) // additional check { basicScreenSelected = null; + resetLrcFields(); resetGUI(selectedScreen); StopThread(); resetAll(); @@ -494,7 +515,7 @@ } - //event driven handler to detect track change + //event driven handler to detect track change. Only used in LRC_Editor mode. private void timeHandler(string tag2, string value) { if (tag2.Equals("#currentplaytime") && !exitingMyLyrics) @@ -503,7 +524,6 @@ { stopwatch.Stop(); } - stopwatch = new Stopwatch(); stopwatch.Start(); @@ -551,9 +571,10 @@ if ((CurrentTrackTag.Lyrics.Length != 0 && (lrc = new SimpleLRC(m_artist, m_title, CurrentTrackTag.Lyrics)).IsValid) || (lyricText.Length != 0 && (lrc = new SimpleLRC(m_artist, m_title, lyricText)).IsValid)) { - resetLrcFields(); + lyricsFound = true; - lines = lrc.SimpleLRCTimeAndLineCollection.Copy(); + lrcTimeCollection = lrc.SimpleLRCTimeAndLineCollection; + lines = lrcTimeCollection.Copy(); //Let's see if the basic or wide version of the LRC-screen should be shown bool aLongLinePresent = false; @@ -592,26 +613,9 @@ m_StatusText = ""; GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, m_StatusText); - enumerator = lrc.SimpleLRCTimeAndLineCollection.GetEnumerator(); + m_StatusText = ""; + m_LyricText = ""; - if (lrc.Artist.Length != 0 && lrc.Title.Length != 0) - { - m_StatusText = ""; - m_LyricText = ""; - - // setup timer and stopwatch - timer = new System.Windows.Forms.Timer(); - stopwatch = new Stopwatch(); - - calculateNextInterval(); - - timer.Enabled = true; - timer.Tick += new System.EventHandler(OnTimerEvent); - - timer.Start(); - stopwatch.Start(); - } - try { for (int i = tagRoundFinished * TAG_IN_ROUND; i < (tagRoundFinished + 1) * TAG_IN_ROUND; i++) @@ -670,16 +674,16 @@ { string time = "[" + min.ToString() + ":" + (sec.ToString().Length == 2 ? sec.ToString() : "0" + sec.ToString()) + "." + (stopwatch.ElapsedMilliseconds.ToString().Length == 3 ? stopwatch.ElapsedMilliseconds.ToString() : stopwatch.ElapsedMilliseconds.ToString() + "0") + "]"; lines[LRCLinesTotal] = time + lines[LRCLinesTotal]; - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + currentLRCLine, time); - GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + currentLRCLine); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + currentLRCLineIndex, time); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + currentLRCLineIndex); if (++LRCLinesTotal < lines.Length) { // If a new round has to start - if (++currentLRCLine == TAG_IN_ROUND) + if (++currentLRCLineIndex == TAG_IN_ROUND) { - currentLRCLine = 0; + currentLRCLineIndex = 0; ++tagRoundFinished; @@ -707,9 +711,9 @@ { GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow( (int)GUIWindow.Window.WINDOW_DIALOG_OK); - dlg.SetHeading("Creating of LRC"); + dlg.SetHeading("LRC creation completed!"); dlg.SetLine(1, "The lyric has been converted"); - dlg.SetLine(2, "to a LRC!"); + dlg.SetLine(2, "to a LRC."); dlg.SetLine(3, String.Empty); dlg.DoModal(GUIWindowManager.ActiveWindow); @@ -743,85 +747,60 @@ } } - public void OnTimerEvent(object source, EventArgs e) + + private void CalculateNextInterval() { - if (shiftPageNextTime) + if (selectedScreen == (int)MyLyricsSettings.Screen.LRC_BASIC || selectedScreen == (int)MyLyricsSettings.Screen.LRC_WIDE) { - try + int trackTime = (int)(g_Player.CurrentPosition * 1000); + currentLRCLineIndex = lrcTimeCollection.GetSimpleLRCTimeAndLineIndex(trackTime); + + SimpleLRCTimeAndLine currentLine = lrcTimeCollection[currentLRCLineIndex]; + + tagRoundFinished = currentLRCLineIndex / TAG_IN_ROUND; + int localIndex = (currentLRCLineIndex % TAG_IN_ROUND); + + if (currentLRCLineIndex == lrcTimeCollection.Count - 1) { - resetGUI(selectedScreen); - for (int i = 0; i < TAG_IN_ROUND; i++) + if (currentLine.Time - trackTime < 500) { - GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i); - GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i, lines[tagRoundFinished * TAG_IN_ROUND + i]); - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, lines[tagRoundFinished * TAG_IN_ROUND + i]); + ++localIndex; } } - catch { ;}; - } - GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + currentLRCLine); - GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + currentLRCLine); - - if (++LRCLinesTotal < lines.Length) - { - - // If a new round has to start - if (++currentLRCLine == TAG_IN_ROUND) + if (tagRoundFinished > 0 && localIndex == 0) { - currentLRCLine = 0; - ++tagRoundFinished; - - shiftPageNextTime = true; + for (int i = 0; i < TAG_IN_ROUND; i++) + { + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); + } } - } - - calculateNextInterval(); - } - - private void calculateNextInterval() - { - if (selectedScreen == (int)MyLyricsSettings.Screen.LRC_BASIC || selectedScreen == (int)MyLyricsSettings.Screen.LRC_WIDE) - { - if (enumerator.MoveNext()) + else { - SimpleLRCTimeAndLine currentLine = (SimpleLRCTimeAndLine)enumerator.Current; - while (currentLine.Time == 0) + for (int i = 0; i < TAG_IN_ROUND; i++) { - m_LyricText += (currentLine.Line); - - ++currentLRCLine; - enumerator.MoveNext(); - currentLine = (SimpleLRCTimeAndLine)enumerator.Current; + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i, ""); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, ""); } - nextTimeToShow = currentLine.TimeString; - nextLineToShow = currentLine.Line; - - int temp = (int)(currentLine.Time - (int)(g_Player.CurrentPosition * 1000)); - if (temp > 0) + try { - timer.Interval = temp; + for (int i = 0; i < TAG_IN_ROUND; i++) + { + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i, lines[tagRoundFinished * TAG_IN_ROUND + i]); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, lines[tagRoundFinished * TAG_IN_ROUND + i]); + } } - else + catch { ;}; + + // Highlight the lines that have been passed in the current interval + for (int i = 0; i < localIndex; i++) { - //MessageBox.Show("temp: " + temp); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); } } - else - { - timer.Stop(); - stopwatch.Stop(); - timer.Dispose(); - } } - else - { - timer.Stop(); - stopwatch.Stop(); - timer.Dispose(); - } } @@ -845,11 +824,13 @@ { resetGUI((int)MyLyricsSettings.Screen.LYRICS_BASIC); GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric, m_LyricText); + GUIControl.FocusControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); } else { resetGUI((int)MyLyricsSettings.Screen.LYRICS_WIDE); GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide, m_LyricText); + GUIControl.FocusControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide); } @@ -927,13 +908,9 @@ private void resetLrcFields() { - if (timer != null) - timer.Dispose(); if (stopwatch != null) stopwatch.Reset(); - nextTimeToShow = ""; - nextLineToShow = ""; - currentLRCLine = 0; + currentLRCLineIndex = 0; LRCLinesTotal = 0; tagRoundFinished = 0; min = 0; @@ -944,20 +921,22 @@ private void resetGUI(int screenID) { + int prevSelectedScreen = selectedScreen; selectedScreen = screenID; - shiftPageNextTime = false; GUIPropertyManager.OnPropertyChanged -= new GUIPropertyManager.OnPropertyChangedHandler(trackChangeHandler); GUIPropertyManager.OnPropertyChanged -= new GUIPropertyManager.OnPropertyChangedHandler(timeHandler); - timer.Tick -= new System.EventHandler(OnTimerEvent); + //timer.Tick -= new System.EventHandler(OnTimerEvent); if (selectedScreen == (int)MyLyricsSettings.Screen.LYRICS_BASIC) { GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(trackChangeHandler); - - + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_TITLE, "Lyrics basic"); + GUIControl.ClearControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); + GUIControl.FocusControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); + // Reset general and lyrics controls GUIControl.ShowControl(GetID, (int)GUI_General_Controls.CONTROL_LBStatus); GUIControl.ShowControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); @@ -995,6 +974,9 @@ GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_TITLE, "Lyrics wide"); + GUIControl.ClearControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide); + GUIControl.FocusControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide); + // Reset general and lyrics controls GUIControl.ShowControl(GetID, (int)GUI_General_Controls.CONTROL_LBStatus); //GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, ""); @@ -1030,8 +1012,6 @@ else if (selectedScreen == (int)MyLyricsSettings.Screen.LRC_BASIC) { GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(trackChangeHandler); - GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(timeHandler); - timer.Tick += new System.EventHandler(OnTimerEvent); GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_TITLE, "LRC basic"); @@ -1054,24 +1034,25 @@ // LRC controls GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_TAGBUTTON); - for (int i = 0; i < TAG_IN_ROUND; i++) + if (prevSelectedScreen != (int)MyLyricsSettings.Screen.LRC_WIDE) { - GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); - GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i); - GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); + for (int i = 0; i < TAG_IN_ROUND; i++) + { + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); - GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i); - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i, ""); - GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, ""); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i, ""); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, ""); + } } } else if (selectedScreen == (int)MyLyricsSettings.Screen.LRC_WIDE) { GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(trackChangeHandler); - GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(timeHandler); - timer.Tick += new System.EventHandler(OnTimerEvent); GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_TITLE, "LRC wide"); @@ -1094,26 +1075,33 @@ // LRC controls GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_TAGBUTTON); - for (int i = 0; i < TAG_IN_ROUND; i++) + if (prevSelectedScreen != (int)MyLyricsSettings.Screen.LRC_BASIC) { - GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); - GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i); - GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); + for (int i = 0; i < TAG_IN_ROUND; i++) + { + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i); - GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i); - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i, ""); - GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); - GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, ""); + GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + i, ""); + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + i, ""); + } } } else if (selectedScreen == (int)MyLyricsSettings.Screen.LRC_EDITOR) { + resetLrcFields(); + GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(trackChangeHandler); GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(timeHandler); GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_TITLE, "LRC editor"); + GUIControl.FocusControl(GetID, (int)GUI_LRC_Controls.CONTROL_TAGBUTTON); + // Lyrics controls GUIControl.ShowControl(GetID, (int)GUI_General_Controls.CONTROL_LBStatus); GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, ""); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-04-26 15:16:31 UTC (rev 346) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-04-27 16:26:25 UTC (rev 347) @@ -30,6 +30,29 @@ { this.tabControl = new MediaPortal.UserInterface.Controls.MPTabControl(); this.tabPageLyricsDatabase = new MediaPortal.UserInterface.Controls.MPTabPage(); + this.tabPageSetup = new MediaPortal.UserInterface.Controls.MPTabPage(); + this.mpGroupBox3 = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.cbAutomaticUpdate = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbMoveSongFrom = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbAutoFetch = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.mpGroupBox2 = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.tbPluginName = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.lbPluginName = new MediaPortal.UserInterface.Controls.MPLabel(); + this.gbLyricSites = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.cbLyrics007 = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbLyricWiki = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbEvilLabs = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbLyricsOnDemand = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbHotLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.cbSeekLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.mpLabel2 = new MediaPortal.UserInterface.Controls.MPLabel(); + this.trackBar = new System.Windows.Forms.TrackBar(); + this.lbSpeed = new MediaPortal.UserInterface.Controls.MPLabel(); + this.rdDefault = new System.Windows.Forms.RadioButton(); + this.rbUserDefined = new System.Windows.Forms.RadioButton(); + this.tbNote = new MediaPortal.UserInterface.Controls.MPLabel(); this.tabPageDatabase = new MediaPortal.UserInterface.Controls.MPTabPage(); this.gbGenerel = new MediaPortal.UserInterface.Controls.MPGroupBox(); this.tbLimit = new MediaPortal.UserInterface.Controls.MPTextBox(); @@ -72,39 +95,10 @@ this.lbTotalSongs = new MediaPortal.UserInterface.Controls.MPLabel(); this.lbLyricsFound2 = new MediaPortal.UserInterface.Controls.MPLabel(); this.lbLyricsFound = new MediaPortal.UserInterface.Controls.MPLabel(); - this.tabPageSetup = new MediaPortal.UserInterface.Controls.MPTabPage(); - this.mpGroupBox3 = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.cbAutomaticUpdate = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbMoveSongFrom = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbAutoFetch = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.mpGroupBox2 = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.tbPluginName = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.lbPluginName = new MediaPortal.UserInterface.Controls.MPLabel(); - this.gbLyricSites = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.cbLyrics007 = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbLyricWiki = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbEvilLabs = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbLyricsOnDemand = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbHotLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.cbSeekLyrics = new MediaPortal.UserInterface.Controls.MPCheckBox(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.mpLabel2 = new MediaPortal.UserInterface.Controls.MPLabel(); - this.trackBar = new System.Windows.Forms.TrackBar(); - this.lbSpeed = new MediaPortal.UserInterface.Controls.MPLabel(); - this.rdDefault = new System.Windows.Forms.RadioButton(); - this.rbUserDefined = new System.Windows.Forms.RadioButton(); - this.tbNote = new MediaPortal.UserInterface.Controls.MPLabel(); this.btSave = new MediaPortal.UserInterface.Controls.MPButton(); this.btClose = new MediaPortal.UserInterface.Controls.MPButton(); this.bgWorkerSearch = new System.ComponentModel.BackgroundWorker(); this.tabControl.SuspendLayout(); - this.tabPageDatabase.SuspendLayout(); - this.gbGenerel.SuspendLayout(); - this.mpGroupBox1.SuspendLayout(); - this.gbMessages.SuspendLayout(); - this.gbProgress.SuspendLayout(); - this.gbMusicDBSearchStats.SuspendLayout(); this.tabPageSetup.SuspendLayout(); this.mpGroupBox3.SuspendLayout(); this.mpGroupBox2.SuspendLayout(); @@ -112,6 +106,12 @@ this.groupBox2.SuspendLayout(); this.groupBox1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.trackBar)).BeginInit(); + this.tabPageDatabase.SuspendLayout(); + this.gbGenerel.SuspendLayout(); + this.mpGroupBox1.SuspendLayout(); + this.gbMessages.SuspendLayout(); + this.gbProgress.SuspendLayout(); + this.gbMusicDBSearchStats.SuspendLayout(); this.SuspendLayout(); // // tabControl @@ -136,6 +136,284 @@ this.tabPageLyricsDatabase.Text = "Lyrics database"; this.tabPageLyricsDatabase.UseVisualStyleBackColor = true; // + // tabPageSetup + // + this.tabPageSetup.Controls.Add(this.mpGroupBox3); + this.tabPageSetup.Controls.Add(this.mpGroupBox2); + 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(549, 468); + this.tabPageSetup.TabIndex = 2; + this.tabPageSetup.Text = "Settings"; + this.tabPageSetup.UseVisualStyleBackColor = true; + // + // mpGroupBox3 + // + this.mpGroupBox3.Controls.Add(this.cbAutomaticUpdate); + this.mpGroupBox3.Controls.Add(this.cbMoveSongFrom); + this.mpGroupBox3.Controls.Add(this.cbAutoFetch); + this.mpGroupBox3.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.mpGroupBox3.Location = new System.Drawing.Point(5, 70); + this.mpGroupBox3.Name = "mpGroupBox3"; + this.mpGroupBox3.Size = new System.Drawing.Size(538, 92); + this.mpGroupBox3.TabIndex = 30; + this.mpGroupBox3.TabStop = false; + this.mpGroupBox3.Text = "Fetch lyric dialog settings"; + // + // cbAutomaticUpdate + // + this.cbAutomaticUpdate.AutoSize = true; + this.cbAutomaticUpdate.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbAutomaticUpdate.Location = new System.Drawing.Point(16, 45); + this.cbAutomaticUpdate.Name = "cbAutomaticUpdate"; + this.cbAutomaticUpdate.Size = new System.Drawing.Size(206, 17); + this.cbAutomaticUpdate.TabIndex = 8; + this.cbAutomaticUpdate.Text = "Automatic update when first lyric found"; + this.cbAutomaticUpdate.UseVisualStyleBackColor = true; + // + // cbMoveSongFrom + // + this.cbMoveSongFrom.AutoSize = true; + this.cbMoveSongFrom.Checked = true; + this.cbMoveSongFrom.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbMoveSongFrom.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbMoveSongFrom.Location = new System.Drawing.Point(16, 68); + this.cbMoveSongFrom.Name = "cbMoveSongFrom"; + this.cbMoveSongFrom.Size = new System.Drawing.Size(341, 17); + this.cbMoveSongFrom.TabIndex = 7; + this.cbMoveSongFrom.Text = "Move lyrics from marked database to lyrics database when updated"; + this.cbMoveSongFrom.UseVisualStyleBackColor = true; + // + // cbAutoFetch + // + this.cbAutoFetch.AutoSize = true; + this.cbAutoFetch.Checked = true; + this.cbAutoFetch.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbAutoFetch.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbAutoFetch.Location = new System.Drawing.Point(16, 23); + this.cbAutoFetch.Name = "cbAutoFetch"; + this.cbAutoFetch.Size = new System.Drawing.Size(119, 17); + this.cbAutoFetch.TabIndex = 6; + this.cbAutoFetch.Text = "Automatic fetch lyric"; + this.cbAutoFetch.UseVisualStyleBackColor = true; + // + // mpGroupBox2 + // + this.mpGroupBox2.Controls.Add(this.tbPluginName); + this.mpGroupBox2.Controls.Add(this.lbPluginName); + this.mpGroupBox2.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.mpGroupBox2.Location = new System.Drawing.Point(5, 5); + this.mpGroupBox2.Name = "mpGroupBox2"; + this.mpGroupBox2.Size = new System.Drawing.Size(538, 59); + this.mpGroupBox2.TabIndex = 29; + this.mpGroupBox2.TabStop = false; + this.mpGroupBox2.Text = "Basic settings"; + // + // tbPluginName + // + this.tbPluginName.BorderColor = System.Drawing.Color.Empty; + this.tbPluginName.Location = new System.Drawing.Point(96, 24); + this.tbPluginName.MaxLength = 30; + this.tbPluginName.Name = "tbPluginName"; + this.tbPluginName.Size = new System.Drawing.Size(144, 20); + this.tbPluginName.TabIndex = 13; + this.tbPluginName.Text = "My Lyrics"; + // + // lbPluginName + // + this.lbPluginName.AutoSize = true; + this.lbPluginName.Location = new System.Drawing.Point(13, 27); + this.lbPluginName.Name = "lbPluginName"; + this.lbPluginName.Size = new System.Drawing.Size(68, 13); + this.lbPluginName.TabIndex = 14; + this.lbPluginName.Text = "Plugin name:"; + // + // gbLyricSites + // + this.gbLyricSites.Controls.Add(this.groupBox2); + this.gbLyricSites.Controls.Add(this.groupBox1); + this.gbLyricSites.Controls.Add(this.rdDefault); + this.gbLyricSites.Controls.Add(this.rbUserDefined); + this.gbLyricSites.Controls.Add(this.tbNote); + this.gbLyricSites.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.gbLyricSites.Location = new System.Drawing.Point(5, 168); + this.gbLyricSites.Name = "gbLyricSites"; + this.gbLyricSites.Size = new System.Drawing.Size(538, 202); + this.gbLyricSites.TabIndex = 28; + this.gbLyricSites.TabStop = false; + this.gbLyricSites.Text = "Lyrics sites settings"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.cbLyrics007); + this.groupBox2.Controls.Add(this.cbLyricWiki); + this.groupBox2.Controls.Add(this.cbEvilLabs); + this.groupBox2.Controls.Add(this.cbLyricsOnDemand); + this.groupBox2.Controls.Add(this.cbHotLyrics); + this.groupBox2.Controls.Add(this.cbSeekLyrics); + this.groupBox2.Location = new System.Drawing.Point(272, 72); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(258, 100); + this.groupBox2.TabIndex = 28; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "User select mode"; + // + // cbLyrics007 + // + 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(17, 48); + 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; + // + // cbLyricWiki + // + 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(17, 71); + 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; + // + // cbEvilLabs + // + 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(145, 71); + 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; + // + // cbLyricsOnDemand + // + 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(17, 26); + 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; + // + // 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(145, 26); + 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(145, 48); + 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; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.mpLabel2); + this.groupBox1.Controls.Add(this.trackBar); + this.groupBox1.Controls.Add(this.lbSpeed); + this.groupBox1.Location = new System.Drawing.Point(6, 72); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(260, 100); + this.groupBox1.TabIndex = 27; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Default select mode"; + // + // mpLabel2 + // + this.mpLabel2.AutoSize = true; + this.mpLabel2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.mpLabel2.Location = new System.Drawing.Point(187, 25); + this.mpLabel2.Name = "mpLabel2"; + this.mpLabel2.Size = new System.Drawing.Size(43, 13); + this.mpLabel2.TabIndex = 26; + this.mpLabel2.Text = "Hit ratio"; + // + // trackBar + // + this.trackBar.BackColor = System.Drawing.SystemColors.Control; + this.trackBar.LargeChange = 3; + this.trackBar.Location = new System.Drawing.Point(36, 42); + this.trackBar.Maximum = 3; + this.trackBar.Name = "trackBar"; + this.trackBar.Size = new System.Drawing.Size(185, 45); + this.trackBar.TabIndex = 25; + this.trackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + this.trackBar.Value = 2; + this.trackBar.Scroll += new System.EventHandler(this.trackBar_Scroll); + // + // lbSpeed + // + this.lbSpeed.AutoSize = true; + this.lbSpeed.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbSpeed.Location = new System.Drawing.Point(29, 25); + this.lbSpeed.Name = "lbSpeed"; + this.lbSpeed.Size = new System.Drawing.Size(38, 13); + this.lbSpeed.TabIndex = 24; + this.lbSpeed.Text = "Speed"; + // + // rdDefault + // + this.rdDefault.AutoSize = true; + this.rdDefault.Location = new System.Drawing.Point(16, 23); + this.rdDefault.Name = "rdDefault"; + this.rdDefault.Size = new System.Drawing.Size(119, 17); + this.rdDefault.TabIndex = 23; + this.rdDefault.Text = "Default select mode"; + this.rdDefault.UseVisualStyleBackColor = true; + this.rdDefault.CheckedChanged += new System.EventHandler(this.rdTrackBar_CheckedChanged); + // + // rbUserDefined + // + this.rbUserDefined.AutoSize = true; + this.rbUserDefined.Location = new System.Drawing.Point(16, 46); + this.rbUserDefined.Name = "rbUserDefined"; + this.rbUserDefined.Size = new System.Drawing.Size(107, 17); + this.rbUserDefined.TabIndex = 22; + this.rbUserDefined.Text = "User select mode"; + this.rbUserDefined.UseVisualStyleBackColor = true; + // + // tbNote + // + 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(13, 178); + this.tbNote.Margin = new System.Windows.Forms.Padding(0); + 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 should currently not be used due to instable servers"; + // // tabPageDatabase // this.tabPageDatabase.Controls.Add(this.gbGenerel); @@ -566,284 +844,6 @@ this.lbLyricsFound.TabIndex = 14; this.lbLyricsFound.Text = "Lyrics found (during search):"; // - // tabPageSetup - // - this.tabPageSetup.Controls.Add(this.mpGroupBox3); - this.tabPageSetup.Controls.Add(this.mpGroupBox2); - 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(549, 468); - this.tabPageSetup.TabIndex = 2; - this.tabPageSetup.Text = "Settings"; - this.tabPageSetup.UseVisualStyleBackColor = true; - // - // mpGroupBox3 - // - this.mpGroupBox3.Controls.Add(this.cbAutomaticUpdate); - this.mpGroupBox3.Controls.Add(this.cbMoveSongFrom); - this.mpGroupBox3.Controls.Add(this.cbAutoFetch); - this.mpGroupBox3.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.mpGroupBox3.Location = new System.Drawing.Point(5, 70); - this.mpGroupBox3.Name = "mpGroupBox3"; - this.mpGroupBox3.Size = new System.Drawing.Size(538, 92); - this.mpGroupBox3.TabIndex = 30; - this.mpGroupBox3.TabStop = false; - this.mpGroupBox3.Text = "Fetch lyric dialog settings"; - // - // cbAutomaticUpdate - // - this.cbAutomaticUpdate.AutoSize = true; - this.cbAutomaticUpdate.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbAutomaticUpdate.Location = new System.Drawing.Point(16, 45); - this.cbAutomaticUpdate.Name = "cbAutomaticUpdate"; - this.cbAutomaticUpdate.Size = new System.Drawing.Size(206, 17); - this.cbAutomaticUpdate.TabIndex = 8; - this.cbAutomaticUpdate.Text = "Automatic update when first lyric found"; - this.cbAutomaticUpdate.UseVisualStyleBackColor = true; - // - // cbMoveSongFrom - // - this.cbMoveSongFrom.AutoSize = true; - this.cbMoveSongFrom.Checked = true; - this.cbMoveSongFrom.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbMoveSongFrom.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbMoveSongFrom.Location = new System.Drawing.Point(16, 68); - this.cbMoveSongFrom.Name = "cbMoveSongFrom"; - this.cbMoveSongFrom.Size = new System.Drawing.Size(341, 17); - this.cbMoveSongFrom.TabIndex = 7; - this.cbMoveSongFrom.Text = "Move lyrics from marked database to lyrics database when updated"; - this.cbMoveSongFrom.UseVisualStyleBackColor = true; - // - // cbAutoFetch - // - this.cbAutoFetch.AutoSize = true; - this.cbAutoFetch.Checked = true; - this.cbAutoFetch.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbAutoFetch.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.cbAutoFetch.Location = new System.Drawing.Point(16, 23); - this.cbAutoFetch.Name = "cbAutoFetch"; - this.cbAutoFetch.Size = new System.Drawing.Size(119, 17); - this.cbAutoFetch.TabIndex = 6; - this.cbAutoFetch.Text = "Automatic fetch lyric"; - this.cbAutoFetch.UseVisualStyleBackColor = true; - // - // mpGroupBox2 - // - this.mpGroupBox2.Controls.Add(this.tbPluginName); - this.mpGroupBox2.Controls.Add(this.lbPluginName); - this.mpGroupBox2.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.mpGroupBox2.Location = new System.Drawing.Point(5, 5); - this.mpGroupBox2.Name = "mpGroupBox2"; - this.mpGroupBox2.Size = new System.Drawing.Size(538, 59); - this.mpGroupBox2.TabIndex = 29; - this.mpGroupBox2.TabStop = false; - this.mpGroupBox2.Text = "Basic settings"; - // - // tbPluginName - // - this.tbPluginName.BorderColor = System.Drawing.Color.Empty; - this.tbPluginName.Location = new System.Drawing.Point(96, 24); - this.tbPluginName.MaxLength = 30; - this.tbPluginName.Name = "tbPluginName"; - this.tbPluginName.Size = new System.Drawing.Size(144, 20); - this.tbPluginName.TabIndex = 13; - this.tbPluginName.Text = "My Lyrics"; - // - // lbPluginName - // - this.lbPluginName.AutoSize = true; - this.lbPluginName.Location = new System.Drawing.Point(13, 27); - this.lbPluginName.Name = "lbPluginName"; - this.lbPluginName.Size = new System.Drawing.Size(68, 13); - this.lbPluginName.TabIndex = 14; - this.lbPluginName.Text = "Plugin name:"; - // - // gbLyricSites - // - this.gbLyricSites.Controls.Add(this.groupBox2); - this.gbLyricSites.Controls.Add(this.groupBox1); - this.gbLyricSites.Controls.Add(this.rdDefault); - this.gbLyricSites.Controls.Add(this.rbUserDefined); - this.gbLyricSites.Controls.Add(this.tbNote); - this.gbLyricSites.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.gbLyricSites.Location = new System.Drawing.Point(5, 168); - this.gbLyricSites.Name = "gbLyricSites"; - this.gbLyricSites.Size = new System.Drawing.Size(538, 202); - this.gbLyricSites.TabIndex = 28; - this.gbLyricSites.TabStop = false; - this.gbLyricSites.Text = "Lyrics sites settings"; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.cbLyrics007); - this.groupBox2.Controls.Add(this.cbLyricWiki); - this.groupBox2.Controls.Add(this.cbEvilLabs); - this.groupBox2.Controls.Add(this.cbLyricsOnDemand); - this.groupBox2.Controls.Add(this.cbHotLyrics); - this.groupBox2.Controls.Add(this.cbSeekLyrics); - this.groupBox2.Location = new System.Drawing.Point(272, 72); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(258, 100); - this.groupBox2.TabIndex = 28; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "User select mode"; - // - // cbLyrics007 - // - this.cbLyrics007.AutoSize = true; - this.cbLyr... [truncated message content] |