You can subscribe to this list here.
2007 |
Jan
(36) |
Feb
(79) |
Mar
(123) |
Apr
(95) |
May
(119) |
Jun
(172) |
Jul
(124) |
Aug
(100) |
Sep
(83) |
Oct
(52) |
Nov
(97) |
Dec
(87) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(131) |
Feb
(80) |
Mar
(163) |
Apr
(178) |
May
(73) |
Jun
(54) |
Jul
(106) |
Aug
(118) |
Sep
(50) |
Oct
(125) |
Nov
(100) |
Dec
(99) |
2009 |
Jan
(104) |
Feb
(99) |
Mar
(68) |
Apr
(81) |
May
(52) |
Jun
(87) |
Jul
(67) |
Aug
(33) |
Sep
(27) |
Oct
(37) |
Nov
(60) |
Dec
(116) |
2010 |
Jan
(82) |
Feb
(79) |
Mar
(38) |
Apr
(50) |
May
(45) |
Jun
(53) |
Jul
(23) |
Aug
(86) |
Sep
(22) |
Oct
(96) |
Nov
(97) |
Dec
(73) |
2011 |
Jan
(24) |
Feb
(45) |
Mar
(28) |
Apr
(31) |
May
(42) |
Jun
(25) |
Jul
|
Aug
(12) |
Sep
(28) |
Oct
(13) |
Nov
(43) |
Dec
(13) |
2012 |
Jan
(62) |
Feb
(28) |
Mar
(6) |
Apr
(16) |
May
(7) |
Jun
|
Jul
(16) |
Aug
(2) |
Sep
(1) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
2013 |
Jan
(5) |
Feb
|
Mar
(34) |
Apr
(9) |
May
(6) |
Jun
(10) |
Jul
(32) |
Aug
(8) |
Sep
(11) |
Oct
(35) |
Nov
(24) |
Dec
(22) |
2014 |
Jan
(44) |
Feb
(9) |
Mar
(9) |
Apr
(15) |
May
(25) |
Jun
(34) |
Jul
(16) |
Aug
(11) |
Sep
(7) |
Oct
(6) |
Nov
(1) |
Dec
(12) |
2015 |
Jan
(33) |
Feb
(19) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(5) |
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] |
From: <gre...@us...> - 2007-04-26 15:21:53
|
Revision: 346 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=346&view=rev Author: gregmac45 Date: 2007-04-26 08:16:31 -0700 (Thu, 26 Apr 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/OnlinePhotos/Flickr.cs trunk/plugins/OnlinePhotos/MyClass.cs Modified: trunk/plugins/OnlinePhotos/Flickr.cs =================================================================== --- trunk/plugins/OnlinePhotos/Flickr.cs 2007-04-26 00:24:38 UTC (rev 345) +++ trunk/plugins/OnlinePhotos/Flickr.cs 2007-04-26 15:16:31 UTC (rev 346) @@ -58,12 +58,14 @@ } public static List<MyPhoto> getPhotosByTag(String tag) { - Photos photos = _flickr.PhotosSearch(tag,""); + PhotoSearchExtras extras = new PhotoSearchExtras(); + Photos photos = _flickr.PhotosSearch( + tag,TagMode.AllTags,"",extras); return loadMyPhotoList(photos); } public static List<MyPhoto> getPhotosByText(String text) { - Photos photos = _flickr.PhotosSearchText(text, ""); + Photos photos = _flickr.PhotosSearchText(text); return loadMyPhotoList(photos); } private static List<MyPhoto> loadMyPhotoList(Photos photos) Modified: trunk/plugins/OnlinePhotos/MyClass.cs =================================================================== --- trunk/plugins/OnlinePhotos/MyClass.cs 2007-04-26 00:24:38 UTC (rev 345) +++ trunk/plugins/OnlinePhotos/MyClass.cs 2007-04-26 15:16:31 UTC (rev 346) @@ -180,15 +180,38 @@ { //_log.Info("onPageLoad state home"); GUIPropertyManager.SetProperty("#header.label", "Online Photos"); + DisplayHome(); //DisplaySites(); } + else if (_CurrentState == State.categories) + { + DisplayCurrentPhotos(); + } currentView = View.Icons; ChangeFacadeView(); base.OnPageLoad(); } - + public override void OnAction(Action action) + { + if (action.wID == Action.ActionType.ACTION_PREVIOUS_MENU) + { + if (_CurrentState == State.videos) + { + //DisplayCategories(); + //_CurrentState = State.categories; + //return; + } + else if (_CurrentState == State.categories) + { + DisplayHome(); + _CurrentState = State.home; + return; + } + } + base.OnAction(action); + } protected override void OnPageDestroy(int new_windowId) { @@ -205,6 +228,41 @@ { OnSlideShow(); } + else if (control == facadeView) + { + String SelectedSiteId = facadeView.SelectedListItem.Path; + switch (SelectedSiteId) + { + case "1": + DisplayInterestingFlickrPhotos(); + _CurrentState = State.categories; + break; + case "2": + DisplayRecentFlickrPhotos(); + _CurrentState = State.categories; + break; + case "3": + string q = ""; + if (GetUserInputString(ref q)) + { + + DisplayFlickrPhotosWithTags(q); + _CurrentState = State.categories; + + } + break; + case "4": + string text = ""; + if (GetUserInputString(ref text)) + { + + DisplayFlickrPhotosWithText(text); + _CurrentState = State.categories; + + } + break; + } + } } public void DisplayInterestingFlickrPhotos() { @@ -222,6 +280,21 @@ CurrentPhotoList = MyFlickr.getPhotosByTag(tags); DisplayCurrentPhotos(); } + public void DisplayFlickrPhotosWithText(String text) + { + CurrentPhotoList = MyFlickr.getPhotosByText(text); + DisplayCurrentPhotos(); + } + private bool GetUserInputString(ref string sString) + { + VirtualKeyboard keyBoard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD); + keyBoard.Reset(); + keyBoard.IsSearchKeyboard = true; + keyBoard.Text = sString; + keyBoard.DoModal(GetID); // show it... + if (keyBoard.IsConfirmed) sString = keyBoard.Text; + return keyBoard.IsConfirmed; + } public void DisplayCurrentPhotos() { facadeView.Clear(); @@ -442,7 +515,7 @@ Log.Error(e); } } - private void DisplaySites() + private void DisplayHome() { //facadeView.Clear(); GUIControl.ClearControl(GetID, facadeView.GetID); @@ -450,17 +523,32 @@ GUIListItem loListItem; //foreach (Site loSite in moSiteList.Values) //{ - loListItem = new GUIListItem("Flickr"); + loListItem = new GUIListItem("Flickr - Interesting Photos"); loListItem.Path = "1"; loListItem.IsFolder = true; MediaPortal.Util.Utils.SetDefaultIcons(loListItem); facadeView.Add(loListItem); - - loListItem = new GUIListItem("Picasa Web"); + + loListItem = new GUIListItem("Flickr - Recent Photos"); loListItem.Path = "2"; loListItem.IsFolder = true; MediaPortal.Util.Utils.SetDefaultIcons(loListItem); facadeView.Add(loListItem); + + + loListItem = new GUIListItem("Flickr - Search by tag"); + loListItem.Path = "3"; + loListItem.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(loListItem); + facadeView.Add(loListItem); + + loListItem = new GUIListItem("Flickr - Search by text"); + loListItem.Path = "4"; + loListItem.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(loListItem); + facadeView.Add(loListItem); + + //} //GUIPropertyManager.SetProperty("#itemcount", facadeView.Count-1 + ""); } @@ -516,7 +604,7 @@ GUIListItem item = facadeView[i]; if (!item.IsFolder && !item.IsRemote) { - SlideShow.Add(CurrentPhotoList[i].smallUrl); + SlideShow.Add(facadeView[i].ThumbnailImage); } i++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gre...@us...> - 2007-04-26 00:24:40
|
Revision: 345 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=345&view=rev Author: gregmac45 Date: 2007-04-25 17:24:38 -0700 (Wed, 25 Apr 2007) Log Message: ----------- Initial Import Added Paths: ----------- trunk/plugins/OnlinePhotos/ trunk/plugins/OnlinePhotos/AssemblyInfo.cs trunk/plugins/OnlinePhotos/Flickr.cs trunk/plugins/OnlinePhotos/FlickrNet.dll trunk/plugins/OnlinePhotos/MyClass.cs trunk/plugins/OnlinePhotos/OnlinePhotos.csproj trunk/plugins/OnlinePhotos/OnlinePhotos.sln trunk/plugins/OnlinePhotos/OnlinePhotos.suo trunk/plugins/OnlinePhotos/bin/ trunk/plugins/OnlinePhotos/bin/Debug/ trunk/plugins/OnlinePhotos/bin/Release/ trunk/plugins/OnlinePhotos/myonlinephotos.xml trunk/plugins/OnlinePhotos/obj/ trunk/plugins/OnlinePhotos/obj/Debug/ trunk/plugins/OnlinePhotos/obj/Release/ Added: trunk/plugins/OnlinePhotos/AssemblyInfo.cs =================================================================== --- trunk/plugins/OnlinePhotos/AssemblyInfo.cs (rev 0) +++ trunk/plugins/OnlinePhotos/AssemblyInfo.cs 2007-04-26 00:24:38 UTC (rev 345) @@ -0,0 +1,31 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Information about this assembly is defined by the following +// attributes. +// +// change them to the information which is associated with the assembly +// you compile. + +[assembly: AssemblyTitle("OnlinePhotos")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OnlinePhotos")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all values by your own or you can build default build and revision +// numbers with the '*' character (the default): + +[assembly: AssemblyVersion("1.0.*")] Added: trunk/plugins/OnlinePhotos/Flickr.cs =================================================================== --- trunk/plugins/OnlinePhotos/Flickr.cs (rev 0) +++ trunk/plugins/OnlinePhotos/Flickr.cs 2007-04-26 00:24:38 UTC (rev 345) @@ -0,0 +1,92 @@ +/* + * Created by SharpDevelop. + * User: GZamor1 + * Date: 4/24/2007 + * Time: 10:44 AM + * + * To change this template use Tools | Options | Coding | Edit Standard Headers. + */ + +using System; +using FlickrNet; +using System.Collections.Generic; +namespace OnlinePhotos +{ + /// <summary> + /// Description of Flickr. + /// </summary> + public class MyFlickr + { + //public static MyFlickr instance = new MyFlickr(); + private static Flickr _flickr = new Flickr("e48ef053dd76717cd30544475e36b2a6"); + + public static String getUserId(String username) + { + String userId = String.Empty; + try + { + FoundUser user= _flickr.PeopleFindByUsername(username); + userId = user.UserId; + } + catch (Exception) + { + } + return userId; + } + public static List<MyPhoto> getUserPhotos(String username) + { + List<MyPhoto> myPhotoList = new List<MyPhoto>(); + String userID = getUserId(username); + if (userID == String.Empty) + { + return myPhotoList; + } + Photos userPhotos = _flickr.PhotosSearch(userID, ""); + return loadMyPhotoList(userPhotos); + + + } + public static List<MyPhoto> getInterestingPhotos(){ + PhotoSearchExtras extras = new PhotoSearchExtras(); + Photos photos = _flickr.InterestingnessGetList(extras,50,1); + return loadMyPhotoList(photos); + } + public static List<MyPhoto> getRecentPhotos() + { + Photos photos = _flickr.PhotosGetRecent(); + return loadMyPhotoList(photos); + } + public static List<MyPhoto> getPhotosByTag(String tag) + { + Photos photos = _flickr.PhotosSearch(tag,""); + return loadMyPhotoList(photos); + } + public static List<MyPhoto> getPhotosByText(String text) + { + Photos photos = _flickr.PhotosSearchText(text, ""); + return loadMyPhotoList(photos); + } + private static List<MyPhoto> loadMyPhotoList(Photos photos) + { + List<MyPhoto> myPhotoList = new List<MyPhoto>(); + MyPhoto myPhoto; + foreach (Photo photo in photos.PhotoCollection) + { + myPhoto = new MyPhoto(); + myPhoto.id = photo.PhotoId; + myPhoto.Title = photo.Title; + myPhoto.largeUrl = photo.LargeUrl; + myPhoto.mediumUrl = photo.MediumUrl; + myPhoto.smallUrl = photo.SmallUrl; + myPhoto.thumbnailUrl = photo.ThumbnailUrl; + myPhotoList.Add(myPhoto); + //photo.; + } + + return myPhotoList; + + } + + + } +} Added: trunk/plugins/OnlinePhotos/FlickrNet.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/OnlinePhotos/FlickrNet.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/OnlinePhotos/MyClass.cs =================================================================== --- trunk/plugins/OnlinePhotos/MyClass.cs (rev 0) +++ trunk/plugins/OnlinePhotos/MyClass.cs 2007-04-26 00:24:38 UTC (rev 345) @@ -0,0 +1,537 @@ +/* + * Created by SharpDevelop. + * User: GZamor1 + * Date: 4/24/2007 + * Time: 10:42 AM + * + * To change this template use Tools | Options | Coding | Edit Standard Headers. + */ +using System; +using MediaPortal; +using MediaPortal.Util; +using MediaPortal.GUI.Library; +using MediaPortal.Dialogs; +using MediaPortal.GUI.Pictures; +using System.Collections.Generic; +using System.Xml; +using System.Net; +using System.Web; +using System.ComponentModel; + +namespace OnlinePhotos +{ + public class MyPhoto + { + private String title; + public String Title + { + get + { + return title; + } + set + { + title = value; + ThumbName = Utils.GetFilename(Utils.GetThumb(value)); + } + } + public String id; + public String thumbnailUrl; + public String largeUrl; + public String mediumUrl; + public String smallUrl; + public String ThumbName; + } + + /// <summary> + /// Description of MyClass. + /// </summary> + public class MyOnlinePhotos : GUIWindow, ISetupForm + { + [SkinControlAttribute(2)] + protected GUIButtonControl btnViewAs = null; + [SkinControlAttribute(3)] + protected GUIButtonControl btnSlide = null; + [SkinControlAttribute(50)] + protected GUIFacadeControl facadeView = null; + private State _CurrentState = State.home; + protected View currentView = View.List; + protected List<MyPhoto> CurrentPhotoList; + protected bool _imagesDone = true; + public enum State + { + home = 0, + categories = 1, + videos = 2 + } + public enum View + { + List = 0, + Icons = 1, + LargeIcons = 2, + FilmStrip = 3 + } + + public string PluginName() + { + + return "Online Photos"; + + } + + // Returns the description of the plugin is shown in the plugin menu + + public string Description() + { + + return "Flickr and Google Photo Plugin"; + + } + + // Returns the author of the plugin which is shown in the plugin menu + + public string Author() + { + + return "GregMac45"; + + } + + // show the setup dialog + + public void ShowPlugin() + { + + //MessageBox.Show("Nothing to configure, this is just an example"); + + } + + // Indicates whether plugin can be enabled/disabled + + public bool CanEnable() + { + + return true; + + } + + // get ID of windowplugin belonging to this setup + + public int GetWindowId() + { + + return GetID; + + } + + // Indicates if plugin is enabled by default; + + public bool DefaultEnabled() + { + + return true; + + } + + // indicates if a plugin has its own setup screen + + public bool HasSetup() + { + + return false; + + } + public override int GetID + { + get + { + return 5757; + } + set + { + } + } + + public override bool Init() + { + LoadSettings(); + return Load(GUIGraphicsContext.Skin + @"\myonlinephotos.xml"); + + } + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = PluginName(); + + strButtonImage = String.Empty; + + strButtonImageFocus = String.Empty; + + strPictureImage = String.Empty; + + return true; + } + public bool ShowDefaultHome() + { + return true; + } + protected override void OnPageLoad() + { + if (_CurrentState == State.home) + { + //_log.Info("onPageLoad state home"); + GUIPropertyManager.SetProperty("#header.label", "Online Photos"); + //DisplaySites(); + } + currentView = View.Icons; + ChangeFacadeView(); + + + base.OnPageLoad(); + } + + protected override void OnPageDestroy(int new_windowId) + { + + base.OnPageDestroy(new_windowId); + } + + protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) + { + if (control == btnViewAs) + { + ChangeFacadeView(); + } + else if (control == btnSlide) + { + OnSlideShow(); + } + } + public void DisplayInterestingFlickrPhotos() + { + CurrentPhotoList = + MyFlickr.getInterestingPhotos(); + DisplayCurrentPhotos(); + } + public void DisplayRecentFlickrPhotos() + { + CurrentPhotoList = MyFlickr.getRecentPhotos(); + DisplayCurrentPhotos(); + } + public void DisplayFlickrPhotosWithTags(String tags) + { + CurrentPhotoList = MyFlickr.getPhotosByTag(tags); + DisplayCurrentPhotos(); + } + public void DisplayCurrentPhotos() + { + facadeView.Clear(); + GUIListItem item; + int i = 0; + List<String> ImageList = new List<string>(); + foreach (MyPhoto photo in CurrentPhotoList) + { + item = new GUIListItem(photo.Title); + item.Path = photo.mediumUrl; + item.ItemId = i; + item.RetrieveArt = false; + item.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(OnRetrieveCoverArt); + item.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(item_OnItemSelected); + ImageList.Add(photo.mediumUrl); + Log.Info("setting photo to url " + photo.mediumUrl); + facadeView.Add(item); + GUIWindowManager.Process(); + i++; + + } + BackgroundWorker worker = new BackgroundWorker(); + + worker.DoWork += new DoWorkEventHandler(downloadImages); + worker.RunWorkerAsync(ImageList); + + using (WaitCursor cursor = new WaitCursor()) + { + while (_imagesDone == false) + { + GUIWindowManager.Process(); + } + } + + } + private String GetThumbnail(String lsUrl) + { + string lsThumb = MediaPortal.Util.Utils.GetThumb(lsUrl); + lsThumb = System.IO.Path.GetFileName(lsThumb); + string lsThumbsDir = "C:\\Temp\\"; + if (System.IO.Directory.Exists(lsThumbsDir) == false) + { + System.IO.Directory.CreateDirectory(lsThumbsDir); + } + lsThumb = lsThumbsDir + lsThumb; + //Log.Info(lsThumb); + if (System.IO.File.Exists(lsThumb) == false) + { + String lsFilename = System.IO.Path.GetFileName(lsThumb); + //moLog.Info("Filename will be {0}", lsFilename); + MediaPortal.Util.Utils.DownLoadImage(lsUrl, lsThumb); + } + if (System.IO.File.Exists(lsThumb)) + { + //facadeView[liIdx].IconImageBig = lsThumb; + return lsThumb; + } + else + { + return ""; + //facadeView[liIdx].IconImageBig = ""; + } + } + public void downloadImages(object sender, DoWorkEventArgs e) + { + _imagesDone = false; + List<String> imageList = (List<String>)e.Argument; + WebClient client = new WebClient(); + int i=0; + foreach (String url in imageList) + { + client.DownloadFile(url, "C:\\Temp\\" + CurrentPhotoList[i].ThumbName + ".jpg"); + facadeView[i].RetrieveArt = true; + facadeView[i].RefreshCoverArt(); + i++; + } + _imagesDone = true; + } + void OnRetrieveCoverArt(GUIListItem item) + { + item.ThumbnailImage = "C:\\Temp\\" + CurrentPhotoList[item.ItemId].ThumbName + ".jpg"; + } + + private void item_OnItemSelected(GUIListItem item, GUIControl parent) + { + GUIFilmstripControl filmstrip = parent as GUIFilmstripControl; + if (filmstrip == null) + return; + filmstrip.InfoImageFileName = item.ThumbnailImage; + } + + private void ChangeFacadeView() + { + + + switch (currentView) + { + case View.List: + currentView = View.Icons; + facadeView.View = GUIFacadeControl.ViewMode.SmallIcons; + break; + case View.Icons: + currentView = View.LargeIcons; + facadeView.View = GUIFacadeControl.ViewMode.LargeIcons; + break; + case View.LargeIcons: + currentView = View.FilmStrip; + facadeView.View = GUIFacadeControl.ViewMode.Filmstrip; + break; + case View.FilmStrip: + currentView = View.List; + facadeView.View = GUIFacadeControl.ViewMode.List; + break; + } + GUIControl.FocusControl(GetID, facadeView.GetID); + + string strLine = String.Empty; + View view = currentView; + switch (view) + { + case View.List: + strLine = GUILocalizeStrings.Get(101); + break; + case View.Icons: + strLine = GUILocalizeStrings.Get(100); + break; + case View.LargeIcons: + strLine = GUILocalizeStrings.Get(417); + break; + case View.FilmStrip: + strLine = GUILocalizeStrings.Get(733); + break; + } + GUIControl.SetControlLabel(GetID, btnViewAs.GetID, strLine); + + } + private void LoadSettings() + { + XmlDocument doc = new XmlDocument(); + try + { + doc.Load("OnlinePhotoSettings.xml"); + /* + XmlNode filter = doc.SelectSingleNode("//settings/filter"); + String lsFilter = filter.InnerText; + msFilterArray = lsFilter.Split(new char[] { ',' }); + if (msFilterArray.Length == 1 && msFilterArray[0] == "") + { + msFilterArray = null; + } + XmlNode thumbNode = doc.SelectSingleNode("//settings/thumbLocation"); + msThumbLocation = thumbNode.InnerText; + + //lsFilterArray + //Log.Write("filter value {0}",filter.InnerText); + + XmlNode root = doc.SelectSingleNode("//settings/sites/site"); + XmlNodeList nodeList; + nodeList = root.SelectNodes("//settings/sites/site"); + List<Site> loSiteList = new List<Site>(); + Site loSite; + XmlNodeList RssNodeList; + RssLink loRssData; + bool lbDonwloadDirSet = false; + foreach (XmlNode chileNode in nodeList) + { + loSite = new Site(); + + XmlNode node = chileNode.SelectSingleNode("name"); + loSite.name = node.InnerText; + + node = chileNode.SelectSingleNode("id"); + loSite.id = node.InnerText; + + node = chileNode.SelectSingleNode("user"); + if (node != null) + loSite.username = node.InnerText; + + node = chileNode.SelectSingleNode("password"); + if (node != null) + loSite.password = node.InnerText; + + node = chileNode.SelectSingleNode("confirmAge"); + if (node != null) + loSite.confirmAge = node.InnerText == "yes"; + + //Console.WriteLine("site Node:{0}", loSite.ToString()); + RssNodeList = chileNode.SelectNodes("rss"); + foreach (XmlNode RssNode in RssNodeList) + { + loRssData = new RssLink(); + //node = chileNode.SelectSingleNode("d"); + + loRssData.name = RssNode.Attributes["name"].InnerText; + try + { + loRssData.isDynamic = RssNode.Attributes["dynamic"].InnerText.Equals("yes"); + Log.Info("Found a dynamic category for site {0}", loSite.name); + } + catch (Exception) { } + loRssData.url = RssNode.InnerText; + if (lbDonwloadDirSet == false && loSite.id == "99") + { + msDownloadDir = loRssData.url; + lbDonwloadDirSet = true; + } + //Console.WriteLine("rss Node:{0}", loRssData.ToString()); + loSite.RssList.Add(loRssData.name, loRssData); + } + moSiteList.Add(loSite.id, loSite); + } + * */ + } + + catch (Exception e) + { + //moLog.Error(e); + Log.Error(e); + } + } + private void DisplaySites() + { + //facadeView.Clear(); + GUIControl.ClearControl(GetID, facadeView.GetID); + + GUIListItem loListItem; + //foreach (Site loSite in moSiteList.Values) + //{ + loListItem = new GUIListItem("Flickr"); + loListItem.Path = "1"; + loListItem.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(loListItem); + facadeView.Add(loListItem); + + loListItem = new GUIListItem("Picasa Web"); + loListItem.Path = "2"; + loListItem.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(loListItem); + facadeView.Add(loListItem); + //} + //GUIPropertyManager.SetProperty("#itemcount", facadeView.Count-1 + ""); + } + private void LoadFlickrCategories() + { + GUIControl.ClearControl(GetID, facadeView.GetID); + + GUIListItem loListItem; + loListItem = new GUIListItem(".."); + loListItem.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(loListItem); + facadeView.Add(loListItem); + + loListItem = new GUIListItem("Interesting Photos"); + loListItem.Path = "1"; + loListItem.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(loListItem); + facadeView.Add(loListItem); + + loListItem = new GUIListItem("Recent Photos"); + loListItem.Path = "2"; + loListItem.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(loListItem); + facadeView.Add(loListItem); + + loListItem = new GUIListItem("My Photos"); + loListItem.Path = "3"; + loListItem.IsFolder = true; + MediaPortal.Util.Utils.SetDefaultIcons(loListItem); + facadeView.Add(loListItem); + + + } + void OnSlideShow() + { + OnSlideShow(0); + } + + void OnSlideShow(int iStartItem) + { + + GUISlideShow SlideShow = (GUISlideShow)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_SLIDESHOW); + if (SlideShow == null) + return; + + SlideShow.Reset(); + + if ((iStartItem < 0) || (iStartItem > CurrentPhotoList.Count)) + iStartItem = 0; + int i = iStartItem; + do + { + GUIListItem item = facadeView[i]; + if (!item.IsFolder && !item.IsRemote) + { + SlideShow.Add(CurrentPhotoList[i].smallUrl); + } + + i++; + if (i >= CurrentPhotoList.Count) + { + i = 0; + } + } + while (i != iStartItem); + + if (SlideShow.Count > 0) + { + SlideShow.StartSlideShow(); + GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_SLIDESHOW); + } + } + } +} \ No newline at end of file Added: trunk/plugins/OnlinePhotos/OnlinePhotos.csproj =================================================================== --- trunk/plugins/OnlinePhotos/OnlinePhotos.csproj (rev 0) +++ trunk/plugins/OnlinePhotos/OnlinePhotos.csproj 2007-04-26 00:24:38 UTC (rev 345) @@ -0,0 +1,63 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectGuid>{3ADCC0C7-F12C-47A2-95D1-0845399E9984}</ProjectGuid> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <OutputType>Library</OutputType> + <RootNamespace>OnlinePhotos</RootNamespace> + <AssemblyName>OnlinePhotos</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> + <OutputPath>bin\Debug\</OutputPath> + <DebugSymbols>True</DebugSymbols> + <DebugType>Full</DebugType> + <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow> + <DefineConstants>DEBUG;TRACE</DefineConstants> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)' == 'Release' "> + <OutputPath>..\..\..\Program Files\Team MediaPortal\MediaPortal\Plugins\Windows\</OutputPath> + <DebugSymbols>False</DebugSymbols> + <DebugType>None</DebugType> + <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> + <DefineConstants>TRACE</DefineConstants> + </PropertyGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" /> + <ItemGroup> + <Reference Include="Core"> + <HintPath>..\..\MediaPortal\Core\bin\Release\Core.DLL</HintPath> + <SpecificVersion>False</SpecificVersion> + <Private>False</Private> + </Reference> + <Reference Include="Databases"> + <HintPath>..\..\MediaPortal\Databases\bin\Release\Databases.DLL</HintPath> + <SpecificVersion>False</SpecificVersion> + <Private>False</Private> + </Reference> + <Reference Include="Dialogs"> + <HintPath>..\..\MediaPortal\Dialogs\bin\Release\Dialogs.DLL</HintPath> + <SpecificVersion>False</SpecificVersion> + <Private>False</Private> + </Reference> + <Reference Include="FlickrNet"> + <HintPath>FlickrNet.dll</HintPath> + <SpecificVersion>False</SpecificVersion> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Xml" /> + <Reference Include="Utils"> + <HintPath>..\..\MediaPortal\Utils\bin\Release\Utils.DLL</HintPath> + <SpecificVersion>False</SpecificVersion> + <Private>False</Private> + </Reference> + <Reference Include="WindowPlugins"> + <HintPath>..\..\MediaPortal\WindowPlugins\bin\Release\WindowPlugins.dll</HintPath> + <SpecificVersion>False</SpecificVersion> + <Private>False</Private> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="AssemblyInfo.cs" /> + <Compile Include="Flickr.cs" /> + <Compile Include="MyClass.cs" /> + </ItemGroup> +</Project> \ No newline at end of file Added: trunk/plugins/OnlinePhotos/OnlinePhotos.sln =================================================================== --- trunk/plugins/OnlinePhotos/OnlinePhotos.sln (rev 0) +++ trunk/plugins/OnlinePhotos/OnlinePhotos.sln 2007-04-26 00:24:38 UTC (rev 345) @@ -0,0 +1,24 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +# SharpDevelop 2.1.0.2429 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OnlinePhotos", "OnlinePhotos.csproj", "{3ADCC0C7-F12C-47A2-95D1-0845399E9984}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestRunner", "..\TestRunner\TestRunner.csproj", "{1EE2BACD-3C01-495E-A06E-F739D649A1ED}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3ADCC0C7-F12C-47A2-95D1-0845399E9984}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3ADCC0C7-F12C-47A2-95D1-0845399E9984}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3ADCC0C7-F12C-47A2-95D1-0845399E9984}.Release|Any CPU.Build.0 = Release|Any CPU + {3ADCC0C7-F12C-47A2-95D1-0845399E9984}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EE2BACD-3C01-495E-A06E-F739D649A1ED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1EE2BACD-3C01-495E-A06E-F739D649A1ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EE2BACD-3C01-495E-A06E-F739D649A1ED}.Release|Any CPU.Build.0 = Release|Any CPU + {1EE2BACD-3C01-495E-A06E-F739D649A1ED}.Release|Any CPU.ActiveCfg = Release|Any CPU + EndGlobalSection +EndGlobal Added: trunk/plugins/OnlinePhotos/OnlinePhotos.suo =================================================================== (Binary files differ) Property changes on: trunk/plugins/OnlinePhotos/OnlinePhotos.suo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/OnlinePhotos/myonlinephotos.xml =================================================================== --- trunk/plugins/OnlinePhotos/myonlinephotos.xml (rev 0) +++ trunk/plugins/OnlinePhotos/myonlinephotos.xml 2007-04-26 00:24:38 UTC (rev 345) @@ -0,0 +1,35 @@ +<window> + <id>4755</id> + <defaultcontrol>50</defaultcontrol> + <allowoverlay>yes</allowoverlay> + <define>#header.label:MyOnlinePhotos</define> + <controls> + <import>common.window.xml</import> + <import>common.facade.xml</import> + <control> + <description>group element</description> + <type>group</type> + <animation effect="fade" time="250">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + <animation effect="slide" time="250" start="-300,0">WindowOpen</animation> + <animation effect="slide" time="500" end="0,-300">WindowClose</animation> + <posX>60</posX> + <posY>97</posY> + <layout>StackLayout</layout> + <control> + <type>button</type> + <description>View button</description> + <id>2</id> + <onright>50</onright> + <label>101</label> + </control> + <control> + <type>button</type> + <description>slideshow button</description> + <id>3</id> + <onright>50</onright> + <label>Slideshow</label> + </control> + </control> + </controls> +</window> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ze...@us...> - 2007-04-25 19:33:42
|
Revision: 344 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=344&view=rev Author: zebons Date: 2007-04-25 12:33:39 -0700 (Wed, 25 Apr 2007) Log Message: ----------- Add Views by Icons/Large Icons Modified Paths: -------------- trunk/plugins/MyFilms/MesFilms.cs trunk/plugins/MyFilms/MesFilms.csproj trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs trunk/plugins/MyFilms/MesFilmsSetup.cs trunk/plugins/MyFilms/skin/BlueTwo/MesFilms.xml Modified: trunk/plugins/MyFilms/MesFilms.cs =================================================================== --- trunk/plugins/MyFilms/MesFilms.cs 2007-04-25 05:00:30 UTC (rev 343) +++ trunk/plugins/MyFilms/MesFilms.cs 2007-04-25 19:33:39 UTC (rev 344) @@ -33,6 +33,7 @@ using System.IO; using System.Data; +using System.Drawing; using MediaPortal.Dialogs; using MediaPortal.Player; @@ -59,6 +60,7 @@ CTRL_BtnViewAs = 3, CTRL_BtnSearchT = 4, CTRL_BtnSearchA = 5, + CTRL_BtnLayout = 6, CTRL_TxtSelect = 12, CTRL_BtnStop = 319, CTRL_BtnPause = 315, @@ -72,6 +74,7 @@ CTRL_TxtYear = 1022, CTRL_TxtGenre = 1024, CTRL_Texte = 1025, + CTRL_Title = 1027, CTRL_ImgGrStar1 = 1051, CTRL_ImgGrStar2 = 1052, CTRL_ImgGrStar3 = 1053, @@ -86,16 +89,21 @@ CTRL_ImgStar2 = 1062, CTRL_ImgStar3 = 1063, CTRL_ImgStar4 = 1064, - CTRL_ImgStar5 = 1065 + CTRL_ImgStar5 = 1065, + CTRL_NbObjects = 2073 } [SkinControlAttribute((int)Controls.CTRL_TxtSelect)] protected GUIFadeLabel TxtSelect = null; [SkinControlAttribute((int)Controls.CTRL_BtnSrtBy)] protected GUISortButtonControl BtnSrtBy = null; [SkinControlAttribute((int)Controls.CTRL_List)] - protected GUIListControl lsCtlFilm = null; + protected GUIFacadeControl facadeView = null; + //[SkinControlAttribute((int)Controls.CTRL_List)] + //protected GUIListControl lsCtlFilm = null; [SkinControlAttribute((int)Controls.CTRL_Texte)] protected GUITextScrollUpControl ScrlLstText = null; + [SkinControlAttribute((int)Controls.CTRL_Title)] + protected GUIFadeLabel TitleSelect = null; [SkinControlAttribute((int)Controls.CTRL_TxtYear)] protected GUILabelControl TxtLstYear = null; [SkinControlAttribute((int)Controls.CTRL_TxtGenre)] @@ -104,7 +112,8 @@ protected GUIImage ImgLstFilm = null; [SkinControlAttribute((int)Controls.CTRL_Image2)] protected GUIImage ImgLstFilm2 = null; - + public int Layout = 0; + int Ctrl_DspImage; int Ctrl_DspImage2; bool boolselect = false; @@ -129,11 +138,13 @@ string StrFileType = null; string StrPathImg = null; string StrSortSens = null; + int StrLayOut = 0; public string WStrSort = null; public string WStrSelect = null; public string WStrSortSens = null; public bool boolreturn = false; public bool boolstorage = false; + string wselectedlabel = null; string StrDfltSelect = null; string CurrentSortMethod = null; decimal w_rating = 0; @@ -330,22 +341,24 @@ //--------------------------------------------------------------------------------------- // Display Informations about List Item //--------------------------------------------------------------------------------------- - if ((iControl == (int)Controls.CTRL_List) && !(boolselect || (lsCtlFilm.SelectedListItemIndex > -1 && lsCtlFilm.SelectedListItem.IsFolder))) //xxxx + if ((iControl == (int)Controls.CTRL_List) && !(boolselect || (facadeView.SelectedListItemIndex > -1 && facadeView.SelectedListItem.IsFolder))) //xxxx { - if (lsCtlFilm.SelectedListItemIndex > -1) + if (facadeView.SelectedListItemIndex > -1) { - affichage_Lstdetail(lsCtlFilm.SelectedListItem.ItemId, true); + affichage_Lstdetail(facadeView.SelectedListItem.ItemId, true, facadeView.SelectedListItem.Label); } } else - if (lsCtlFilm.SelectedListItemIndex > -1 && lsCtlFilm.SelectedListItem.IsFolder) + { + if (facadeView.SelectedListItemIndex > -1 && facadeView.SelectedListItem.IsFolder) { - affichage_Lstdetail(lsCtlFilm.SelectedListItem.ItemId, false); + affichage_Lstdetail(facadeView.SelectedListItem.ItemId, false, facadeView.SelectedListItem.Label); } else { masquage_Lstdetail(); } + } base.OnMessage(messageType); return true; @@ -353,17 +366,22 @@ //--------------------------------------------------------------------------------------- // Hide Informations about List Item //--------------------------------------------------------------------------------------- - if ((dControl == (int)Controls.CTRL_List) && !(boolselect || (lsCtlFilm.SelectedListItemIndex > -1 && lsCtlFilm.SelectedListItem.IsFolder))) //xxxx + if ((iControl == 0) && (dControl == (int)Controls.CTRL_List)) { - if (lsCtlFilm.SelectedListItemIndex > -1) + base.OnMessage(messageType); + return true; + } + if ((dControl == (int)Controls.CTRL_List) && !(boolselect || (facadeView.SelectedListItemIndex > -1 && facadeView.SelectedListItem.IsFolder))) //xxxx + { + if (facadeView.SelectedListItemIndex > -1) { - affichage_Lstdetail(lsCtlFilm.SelectedListItem.ItemId,true); + affichage_Lstdetail(facadeView.SelectedListItem.ItemId, true, facadeView.SelectedListItem.Label); } } else - if (lsCtlFilm.SelectedListItemIndex > -1 && lsCtlFilm.SelectedListItem.IsFolder) + if (facadeView.SelectedListItemIndex > -1 && facadeView.SelectedListItem.IsFolder) { - affichage_Lstdetail(lsCtlFilm.SelectedListItem.ItemId, false); + affichage_Lstdetail(facadeView.SelectedListItem.ItemId, false, facadeView.SelectedListItem.Label); } else { @@ -482,14 +500,39 @@ Selection_type_Video(); return base.OnMessage(messageType); } + if ((iControl == (int)Controls.CTRL_BtnLayout) && !boolselect) + // Change Layout View + { + if (Layout == 1) + { + GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(417)); + facadeView.View = GUIFacadeControl.ViewMode.LargeIcons; + Layout = 2; + } + else if (Layout == 2) + { + GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(101)); + facadeView.View = GUIFacadeControl.ViewMode.List; + Layout = 0; + } + else + { + GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(100)); + facadeView.View = GUIFacadeControl.ViewMode.SmallIcons; + Layout = 1; + } + GetFilmList(); + return base.OnMessage(messageType); + } + if (iControl == (int)Controls.CTRL_List) { - if (lsCtlFilm.SelectedListItemIndex > -1) + if (facadeView.SelectedListItemIndex > -1) { - if (!lsCtlFilm.SelectedListItem.IsFolder && !boolselect) + if (!facadeView.SelectedListItem.IsFolder && !boolselect) // New Window for detailed selected item information { - //l_index = lsCtlFilm.SelectedListItemIndex; + //l_index = facadeView.SelectedListItemIndex; save_config_values(); mydivx.Clear(); GUIWindowManager.ActivateWindow(ID_MesFilmsDetail); @@ -497,10 +540,12 @@ else // View List as selected { + wselectedlabel = facadeView.SelectedListItem.Label; + Change_LayOut(Layout); do { if (StrTitleSelect != "") StrTitleSelect += TitleDelim; - StrTitleSelect += lsCtlFilm.SelectedListItem.Label; + StrTitleSelect += wselectedlabel; } while (GetFilmList() == false); //keep calling while single folders found } } @@ -571,7 +616,7 @@ if (boolselect) { - string sLabel = lsCtlFilm.SelectedListItem.Label; + string sLabel = wselectedlabel; if (WStrSort == "Date") StrSelect = "Date" + " like '" + string.Format("{0:dd/MM/yyyy}",DateTime.Parse(sLabel).ToShortDateString()) + "'"; else @@ -611,7 +656,7 @@ /// <returns>If returns false means is currently displaying a single folder</returns> bool GetFilmList<T>(T gSelItem) { - int iCnt = 0; + int iCnt = 0; int DelimCnt = 0, DelimCnt2; GUIListItem item = new GUIListItem(); string sTitle; @@ -629,8 +674,7 @@ BtnSrtBy.Label = CurrentSortMethod; if (StrTitleSelect != "") DelimCnt = NewString.PosCount(TitleDelim, StrTitleSelect, false) + 1; //get num .'s in title - lsCtlFilm.Clear(); - + facadeView.Clear(); //---------------------------------------------------------------------------------------- // Load the DataSet. foreach (DataRow r in LectureDonn\xE9es(StrFilmSelect, StrSort, StrSortSens)) @@ -685,25 +729,32 @@ item.Label2 = r[StrSort1].ToString(); break; } - lsCtlFilm.Add(item); + if (r["Picture"].ToString().IndexOf(":\\") == -1) + item.ThumbnailImage = StrPathImg + "\\" + r["Picture"].ToString(); + else + item.ThumbnailImage = r["Picture"].ToString(); + //item.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(OnRetrieveCoverArt); + facadeView.Add(item); + if (iSelItem == -2) //set selected item = passed in string? { - if (sTitle == SelItem) l_index = lsCtlFilm.Count - 1; //test if this item is one to select + if (sTitle == SelItem) l_index = facadeView.Count - 1; //test if this item is one to select } } if (iSelItem >= 0) //-1 = ignore, >=0 = itemID to locate (test every item in case item is from within a folder) { - if ((int)(r["Number"]) == iSelItem) l_index = lsCtlFilm.Count - 1; //test if this item is one to select + if ((int)(r["Number"]) == iSelItem) l_index = facadeView.Count - 1; //test if this item is one to select } sPrevTitle = sTitle; } - if ((l_index > lsCtlFilm.Count - 1) || (l_index < 0)) + if ((l_index > facadeView.Count - 1) || (l_index < 0)) l_index = 0; - GUIControl.SelectItemControl(GetID, (int)Controls.CTRL_List, (int)l_index); - GUIPropertyManager.SetProperty("#nbobjects", lsCtlFilm.Count.ToString() + " " + GUILocalizeStrings.Get(127)); - return !(lsCtlFilm.Count == 1 && item.IsFolder); //ret false if single folder found + + GUIControl.SelectItemControl(GetID, (int)Controls.CTRL_List, (int)l_index); + GUIPropertyManager.SetProperty("#nbobjects", facadeView.Count.ToString() + " " + GUILocalizeStrings.Get(127)); + return !(facadeView.Count == 1 && item.IsFolder); //ret false if single folder found } @@ -759,7 +810,7 @@ //---------------------------------------------------------------------------------------- // Display Detailed Info (Image, Description, Year, Category) //---------------------------------------------------------------------------------------- - private void affichage_Lstdetail(int ItemId, bool wrep)//wrep = false display only image + private void affichage_Lstdetail(int ItemId, bool wrep, string wlabel)//wrep = false display only image { DataRow[] r = LectureDonn\xE9es("Number = " + ItemId.ToString(), "", ""); @@ -818,7 +869,17 @@ } ScrlLstText.Clear(); ScrlLstText.Label = r[0]["Description"].ToString().Replace('|', ' '); - GUIControl.ShowControl(GetID, (int)Controls.CTRL_Texte); + TitleSelect.Label = wlabel; + if (Layout == 0) + { + GUIControl.ShowControl(GetID, (int)Controls.CTRL_Texte); + GUIControl.HideControl(GetID, (int)Controls.CTRL_Title); + } + else + { + GUIControl.ShowControl(GetID, (int)Controls.CTRL_Title); + GUIControl.HideControl(GetID, (int)Controls.CTRL_Texte); + } TxtLstGenre.Label = r[0]["Category"].ToString(); GUIControl.ShowControl(GetID, (int)Controls.CTRL_TxtGenre); TxtLstYear.Label = r[0]["Year"].ToString(); @@ -853,7 +914,7 @@ StrSortSens = " DESC"; if (!boolselect) GetFilmList(); - else + else getSelectFromDivx(StrTitle1.ToString() + " not like ''", WStrSort, StrSortSens, "*", true, ""); return; } @@ -956,7 +1017,10 @@ } dlg.DoModal(GetID); - if (dlg.SelectedLabel == -1) return; + if (dlg.SelectedLabel == -1) + { + return; + } Change_view(choice_view[dlg.SelectedLabel].ToString()); return; } @@ -986,7 +1050,7 @@ boolselect = true; boolreturn = true; if (ClearIndex) l_index = 0; - lsCtlFilm.Clear(); + facadeView.Clear(); foreach (DataRow enr in LectureDonn\xE9es(WstrSelect, WStrSort, WStrSortSens)) { @@ -1027,8 +1091,8 @@ item = new GUIListItem(); item.Label = champselect.ToString(); item.Label2 = Wnb_enr.ToString(); - lsCtlFilm.Add(item); - if (SelItem != "" && item.Label == SelItem) l_index = lsCtlFilm.Count - 1; //test if this item is one to select + facadeView.Add(item); + if (SelItem != "" && item.Label == SelItem) l_index = facadeView.Count - 1; //test if this item is one to select } else Wnb_enr = 0; @@ -1042,11 +1106,11 @@ StrSelect = WstrSelect; StrFilmSelect = ""; - if ((l_index > lsCtlFilm.Count - 1) || (l_index < 0)) //check index within bounds, will be unless xml file heavily edited + if ((l_index > facadeView.Count - 1) || (l_index < 0)) //check index within bounds, will be unless xml file heavily edited l_index = 0; GUIControl.SelectItemControl(GetID, (int)Controls.CTRL_List, (int)l_index); - GUIPropertyManager.SetProperty("#nbobjects", lsCtlFilm.Count.ToString() + " " + GUILocalizeStrings.Get(127)); + GUIPropertyManager.SetProperty("#nbobjects", facadeView.Count.ToString() + " " + GUILocalizeStrings.Get(127)); } //---------------------------------------------------------------------------------------------- @@ -1076,10 +1140,11 @@ xmlwriter.SetValue(CurrentConfig, "CurrentSortMethod", CurrentSortMethod.ToString()); xmlwriter.SetValue(CurrentConfig, "StrSortSens", StrSortSens.ToString()); xmlwriter.SetValue(CurrentConfig, "Selection", StrTxtSelect); - xmlwriter.SetValue(CurrentConfig, "IndexItem", (lsCtlFilm.SelectedListItemIndex > -1) ? ((boolselect) ? lsCtlFilm.SelectedListItemIndex.ToString() : lsCtlFilm.SelectedListItem.ItemId.ToString()) : "-1"); //may need to check if there is no item selected and so save -1 + xmlwriter.SetValue(CurrentConfig, "IndexItem", (facadeView.SelectedListItemIndex > -1) ? ((boolselect) ? facadeView.SelectedListItemIndex.ToString() : facadeView.SelectedListItem.ItemId.ToString()) : "-1"); //may need to check if there is no item selected and so save -1 xmlwriter.SetValueAsBool(CurrentConfig, "boolselect", boolselect); xmlwriter.SetValue(CurrentConfig, "WStrSort", WStrSort); xmlwriter.SetValue(CurrentConfig, "Wstar", Wstar); + xmlwriter.SetValue(CurrentConfig, "WLayOut", Layout); switch (StrFileType) { case "0": @@ -1114,6 +1179,8 @@ StrFileXml = xmlreader.GetValueAsString(CurrentConfig, "AntCatalog", ""); StrFileType = xmlreader.GetValueAsString(CurrentConfig, "CatalogType", "0"); StrPathImg = xmlreader.GetValueAsString(CurrentConfig, "AntPicture", ""); + StrLayOut = xmlreader.GetValueAsInt(CurrentConfig, "LayOut", 0); + StrLayOut = xmlreader.GetValueAsInt(CurrentConfig, "WLayOut", StrLayOut); switch (StrFileType) { case "0": @@ -1219,6 +1286,8 @@ dlgOk.SetLine(2, "Verify your file with the plugin setup"); dlgOk.DoModal(GetID); } + Layout = StrLayOut; + Change_LayOut(Layout); if (StrSelect == "") StrSelect = StrTitle1.ToString() + " not like ''"; if (StrSort1.Length == 0) @@ -1243,7 +1312,7 @@ if (!(LoadDfltSlct)) GetFilmList(l_index); else - { + { if ((StrViewDfltItem.Length == 0) || (StrViewDfltItem == "(none)")) { StrSelect = StrTitle1.ToString() + " not like ''"; @@ -1286,7 +1355,6 @@ else BtnSrtBy.IsAscending = false; GetFilmList(l_index); - } } @@ -1299,6 +1367,31 @@ } } //-------------------------------------------------------------------------------------------- + // Change LayOut + //-------------------------------------------------------------------------------------------- + private void Change_LayOut(int wLayOut) + { + switch (wLayOut) + { + case 1: + GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(100)); + facadeView.View = GUIFacadeControl.ViewMode.SmallIcons; + break; + case 2: + GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(417)); + facadeView.View = GUIFacadeControl.ViewMode.LargeIcons; + break; + default: + GUIControl.SetControlLabel(GetID, (int)Controls.CTRL_BtnLayout, GUILocalizeStrings.Get(101)); + facadeView.View = GUIFacadeControl.ViewMode.List; + break; + } + GUIControl.HideControl(GetID, facadeView.GetID); + int iControl = facadeView.GetID; + GUIControl.ShowControl(GetID, iControl); + GUIControl.FocusControl(GetID, iControl); + } + //-------------------------------------------------------------------------------------------- // Change View Response //-------------------------------------------------------------------------------------------- private void Change_view(string choice_view) @@ -1315,6 +1408,7 @@ if (choice_view == "Year") { // Change View by Year + Change_LayOut(0); WStrSort = "YEAR"; WStrSortSens = " DESC"; BtnSrtBy.IsAscending = false; @@ -1325,6 +1419,7 @@ if (choice_view == "Category") { // Change View by "Category": + Change_LayOut(0); WStrSort = "CATEGORY"; WStrSortSens = " ASC"; BtnSrtBy.IsAscending = true; @@ -1334,6 +1429,7 @@ if (choice_view == "Country") { // Change View by "Country": + Change_LayOut(0); WStrSort = "COUNTRY"; WStrSortSens = " ASC"; BtnSrtBy.IsAscending = true; @@ -1359,6 +1455,7 @@ if (choice_view == "View1") { // Change View by "View1": + Change_LayOut(0); WStrSort = StrViewItem1; // specific user View1 WStrSortSens = " ASC"; BtnSrtBy.IsAscending = true; @@ -1371,6 +1468,7 @@ if (choice_view == "View2") { // Change View by "View2": + Change_LayOut(0); WStrSort = StrViewItem2; WStrSortSens = " ASC"; BtnSrtBy.IsAscending = true; Modified: trunk/plugins/MyFilms/MesFilms.csproj =================================================================== --- trunk/plugins/MyFilms/MesFilms.csproj 2007-04-25 05:00:30 UTC (rev 343) +++ trunk/plugins/MyFilms/MesFilms.csproj 2007-04-25 19:33:39 UTC (rev 344) @@ -29,28 +29,26 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="Core, Version=1.0.2576.34540, Culture=neutral, processorArchitecture=x86"> + <Reference Include="Core, Version=0.2.2.0, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\mediaportal_plugin\MesFilms\Core_Svn\Core.dll</HintPath> + <HintPath>..\..\Mediaportal\Core\bin\Release\Core.dll</HintPath> </Reference> - <Reference Include="Databases, Version=1.0.2548.1828, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Databases, Version=0.2.2.0, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\Mediaportal\Dialogs\bin\Release\Databases.dll</HintPath> - <Private>False</Private> + <HintPath>..\..\Mediaportal\Dialogs\bin\Release\Databases.dll</HintPath> </Reference> - <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\Mediaportal\Dialogs\bin\Release\Dialogs.dll</HintPath> - <Private>False</Private> + <HintPath>..\..\Mediaportal\Dialogs\bin\Release\Dialogs.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> - <Reference Include="Utils, Version=1.0.2576.34538, Culture=neutral, processorArchitecture=x86"> + <Reference Include="Utils, Version=2.1.2.0, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\mediaportal_plugin\MesFilms\Core_Svn\Utils.dll</HintPath> + <HintPath>..\..\Mediaportal\Core\bin\Release\Utils.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> Modified: trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs =================================================================== --- trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs 2007-04-25 05:00:30 UTC (rev 343) +++ trunk/plugins/MyFilms/MesFilmsSetup.Designer.cs 2007-04-25 19:33:39 UTC (rev 344) @@ -155,6 +155,8 @@ this.Config_Name = new System.Windows.Forms.ComboBox(); this.label12 = new System.Windows.Forms.Label(); this.groupBox7 = new System.Windows.Forms.GroupBox(); + this.label14 = new System.Windows.Forms.Label(); + this.LayOut = new System.Windows.Forms.ComboBox(); this.label13 = new System.Windows.Forms.Label(); this.CatalogType = new System.Windows.Forms.ComboBox(); this.ButSave = new System.Windows.Forms.Button(); @@ -703,7 +705,7 @@ this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(69, 13); this.label10.TabIndex = 34; - this.label10.Text = "Version 4.1.0"; + this.label10.Text = "Version 4.2.0"; // // textBox1 // @@ -743,6 +745,8 @@ // // groupBox7 // + this.groupBox7.Controls.Add(this.label14); + this.groupBox7.Controls.Add(this.LayOut); this.groupBox7.Controls.Add(this.label13); this.groupBox7.Controls.Add(this.CatalogType); this.groupBox7.Controls.Add(this.ButSave); @@ -776,6 +780,28 @@ this.groupBox7.TabStop = false; this.groupBox7.Text = "Config Infos"; // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(597, 130); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(78, 13); + this.label14.TabIndex = 44; + this.label14.Text = "Default LayOut"; + // + // LayOut + // + this.LayOut.FormattingEnabled = true; + this.LayOut.Items.AddRange(new object[] { + "List", + "Small Icons", + "Large Icons"}); + this.LayOut.Location = new System.Drawing.Point(681, 127); + this.LayOut.Name = "LayOut"; + this.LayOut.Size = new System.Drawing.Size(112, 21); + this.LayOut.TabIndex = 43; + this.LayOut.Text = "List"; + // // label13 // this.label13.AutoSize = true; @@ -962,6 +988,8 @@ private TextBox TitleDelim; private Label label13; private ComboBox CatalogType; + private Label label14; + private ComboBox LayOut; } } \ No newline at end of file Modified: trunk/plugins/MyFilms/MesFilmsSetup.cs =================================================================== --- trunk/plugins/MyFilms/MesFilmsSetup.cs 2007-04-25 05:00:30 UTC (rev 343) +++ trunk/plugins/MyFilms/MesFilmsSetup.cs 2007-04-25 19:33:39 UTC (rev 344) @@ -272,7 +272,11 @@ // currentLanguage = xmlreader.GetValueAsString("skin", "language", "English"); //} //string LanguageDirectory = Config.GetFolder(Config.Dir.Language); - + int WLayOut = 0; + if (LayOut.Text == "Small Icons") + WLayOut = 1; + if (LayOut.Text == "Large Icons") + WLayOut = 2; if (AntTitle2.Text.Length == 0) AntTitle2.Text = "(none)"; if (Config_Dflt.Checked) @@ -326,8 +330,7 @@ MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "StrSortSens", ""); MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "IndexItem", ""); MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "TitleDelim", TitleDelim.Text); - - + MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "LayOut", WLayOut); MyFilms_xmlwriter.SetValue(Config_Name.Text.ToString(), "StrDfltSelect", StrDfltSelect); string w_Config_Name = Config_Name.Text; @@ -413,6 +416,13 @@ View_Dflt_Item.Items.Add(AntViewItem1.Text); if (!(AntViewItem2.Text == "Country") & !(AntViewItem2.Text == "Category") & !(AntViewItem2.Text == "Year") & !(AntViewItem2.Text == "(none)")) View_Dflt_Item.Items.Add(AntViewItem2.Text); + int WLayOut = MyFilms_xmlreader.GetValueAsInt(Config_Name.Text.ToString(), "LayOut", 0); + if (WLayOut == 0) + LayOut.Text = "List"; + if (WLayOut == 1) + LayOut.Text = "Small Icons"; + if (WLayOut == 2) + LayOut.Text = "Large Icons"; View_Dflt_Item.Items.Remove(""); } private void Refresh_Items(bool all) @@ -461,6 +471,7 @@ AntItem2.ResetText(); AntItem3.ResetText(); TitleDelim.ResetText(); + LayOut.ResetText(); View_Dflt_Item.ResetText(); View_Dflt_Text.ResetText(); } @@ -528,6 +539,7 @@ MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "StrSortSens"); MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "IndexItem"); MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "TitleDelim"); + MyFilms_xmlwriter.RemoveEntry(Config_Name.Text, "LayOut"); if ((Config_Name.Text) == MyFilms_xmlreader.GetValueAsString("MyFilms", "Default_Config", "")) MyFilms_xmlwriter.RemoveEntry("MyFilms", "Default_Config"); Config_Name.Items.Remove(Config_Name.Text); Modified: trunk/plugins/MyFilms/skin/BlueTwo/MesFilms.xml =================================================================== --- trunk/plugins/MyFilms/skin/BlueTwo/MesFilms.xml 2007-04-25 05:00:30 UTC (rev 343) +++ trunk/plugins/MyFilms/skin/BlueTwo/MesFilms.xml 2007-04-25 19:33:39 UTC (rev 344) @@ -1,6 +1,6 @@ <window> <id>7986</id> - <defaultcontrol>1026</defaultcontrol> + <defaultcontrol>6</defaultcontrol> <allowoverlay>yes</allowoverlay> <controls> <import>common.time.xml</import> @@ -55,13 +55,27 @@ </padding> </mpe> <control> - <type>sortbutton</type> - <id>2</id> + <type>button</type> + <description>Layout</description> + <id>6</id> <posX>60</posX> <posY>97</posY> <onleft>5</onleft> <onright>1026</onright> <onup>5</onup> + <ondown>2</ondown> + <animation>unfocus</animation> + <label>101</label> + <textcolor>ff000000</textcolor> + </control> + <control> + <type>sortbutton</type> + <id>2</id> + <posX>60</posX> + <posY>129</posY> + <onleft>6</onleft> + <onright>1026</onright> + <onup>6</onup> <ondown>3</ondown> <textureAscendingFocused>arrow_round_up_focus.png</textureAscendingFocused> <font>font13</font> @@ -84,7 +98,7 @@ <description>Switch view</description> <id>3</id> <posX>60</posX> - <posY>129</posY> + <posY>161</posY> <onleft>2</onleft> <onright>1026</onright> <onup>2</onup> @@ -98,7 +112,7 @@ <description>Search by Films</description> <id>4</id> <posX>60</posX> - <posY>161</posY> + <posY>193</posY> <onleft>3</onleft> <onright>1026</onright> <onup>3</onup> @@ -112,15 +126,16 @@ <description>Search by Actors</description> <id>5</id> <posX>60</posX> - <posY>193</posY> + <posY>225</posY> <onleft>4</onleft> <onright>1026</onright> <onup>4</onup> - <ondown>319</ondown> + <ondown>6</ondown> <animation>unfocus</animation> <label>137</label> <textcolor>ff000000</textcolor> </control> + </control> <control> <type>fadelabel</type> @@ -136,69 +151,58 @@ </control> <control> <type>group</type> - <description>composite control consisting of a list control and a thumbnail panel</description> - <id>1000</id> - <posX>260</posX> - <posY>97</posY> - <width>448</width> - <height>424</height> <animation effect="slide" time="400" start="0,-300">WindowOpen</animation> <animation effect="slide" time="400" end="800,0" >WindowClose</animation> <animation effect="fade" time="250">WindowOpen</animation> <animation effect="fade" time="500">WindowClose</animation> - <mpe> - <layout>Grid</layout> - <spring>no</spring> - <spacing>0</spacing> - <padding> - <top>0</top> - <right>0</right> - <bottom>0</bottom> - <left>0</left> - </padding> - </mpe> + <control> + <description>composite control consisting of a list control and a thumbnail panel</description> + <type>facadeview</type> + <id>1026</id> <control> + <description>Thumbnail Panel</description> + <type>thumbnailpanel</type> + <scrollOffset>1</scrollOffset> + <onleft>6</onleft> + <onright>1026</onright> + <itemWidth>72</itemWidth> + <textureWidth>58</textureWidth> + <thumbWidth>44</thumbWidth> + <thumbPosX>7</thumbPosX> + <textureWidthBig>85</textureWidthBig> + <textureHeightBig>116</textureHeightBig> + <itemWidthBig>108</itemWidthBig> + <itemHeightBig>138</itemHeightBig> + <thumbWidthBig>64</thumbWidthBig> + <thumbHeightBig>90</thumbHeightBig> + <thumbPosXBig>10</thumbPosXBig> + </control> + <control> <type>listcontrol</type> <description>listcontrol</description> - <id>1026</id> <posX>260</posX> <posY>97</posY> <width>440</width> <height>354</height> - <onleft>2</onleft> - <onright>1000</onright> - <onup>1026</onup> - <ondown>1026</ondown> - <playedColor>ffa0d0ff</playedColor> + <onleft>6</onleft> <font>font13</font> - <textcolor2>ffffffff</textcolor2> - <textureDown>page_down_nofocus.png</textureDown> - <spinPosY>530</spinPosY> - <remoteColor>ffFFA075</remoteColor> - <textureHeight>32</textureHeight> - <spinHeight>27</spinHeight> - <textureUpFocus>page_up_focus.png</textureUpFocus> - <textXOff>5</textXOff> - <textYOff>4</textYOff> - <spinColor>ffffffff</spinColor> - <spinWidth>26</spinWidth> - <shadedColor>20ffffff</shadedColor> - <textYOff2>4</textYOff2> - <IconXOff>8</IconXOff> - <textureNoFocus>list_sub_nofocus.png</textureNoFocus> - <textureDownFocus>page_down_focus.png</textureDownFocus> - <textcolor>ffffffff</textcolor> - <selectedColor>FFF8BC70</selectedColor> - <image>folder_focus.png</image> - <IconYOff>8</IconYOff> - <spinPosX>590</spinPosX> - <textXOff2>0</textXOff2> - <suffix>|</suffix> - <textureUp>page_up_nofocus.png</textureUp> - <downloadColor>ff80ff80</downloadColor> - <textcolor3>ffffffff</textcolor3> - <textureFocus>list_sub_focus.png</textureFocus> </control> + <control> + <description>Filmstrip view</description> + <type>filmstrip</type> + <width>440</width> + <height>354</height> + <onleft>6</onleft> + <backgroundx>354</backgroundx> + <backgroundy>99</backgroundy> + <backgroundwidth>238</backgroundwidth> + <backgroundheight>336</backgroundheight> + <InfoImagex>366</InfoImagex> + <InfoImagey>118</InfoImagey> + <InfoImagewidth>197</InfoImagewidth> + <InfoImageheight>274</InfoImageheight> + </control> + </control> <control> <type>textboxscrollup</type> <description>Biography value</description> @@ -208,7 +212,7 @@ <width>440</width> <height>106</height> <colordiffuse>ffffffff</colordiffuse> - <onleft>2</onleft> + <onleft>6</onleft> <onright>1026</onright> <onup>1026</onup> <ondown>1026</ondown> @@ -217,12 +221,27 @@ <textcolor>FFFFFFFF</textcolor> <label>-</label> </control> + <control> + <type>fadelabel</type> + <description>Title (during Icons)</description> + <id>1027</id> + <posX>65</posX> + <posY>470</posY> + <onleft>6</onleft> + <onright>1026</onright> + <onup>1026</onup> + <ondown>1026</ondown> + <font>font12</font> + <width>175</width> + <height>24</height> + <label>-</label> + </control> </control> <control> <type>image</type> <id>1065</id> - <posX>224</posX> - <posY>350</posY> + <posX>219</posX> + <posY>370</posY> <width>36</width> <height>36</height> <visible>no</visible> @@ -232,8 +251,8 @@ <control> <type>image</type> <id>1064</id> - <posX>227</posX> - <posY>316</posY> + <posX>222</posX> + <posY>336</posY> <width>30</width> <height>30</height> <visible>no</visible> @@ -243,8 +262,8 @@ <control> <type>image</type> <id>1063</id> - <posX>230</posX> - <posY>288</posY> + <posX>225</posX> + <posY>308</posY> <width>24</width> <height>24</height> <visible>no</visible> @@ -254,8 +273,8 @@ <control> <type>image</type> <id>1062</id> - <posX>233</posX> - <posY>266</posY> + <posX>228</posX> + <posY>286</posY> <width>18</width> <height>18</height> <visible>no</visible> @@ -265,8 +284,8 @@ <control> <type>image</type> <id>1061</id> - <posX>236</posX> - <posY>250</posY> + <posX>231</posX> + <posY>270</posY> <width>12</width> <height>12</height> <visible>no</visible> @@ -276,8 +295,8 @@ <control> <type>image</type> <id>1060</id> - <posX>224</posX> - <posY>350</posY> + <posX>219</posX> + <posY>370</posY> <width>36</width> <height>36</height> <visible>no</visible> @@ -287,8 +306,8 @@ <control> <type>image</type> <id>1059</id> - <posX>227</posX> - <posY>316</posY> + <posX>222</posX> + <posY>336</posY> <width>30</width> <height>30</height> <visible>no</visible> @@ -298,8 +317,8 @@ <control> <type>image</type> <id>1058</id> - <posX>230</posX> - <posY>288</posY> + <posX>225</posX> + <posY>308</posY> <width>24</width> <height>24</height> <visible>no</visible> @@ -309,8 +328,8 @@ <control> <type>image</type> <id>1057</id> - <posX>233</posX> - <posY>266</posY> + <posX>228</posX> + <posY>286</posY> <width>18</width> <height>18</height> <visible>no</visible> @@ -320,8 +339,8 @@ <control> <type>image</type> <id>1056</id> - <posX>236</posX> - <posY>250</posY> + <posX>231</posX> + <posY>270</posY> <width>12</width> <height>12</height> <visible>no</visible> @@ -331,8 +350,8 @@ <control> <type>image</type> <id>1055</id> - <posX>224</posX> - <posY>350</posY> + <posX>219</posX> + <posY>370</posY> <width>36</width> <height>36</height> <visible>no</visible> @@ -342,8 +361,8 @@ <control> <type>image</type> <id>1054</id> - <posX>227</posX> - <posY>316</posY> + <posX>222</posX> + <posY>336</posY> <width>30</width> <height>30</height> <visible>no</visible> @@ -353,8 +372,8 @@ <control> <type>image</type> <id>1053</id> - <posX>230</posX> - <posY>288</posY> + <posX>225</posX> + <posY>308</posY> <width>24</width> <height>24</height> <visible>no</visible> @@ -364,8 +383,8 @@ <control> <type>image</type> <id>1052</id> - <posX>233</posX> - <posY>266</posY> + <posX>228</posX> + <posY>286</posY> <width>18</width> <height>18</height> <visible>no</visible> @@ -375,8 +394,8 @@ <control> <type>image</type> <id>1051</id> - <posX>236</posX> - <posY>250</posY> + <posX>231</posX> + <posY>270</posY> <width>12</width> <height>12</height> <visible>no</visible> @@ -387,9 +406,9 @@ <type>image</type> <id>1021</id> <posX>65</posX> - <posY>250</posY> - <width>155</width> - <height>220</height> + <posY>270</posY> + <width>145</width> + <height>200</height> <texture>-</texture> <keepaspectratio>yes</keepaspectratio> </control> @@ -424,8 +443,8 @@ <control> <type>image</type> <id>1020</id> - <posX>80</posX> - <posY>235</posY> + <posX>85</posX> + <posY>260</posY> <width>122</width> <height>160</height> <texture>-</texture> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2007-04-25 05:00:39
|
Revision: 343 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=343&view=rev Author: and-81 Date: 2007-04-24 22:00:30 -0700 (Tue, 24 Apr 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MCEReplacement/Forms/GoToScreen.Designer.cs trunk/plugins/MCEReplacement/MCEReplacement.cs Modified: trunk/plugins/MCEReplacement/Forms/GoToScreen.Designer.cs =================================================================== --- trunk/plugins/MCEReplacement/Forms/GoToScreen.Designer.cs 2007-04-19 14:45:34 UTC (rev 342) +++ trunk/plugins/MCEReplacement/Forms/GoToScreen.Designer.cs 2007-04-25 05:00:30 UTC (rev 343) @@ -38,17 +38,18 @@ // this.comboBoxScreen.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.comboBoxScreen.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBoxScreen.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + this.comboBoxScreen.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; this.comboBoxScreen.FormattingEnabled = true; this.comboBoxScreen.Location = new System.Drawing.Point(8, 24); this.comboBoxScreen.Name = "comboBoxScreen"; - this.comboBoxScreen.Size = new System.Drawing.Size(280, 21); + this.comboBoxScreen.Size = new System.Drawing.Size(248, 21); this.comboBoxScreen.TabIndex = 0; // // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonOK.Location = new System.Drawing.Point(152, 56); + this.buttonOK.Location = new System.Drawing.Point(120, 56); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(64, 24); this.buttonOK.TabIndex = 1; @@ -60,7 +61,7 @@ // this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(224, 56); + this.buttonCancel.Location = new System.Drawing.Point(192, 56); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(64, 24); this.buttonCancel.TabIndex = 2; @@ -74,7 +75,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.labelScreen.Location = new System.Drawing.Point(8, 8); this.labelScreen.Name = "labelScreen"; - this.labelScreen.Size = new System.Drawing.Size(280, 16); + this.labelScreen.Size = new System.Drawing.Size(248, 16); this.labelScreen.TabIndex = 3; this.labelScreen.Text = "Screen:"; // @@ -84,14 +85,14 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.buttonCancel; - this.ClientSize = new System.Drawing.Size(296, 89); + this.ClientSize = new System.Drawing.Size(264, 89); this.Controls.Add(this.labelScreen); this.Controls.Add(this.buttonCancel); this.Controls.Add(this.buttonOK); this.Controls.Add(this.comboBoxScreen); this.MaximizeBox = false; this.MinimizeBox = false; - this.MinimumSize = new System.Drawing.Size(270, 116); + this.MinimumSize = new System.Drawing.Size(272, 123); this.Name = "GoToScreen"; this.ShowIcon = false; this.ShowInTaskbar = false; Modified: trunk/plugins/MCEReplacement/MCEReplacement.cs =================================================================== --- trunk/plugins/MCEReplacement/MCEReplacement.cs 2007-04-19 14:45:34 UTC (rev 342) +++ trunk/plugins/MCEReplacement/MCEReplacement.cs 2007-04-25 05:00:30 UTC (rev 343) @@ -38,7 +38,7 @@ public const string IRExtension = ".IR"; public const string MacroExtension = ".MACRO"; - // Plugin Commands + // Macro Commands public const string RunCommandPrefix = "Run: "; public const string BlastCommandPrefix = "Blast: "; public const string PauseCommandPrefix = "Pause: "; @@ -412,7 +412,6 @@ if (LogVerbose) Log.Info("MCEReplacement: Started"); } - public void Stop() { if (LogVerbose) @@ -2160,27 +2159,6 @@ return ProcessGoTo(command.Substring(GoToCommandPrefix.Length)); } - - - - - /* - public const string SetMapCommandPrefix = "Multi-Mapping: "; - public const string SetMouseCommandPrefix = "Mouse Mode: "; - public const string InputLayerCommand = "Toggle Input Layer"; - public const string WindowStateCommand = "Toggle Window State"; - public const string GetFocusCommand = "Get Focus"; - - public const string ExitCommand = "Exit MediaPortal"; -public const string StandByCommand = "Standby"; -public const string HibernateCommand = "Hibernate"; -public const string RebootCommand = "Reboot"; -public const string ShutdownCommand = "Shutdown"; - */ - - - - Log.Error("MCEReplacement: Unprocessed command \"{0}\"", command); return false; } @@ -2323,16 +2301,41 @@ try { - GUIWindow.Window window = (GUIWindow.Window)Enum.Parse(typeof(GUIWindow.Window), "WINDOW_" + screen); + int window = (int)GUIWindow.Window.WINDOW_INVALID; - if (window == GUIWindow.Window.WINDOW_HOME && MP_BasicHome) - window = GUIWindow.Window.WINDOW_SECOND_HOME; + try + { + window = (int)Enum.Parse(typeof(GUIWindow.Window), "WINDOW_" + screen); + } + catch + { + // Parsing the window id as a GUIWindow.Window failed, so parse it as an int + } + try + { + if (window == (int)GUIWindow.Window.WINDOW_INVALID) + window = Convert.ToInt32(screen); + } + catch + { + // Parsing the window id as an int failed, give up. + } + + if (window == (int)GUIWindow.Window.WINDOW_INVALID) + { + Log.Error("MCEReplacement: Failed to parse Goto command window id \"{0}\"", screen); + return false; + } + + if (window == (int)GUIWindow.Window.WINDOW_HOME && MP_BasicHome) + window = (int)GUIWindow.Window.WINDOW_SECOND_HOME; + if (LogVerbose) - Log.Info("MCEReplacement: Go To Window \"{0}\"", Enum.GetName(typeof(GUIWindow.Window), window)); + Log.Info("MCEReplacement: Go To Window \"{0}\"", window); GUIGraphicsContext.ResetLastActivity(); - GUIWindowManager.SendThreadMessage(new GUIMessage(GUIMessage.MessageType.GUI_MSG_GOTO_WINDOW, 0, 0, 0, (int)window, 0, null)); + GUIWindowManager.SendThreadMessage(new GUIMessage(GUIMessage.MessageType.GUI_MSG_GOTO_WINDOW, 0, 0, 0, window, 0, null)); } catch (Exception ex) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-04-19 14:45:35
|
Revision: 342 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=342&view=rev Author: dukus Date: 2007-04-19 07:45:34 -0700 (Thu, 19 Apr 2007) Log Message: ----------- Removed Paths: ------------- trunk/plugins/MyDVDs/MyDVDs.suo Deleted: trunk/plugins/MyDVDs/MyDVDs.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fa...@us...> - 2007-04-18 22:15:13
|
Revision: 341 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=341&view=rev Author: falkyre Date: 2007-04-18 15:14:47 -0700 (Wed, 18 Apr 2007) Log Message: ----------- Added Paths: ----------- trunk/plugins/MyShowTimes/ trunk/plugins/MyShowTimes/MediaPortal ShowTimes Plugins Suite.doc trunk/plugins/MyShowTimes/ShowTimesGUI/ trunk/plugins/MyShowTimes/ShowTimesGUI/AssemblyInfo.cs trunk/plugins/MyShowTimes/ShowTimesGUI/MovieInfo.cs trunk/plugins/MyShowTimes/ShowTimesGUI/PluginSettings.cs trunk/plugins/MyShowTimes/ShowTimesGUI/ShowTimesGUI.cs trunk/plugins/MyShowTimes/ShowTimesGUI/ShowTimesGUI.csproj trunk/plugins/MyShowTimes/ShowTimesGUI/ShowTimesGUI.csproj.user trunk/plugins/MyShowTimes/ShowTimesGUI/ShowTimesGUI.sln trunk/plugins/MyShowTimes/ShowTimesGUI/ShowTimesGUI.suo trunk/plugins/MyShowTimes/ShowTimesGUI/TheaterInfo.cs trunk/plugins/MyShowTimes/ShowTimesGUI/skin/ trunk/plugins/MyShowTimes/ShowTimesGUI/skin/Blue Two/ trunk/plugins/MyShowTimes/ShowTimesGUI/skin/Blue Two/ShowTimesGUI.xml trunk/plugins/MyShowTimes/ShowTimesGUI/skin/MePo Wide/ trunk/plugins/MyShowTimes/ShowTimesGUI/skin/MePo Wide/ShowTimesGUI.xml trunk/plugins/MyShowTimes/ShowTimesGrabber/ trunk/plugins/MyShowTimes/ShowTimesGrabber/ShowTimes/ trunk/plugins/MyShowTimes/ShowTimesGrabber/ShowTimes/PluginSettings.cs trunk/plugins/MyShowTimes/ShowTimesGrabber/ShowTimes/PluginSetup.cs trunk/plugins/MyShowTimes/ShowTimesGrabber/ShowTimes/Properties/ trunk/plugins/MyShowTimes/ShowTimesGrabber/ShowTimes/Properties/AssemblyInfo.cs trunk/plugins/MyShowTimes/ShowTimesGrabber/ShowTimes/ShowTimes.csproj trunk/plugins/MyShowTimes/ShowTimesGrabber/ShowTimes/showtimes.cs trunk/plugins/MyShowTimes/ShowTimesGrabber/ShowTimes/showtimesSetup.Designer.cs trunk/plugins/MyShowTimes/ShowTimesGrabber/ShowTimes/showtimesSetup.cs trunk/plugins/MyShowTimes/ShowTimesGrabber/ShowTimes/showtimesSetup.resx trunk/plugins/MyShowTimes/ShowTimesGrabber/ShowTimes.sln trunk/plugins/MyShowTimes/ShowTimesGrabber/ShowTimes.suo Added: trunk/plugins/MyShowTimes/MediaPortal ShowTimes Plugins Suite.doc =================================================================== (Binary files differ) Property changes on: trunk/plugins/MyShowTimes/MediaPortal ShowTimes Plugins Suite.doc ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MyShowTimes/ShowTimesGUI/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyShowTimes/ShowTimesGUI/AssemblyInfo.cs (rev 0) +++ trunk/plugins/MyShowTimes/ShowTimesGUI/AssemblyInfo.cs 2007-04-18 22:14:47 UTC (rev 341) @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("ShowTimesGUI")] +[assembly: AssemblyDescription("GUI for the ShowTimes Grabber")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\<configuration>. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] Added: trunk/plugins/MyShowTimes/ShowTimesGUI/MovieInfo.cs =================================================================== --- trunk/plugins/MyShowTimes/ShowTimesGUI/MovieInfo.cs (rev 0) +++ trunk/plugins/MyShowTimes/ShowTimesGUI/MovieInfo.cs 2007-04-18 22:14:47 UTC (rev 341) @@ -0,0 +1,256 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Xml; +using MediaPortal.GUI.Library; + +namespace ShowTimesGUI +{ + class MovieInfo + { + public static string[] Movies = new string[200]; //strings for all movies + public static int NumMovies; //number of movies + + public static string GetMovieName(int index) + { + + string nodeselect = String.Format("/MediaLibrary/Media[MediaID=\"{0}\"]/Name", index.ToString()); + + //XmlDocument XmlDoc = new XmlDocument(); + + //XmlDoc.Load(ShowTimesGUI.MOVIEDATA); + + XmlNode MovieName = ShowTimesGUI.movieXML.SelectSingleNode(nodeselect); + + if (MovieName == null) + return "NA"; + else + return MovieName.InnerText; + } + + public static int GetMovieID(string MovieName) + { + + string nodeselect = String.Format("/MediaLibrary/Media[contains(Name,\"{0}\")]/MediaID", MovieName); + + XmlNode MovieID = ShowTimesGUI.movieXML.SelectSingleNode(nodeselect); + + if (MovieID == null) + return -1; + else + return int.Parse(MovieID.InnerText); + } + + public static void GetAllMovies() + { + int i = 0; + + Array.Resize(ref Movies, 200); + + XmlNodeList MovieNames = ShowTimesGUI.movieXML.SelectNodes("/MediaLibrary/Media/Name"); + + NumMovies = MovieNames.Count; + + if (PluginSettings.DebugMode) + Log.Debug("Number of movies found = {0}", NumMovies); + + //Create list of Movies + foreach (XmlNode node in MovieNames) + { + // Do anything with node + Movies[i] = node.InnerText; + i++; + } + + Movies[i] = null; + + Array.Resize(ref Movies, i); + Movies = ShowTimesGUI.RemoveDups(Movies, true); + if (PluginSettings.DebugMode) + Log.Debug("GetAllMovies::Num Movies = {0} after dup = {1}", NumMovies,Movies.Length); + //Array.Resize(ref Movies, i); + + } + + + public static string GetPosterImage(string MovieName) + { + string nodeselect; + + //XmlDocument XmlDoc = new XmlDocument(); + + //XmlDoc.Load(ShowTimesGUI.MOVIEDATA); + + nodeselect = String.Format("/MediaLibrary/Media[contains(Name,\"{0}\")]/image", MovieName); + + XmlNode PosterImage = ShowTimesGUI.movieXML.SelectSingleNode(nodeselect); + + if (PluginSettings.DebugMode) + { + if (PosterImage != null) + Log.Debug("Poster Image = {0}", PosterImage.InnerText); + else + Log.Debug("Poster Image = Not found"); + } + + if (PosterImage == null) + return "NA"; + else + return PosterImage.InnerText; + } + + public static string GetRating(string MovieName) + { + string nodeselect; + + //XmlDocument XmlDoc = new XmlDocument(); + + //XmlDoc.Load(ShowTimesGUI.MOVIEDATA); + + nodeselect = String.Format("/MediaLibrary/Media[contains(Name,\"{0}\")]/Rating", MovieName); + + XmlNode Rating = ShowTimesGUI.movieXML.SelectSingleNode(nodeselect); + + if (Rating == null) + return "NA"; + else + return Rating.InnerText; + } + + public static string GetRunTime(string MovieName) + { + string nodeselect; + + //XmlDocument XmlDoc = new XmlDocument(); + + //XmlDoc.Load(ShowTimesGUI.MOVIEDATA); + + nodeselect = String.Format("/MediaLibrary/Media[contains(Name,\"{0}\")]/Runtime", MovieName); + + XmlNode RunTime = ShowTimesGUI.movieXML.SelectSingleNode(nodeselect); + + if (RunTime == null) + return "NA"; + else + return RunTime.InnerText; + } + + public static string GetIMDBRating(string MovieName) + { + string nodeselect; + + nodeselect = String.Format("/MediaLibrary/Media[contains(Name,\"{0}\")]/ImdbUserReview", MovieName); + + XmlNode IMDB = ShowTimesGUI.movieXML.SelectSingleNode(nodeselect); + + if (IMDB == null) + return "NA"; + else + return IMDB.InnerText; + } + + public static string GetReleaseDate(string MovieName) + { + string nodeselect; + + //XmlDocument XmlDoc = new XmlDocument(); + + //XmlDoc.Load(ShowTimesGUI.MOVIEDATA); + + nodeselect = String.Format("/MediaLibrary/Media[contains(Name,\"{0}\")]/ReleaseDate", MovieName); + + XmlNode ReleaseDate = ShowTimesGUI.movieXML.SelectSingleNode(nodeselect); + + if (ReleaseDate == null) + return "NA"; + else + return ReleaseDate.InnerText; + } + + public static string GetActors(string MovieName) + { + string nodeselect; + + nodeselect = String.Format("/MediaLibrary/Media[contains(Name,\"{0}\")]/Actors", MovieName); + + XmlNode Actors = ShowTimesGUI.movieXML.SelectSingleNode(nodeselect); + + if (Actors == null) + return "NA"; + else + return Actors.InnerText; + } + + public static string GetDirector(string MovieName) + { + string nodeselect; + + nodeselect = String.Format("/MediaLibrary/Media[contains(Name,\"{0}\")]/Director", MovieName); + + XmlNode Director = ShowTimesGUI.movieXML.SelectSingleNode(nodeselect); + + if (Director == null) + return "NA"; + else + return Director.InnerText; + } + + public static string GetPlot(string MovieName) + { + string nodeselect; + + nodeselect = String.Format("/MediaLibrary/Media[contains(Name,\"{0}\")]/PlotSummary", MovieName); + + XmlNode Plot = ShowTimesGUI.movieXML.SelectSingleNode(nodeselect); + + if (Plot == null) + return "NA"; + else + return Plot.InnerText; + } + + public static string GetGenre(string MovieName) + { + string nodeselect; + + nodeselect = String.Format("/MediaLibrary/Media[contains(Name,\"{0}\")]/Genre", MovieName); + + XmlNode Genre = ShowTimesGUI.movieXML.SelectSingleNode(nodeselect); + + if (Genre == null) + return "NA"; + else + return Genre.InnerText; + } + + public static string GetTrailerExists(string MovieName) + { + string nodeselect; + + nodeselect = String.Format("/MediaLibrary/Media[contains(Name,\"{0}\")]/Trailer", MovieName); + + XmlNode Trailers = ShowTimesGUI.movieXML.SelectSingleNode(nodeselect); + + if (Trailers == null) + return "NA"; + else + return Trailers.InnerText; + } + + public static string GetTrailerLoc(string MovieName) + { + string nodeselect; + + nodeselect = String.Format("/MediaLibrary/Media[contains(Name,\"{0}\")]/location", MovieName); + + XmlNode TrailerLoc = ShowTimesGUI.movieXML.SelectSingleNode(nodeselect); + + if (TrailerLoc == null) + return "NA"; + else + return TrailerLoc.InnerText; + } + + + } +} Added: trunk/plugins/MyShowTimes/ShowTimesGUI/PluginSettings.cs =================================================================== --- trunk/plugins/MyShowTimes/ShowTimesGUI/PluginSettings.cs (rev 0) +++ trunk/plugins/MyShowTimes/ShowTimesGUI/PluginSettings.cs 2007-04-18 22:14:47 UTC (rev 341) @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Text; +using System.Reflection; +using System.Threading; +using System.Windows.Forms; +using MediaPortal.GUI.Library; + +namespace ShowTimesGUI +{ + public static class PluginSettings + { + // The Cached MediaPortal Settings Configuration file + static private MediaPortal.Profile.Settings mpSettings = new MediaPortal.Profile.Settings("MediaPortal.xml", true); + + + #region Configuration Properties + + /// <summary> + /// Gets or sets the next poll time. + /// </summary> + /// <value>The next poll.</value> + static public DateTime NextPoll + { + get { return DateTime.Parse(mpSettings.GetValueAsString(ShowTimesGUI.PLUGIN_NAME, "NextPoll", DateTime.Now.ToString("s"))); } + set { mpSettings.SetValue(ShowTimesGUI.PLUGIN_NAME, "NextPoll", value.ToString("s")); } + } + + /// <summary> + /// Gets or sets the location of the grabber (mtsa.exe) config.xml. + /// </summary> + /// <value>full path of the mtsa.exe config.xml file</value> + static public string grabberCfgXml + { + get { return mpSettings.GetValueAsString(ShowTimesGUI.PLUGIN_NAME, "grabberCfgXml", System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\config.xml"); } + set { mpSettings.SetValue(ShowTimesGUI.PLUGIN_NAME, "grabberCfgXml", value); } + } + + + /// <summary> + /// Gets or sets the number of days between downloads of showtimes. + /// </summary> + /// <value>The update days.</value> + static public int UpdateDays + { + get { return mpSettings.GetValueAsInt(ShowTimesGUI.PLUGIN_NAME, "UpdateDays", 5); } + set { mpSettings.SetValue(ShowTimesGUI.PLUGIN_NAME, "UpdateDays", value); } + } + + /// <summary> + /// Gets or sets the location of the grabber (mtsa.exe) files. + /// </summary> + /// <value>full path of the directory to be used by mtsa.exe</value> + static public string grabberFiles + { + get { return mpSettings.GetValueAsString(ShowTimesGUI.PLUGIN_NAME, "grabberFiles", System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath)); } + set { mpSettings.SetValue(ShowTimesGUI.PLUGIN_NAME, "grabberFiles", value); } + } + + + /// <summary> + /// Gets or sets a value indicating whether debug mode is enabled. + /// </summary> + /// <value><c>true</c> if [debug mode]; otherwise, <c>false</c>.</value> + static public bool DebugMode + { + get { return mpSettings.GetValueAsBool(ShowTimesGUI.PLUGIN_NAME, "DebugMode", false); } + set { mpSettings.SetValueAsBool(ShowTimesGUI.PLUGIN_NAME, "DebugMode", value); } + } + + + /// <summary> + /// Gets or sets a value indicating whether the user wants to be notified when the import is complete. + /// </summary> + /// <value><c>true</c> if [notify on completion]; otherwise, <c>false</c>.</value> + static public bool NotifyOnCompletion + { + get { return mpSettings.GetValueAsBool(ShowTimesGUI.PLUGIN_NAME, "NotifyOnCompletion", true); } + set { mpSettings.SetValueAsBool(ShowTimesGUI.PLUGIN_NAME, "NotifyOnCompletion", value); } + } + + /// <summary> + /// Gets or sets a value indicating whether the user wants to force update on MP start. + /// </summary> + /// <value><c>true</c> if [force on start]; otherwise, <c>false</c>.</value> + static public bool ForceUpdate + { + get { return mpSettings.GetValueAsBool(ShowTimesGUI.PLUGIN_NAME, "ForceUpdate", true); } + set { mpSettings.SetValueAsBool(ShowTimesGUI.PLUGIN_NAME, "ForceUpdate", value); } + } + + #endregion + } +} Added: trunk/plugins/MyShowTimes/ShowTimesGUI/ShowTimesGUI.cs =================================================================== --- trunk/plugins/MyShowTimes/ShowTimesGUI/ShowTimesGUI.cs (rev 0) +++ trunk/plugins/MyShowTimes/ShowTimesGUI/ShowTimesGUI.cs 2007-04-18 22:14:47 UTC (rev 341) @@ -0,0 +1,1270 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Windows.Forms; +using System.Collections; +using MediaPortal.GUI.Library; +using MediaPortal.Dialogs; +using MediaPortal.Player; +using System.Xml; +using System.Xml.Serialization; + + + +namespace ShowTimesGUI +{ + /// <summary> + /// GUI for the ShowTimes process plugin to show information and showtimes on movies playing in your local theater. + /// </summary> + public class ShowTimesGUI : GUIWindow, ISetupForm, IPlugin + { + + #region MapSettings class + [Serializable] + public class MapSettings + { + protected int _SortBy; + protected int _ViewAs; + protected bool _SortAscending; + + public MapSettings() + { + // Set default view + _SortBy = (int)SortMethod.Name; + _ViewAs = (int)View.BigIcons; + _SortAscending = true; + } + + [XmlElement("SortBy")] + public int SortBy + { + get { return _SortBy; } + set { _SortBy = value; } + } + + [XmlElement("ViewAs")] + public int ViewAs + { + get { return _ViewAs; } + set { _ViewAs = value; } + } + + [XmlElement("SortAscending")] + public bool SortAscending + { + get { return _SortAscending; } + set { _SortAscending = value; } + } + } + + enum SortMethod + { + Name = 0, + Date = 1, + Size = 2 + } + + enum View + { + List = 0, + Icons = 1, + BigIcons = 2, + Albums = 3, + Filmstrip = 4, + MovieDates = 5, + } + #endregion + + #region SkinControlAttributes + + + + [SkinControlAttribute(2)] + protected GUIButtonControl buttonOne = null; + [SkinControlAttribute(3)] + protected GUIButtonControl btnMovieTheaters = null; + + [SkinControlAttribute(0)] protected GUIImage posterBorder = null; + [SkinControlAttribute(24)] protected GUIImage poster = null; + [SkinControlAttribute(25)] protected GUILabelControl RatingCtrl = null; + [SkinControlAttribute(26)] protected GUILabelControl RunTimeCtrl = null; + [SkinControlAttribute(27)] protected GUILabelControl TrailerCtrl = null; + [SkinControlAttribute(28)] protected GUILabelControl StarringLabel = null; + [SkinControlAttribute(29)] protected GUITextControl StarringCtrl = null; + [SkinControlAttribute(30)] protected GUILabelControl DirectorLabel = null; + [SkinControlAttribute(31)] protected GUITextControl DirectorCtrl = null; + [SkinControlAttribute(32)] protected GUILabelControl IMDBCtrl = null; + [SkinControlAttribute(33)] protected GUILabelControl PlotLabel = null; + [SkinControlAttribute(34)] protected GUITextScrollUpControl plotarea = null; + [SkinControlAttribute(35)] protected GUILabelControl GenreLabel = null; + [SkinControlAttribute(36)] protected GUIFadeLabel GenreCtrl = null; + [SkinControlAttribute(44)] protected GUIFadeLabel SelectedTheaterCtrl = null; + + [SkinControlAttribute(40)] protected GUIButtonControl btnShowTimes = null; + [SkinControlAttribute(41)] protected GUIButtonControl btnPlayTrailer = null; + [SkinControlAttribute(42)] protected GUIButtonControl btnNextMovie = null; + [SkinControlAttribute(43)] protected GUIButtonControl btnPreviousMovie = null; + [SkinControlAttribute(45)] protected GUILabelControl NextRefreshLabel = null; + + + [SkinControlAttribute(50)] protected GUIFacadeControl facadeView = null; + + #endregion + + #region Variables + + internal const string PLUGIN_NAME = "ShowTimes Grabber"; + internal const string GUI_PLUGIN_NAME = "ShowTimes GUI"; + public static string POSTER_LOC; + public static string TRAILER_LOC; + public static string LOCFILE; + public static string MOVIEDATA; + public static XmlDocument movieXML; + private static bool xmlLoaded = false; + private static bool movOrTheater = false; + private static bool theaterDatesShown = false; + private static bool showMoviesForTheater = false; + private static bool getShowTimes = false; + public static int selectedItem = 0; + public static string selectedMovieName; + public static string selectedTheaterName; + public static string selectedMovieDate; + + + //string backgroundposter = null; + + MapSettings mapSettings = new MapSettings(); + #endregion + + + public ShowTimesGUI() + { + // + // TODO: Add constructor logic here + // + + + } + #region IPlugin Members + public void Start() + { + + } + + public void Stop() + { + + } + + #endregion + + #region ISetupForm Members + + // Returns the name of the plugin which is shown in the plugin menu + public string PluginName() + { + return "My ShowTimes"; + } + + // Returns the description of the plugin is shown in the plugin menu + public string Description() + { + return "ShowTimes GUI"; + } + + // Returns the author of the plugin which is shown in the plugin menu + public string Author() + { + return "Falkyre"; + } + + // show the setup dialog + public void ShowPlugin() + { + MessageBox.Show("Configuration done using the ShowTimes Grabber Plugin"); + } + + // Indicates whether plugin can be enabled/disabled + public bool CanEnable() + { + return true; + } + + // get ID of windowplugin belonging to this setup + public int GetWindowId() + { + return 7111992; + } + + // Indicates if plugin is enabled by default; + public bool DefaultEnabled() + { + return true; + } + // indicates if a plugin has its own setup screen + public bool HasSetup() + { + return true; + } + + /// <summary> + /// If the plugin should have its own button on the main menu of Mediaportal then it + /// should return true to this method, otherwise if it should not be on home + /// it should return false + /// </summary> + /// <param name="strButtonText">text the button should have</param> + /// <param name="strButtonImage">image for the button, or empty for default</param> + /// <param name="strButtonImageFocus">image for the button, or empty for default</param> + /// <param name="strPictureImage">subpicture for the button or empty for none</param> + /// <returns>true : plugin needs its own button on home + /// false : plugin does not need its own button on home</returns> + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + //strButtonText = PluginName(); + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) + { + strButtonText = ((string)xmlreader.GetValueAsString("ShowTimes Grabber", "pluginName", PluginName())).ToString(); + } + strButtonImage = String.Empty; + strButtonImageFocus = String.Empty; + strPictureImage = "hover_my trailers.png"; + return true; + } + + + public override int GetID + { + get + { + return 7111992; + } + set + { + } + } + #endregion + + public override bool Init() + { + GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(OnPropertyChanged); + loadXML(true); + + return Load(GUIGraphicsContext.Skin + @"\ShowTimesGUI.xml"); + + } + + protected override void OnPreviousWindow() + { + if (PluginSettings.DebugMode) + { + Log.Debug("OnPageDestroy::Selected {0},{1},{2},{3}", selectedItem, selectedMovieName, selectedMovieDate, selectedTheaterName); + Log.Debug("OnPageDestroy::Properties {0},{1},{2},{3}", selectedItem, GUIPropertyManager.GetProperty("#st_title"), GUIPropertyManager.GetProperty("#st_theater"), GUIPropertyManager.GetProperty("#st_moviedate")); + Log.Debug("OnPageDestroy::Selected movOrTheater={0},theaterDatesShown={1},showMoviesForTheater={2},getShowTimes={3}", movOrTheater, theaterDatesShown, showMoviesForTheater, getShowTimes); + Log.Debug("OnPageDestroy::mapSettings.ViewAs = {0}", mapSettings.ViewAs); + + } + + if (g_Player.Playing) + { + Log.Debug("in OnPreviousWindow and g_player is playing"); + } + + //Store movie name in property so we can reset + + GUIPropertyManager.SetProperty("#st_title",selectedMovieName); + GUIPropertyManager.SetProperty("#st_theater",selectedTheaterName); + GUIPropertyManager.SetProperty("#st_moviedate", selectedMovieDate); + + //reset the values if we were selecting theaters so that we always go back to all the movies + /* + if (showMoviesForTheater || theaterDatesShown || getShowTimes) + { + showMoviesForTheater = false; + theaterDatesShown = false; + getShowTimes = false; + movOrTheater = true; + }*/ + + base.OnPreviousWindow(); + } + + protected override void OnPageLoad() + { + base.OnPageLoad(); + + //loadXML(false); + //check the current date and see if it is greater than the PluginSettings.NextPoll date + //if it is, run mtsa.exe (this will handle situations where the computer is in hibernation + //and the grabber plugin missed its update time) + //The grabber checks the same thing upon MP start, this checks while MP is running + + TimeSpan numdays = DateTime.Now - PluginSettings.NextPoll; + + if (numdays.Days > PluginSettings.UpdateDays + 1) + { + if ((GUIPropertyManager.GetProperty("#showtimes_grabber_running") == "no" || String.IsNullOrEmpty(GUIPropertyManager.GetProperty("#showtimes_grabber_running")))) + GUIPropertyManager.SetProperty("#showtimes_update","true"); + + } + + GUIPropertyManager.SetProperty("#currentmodule", "ShowTimesGUI"); + + if (PluginSettings.DebugMode) + { + Log.Debug("OnPageLoad::Selected {0},{1},{2},{3}", selectedItem, selectedMovieName, selectedMovieDate, selectedTheaterName); + Log.Debug("OnPageLoad::Properties {0},{1},{2},{3}", selectedItem, GUIPropertyManager.GetProperty("#st_title"), GUIPropertyManager.GetProperty("#st_theater"), GUIPropertyManager.GetProperty("#st_moviedate")); + Log.Debug("OnPageLoad::Selected movOrTheater={0},theaterDatesShown={1},showMoviesForTheater={2},getShowTimes={3}", movOrTheater, theaterDatesShown, showMoviesForTheater, getShowTimes); + } + + if (xmlLoaded) + { + + if (!String.IsNullOrEmpty(GUIPropertyManager.GetProperty("#st_title"))) + selectedMovieName = GUIPropertyManager.GetProperty("#st_title"); + + if (getShowTimes) + { + if (!String.IsNullOrEmpty(GUIPropertyManager.GetProperty("#st_theater"))) + selectedTheaterName = GUIPropertyManager.GetProperty("#st_theater"); + + if (!String.IsNullOrEmpty(GUIPropertyManager.GetProperty("#st_moviedate"))) + selectedMovieDate = GUIPropertyManager.GetProperty("#st_moviedate"); + } + + TheaterInfo.GetTheaters(); + MovieInfo.GetAllMovies(); + + //HideMovieControls(); + + //if (theaterDatesShown && getShowTimes && showMoviesForTheater) + // showMoviesForTheater = false; + + + //We selected Show Theaters and a theater, then when back to home, re display the dates + if (!movOrTheater && theaterDatesShown && !getShowTimes && showMoviesForTheater) + { + //movOrTheater=False,theaterDatesShown=True,showMoviesForTheater=True,getShowTimes=False + if (PluginSettings.DebugMode) + Log.Debug("OnPageLoad::Calling OnMovieTheaters"); + //movOrTheater=False,theaterDatesShown=False,showMoviesForTheater=True,getShowTimes=False + theaterDatesShown = false; + getShowTimes = false; + + //OnMovieTheaters(); + //get_ShowTimes(); + OnClick(selectedItem); + } + else if (!movOrTheater && !theaterDatesShown && !getShowTimes && showMoviesForTheater) + { + //movOrTheater=False,theaterDatesShown=False,showMoviesForTheater=True,getShowTimes=False + showMoviesForTheater = false; + //getShowTimes = true; + movOrTheater = true; + if (PluginSettings.DebugMode) + Log.Debug("OnPageLoad::Calling get_ShowTimes for theaters"); + + //get_ShowTimes(); + //OnClick(selectedItem); + OnMovieTheaters(); + } + else if (movOrTheater && !theaterDatesShown && !getShowTimes && showMoviesForTheater) + { + if (PluginSettings.DebugMode) + Log.Debug("OnPageLoad::Calling OnClick mapSettings.ViewAs = {0}",mapSettings.ViewAs); + + //To display theaters after date selection + //before pagedestroy + //movOrTheater=False,theaterDatesShown=True,showMoviesForTheater=True,getShowTimes=False + //after page destroy + //movOrTheater=True,theaterDatesShown=False,showMoviesForTheater=True,getShowTimes=False + if (mapSettings.ViewAs != 5) + movOrTheater = false; + theaterDatesShown = true; + //showMoviesForTheater = false; + //getShowTimes = true; + + OnClick(selectedItem); + } + else if (!movOrTheater && !theaterDatesShown && getShowTimes && !showMoviesForTheater) + { + //movOrTheater=False,theaterDatesShown=False,showMoviesForTheater=False,getShowTimes=True + if (PluginSettings.DebugMode) + Log.Debug("OnPageLoad::Calling get_ShowTimes"); + + get_ShowTimes(); + } + else if (!movOrTheater && theaterDatesShown && getShowTimes && !showMoviesForTheater) + { + //movOrTheater=False,theaterDatesShown=True,showMoviesForTheater=False,getShowTimes=True + if (PluginSettings.DebugMode) + Log.Debug("OnPageLoad::Calling OnClick to get the movie dates to pick for {0}", selectedTheaterName); + + theaterDatesShown = false; + + OnClick(selectedItem); + } + else if (!movOrTheater && theaterDatesShown && getShowTimes && showMoviesForTheater) + { + //movOrTheater=False,theaterDatesShown=True,showMoviesForTheater=True,getShowTimes=True + //We already have all of the information, change to only view the movie + if (PluginSettings.DebugMode) + Log.Debug("OnPageLoad::Calling OnClick to view the movie data for {0},{1},{2}", selectedMovieName,selectedTheaterName,selectedMovieDate); + showMoviesForTheater = false; + OnClick(selectedItem); + } + else if (movOrTheater && !theaterDatesShown && !getShowTimes && !showMoviesForTheater) + { + HideMovieControls(true); + + GUIControl.ShowControl(GetID, buttonOne.GetID); + GUIControl.ShowControl(GetID, btnMovieTheaters.GetID); + GUIControl.ShowControl(GetID, NextRefreshLabel.GetID); + + GUIControl.EnableControl(GetID, buttonOne.GetID); + GUIControl.EnableControl(GetID, btnMovieTheaters.GetID); + GUIControl.SetControlLabel(GetID, btnMovieTheaters.GetID, "Show Theaters"); + + GUIControl.ShowControl(GetID, facadeView.GetID); + ShowListView(MovieInfo.Movies, true); + + GUIControl.SetControlLabel(GetID, buttonOne.GetID, "View:Big Icons"); + if (!String.IsNullOrEmpty(GUIPropertyManager.GetProperty("#showtimes_nextupdate"))) + GUIControl.SetControlLabel(GetID, NextRefreshLabel.GetID, GUIPropertyManager.GetProperty("#showtimes_nextupdate")); + else + GUIControl.SetControlLabel(GetID, NextRefreshLabel.GetID, "Next ShowTimes Refresh\n" + PluginSettings.NextPoll.ToLongDateString() + "\n@" + PluginSettings.NextPoll.ToShortTimeString()); + + facadeView.View = GUIFacadeControl.ViewMode.SmallIcons; + mapSettings.ViewAs = 1; + GUIControl.FocusControl(GetID, facadeView.GetID); + } + + else + { + GUIPropertyManager.SetProperty("#selecteditem", selectedMovieName); + GUIPropertyManager.SetProperty("#st_title", selectedMovieName); + + + /*if (!showMoviesForTheater) + { + movOrTheater = true; + getShowTimes = true; + } + if (showMoviesForTheater) + { + //Start the process of selecting the theaters again + movOrTheater = true; + OnMovieTheaters(); + } + else + { + movOrTheater = true; + OnClick(selectedItem); + }*/ + movOrTheater = true; + OnClick(selectedItem); + } + + } + else + { + if (PluginSettings.DebugMode) + Log.Info("OnPageLoad::Missing XML files {0} {1} {2}", PluginSettings.grabberCfgXml, LOCFILE,MOVIEDATA); + //Display dialog stating that we can't load the xml files + + okDialog("Unable to load some required XML files", "Can't load " + PluginSettings.grabberCfgXml, "or " + LOCFILE,"or " + MOVIEDATA); + + } + + + } + + + protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) + { + + if (control == buttonOne) + OnButtonOne(); + + if (control == btnMovieTheaters) + OnMovieTheaters(); + + if (control == btnPlayTrailer) + + OnPlayTrailer(selectedMovieName); + + if (control == btnNextMovie) + { + movOrTheater = true; + + if (showMoviesForTheater && getShowTimes == false) + { + if (selectedItem < TheaterInfo.NumMovies - 1) + selectedItem++; + else + selectedItem = 0; + + selectedMovieName = TheaterInfo.Movies[selectedItem]; + } + else + { + getShowTimes = false; + theaterDatesShown = false; + showMoviesForTheater = false; + + selectedItem = Array.IndexOf(MovieInfo.Movies, selectedMovieName); + if (selectedItem < MovieInfo.NumMovies - 1) + selectedItem++; + else + selectedItem = 0; + + selectedMovieName = MovieInfo.Movies[selectedItem]; + } + + GUIPropertyManager.SetProperty("#selecteditem", selectedMovieName); + GUIPropertyManager.SetProperty("#st_title", selectedMovieName); + + OnClick(selectedItem); + } + + if (control == btnPreviousMovie) + { + movOrTheater = true; + + if (showMoviesForTheater && getShowTimes == false) + { + if (selectedItem > 0) + selectedItem--; + else + selectedItem = TheaterInfo.NumMovies - 1; + + selectedMovieName = TheaterInfo.Movies[selectedItem]; + + } + else + { + getShowTimes = false; + theaterDatesShown = false; + showMoviesForTheater = false; + + selectedItem = Array.IndexOf(MovieInfo.Movies, selectedMovieName); + + if (selectedItem > 0) + selectedItem--; + else + selectedItem = MovieInfo.NumMovies - 1; + + selectedMovieName = MovieInfo.Movies[selectedItem]; + } + + GUIPropertyManager.SetProperty("#selecteditem", selectedMovieName); + GUIPropertyManager.SetProperty("#st_title", selectedMovieName); + + OnClick(selectedItem); + } + + //Display showtimes for selected movie and all theaters + if (control == btnShowTimes) + { + get_ShowTimes(); + } + + if (control == facadeView) + { + GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_ITEM_SELECTED, GetID, 0, controlId, 0, 0, null); + OnMessage(msg); + + int itemIndex = (int)msg.Param1; + + if (actionType == Action.ActionType.ACTION_SELECT_ITEM) + { + GUIListItem item = GUIControl.GetSelectedListItem(GetID, controlId); + + selectedItem = itemIndex; + + if (movOrTheater) + selectedMovieName = item.Label; + + //if (getShowTimes) + // selectedTheaterName = item.Label; + + if (theaterDatesShown) + selectedMovieDate = item.Label; + + if (PluginSettings.DebugMode) + { + Log.Debug("facadeView::Selected {0},{1},{2},{3}", selectedItem, selectedMovieName, selectedMovieDate, selectedTheaterName); + Log.Debug("facadeView::Selected movOrTheater={0},theaterDatesShown={1},showMoviesForTheater={2},getShowTimes={3}", movOrTheater,theaterDatesShown,showMoviesForTheater,getShowTimes); + } + + OnClick(itemIndex); + } + } + + base.OnClicked(controlId, control, actionType); + } + + private void OnClick(int itemindex) //When something is pressed in the listview + { + + if (PluginSettings.DebugMode) + { + Log.Debug("OnClick::Movie = {0}; Theater = {1}, Date = {2}", selectedMovieName, selectedTheaterName, selectedMovieDate); + Log.Debug("OnClick::Selected movOrTheater={0},theaterDatesShown={1},showMoviesForTheater={2},getShowTimes={3}", movOrTheater, theaterDatesShown, showMoviesForTheater, getShowTimes); + } + + if (getShowTimes && theaterDatesShown) + { + movOrTheater = true; + showMoviesForTheater = true; + } + + if (movOrTheater) + { + //Hide facadeView + GUIControl.HideControl(GetID, facadeView.GetID); + + //Hide the Movie Theater name + if (!showMoviesForTheater) + GUIControl.HideControl(GetID, SelectedTheaterCtrl.GetID); + + //Disable View button + GUIControl.DisableControl(GetID, buttonOne.GetID); + GUIControl.SetControlLabel(GetID, btnMovieTheaters.GetID, "Show All Movies"); + + //Get Filename of currently selected item + string posterFileName = MovieInfo.GetPosterImage(selectedMovieName); + //Show Poster Image + if (posterFileName.Equals("NA")) + poster.SetFileName(GUIGraphicsContext.Skin + @"\media\defaultvideobig.png"); + else + poster.SetFileName(posterFileName); + + //Get Rating + GUIControl.SetControlLabel(GetID,RatingCtrl.GetID,"Rating: " + MovieInfo.GetRating(selectedMovieName)); + + //Get Runtime + GUIControl.SetControlLabel(GetID, RunTimeCtrl.GetID, "Runtime: " + MovieInfo.GetRunTime(selectedMovieName)); + + //Get the Genre + GUIControl.SetControlLabel(GetID, GenreCtrl.GetID, MovieInfo.GetGenre(selectedMovieName)); + + string playtrailer = MovieInfo.GetTrailerExists(selectedMovieName); + //Get Trailer + //GUIControl.SetControlLabel(GetID, TrailerCtrl.GetID, "Trailer: " + playtrailer); + + //Disable Play Trailer button if no trailer available or reenable if one available + if (playtrailer.Equals("No")) + GUIControl.DisableControl(GetID, btnPlayTrailer.GetID); + else + GUIControl.EnableControl(GetID, btnPlayTrailer.GetID); + + //Get the Actors + GUIControl.SetControlLabel(GetID, StarringCtrl.GetID, MovieInfo.GetActors(selectedMovieName)); + + //Get the Director + GUIControl.SetControlLabel(GetID, DirectorCtrl.GetID, MovieInfo.GetDirector(selectedMovieName)); + + //Get the IMDB + GUIControl.SetControlLabel(GetID, IMDBCtrl.GetID, "IMDB Rating: " + MovieInfo.GetIMDBRating(selectedMovieName)); + + //Get the Plot + GUIControl.SetControlLabel(GetID, plotarea.GetID, MovieInfo.GetPlot(selectedMovieName)); + + ShowMovieControls(); + + if (showMoviesForTheater || getShowTimes) + { + SelectedTheaterCtrl.Label = selectedTheaterName; + GUIControl.ShowControl(GetID, SelectedTheaterCtrl.GetID); + GUIPropertyManager.SetProperty("#selecteditem", selectedMovieName + " " + selectedMovieDate + "@" + TheaterInfo.GetShowTimes(selectedMovieName, selectedTheaterName, selectedMovieDate)); + TheaterInfo.GetMoviesByTheater(selectedTheaterName,selectedMovieDate); + GUIPropertyManager.SetProperty("#st_theater", selectedTheaterName); + /*if (getShowTimes) + { + showMoviesForTheater = false; + getShowTimes = false; + theaterDatesShown = false; + }*/ + //Hide next/previous and disable get showtimes button + if (getShowTimes) + { + if (PluginSettings.DebugMode) + Log.Debug("OnClick::Hide Next/Prev movOrTheater={0},theaterDatesShown={1},showMoviesForTheater={2},getShowTimes={3}", movOrTheater, theaterDatesShown, showMoviesForTheater, getShowTimes); + GUIControl.HideControl(GetID, btnNextMovie.GetID); + GUIControl.HideControl(GetID, btnPreviousMovie.GetID); + GUIControl.DisableControl(GetID, btnShowTimes.GetID); + } + mapSettings.ViewAs = 5; + } + + if (!showMoviesForTheater) + movOrTheater = false; + + } + else + { + if (theaterDatesShown) + { + //We have a list of dates, display the movies for the theater on the date selected + + if (facadeView.Focus) + { + if (PluginSettings.DebugMode) + Log.Debug("OnClick::Getting movies for {0} on date {1}", selectedTheaterName, selectedMovieDate); + selectedMovieDate = facadeView.ListView.SelectedListItem.Label; + GUIPropertyManager.SetProperty("#st_moviedate", selectedMovieDate); + } + + if (PluginSettings.DebugMode) + Log.Debug("Getting movies for {0} on date {1}", selectedTheaterName, selectedMovieDate); + + TheaterInfo.GetMoviesByTheater(selectedTheaterName,selectedMovieDate); + + GUIControl.SetControlLabel(GetID, buttonOne.GetID, "View:Big Icons"); + facadeView.View = GUIFacadeControl.ViewMode.SmallIcons; + mapSettings.ViewAs = 1; + + GUIControl.EnableControl(GetID, buttonOne.GetID); + GUIControl.EnableControl(GetID, btnMovieTheaters.GetID); + + theaterDatesShown = false; + showMoviesForTheater = true; + movOrTheater = true; + + + ShowTheaterMoviesView(); + + //OnClick(selectedItem); + + + } + else + { + //We have a list of Theaters, display the dates we have to allow the user to see what's playing on that date + + if (PluginSettings.DebugMode) + Log.Debug("OnClick::Selecting dates for {1} at theater {0}", selectedTheaterName, selectedMovieName); + + + if (facadeView.Focus) + { + if (PluginSettings.DebugMode) + Log.Debug("OnClick::Getting movies for {0} on date {1}", selectedTheaterName, selectedMovieDate); + + selectedTheaterName = facadeView.ListView.SelectedListItem.Label; + GUIPropertyManager.SetProperty("#st_theater", selectedTheaterName); + } else + Log.Debug("facadeView::Not loaded"); + + if (PluginSettings.DebugMode) + Log.Debug("Theater item index {0} selected {1}", itemindex, selectedTheaterName); + + //selectedTheaterName = TheaterInfo.Theaters[itemindex]; + + + SelectedTheaterCtrl.Label = selectedTheaterName; + GUIControl.ShowControl(GetID, SelectedTheaterCtrl.GetID); + + //GUIControl.SetControlLabel(GetID, buttonOne.GetID, "View:List"); + facadeView.View = GUIFacadeControl.ViewMode.List; + //mapSettings.ViewAs = 0; + + + ShowTheaterDatesView(TheaterInfo.GetUniqueShowDates(TheaterInfo.Theaters[itemindex])); + + + //GUIControl.EnableControl(GetID, buttonOne.GetID); + GUIControl.SetControlLabel(GetID, btnMovieTheaters.GetID, "Show All Movies"); + + theaterDatesShown = true; + //movOrTheater = true; + } + + } + + } + + private void HideMovieControls(bool hideposter) + { + + if (hideposter) + { + GUIControl.HideControl(GetID, poster.GetID); + GUIControl.HideControl(GetID, posterBorder.GetID); + } + + GUIControl.HideControl(GetID, RatingCtrl.GetID); + GUIControl.HideControl(GetID, RunTimeCtrl.GetID); + //GUIControl.HideControl(GetID, TrailerCtrl.GetID); + GUIControl.HideControl(GetID, GenreLabel.GetID); + GUIControl.HideControl(GetID, GenreCtrl.GetID); + GUIControl.HideControl(GetID, StarringLabel.GetID); + GUIControl.HideControl(GetID, StarringCtrl.GetID); + GUIControl.HideControl(GetID, DirectorLabel.GetID); + GUIControl.HideControl(GetID, DirectorCtrl.GetID); + GUIControl.HideControl(GetID, IMDBCtrl.GetID); + GUIControl.HideControl(GetID, PlotLabel.GetID); + GUIControl.HideControl(GetID, plotarea.GetID); + GUIControl.HideControl(GetID, btnShowTimes.GetID); + GUIControl.HideControl(GetID, btnPlayTrailer.GetID); + GUIControl.HideControl(GetID, btnNextMovie.GetID); + GUIControl.HideControl(GetID, btnPreviousMovie.GetID); + GUIControl.HideControl(GetID, SelectedTheaterCtrl.GetID); + } + + private void ShowMovieControls() + { + GUIControl.ShowControl(GetID, poster.GetID); + GUIControl.ShowControl(GetID, posterBorder.GetID); + GUIControl.ShowControl(GetID, RatingCtrl.GetID); + GUIControl.ShowControl(GetID, RunTimeCtrl.GetID); + //GUIControl.ShowControl(GetID, TrailerCtrl.GetID); + GUIControl.ShowControl(GetID, GenreLabel.GetID); + GUIControl.ShowControl(GetID, GenreCtrl.GetID); + GUIControl.ShowControl(GetID, StarringLabel.GetID); + GUIControl.ShowControl(GetID, StarringCtrl.GetID); + GUIControl.ShowControl(GetID, DirectorLabel.GetID); + GUIControl.ShowControl(GetID, DirectorCtrl.GetID); + GUIControl.ShowControl(GetID, IMDBCtrl.GetID); + //GUIControl.ShowControl(GetID, PlotLabel.GetID); + GUIControl.ShowControl(GetID, plotarea.GetID); + GUIControl.ShowControl(GetID, btnShowTimes .GetID); + GUIControl.ShowControl(GetID, btnPlayTrailer.GetID); + GUIControl.ShowControl(GetID, btnNextMovie.GetID); + GUIControl.ShowControl(GetID, btnPreviousMovie.GetID); + } + + + private void OnButtonOne() + { + if (mapSettings.ViewAs == 1) + { + GUIControl.SetControlLabel(GetID, buttonOne.GetID, "View:List"); + facadeView.View = GUIFacadeControl.ViewMode.LargeIcons; + mapSettings.ViewAs = 2; + } + else if (mapSettings.ViewAs == 2) + { + GUIControl.SetControlLabel(GetID, buttonOne.GetID, "View:Small Icons"); + facadeView.View = GUIFacadeControl.ViewMode.List; + mapSettings.ViewAs = 0; + } + else + { + GUIControl.SetControlLabel(GetID, buttonOne.GetID, "View:Big Icons"); + facadeView.View = GUIFacadeControl.ViewMode.SmallIcons; + mapSettings.ViewAs = 1; + } + } + + private void OnMovieTheaters() + { + HideMovieControls(true); + + + if (showMoviesForTheater) + movOrTheater = false; + + if (movOrTheater) + { + facadeView.View = GUIFacadeControl.ViewMode.List; + GUIControl.SetControlLabel(GetID, btnMovieTheaters.GetID, "Show All Movies"); + GUIControl.DisableControl(GetID, btnMovieTheaters.GetID); + GUIControl.DisableControl(GetID, buttonOne.GetID); + GUIControl.DisableControl(GetID, btnShowTimes.GetID); + GUIControl.FocusControl(GetID, facadeView.GetID); + + ShowTheatersView(TheaterInfo.Theaters); + + if (PluginSettings.DebugMode) + Log.Debug("Movies Changed to Theaters"); + + getShowTimes = false; + showMoviesForTheater = true; + movOrTheater = false; + + } + else + { + + GUIControl.EnableControl(GetID, buttonOne.GetID); + GUIControl.EnableControl(GetID, btnShowTimes.GetID); + GUIControl.SetControlLabel(GetID, btnMovieTheaters.GetID, "Show Theaters"); + + if (mapSettings.ViewAs == 5) mapSettings.ViewAs = 1; + + if (mapSettings.ViewAs == 0) + { + GUIControl.SetControlLabel(GetID, buttonOne.GetID, "View:Small Icons"); + facadeView.View = GUIFacadeControl.ViewMode.List; + mapSettings.ViewAs = 0; + } + else if (mapSettings.ViewAs == 1) + { + GUIControl.SetControlLabel(GetID, buttonOne.GetID, "View:Big Icons"); + facadeView.View = GUIFacadeControl.ViewMode.SmallIcons; + mapSettings.ViewAs = 1; + } + else + { + GUIControl.SetControlLabel(GetID, buttonOne.GetID, "View:List"); + facadeView.View = GUIFacadeControl.ViewMode.LargeIcons; + mapSettings.ViewAs = 2; + } + + MovieInfo.GetAllMovies(); + + + + //GUIControl.HideControl(GetID, SelectedTheaterCtrl.GetID); + + movOrTheater = true; + + selectedMovieDate = String.Empty; + selectedMovieName = String.Empty; + selectedTheaterName = String.Empty; + + theaterDatesShown = false; + getShowTimes = false; + showMoviesForTheater = false; + + ShowListView(MovieInfo.Movies, false); + + if (PluginSettings.DebugMode) + Log.Debug("Theaters Changed to Movies"); + } + + } + + private void OnPlayTrailer(string MovieName) + { + //Get the trailer location (can be a URL or location on disk) + GUIGraphicsContext.IsFullScreenVideo = true; + GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO); + g_Player.FullScreen = true; + + g_Player.Play(MovieInfo.GetTrailerLoc(MovieName),g_Player.MediaType.Video); + //If we are downloading a stream and dont't have an actual file to play + //g_Player.Play(@"http://movies.apple.com/movies/mgm/arthurandtheinvisibles/arthurandtheinvisibles_h320.mov"); + + + } + + public void ShowListView(string[] _List, bool show_poster) + { + int i = 0; + if (show_poster == false) + //poster.SetFileName(GUIGraphicsContext.Skin + @"\media\" + backgroundposter); + + GUIControl.ClearControl(GetID, facadeView.GetID); + + if (PluginSettings.DebugMode) + Log.Debug("ShowListView::List size {0}", _List.Length.ToString()); + + //while (_List[i] != null) + while (i<_List.Length) + { + GUIListItem item = new GUIListItem(); + + item.Label = _List[i]; + item.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(OnRetrieveCoverArt); + facadeView.Add(item); + if (PluginSettings.DebugMode) + Log.Debug("Adding {0} to facadeView", _List[i]); + i++; + } + + } + + public void ShowTheatersView(string[] _Theaters) + { + GUIControl.ClearControl(GetID, facadeView.GetID); + + if (PluginSettings.DebugMode) + Log.Debug("Theater List size {0}", _Theaters.Length.ToString()); + + ... [truncated message content] |
From: <moi...@us...> - 2007-04-17 21:08:54
|
Revision: 340 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=340&view=rev Author: moiristo Date: 2007-04-17 14:08:51 -0700 (Tue, 17 Apr 2007) Log Message: ----------- - vlc opts are now created using arraylist - improved the configuration form Modified Paths: -------------- trunk/plugins/VideoLAN/ConfigurationForm.cs trunk/plugins/VideoLAN/VideoLAN.csproj trunk/plugins/VideoLAN/VideoLAN.suo trunk/plugins/VideoLAN/VideoLanPlugin.cs Modified: trunk/plugins/VideoLAN/ConfigurationForm.cs =================================================================== --- trunk/plugins/VideoLAN/ConfigurationForm.cs 2007-04-17 17:42:39 UTC (rev 339) +++ trunk/plugins/VideoLAN/ConfigurationForm.cs 2007-04-17 21:08:51 UTC (rev 340) @@ -41,21 +41,49 @@ /// </summary> public class ConfigurationForm : System.Windows.Forms.Form { - - private string m_enabledExt = ""; - private string m_enabledStreams = ""; private string bufsize = ""; private string m_deinterlace = "Disable"; - private MediaPortal.UserInterface.Controls.MPButton buttonEnable; - private MediaPortal.UserInterface.Controls.MPTextBox extensionBox; - private TextBox streamBox; - private Label label1; + private MediaPortal.UserInterface.Controls.MPButton okBtn; private GroupBox groupBox1; - private Label label2; private TextBox bufBox; private Label label3; private Label label4; private ComboBox deintBox; + private GroupBox groupBox2; + private CheckBox checkBox6; + private CheckBox checkBox5; + private CheckBox checkBox4; + private CheckBox checkBox3; + private CheckBox checkBox2; + private CheckBox checkBox1; + private CheckBox checkBox19; + private CheckBox checkBox20; + private CheckBox checkBox21; + private CheckBox checkBox22; + private CheckBox checkBox23; + private CheckBox checkBox14; + private CheckBox checkBox15; + private CheckBox checkBox16; + private CheckBox checkBox17; + private CheckBox checkBox10; + private CheckBox checkBox11; + private CheckBox checkBox13; + private CheckBox checkBox7; + private CheckBox checkBox8; + private CheckBox checkBox9; + private Button allAudBtn; + private Button allVidBtn; + private GroupBox protBox; + private CheckBox httpOpt; + private CheckBox udpOpt; + private CheckBox rtspOpt; + private CheckBox mmsOpt; + private CheckBox checkBox27; + private Button cancelBtn; + private Button applyBtn; + private Panel audPanel; + private Panel vidPanel; + private bool isCancelled = false; /// <summary> /// Required designer variable. /// </summary> @@ -91,69 +119,75 @@ /// </summary> private void InitializeComponent() { - this.buttonEnable = new MediaPortal.UserInterface.Controls.MPButton(); - this.extensionBox = new MediaPortal.UserInterface.Controls.MPTextBox(); - this.streamBox = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); + this.okBtn = new MediaPortal.UserInterface.Controls.MPButton(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.deintBox = new System.Windows.Forms.ComboBox(); this.label4 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); + this.bufBox = new System.Windows.Forms.TextBox(); this.label3 = new System.Windows.Forms.Label(); - this.bufBox = new System.Windows.Forms.TextBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.audPanel = new System.Windows.Forms.Panel(); + this.checkBox19 = new System.Windows.Forms.CheckBox(); + this.checkBox20 = new System.Windows.Forms.CheckBox(); + this.checkBox21 = new System.Windows.Forms.CheckBox(); + this.checkBox22 = new System.Windows.Forms.CheckBox(); + this.checkBox23 = new System.Windows.Forms.CheckBox(); + this.checkBox14 = new System.Windows.Forms.CheckBox(); + this.checkBox16 = new System.Windows.Forms.CheckBox(); + this.checkBox17 = new System.Windows.Forms.CheckBox(); + this.checkBox9 = new System.Windows.Forms.CheckBox(); + this.checkBox4 = new System.Windows.Forms.CheckBox(); + this.vidPanel = new System.Windows.Forms.Panel(); + this.checkBox27 = new System.Windows.Forms.CheckBox(); + this.checkBox15 = new System.Windows.Forms.CheckBox(); + this.checkBox10 = new System.Windows.Forms.CheckBox(); + this.checkBox11 = new System.Windows.Forms.CheckBox(); + this.checkBox7 = new System.Windows.Forms.CheckBox(); + this.checkBox8 = new System.Windows.Forms.CheckBox(); + this.checkBox6 = new System.Windows.Forms.CheckBox(); + this.checkBox5 = new System.Windows.Forms.CheckBox(); + this.checkBox3 = new System.Windows.Forms.CheckBox(); + this.checkBox2 = new System.Windows.Forms.CheckBox(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.allAudBtn = new System.Windows.Forms.Button(); + this.allVidBtn = new System.Windows.Forms.Button(); + this.checkBox13 = new System.Windows.Forms.CheckBox(); + this.protBox = new System.Windows.Forms.GroupBox(); + this.httpOpt = new System.Windows.Forms.CheckBox(); + this.udpOpt = new System.Windows.Forms.CheckBox(); + this.rtspOpt = new System.Windows.Forms.CheckBox(); + this.mmsOpt = new System.Windows.Forms.CheckBox(); + this.cancelBtn = new System.Windows.Forms.Button(); + this.applyBtn = new System.Windows.Forms.Button(); this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.audPanel.SuspendLayout(); + this.vidPanel.SuspendLayout(); + this.protBox.SuspendLayout(); this.SuspendLayout(); // - // buttonEnable + // okBtn // - this.buttonEnable.Location = new System.Drawing.Point(12, 163); - this.buttonEnable.Name = "buttonEnable"; - this.buttonEnable.Size = new System.Drawing.Size(75, 23); - this.buttonEnable.TabIndex = 3; - this.buttonEnable.Text = "Save"; - this.buttonEnable.UseVisualStyleBackColor = true; - this.buttonEnable.Click += new System.EventHandler(this.buttonEnable_Click); + this.okBtn.Location = new System.Drawing.Point(170, 367); + this.okBtn.Name = "okBtn"; + this.okBtn.Size = new System.Drawing.Size(75, 23); + this.okBtn.TabIndex = 3; + this.okBtn.Text = "Ok"; + this.okBtn.UseVisualStyleBackColor = true; + this.okBtn.Click += new System.EventHandler(this.buttonEnable_Click); // - // extensionBox - // - this.extensionBox.BorderColor = System.Drawing.Color.Empty; - this.extensionBox.Location = new System.Drawing.Point(135, 25); - this.extensionBox.Name = "extensionBox"; - this.extensionBox.Size = new System.Drawing.Size(256, 20); - this.extensionBox.TabIndex = 4; - // - // streamBox - // - this.streamBox.Location = new System.Drawing.Point(135, 52); - this.streamBox.Name = "streamBox"; - this.streamBox.Size = new System.Drawing.Size(256, 20); - this.streamBox.TabIndex = 5; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(6, 28); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(115, 13); - this.label1.TabIndex = 6; - this.label1.Text = "Associated extensions:"; - // // groupBox1 // this.groupBox1.Controls.Add(this.deintBox); this.groupBox1.Controls.Add(this.label4); this.groupBox1.Controls.Add(this.bufBox); this.groupBox1.Controls.Add(this.label3); - this.groupBox1.Controls.Add(this.label2); - this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Controls.Add(this.streamBox); - this.groupBox1.Controls.Add(this.extensionBox); this.groupBox1.Location = new System.Drawing.Point(11, 12); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(411, 145); + this.groupBox1.Size = new System.Drawing.Size(222, 89); this.groupBox1.TabIndex = 7; this.groupBox1.TabStop = false; - this.groupBox1.Text = "General"; + this.groupBox1.Text = "General settings"; // // deintBox // @@ -167,15 +201,15 @@ "Linear", "Mean", "X"}); - this.deintBox.Location = new System.Drawing.Point(135, 107); + this.deintBox.Location = new System.Drawing.Point(104, 50); this.deintBox.Name = "deintBox"; - this.deintBox.Size = new System.Drawing.Size(256, 21); + this.deintBox.Size = new System.Drawing.Size(110, 21); this.deintBox.TabIndex = 11; // // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(6, 107); + this.label4.Location = new System.Drawing.Point(6, 54); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(64, 13); this.label4.TabIndex = 10; @@ -183,7 +217,7 @@ // // bufBox // - this.bufBox.Location = new System.Drawing.Point(135, 80); + this.bufBox.Location = new System.Drawing.Point(104, 24); this.bufBox.Name = "bufBox"; this.bufBox.Size = new System.Drawing.Size(59, 20); this.bufBox.TabIndex = 9; @@ -191,34 +225,398 @@ // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(6, 83); + this.label3.Location = new System.Drawing.Point(6, 24); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(59, 13); + this.label3.Size = new System.Drawing.Size(92, 13); this.label3.TabIndex = 8; - this.label3.Text = "Buffer size:"; + this.label3.Text = "Buffer size (in ms):"; // - // label2 + // groupBox2 // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(6, 55); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(108, 13); - this.label2.TabIndex = 7; - this.label2.Text = "Associated protocols:"; + this.groupBox2.Controls.Add(this.audPanel); + this.groupBox2.Controls.Add(this.vidPanel); + this.groupBox2.Controls.Add(this.allAudBtn); + this.groupBox2.Controls.Add(this.allVidBtn); + this.groupBox2.Location = new System.Drawing.Point(239, 12); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(169, 349); + this.groupBox2.TabIndex = 8; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Associated extensions"; // + // audPanel + // + this.audPanel.Controls.Add(this.checkBox19); + this.audPanel.Controls.Add(this.checkBox20); + this.audPanel.Controls.Add(this.checkBox21); + this.audPanel.Controls.Add(this.checkBox22); + this.audPanel.Controls.Add(this.checkBox23); + this.audPanel.Controls.Add(this.checkBox14); + this.audPanel.Controls.Add(this.checkBox16); + this.audPanel.Controls.Add(this.checkBox17); + this.audPanel.Controls.Add(this.checkBox9); + this.audPanel.Controls.Add(this.checkBox4); + this.audPanel.Location = new System.Drawing.Point(86, 19); + this.audPanel.Name = "audPanel"; + this.audPanel.Size = new System.Drawing.Size(74, 277); + this.audPanel.TabIndex = 26; + // + // checkBox19 + // + this.checkBox19.AutoSize = true; + this.checkBox19.Location = new System.Drawing.Point(10, 100); + this.checkBox19.Name = "checkBox19"; + this.checkBox19.Size = new System.Drawing.Size(40, 17); + this.checkBox19.TabIndex = 21; + this.checkBox19.Text = ".flv"; + this.checkBox19.UseVisualStyleBackColor = true; + // + // checkBox20 + // + this.checkBox20.AutoSize = true; + this.checkBox20.Location = new System.Drawing.Point(10, 77); + this.checkBox20.Name = "checkBox20"; + this.checkBox20.Size = new System.Drawing.Size(46, 17); + this.checkBox20.TabIndex = 20; + this.checkBox20.Text = ".flac"; + this.checkBox20.UseVisualStyleBackColor = true; + // + // checkBox21 + // + this.checkBox21.AutoSize = true; + this.checkBox21.Location = new System.Drawing.Point(10, 31); + this.checkBox21.Name = "checkBox21"; + this.checkBox21.Size = new System.Drawing.Size(47, 17); + this.checkBox21.TabIndex = 19; + this.checkBox21.Text = ".ac3"; + this.checkBox21.UseVisualStyleBackColor = true; + // + // checkBox22 + // + this.checkBox22.AutoSize = true; + this.checkBox22.Location = new System.Drawing.Point(10, 8); + this.checkBox22.Name = "checkBox22"; + this.checkBox22.Size = new System.Drawing.Size(47, 17); + this.checkBox22.TabIndex = 18; + this.checkBox22.Text = ".aac"; + this.checkBox22.UseVisualStyleBackColor = true; + // + // checkBox23 + // + this.checkBox23.AutoSize = true; + this.checkBox23.Location = new System.Drawing.Point(10, 54); + this.checkBox23.Name = "checkBox23"; + this.checkBox23.Size = new System.Drawing.Size(43, 17); + this.checkBox23.TabIndex = 17; + this.checkBox23.Text = ".dts"; + this.checkBox23.UseVisualStyleBackColor = true; + // + // checkBox14 + // + this.checkBox14.AutoSize = true; + this.checkBox14.Location = new System.Drawing.Point(10, 215); + this.checkBox14.Name = "checkBox14"; + this.checkBox14.Size = new System.Drawing.Size(49, 17); + this.checkBox14.TabIndex = 16; + this.checkBox14.Text = ".wav"; + this.checkBox14.UseVisualStyleBackColor = true; + // + // checkBox16 + // + this.checkBox16.AutoSize = true; + this.checkBox16.Location = new System.Drawing.Point(10, 192); + this.checkBox16.Name = "checkBox16"; + this.checkBox16.Size = new System.Drawing.Size(49, 17); + this.checkBox16.TabIndex = 14; + this.checkBox16.Text = ".ogm"; + this.checkBox16.UseVisualStyleBackColor = true; + // + // checkBox17 + // + this.checkBox17.AutoSize = true; + this.checkBox17.Location = new System.Drawing.Point(10, 169); + this.checkBox17.Name = "checkBox17"; + this.checkBox17.Size = new System.Drawing.Size(47, 17); + this.checkBox17.TabIndex = 13; + this.checkBox17.Text = ".ogg"; + this.checkBox17.UseVisualStyleBackColor = true; + // + // checkBox9 + // + this.checkBox9.AutoSize = true; + this.checkBox9.Location = new System.Drawing.Point(10, 146); + this.checkBox9.Name = "checkBox9"; + this.checkBox9.Size = new System.Drawing.Size(49, 17); + this.checkBox9.TabIndex = 6; + this.checkBox9.Text = ".mp3"; + this.checkBox9.UseVisualStyleBackColor = true; + // + // checkBox4 + // + this.checkBox4.AutoSize = true; + this.checkBox4.Location = new System.Drawing.Point(10, 123); + this.checkBox4.Name = "checkBox4"; + this.checkBox4.Size = new System.Drawing.Size(49, 17); + this.checkBox4.TabIndex = 3; + this.checkBox4.Text = ".m4a"; + this.checkBox4.UseVisualStyleBackColor = true; + // + // vidPanel + // + this.vidPanel.Controls.Add(this.checkBox27); + this.vidPanel.Controls.Add(this.checkBox15); + this.vidPanel.Controls.Add(this.checkBox10); + this.vidPanel.Controls.Add(this.checkBox11); + this.vidPanel.Controls.Add(this.checkBox13); + this.vidPanel.Controls.Add(this.checkBox7); + this.vidPanel.Controls.Add(this.checkBox8); + this.vidPanel.Controls.Add(this.checkBox6); + this.vidPanel.Controls.Add(this.checkBox5); + this.vidPanel.Controls.Add(this.checkBox3); + this.vidPanel.Controls.Add(this.checkBox2); + this.vidPanel.Controls.Add(this.checkBox1); + this.vidPanel.Location = new System.Drawing.Point(6, 19); + this.vidPanel.Name = "vidPanel"; + this.vidPanel.Size = new System.Drawing.Size(74, 295); + this.vidPanel.TabIndex = 25; + // + // checkBox27 + // + this.checkBox27.AutoSize = true; + this.checkBox27.Location = new System.Drawing.Point(8, 102); + this.checkBox27.Name = "checkBox27"; + this.checkBox27.Size = new System.Drawing.Size(53, 17); + this.checkBox27.TabIndex = 24; + this.checkBox27.Text = ".h264"; + this.checkBox27.UseVisualStyleBackColor = true; + // + // checkBox15 + // + this.checkBox15.AutoSize = true; + this.checkBox15.Location = new System.Drawing.Point(8, 125); + this.checkBox15.Name = "checkBox15"; + this.checkBox15.Size = new System.Drawing.Size(49, 17); + this.checkBox15.TabIndex = 15; + this.checkBox15.Text = ".mkv"; + this.checkBox15.UseVisualStyleBackColor = true; + // + // checkBox10 + // + this.checkBox10.AutoSize = true; + this.checkBox10.Location = new System.Drawing.Point(8, 10); + this.checkBox10.Name = "checkBox10"; + this.checkBox10.Size = new System.Drawing.Size(47, 17); + this.checkBox10.TabIndex = 12; + this.checkBox10.Text = ".3gp"; + this.checkBox10.UseVisualStyleBackColor = true; + // + // checkBox11 + // + this.checkBox11.AutoSize = true; + this.checkBox11.Location = new System.Drawing.Point(8, 171); + this.checkBox11.Name = "checkBox11"; + this.checkBox11.Size = new System.Drawing.Size(49, 17); + this.checkBox11.TabIndex = 11; + this.checkBox11.Text = ".mp4"; + this.checkBox11.UseVisualStyleBackColor = true; + // + // checkBox7 + // + this.checkBox7.AutoSize = true; + this.checkBox7.Location = new System.Drawing.Point(8, 240); + this.checkBox7.Name = "checkBox7"; + this.checkBox7.Size = new System.Drawing.Size(51, 17); + this.checkBox7.TabIndex = 8; + this.checkBox7.Text = ".wma"; + this.checkBox7.UseVisualStyleBackColor = true; + // + // checkBox8 + // + this.checkBox8.AutoSize = true; + this.checkBox8.Location = new System.Drawing.Point(8, 33); + this.checkBox8.Name = "checkBox8"; + this.checkBox8.Size = new System.Drawing.Size(43, 17); + this.checkBox8.TabIndex = 7; + this.checkBox8.Text = ".asf"; + this.checkBox8.UseVisualStyleBackColor = true; + // + // checkBox6 + // + this.checkBox6.AutoSize = true; + this.checkBox6.Location = new System.Drawing.Point(8, 194); + this.checkBox6.Name = "checkBox6"; + this.checkBox6.Size = new System.Drawing.Size(49, 17); + this.checkBox6.TabIndex = 5; + this.checkBox6.Text = ".mpg"; + this.checkBox6.UseVisualStyleBackColor = true; + // + // checkBox5 + // + this.checkBox5.AutoSize = true; + this.checkBox5.Location = new System.Drawing.Point(8, 148); + this.checkBox5.Name = "checkBox5"; + this.checkBox5.Size = new System.Drawing.Size(49, 17); + this.checkBox5.TabIndex = 4; + this.checkBox5.Text = ".mov"; + this.checkBox5.UseVisualStyleBackColor = true; + // + // checkBox3 + // + this.checkBox3.AutoSize = true; + this.checkBox3.Location = new System.Drawing.Point(8, 56); + this.checkBox3.Name = "checkBox3"; + this.checkBox3.Size = new System.Drawing.Size(43, 17); + this.checkBox3.TabIndex = 2; + this.checkBox3.Text = ".avi"; + this.checkBox3.UseVisualStyleBackColor = true; + // + // checkBox2 + // + this.checkBox2.AutoSize = true; + this.checkBox2.Location = new System.Drawing.Point(8, 79); + this.checkBox2.Name = "checkBox2"; + this.checkBox2.Size = new System.Drawing.Size(49, 17); + this.checkBox2.TabIndex = 1; + this.checkBox2.Text = ".gary"; + this.checkBox2.UseVisualStyleBackColor = true; + // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.Location = new System.Drawing.Point(8, 217); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(37, 17); + this.checkBox1.TabIndex = 0; + this.checkBox1.Text = ".ts"; + this.checkBox1.UseVisualStyleBackColor = true; + // + // allAudBtn + // + this.allAudBtn.Location = new System.Drawing.Point(85, 320); + this.allAudBtn.Name = "allAudBtn"; + this.allAudBtn.Size = new System.Drawing.Size(75, 23); + this.allAudBtn.TabIndex = 23; + this.allAudBtn.Text = "All audio"; + this.allAudBtn.UseVisualStyleBackColor = true; + this.allAudBtn.Click += new System.EventHandler(this.allAudBtn_Click); + // + // allVidBtn + // + this.allVidBtn.Location = new System.Drawing.Point(6, 320); + this.allVidBtn.Name = "allVidBtn"; + this.allVidBtn.Size = new System.Drawing.Size(75, 23); + this.allVidBtn.TabIndex = 22; + this.allVidBtn.Text = "All video"; + this.allVidBtn.UseVisualStyleBackColor = true; + this.allVidBtn.Click += new System.EventHandler(this.allVidBtn_Click); + // + // checkBox13 + // + this.checkBox13.AutoSize = true; + this.checkBox13.Location = new System.Drawing.Point(6, 263); + this.checkBox13.Name = "checkBox13"; + this.checkBox13.Size = new System.Drawing.Size(51, 17); + this.checkBox13.TabIndex = 9; + this.checkBox13.Text = ".wmv"; + this.checkBox13.UseVisualStyleBackColor = true; + // + // protBox + // + this.protBox.Controls.Add(this.httpOpt); + this.protBox.Controls.Add(this.udpOpt); + this.protBox.Controls.Add(this.rtspOpt); + this.protBox.Controls.Add(this.mmsOpt); + this.protBox.Location = new System.Drawing.Point(12, 109); + this.protBox.Name = "protBox"; + this.protBox.Size = new System.Drawing.Size(221, 84); + this.protBox.TabIndex = 24; + this.protBox.TabStop = false; + this.protBox.Text = "Associated protocols"; + // + // httpOpt + // + this.httpOpt.AutoSize = true; + this.httpOpt.Location = new System.Drawing.Point(8, 26); + this.httpOpt.Name = "httpOpt"; + this.httpOpt.Size = new System.Drawing.Size(44, 17); + this.httpOpt.TabIndex = 12; + this.httpOpt.Text = "http"; + this.httpOpt.UseVisualStyleBackColor = true; + // + // udpOpt + // + this.udpOpt.AutoSize = true; + this.udpOpt.Location = new System.Drawing.Point(8, 49); + this.udpOpt.Name = "udpOpt"; + this.udpOpt.Size = new System.Drawing.Size(44, 17); + this.udpOpt.TabIndex = 7; + this.udpOpt.Text = "udp"; + this.udpOpt.UseVisualStyleBackColor = true; + // + // rtspOpt + // + this.rtspOpt.AutoSize = true; + this.rtspOpt.Location = new System.Drawing.Point(71, 26); + this.rtspOpt.Name = "rtspOpt"; + this.rtspOpt.Size = new System.Drawing.Size(43, 17); + this.rtspOpt.TabIndex = 2; + this.rtspOpt.Text = "rtsp"; + this.rtspOpt.UseVisualStyleBackColor = true; + // + // mmsOpt + // + this.mmsOpt.AutoSize = true; + this.mmsOpt.Location = new System.Drawing.Point(71, 49); + this.mmsOpt.Name = "mmsOpt"; + this.mmsOpt.Size = new System.Drawing.Size(47, 17); + this.mmsOpt.TabIndex = 1; + this.mmsOpt.Text = "mms"; + this.mmsOpt.UseVisualStyleBackColor = true; + // + // cancelBtn + // + this.cancelBtn.Location = new System.Drawing.Point(251, 367); + this.cancelBtn.Name = "cancelBtn"; + this.cancelBtn.Size = new System.Drawing.Size(75, 23); + this.cancelBtn.TabIndex = 25; + this.cancelBtn.Text = "Cancel"; + this.cancelBtn.UseVisualStyleBackColor = true; + this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click); + // + // applyBtn + // + this.applyBtn.Location = new System.Drawing.Point(333, 367); + this.applyBtn.Name = "applyBtn"; + this.applyBtn.Size = new System.Drawing.Size(75, 23); + this.applyBtn.TabIndex = 26; + this.applyBtn.Text = "Apply"; + this.applyBtn.UseVisualStyleBackColor = true; + this.applyBtn.Click += new System.EventHandler(this.applyBtn_Click); + // // ConfigurationForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.ClientSize = new System.Drawing.Size(440, 198); + this.ClientSize = new System.Drawing.Size(417, 398); + this.Controls.Add(this.applyBtn); + this.Controls.Add(this.cancelBtn); + this.Controls.Add(this.protBox); + this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); - this.Controls.Add(this.buttonEnable); + this.Controls.Add(this.okBtn); this.Name = "ConfigurationForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Configuration"; + this.Text = "VideoLan Player Configuration"; this.Closing += new System.ComponentModel.CancelEventHandler(this.ConfigurationForm_Closing); this.Load += new System.EventHandler(this.ConfigurationForm_Load); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.audPanel.ResumeLayout(false); + this.audPanel.PerformLayout(); + this.vidPanel.ResumeLayout(false); + this.vidPanel.PerformLayout(); + this.protBox.ResumeLayout(false); + this.protBox.PerformLayout(); this.ResumeLayout(false); } @@ -228,24 +626,33 @@ { using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Directory.GetCurrentDirectory() + @"\MediaPortal.xml")) { - m_enabledExt = xmlreader.GetValueAsString("vlcplugin", "enabledextensions", ".ts,.gary"); - m_enabledStreams = xmlreader.GetValueAsString("vlcplugin", "enabledstreams", "udp"); + string m_enabledExt = xmlreader.GetValueAsString("vlcplugin", "enabledextensions", ".ts,.gary"); + string m_enabledStreams = xmlreader.GetValueAsString("vlcplugin", "enabledstreams", "udp"); bufsize = xmlreader.GetValueAsString("vlcplugin", "buffer", "5000"); m_deinterlace = xmlreader.GetValueAsString("vlcplugin", "deinterlace", "Disable"); m_enabledExt.Replace(":", ","); // in case it was using the old plugin code where the separator was ":" + if (m_enabledExt != null && m_enabledExt.Length > 0) + { + ArrayList extArrayList = new ArrayList(); + ArrayList protArrayList = new ArrayList(); + extArrayList.AddRange(m_enabledExt.Split(',')); + protArrayList.AddRange(m_enabledStreams.Split(',')); + + foreach (CheckBox vbox in vidPanel.Controls) + if (extArrayList.Contains(vbox.Text)) vbox.Checked = true; + foreach (CheckBox abox in audPanel.Controls) + if (extArrayList.Contains(abox.Text)) abox.Checked = true; + foreach (CheckBox pbox in protBox.Controls) + if (protArrayList.Contains(pbox.Text)) pbox.Checked = true; + } } - if (m_enabledExt != null && m_enabledExt.Length > 0) - extensionBox.Text = m_enabledExt; - - this.extensionBox.Text = m_enabledExt; - this.streamBox.Text = m_enabledStreams; this.bufBox.Text = bufsize; this.deintBox.SelectedItem = m_deinterlace; } private void ConfigurationForm_Closing(object sender, System.ComponentModel.CancelEventArgs e) { - writeConfiguration(); + if(!isCancelled) writeConfiguration(); } private void buttonEnable_Click(object sender, System.EventArgs e) @@ -254,15 +661,62 @@ this.Close(); } - private void writeConfiguration() - { - using (MediaPortal.Profile.Settings xmlWriter = new MediaPortal.Profile.Settings(Directory.GetCurrentDirectory() + @"\MediaPortal.xml")) - { - xmlWriter.SetValue("vlcplugin", "enabledextensions", extensionBox.Text); - xmlWriter.SetValue("vlcplugin", "enabledstreams", streamBox.Text); - xmlWriter.SetValue("vlcplugin", "buffer", bufBox.Text); - xmlWriter.SetValue("vlcplugin", "deinterlace", deintBox.Text); - } - } + private void allVidBtn_Click(object sender, EventArgs e) + { + foreach(CheckBox vbox in vidPanel.Controls) + { + vbox.Checked = true; + } + } + + private void allAudBtn_Click(object sender, EventArgs e) + { + foreach (CheckBox abox in audPanel.Controls) + { + abox.Checked = true; + } + } + + private void applyBtn_Click(object sender, EventArgs e) + { + writeConfiguration(); + } + + private void cancelBtn_Click(object sender, EventArgs e) + { + isCancelled = true; + this.Close(); + } + + private void writeConfiguration() + { + using (MediaPortal.Profile.Settings xmlWriter = new MediaPortal.Profile.Settings(Directory.GetCurrentDirectory() + @"\MediaPortal.xml")) + { + xmlWriter.SetValue("vlcplugin", "enabledextensions", getCheckedExtensions()); + xmlWriter.SetValue("vlcplugin", "enabledstreams", getCheckedProtocols()); + xmlWriter.SetValue("vlcplugin", "buffer", bufBox.Text); + xmlWriter.SetValue("vlcplugin", "deinterlace", deintBox.Text); + } + } + + private string getCheckedExtensions() + { + string result = ""; + foreach (CheckBox vbox in vidPanel.Controls) + if (vbox.Checked) result += vbox.Text + ","; + foreach (CheckBox abox in audPanel.Controls) + if (abox.Checked) result += abox.Text + ","; + + return result.Substring(0, result.Length - 1); + } + + private string getCheckedProtocols() + { + string result = ""; + foreach (CheckBox pbox in protBox.Controls) + if (pbox.Checked) result += pbox.Text + ","; + + return result.Substring(0, result.Length - 1); + } } } Modified: trunk/plugins/VideoLAN/VideoLAN.csproj =================================================================== --- trunk/plugins/VideoLAN/VideoLAN.csproj 2007-04-17 17:42:39 UTC (rev 339) +++ trunk/plugins/VideoLAN/VideoLAN.csproj 2007-04-17 21:08:51 UTC (rev 340) @@ -36,18 +36,18 @@ <SpecificVersion>False</SpecificVersion> <HintPath>bin\AXVLC.dll</HintPath> </Reference> - <Reference Include="Core, Version=1.0.2586.6922, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Core, Version=1.0.2546.32606, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\trunk\mediaportal\xbmc\bin\Release\Core.dll</HintPath> + <HintPath>C:\Program Files (x86)\MediaPortal\Core.DLL</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> - <Reference Include="Utils, Version=1.0.2586.6921, Culture=neutral, processorArchitecture=MSIL"> + <Reference Include="Utils, Version=1.0.2546.32604, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\trunk\mediaportal\xbmc\bin\Release\Utils.dll</HintPath> + <HintPath>C:\Program Files (x86)\MediaPortal\Utils.DLL</HintPath> </Reference> </ItemGroup> <ItemGroup> Modified: trunk/plugins/VideoLAN/VideoLAN.suo =================================================================== (Binary files differ) Modified: trunk/plugins/VideoLAN/VideoLanPlugin.cs =================================================================== --- trunk/plugins/VideoLAN/VideoLanPlugin.cs 2007-04-17 17:42:39 UTC (rev 339) +++ trunk/plugins/VideoLAN/VideoLanPlugin.cs 2007-04-17 21:08:51 UTC (rev 340) @@ -1,6 +1,6 @@ using System; using System.IO; -using System.Collections.Generic; +using System.Collections; using System.Text; using System.Drawing; using AXVLC; @@ -142,37 +142,27 @@ GUIWindowManager.SendThreadMessage(msg); Player_Initializing(); + + // Set options string vlciptvdir = Directory.GetCurrentDirectory() + @"\vlciptv"; if (!Directory.Exists(vlciptvdir)) Directory.CreateDirectory(vlciptvdir); - + string deinterlace = getDeinterlace(); + int bufferSize = getBufferSize(); - string[] option; - - if (!deinterlace.Equals("disable")) + ArrayList options = new ArrayList(); + options.Add(":http-caching=" + bufferSize); + options.Add(":mms-caching=" + bufferSize); + options.Add(":realrtsp-caching=" + bufferSize); + options.Add(":smb-caching=" + bufferSize); + options.Add(":snapshot-path=" + vlciptvdir); + options.Add(":record-path=" + vlciptvdir); + options.Add(":timeshift-dir=" + vlciptvdir); + options.Add(":access-filter=record"); + if (!deinterlace.Equals("disable")) { - option= new string[]{ - ":http-caching=" + getBufferSize(), - ":mms-caching=" + getBufferSize(), - ":realrtsp-caching=" + getBufferSize(), - ":smb-caching=" + getBufferSize(), - ":snapshot-path=" + vlciptvdir, - ":record-path=" + vlciptvdir, - ":timeshift-dir=" + vlciptvdir, - ":access-filter=record", - ":vout-filter=deinterlace", ":deinterlace-mode=" + deinterlace - }; - } else { - option = new string[]{ - ":http-caching=" + getBufferSize(), - ":mms-caching=" + getBufferSize(), - ":realrtsp-caching=" + getBufferSize(), - ":smb-caching=" + getBufferSize(), - ":snapshot-path=" + vlciptvdir, - ":record-path=" + vlciptvdir, - ":timeshift-dir=" + vlciptvdir, - ":access-filter=record", - }; + options.Add(":vout-filter=deinterlace"); + options.Add(":deinterlace-mode=" + deinterlace); } vlcControl.Stop(); @@ -181,7 +171,7 @@ System.Threading.Thread.Sleep(1000); //wait for vlc strange playlist problem - vlcControl.AddToPlayList(strFile, null, option); + vlcControl.AddToPlayList(strFile, null, (string[]) options.ToArray()); vlcControl.Play(); GUIGraphicsContext.form.Focus(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-04-17 17:42:43
|
Revision: 339 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=339&view=rev Author: dukus Date: 2007-04-17 10:42:39 -0700 (Tue, 17 Apr 2007) Log Message: ----------- Update checker Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs trunk/plugins/mpinstaler/MPInstaler/start_form.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs Modified: trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-04-17 17:00:41 UTC (rev 338) +++ trunk/plugins/mpinstaler/MPInstaler/MPInstaler.csproj 2007-04-17 17:42:39 UTC (rev 339) @@ -147,6 +147,10 @@ <SubType>Designer</SubType> <DependentUpon>start_form.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="UpdateChecker.resx"> + <SubType>Designer</SubType> + <DependentUpon>UpdateChecker.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="wizard\controlp.resx"> <SubType>Designer</SubType> <DependentUpon>controlp.cs</DependentUpon> @@ -183,6 +187,12 @@ <Compile Include="start_form.Designer.cs"> <DependentUpon>start_form.cs</DependentUpon> </Compile> + <Compile Include="UpdateChecker.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="UpdateChecker.Designer.cs"> + <DependentUpon>UpdateChecker.cs</DependentUpon> + </Compile> <Compile Include="wizard\controlp.cs"> <SubType>Form</SubType> </Compile> Modified: trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs 2007-04-17 17:00:41 UTC (rev 338) +++ trunk/plugins/mpinstaler/MPInstaler/start_form.Designer.cs 2007-04-17 17:42:39 UTC (rev 339) @@ -33,11 +33,12 @@ this.button2 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.button4 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // button1 // - this.button1.Location = new System.Drawing.Point(153, 50); + this.button1.Location = new System.Drawing.Point(171, 21); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(109, 32); this.button1.TabIndex = 0; @@ -47,7 +48,7 @@ // // button2 // - this.button2.Location = new System.Drawing.Point(153, 100); + this.button2.Location = new System.Drawing.Point(171, 71); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(109, 32); this.button2.TabIndex = 1; @@ -57,7 +58,7 @@ // // button3 // - this.button3.Location = new System.Drawing.Point(153, 150); + this.button3.Location = new System.Drawing.Point(171, 121); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(109, 32); this.button3.TabIndex = 2; @@ -69,6 +70,16 @@ // this.openFileDialog1.Filter = "MPI files|*.mpi|ZIP files|*.zip|All files|*.*"; // + // button4 + // + this.button4.Location = new System.Drawing.Point(171, 172); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(109, 32); + this.button4.TabIndex = 3; + this.button4.Text = "Check for updates"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click_1); + // // start_form // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -76,6 +87,7 @@ this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.ClientSize = new System.Drawing.Size(292, 249); + this.Controls.Add(this.button4); this.Controls.Add(this.button3); this.Controls.Add(this.button2); this.Controls.Add(this.button1); @@ -97,5 +109,6 @@ private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button3; private System.Windows.Forms.OpenFileDialog openFileDialog1; + private System.Windows.Forms.Button button4; } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/start_form.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/start_form.cs 2007-04-17 17:00:41 UTC (rev 338) +++ trunk/plugins/mpinstaler/MPInstaler/start_form.cs 2007-04-17 17:42:39 UTC (rev 339) @@ -57,5 +57,13 @@ { this.Close(); } + + private void button4_Click_1(object sender, EventArgs e) + { + this.Hide(); + UpdateChecker checker = new UpdateChecker(); + checker.Check(); + this.Show(); + } } } \ No newline at end of file Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-04-17 17:00:41 UTC (rev 338) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.Designer.cs 2007-04-17 17:42:39 UTC (rev 339) @@ -43,7 +43,6 @@ this.button4 = new System.Windows.Forms.Button(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); - this.button6 = new System.Windows.Forms.Button(); this.label2 = new System.Windows.Forms.Label(); this.comboBox2 = new System.Windows.Forms.ComboBox(); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); @@ -185,7 +184,6 @@ // // tabPage1 // - this.tabPage1.Controls.Add(this.button6); this.tabPage1.Controls.Add(this.label2); this.tabPage1.Controls.Add(this.comboBox2); this.tabPage1.Controls.Add(this.linkLabel1); @@ -203,16 +201,6 @@ this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.Enter += new System.EventHandler(this.tabPage1_Enter); // - // button6 - // - this.button6.Location = new System.Drawing.Point(250, 294); - this.button6.Name = "button6"; - this.button6.Size = new System.Drawing.Size(105, 23); - this.button6.TabIndex = 8; - this.button6.Text = "Find updates"; - this.button6.UseVisualStyleBackColor = true; - this.button6.Visible = false; - // // label2 // this.label2.AutoSize = true; @@ -402,7 +390,6 @@ private System.Windows.Forms.Label label2; private System.Windows.Forms.ComboBox comboBox2; private System.Windows.Forms.ColumnHeader columnHeader10; - private System.Windows.Forms.Button button6; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; } Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx 2007-04-17 17:00:41 UTC (rev 338) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/controlp.resx 2007-04-17 17:42:39 UTC (rev 339) @@ -126,129 +126,129 @@ LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACS HQAAAk1TRnQBSQFMAwEBAAEEAQABBAEAASABAAEgAQAE/wEhAQAI/wFCAU0BNgcAATYDAAEoAwABgAMA - ASADAAEBAQABIAYAAUAqAAEVATMBfAH/ARYBOQGBAf8BFgE9AYgB/wEXAUMBmQH/ARcBRAGfAf8BFwFK - AbAB/wEXAUwBtgH/ARgBTAG2Af8BGAFMAbYB/wEYAUwBtgH/ARgBTAG2Af8BGAFMAbYB/wEYAUwBtgH/ - ARgBTAG2Af8BFwFIAaoB/wEXAUQBnwH/ARcBQgGWAf8BFgE9AYgB/wEWATcBgQH/ARUBMgF5Af//AKEA - ARcBQQGTAf8BGgFNAbYB/wEfAVMBuAH/ASMBVwG7Af8BKAFbAb8B/wEsAWABwwH/ATEBZAHHAf8BNgFp - AcoB/wE6AW4BzgH/AT8BcwHRAf8BRAF3AdQB/wFIAXwB1wH/AUwBgAHaAf8BTwGBAdwB/wFSAYEB3gH/ - AVYBgQHgAf8BVwGBAeEB/wFYAYEB4gH/AVgBgQHiAf8BVwGBAeEB/wFVAYEB4AH/AVIBgQHeAf8BTQGB - AdoB/wFIAXsB1gH/AUABdAHRAf8BNwFrAcsB/wEhAVUBvAH/ARcBQAGQAf//AI0AARcBQgGWAf8BHgFQ - AbMB/wEpAVsBtwH/AS0BXwG8Af8BMAFjAcEB/wEzAWYBxQH/ATYBagHJAf8BOQFtAc0B/wE8AXABzwH/ - AUABcwHRAf8BQwF2AdMB/wFGAXkB1QH/AUkBfAHXAf8BTAGAAdoB/wFPAYEB3AH/AVIBgQHeAf8BVQGB - AeAB/wFYAYEB4gH/AVwBgQHkAf8BXwGBAeYB/wFiAYIB6QH/AWUBhQHrAf8BaAGIAe0B/wFrAYsB7wH/ - AW4BjgHxAf8BcQGSAfMB/wF0AZQB9QH/AXQBlAH1Af8BOwFuAc4B/wEWAUEBkwH//wCJAAEZAUwBswH/ - ASUBVwGwAf8BKQFbAbUB/wEsAV4BugH/ATABYgG/Af8BMwFlAcMB/wE2AWkByAH/ATkBbQHMAf8BPAFw - Ac8B/wE/AXMB0QH/AUIBdgHTAf8BRgF5AdUB/wFJAXwB1wH/AUwBfwHZAf8BTwGBAdwB/wFSAYEB3gH/ - AVUBgQHgAf8BWAGBAeIB/wFbAYEB5AH/AV4BgQHmAf8BYgGCAegB/wFlAYUB6gH/AWgBiAHsAf8BawGL - Ae8B/wFuAY4B8QH/AXEBkQHzAf8BdAGUAfUB/wF3AZcB9wH/AXYBlgH2Af8BIwFXAb4B//8AiQABHAFO - Aa8B/wElAVYBrgH/ASkBWgGzAf8BLAFeAbgB/wEvAWEBvQH/ATIBZQHBAf8BNQFoAcYB/wE5AWwBygH/ - ATwBbwHOAf8BPwFyAdAB/wFCAXYB0wH/AUUBeQHVAf8BSAF8AdcB/wFLAX8B2QH/AU4BgQHbAf8BUQGB - Ad0B/wFVAYEB3wH/AVgBgQHhAf8BWwGBAeQB/wFeAYEB5gH/AWEBgQHoAf8BZAGEAeoB/wFnAYcB7AH/ - AWoBigHuAf8BbQGNAfAB/wFwAZAB8gH/AXIBkwH0Af8BdAGUAfUB/wF1AZUB9gH/ATwBcAHOAf//AIkA - AR0BTwGsAf8BJQFVAawB/wEoAVkBsQH/ASwBXQG2Af8BLwFgAbsB/wEyAWQBvwH/ATUBZwHEAf8BOAFr - AcgB/wE7AW8BzQH/AT4BcgHQAf8BQQF1AdIB/wFFAXgB1AH/AUgBewHWAf8BSwF+AdkB/wFOAYEB2wH/ - AVEBgQHdAf8BVAGBAd8B/wFXAYEB4QH/AVoBgQHjAf8BXQGBAeUB/wFgAYEB5wH/AWMBgwHpAf8BZgGG - AesB/wFpAYkB7QH/AWsBjAHvAf8BbgGOAfEB/wFwAZAB8gH/AXIBkgHzAf8BcgGTAfQB/wFFAXkB1QH/ - /wCFAAEWATYBgQH/AR4BTgGpAf8BJAFUAakB/wEnAVgBrwH/ASoBXAG0Af8BLgFfAbkB/wExAWMBvQH/ - ATQBZwHCAf8BNwFqAcYB/wE6AW0BywH/AT4BcQHPAf8BQQF0AdIB/wFEAXcB1AH/AUcBegHWAf8BSgF9 - AdgB/wFNAYAB2gH/AVABgQHcAf8BTAGAAd4B/wE+AXYB2wH/AVABgQHfAf8BRAF+Ad8B/wFWAYEB5wH/ - AXEBjgHrAf8BVQGBAeoB/wFnAYcB7AH/AWoBigHuAf8BbAGMAe8B/wFuAY4B8QH/AW8BjwHxAf8BbwGQ - AfIB/wFMAYAB2gH/ARYBNgGBAf//AIEAARYBOwGCAf8BIgFRAacB/wEjAVMBpwH/ASYBVwGsAf8BKgFb - AbIB/wEtAV4BtwH/ATEBYgG7Af8BNAFmAcAB/wE3AWkBxAH/AToBbQHJAf8BPQFwAc0B/wFAAXMB0QH/ - AUMBdgHTAf8BRgF5AdUB/wFJAXwB1wH/AUwBfwHZAf8BTwGBAdsB/wFDAXkB3gH/AvwG/wGBAZwB7gH/ - AeQB6wH9Bf8BZwGGAesB/wFfAYEB6wH/AWcBiAHsAf8BaQGKAe4B/wFrAYsB7wH/AWwBjAHvAf8BbAGN - AfAB/wFSAYEB3gH/ARYBOwGCAf//AIEAARYBPwGNAf8BSwFyAbMB/wE8AWYBrgH/AScBVgGqAf8BKQFZ - Aa8B/wEsAV0BtAH/ATABYQG5Af8BMwFkAb4B/wE2AWgBwgH/ATkBawHHAf8BPAFvAcsB/wE/AXIBzwH/ - AUIBdQHSAf8BRQF4AdUB/wFIAXsB1wH/AUsBfgHZAf8BRwF8AdsB/wElAWYB1wP/Af4F/wH9Af4B/Qn/ - AYsBrgHyAf8BQQF+AeYB/wFZAYEB6wH/AWcBhwHsAf8BaAGIAe0B/wFpAYkB7QH/AWoBigHuAf8BVwGB - AeEB/wEWAT8BjgH//wCBAAEXAUQBnwH/AVoBfQG1Af8BVwF7AbYB/wFGAW8BtAH/ASIBVAGtAf8BKwFc - AbIB/wEuAV8BtwH/ATIBYwG7Af8BNQFmAcAB/wE4AWoBxAH/ATsBbQHJAf8BPgFxAc0B/wFBAXQB0QH/ - AUMBdwHUAf8BRwF6AdYB/wE/AXcB1wH/AUoBewHdAf8BdwGLAecF/wFkAYIB4wH/ATABbQHbAf8BMQFv - Ad0B/wGJAakB7wn/AXsBlgHsAf8BYAGEAeoB/wFlAYYB6wH/AWYBhwHsAf8BZwGHAewB/wFaAYEB4wH/ - ARcBRAGfAf//AIEAARgBRgGkAf8BcAGBAbsB/wFeAYEBtwH/AVgBfQG4Af8BSgF0AbUB/wEkAVUBrwH/ - AS0BXgG0Af8BMAFhAbkB/wE0AWUBvgH/ATcBaAHCAf8BOgFsAcYB/wE8AW8BygH/AT8BcgHOAf8BQgF2 - AdIB/wFFAXkB1QH/ATcBbgHSAf8B2wHlAfUF/wG/AdIB9QH/ATMBbgHYAf8BVQGBAeAB/wFYAYEB4QH/ - ATIBcAHfAf8C/gH9Af8B5AHqAfwB/wFlAYcB6gH/AWEBggHoAf8BYwGDAekB/wFjAYQB6gH/AWQBhAHq - Af8BXAGBAeQB/wEXAUYBpQH//wCBAAEcAU4BtQH/AYEBigHCAf8BZgGBAbkB/wFfAYEBuQH/AWABgQG+ - Af8BQAFrAbUB/wEoAVgBsQH/AS8BYAG2Af8BMgFjAbsB/wE1AWcBwAH/ATIBYgHEAf8BIwFbAcIB/wEx - AWcBygH/ATUBagHQAf8BQwF3AdMB/wEuAWkB1gH/AYMBowHmBf8BrwHHAe8B/wE0AW8B2QH/AVMBgQHe - Af8BVgGBAeAB/wE1AXAB2wH/AfQB+AH9Af8BXAGBAeoB/wFJAYEB5QH/AV8BgQHmAf8BYAGBAecB/wFg - AYEB6AH/AWEBgQHoAf8BXAGBAeUB/wEXAUwBtgH//wCBAAEfAVEBtQH/AYMBmQHIAf8BbAGBAboB/wFn - AYEBugH/AWEBgQG7Af8BYQGBAb8B/wEiAVcBsAH/AS0BXgG0Af8BMAFiAbgB/wE0AWUBvQH/ASEBWAG7 - Af8ByAHUAfEF/wETAU0BwQH/AR4BWwHJAf8BdgGJAd8B/wFmAYEB3gH/ATQBbwHUBf8BLgFpAdYB/wE3 - AW8B2QH/ATUBcAHaAf8BUgGBAeIF/wHUAeEB9AH/AVABgQHjAf8BXAGBAeQB/wFdAYEB5QH/AV4BgQHm - Af8BXgGBAeYB/wFcAYEB5QH/ARgBTAG1Af//AIEAASIBUwG1Af8BlAGmAc4B/wFzAYEBuwH/AW4BgQG7 - Af8BaAGBAbwB/wFpAYEBwAH/AUEBZwG0Af8BGAFNAasB/wE1AWQBuQH/ARMBRAGsAf8BEwE3Aa4B/wHd - AeIB9AX/AdMB3AHyAf8BjwGpAeMJ/wGBAZYB4Qn/AaIBugHuAf8BsAHEAe8N/wFFAX0B4gH/AVkBgQHi - Af8BWgGBAeMB/wFbAYEB4wH/AVsBgQHkAf8BWwGBAeQB/wEYAUwBtgH//wCBAAElAVYBtgH/AaMBswHU - Af8BegGCAbwB/wF1AYEBvQH/AW8BgQG9Af8BbAGBAb0B/wFVAXwBugH/ASABUQGqBf8B3wHlAfUB/wHh - AeUB9Bn/ATwBcgHQBf8BiAGrAesD/wH+Bf8BngG3Ae0B/wEiAWQB1wH/AUIBegHfAf8BTQGBAd8B/wFW - AYEB4AH/AVcBgQHhAf8BWAGBAeEB/wFYAYEB4gH/AVgBgQHiAf8BGAFMAbYB//8AgQABJwFXAbcB/wGy - Ab8B2gH/AYABhwG8Af8BfAGEAb4B/wF2AYEBvgH/AXABgQG/Af8BcQGBAcIB/wEmAVYBrA3/AZYBrgHg - Af8BLAFeAb4B/wETAUoBvAH/AVEBfgHPAf8B4wHnAfgF/wHJAdcB9AH/AZIBrQHrAf8BTAGAAdcB/wFO - AYAB2AH/Ae0B8wH9Af8BYgGBAeEB/wFFAXsB2wH/AVEBgQHdAf8BUgGBAd4B/wFTAYEB3wH/AVQBgQHf - Af8BVQGBAeAB/wFVAYEB4AH/AVUBgQHgAf8BGQFNAbYB//8AgQABJwFXAbcB/wHAAcsB4QH/AYEBjAG+ - Af8BgQGJAb8B/wF9AYYBvwH/AXcBgQHAAf8BeAGEAcAB/wETATwBmQH/AZIBqAHXBf8BfwGLAdEB/wET - AUkBrQH/ASwBYAG/Af8BNAFlAcIB/wErAWIBwQH/ARMBTwHDAf8B5wHvAfoJ/wHiAeoB9wH/ASsBZQHP - Af8BNwFxAdcB/wE+AXYB2QH/AU0BgAHaAf8BTgGBAdsB/wFPAYEB3AH/AVEBgQHdAf8BUQGBAd0B/wFS - AYEB3gH/AVIBgQHeAf8BUgGBAd4B/wEYAUwBtgH//wCBAAEmAVYBtwH/Ac0B1gHmAf8BgQGTAcAB/wGB - AY4BvwH/AYEBiwHBAf8BfgGHAcEB/wF3AYIBvgH/AUoBdQGxCf8BEwE4AaIB/wEoAWIBtwH/ATMBZAG7 - Af8BNgFnAb8B/wE5AWoBwwH/ASsBYQHCAf8BXgGBAdMJ/wE/AXQB1AH/ATwBcgHVAf8BRwF6AdYB/wFJ - AXwB1wH/AUoBfgHYAf8BSwF/AdkB/wFNAYAB2gH/AU4BgQHbAf8BTgGBAdsB/wFPAYEB3AH/AU8BgQHc - Af8BTwGBAdwB/wEYAUwBtgH//wCBAAEjAVQBtgH/AdgB3gHrAf8BhgGaAcQB/wGBAZMBwQH/AYEBkAHB - Af8BewGFAb0B/wGzAcQB4Qn/Ac0B1gHtAf8BEwE9AaIB/wEuAV8BtAH/ATEBYgG4Af8BNAFlAbwB/wE2 - AWgBwAH/ATIBZwHEAf8BIgFdAcQF/wG4AckB7wH/ARQBUwHJAf8BPwFxAdIB/wFEAXgB1AH/AUYBeQHV - Af8BRwF7AdYB/wFJAXwB1wH/AUoBfQHYAf8BSwF+AdkB/wFLAX8B2QH/AUwBgAHaAf8BTAGAAdoB/wFL - AX4B2QH/ARgBTAG1Af//AIEAAR4BUQG1Af8B3wHkAe8B/wGRAaMByQH/AYUBmgHEAf8BgQGUAcIB/wGB - AY0BwgH/AZsBrgHUAf8B+QH4Af0F/wL1AfoB/wETATQBmwH/ASwBXQGwAf8BLwFgAbUB/wExAWMBuQH/ - ATQBZQG9Af8BKgFfAcEB/wFCAXIByAn/AXUBhwHeAf8BMAFmAdEB/wFCAXUB0wH/AUMBdwHTAf8BRQF4 - AdUB/wFGAXkB1QH/AUcBegHWAf8BSAF7AdcB/wFJAXwB1wH/AUkBfQHYAf8BSgF9AdgB/wFGAXoB1gH/ - ARcBSwG2Af//AIEAARgBRgGhAf8B4wHoAfEB/wGcAa0BzgH/AY4BoAHHAf8BhgGaAcUB/wGBAZUBwwH/ - AYEBigHAAf8BYgGBAbUB/wHIAdIB6AX/AT0BZgGuAf8BEwFIAaUB/wEtAV0BsQH/AS8BYAG1Af8BKAFf - AbkB/wETAUYBsQH/AbkBxQHsDf8BJgFfAcgB/wE/AXMB0QH/AUEBdAHSAf8BQgF2AdMB/wFDAXcB0wH/ - AUQBeAHUAf8BRQF5AdUB/wFGAXkB1QH/AUYBegHWAf8BRwF6AdYB/wFBAXUB0gH/ARcBRQGiAf//AIEA - ARcBRAGfAf8B3gHkAfAB/wGpAbcB0wH/AZYBpwHKAf8BjgGhAcgB/wGGAZoBxQH/AYEBlgHFAf8BeQGE - Ab4B/wG3AcYB4wn/AUYBbQG0Af8BEwEzAZsB/wETAT0BogH/ARMBPwGqAf8BlAGrAd4F/wGVAa0B4wH/ - AUoBegHLAf8BbwGCAdUB/wEsAWEBxgH/ATwBcAHOAf8BPgFyAdAB/wE/AXMB0QH/AUABdAHSAf8BQQF1 - AdIB/wFCAXYB0wH/AUMBdgHTAf8BQwF3AdMB/wFEAXcB1AH/ATwBcAHPAf8BFwFEAZ8B//8AgQABFgE+ + ASADAAEBAQABIAYAAUAqAAEWATQBfQH/ARcBOgGBAf8BFwE+AYgB/wEYAUQBmQH/ARgBRQGfAf8BGAFL + AbAB/wEYAU0BtgH/ARkBTQG2Af8BGQFNAbYB/wEZAU0BtgH/ARkBTQG2Af8BGQFNAbYB/wEZAU0BtgH/ + ARkBTQG2Af8BGAFJAaoB/wEYAUUBnwH/ARgBQwGWAf8BFwE+AYgB/wEXATgBgQH/ARYBMwF6Af//AKEA + ARgBQgGTAf8BGwFOAbYB/wEgAVQBuAH/ASQBWAG7Af8BKQFcAb8B/wEtAWEBwwH/ATIBZQHHAf8BNwFq + AcoB/wE7AW8BzgH/AUABdAHRAf8BRQF4AdQB/wFJAX0B1wH/AU0BgQHaAf8BUAGBAdwB/wFTAYEB3gH/ + AVcBgQHgAf8BWAGBAeEB/wFZAYEB4gH/AVkBgQHiAf8BWAGBAeEB/wFWAYEB4AH/AVMBgQHeAf8BTgGB + AdoB/wFJAXwB1gH/AUEBdQHRAf8BOAFsAcsB/wEiAVYBvAH/ARgBQQGQAf//AI0AARgBQwGWAf8BHwFR + AbMB/wEqAVwBtwH/AS4BYAG8Af8BMQFkAcEB/wE0AWcBxQH/ATcBawHJAf8BOgFuAc0B/wE9AXEBzwH/ + AUEBdAHRAf8BRAF3AdMB/wFHAXoB1QH/AUoBfQHXAf8BTQGBAdoB/wFQAYEB3AH/AVMBgQHeAf8BVgGB + AeAB/wFZAYEB4gH/AV0BgQHkAf8BYAGBAeYB/wFjAYIB6QH/AWYBhQHrAf8BaQGIAe0B/wFsAYsB7wH/ + AW8BjgHxAf8BcgGSAfMB/wF1AZQB9QH/AXUBlAH1Af8BPAFvAc4B/wEXAUIBkwH//wCJAAEaAU0BswH/ + ASYBWAGwAf8BKgFcAbUB/wEtAV8BugH/ATEBYwG/Af8BNAFmAcMB/wE3AWoByAH/AToBbgHMAf8BPQFx + Ac8B/wFAAXQB0QH/AUMBdwHTAf8BRwF6AdUB/wFKAX0B1wH/AU0BgAHZAf8BUAGBAdwB/wFTAYEB3gH/ + AVYBgQHgAf8BWQGBAeIB/wFcAYEB5AH/AV8BgQHmAf8BYwGCAegB/wFmAYUB6gH/AWkBiAHsAf8BbAGL + Ae8B/wFvAY4B8QH/AXIBkQHzAf8BdQGUAfUB/wF4AZcB9wH/AXcBlgH2Af8BJAFYAb4B//8AiQABHQFP + Aa8B/wEmAVcBrgH/ASoBWwGzAf8BLQFfAbgB/wEwAWIBvQH/ATMBZgHBAf8BNgFpAcYB/wE6AW0BygH/ + AT0BcAHOAf8BQAFzAdAB/wFDAXcB0wH/AUYBegHVAf8BSQF9AdcB/wFMAYAB2QH/AU8BgQHbAf8BUgGB + Ad0B/wFWAYEB3wH/AVkBgQHhAf8BXAGBAeQB/wFfAYEB5gH/AWIBgQHoAf8BZQGEAeoB/wFoAYcB7AH/ + AWsBigHuAf8BbgGNAfAB/wFxAZAB8gH/AXMBkwH0Af8BdQGUAfUB/wF2AZUB9gH/AT0BcQHOAf//AIkA + AR4BUAGsAf8BJgFWAawB/wEpAVoBsQH/AS0BXgG2Af8BMAFhAbsB/wEzAWUBvwH/ATYBaAHEAf8BOQFs + AcgB/wE8AXABzQH/AT8BcwHQAf8BQgF2AdIB/wFGAXkB1AH/AUkBfAHWAf8BTAF/AdkB/wFPAYEB2wH/ + AVIBgQHdAf8BVQGBAd8B/wFYAYEB4QH/AVsBgQHjAf8BXgGBAeUB/wFhAYEB5wH/AWQBgwHpAf8BZwGG + AesB/wFqAYkB7QH/AWwBjAHvAf8BbwGOAfEB/wFxAZAB8gH/AXMBkgHzAf8BcwGTAfQB/wFGAXoB1QH/ + /wCFAAEXATcBgQH/AR8BTwGpAf8BJQFVAakB/wEoAVkBrwH/ASsBXQG0Af8BLwFgAbkB/wEyAWQBvQH/ + ATUBaAHCAf8BOAFrAcYB/wE7AW4BywH/AT8BcgHPAf8BQgF1AdIB/wFFAXgB1AH/AUgBewHWAf8BSwF+ + AdgB/wFOAYEB2gH/AVEBgQHcAf8BTQGBAd4B/wE/AXcB2wH/AVEBgQHfAf8BRQF/Ad8B/wFXAYEB5wH/ + AXIBjgHrAf8BVgGBAeoB/wFoAYcB7AH/AWsBigHuAf8BbQGMAe8B/wFvAY4B8QH/AXABjwHxAf8BcAGQ + AfIB/wFNAYEB2gH/ARcBNwGBAf//AIEAARcBPAGCAf8BIwFSAacB/wEkAVQBpwH/AScBWAGsAf8BKwFc + AbIB/wEuAV8BtwH/ATIBYwG7Af8BNQFnAcAB/wE4AWoBxAH/ATsBbgHJAf8BPgFxAc0B/wFBAXQB0QH/ + AUQBdwHTAf8BRwF6AdUB/wFKAX0B1wH/AU0BgAHZAf8BUAGBAdsB/wFEAXoB3gH/AvwG/wGBAZwB7gH/ + AeQB6wH9Bf8BaAGGAesB/wFgAYEB6wH/AWgBiAHsAf8BagGKAe4B/wFsAYsB7wH/AW0BjAHvAf8BbQGN + AfAB/wFTAYEB3gH/ARcBPAGCAf//AIEAARcBQAGNAf8BTAFzAbMB/wE9AWcBrgH/ASgBVwGqAf8BKgFa + Aa8B/wEtAV4BtAH/ATEBYgG5Af8BNAFlAb4B/wE3AWkBwgH/AToBbAHHAf8BPQFwAcsB/wFAAXMBzwH/ + AUMBdgHSAf8BRgF5AdUB/wFJAXwB1wH/AUwBfwHZAf8BSAF9AdsB/wEmAWcB1wP/Af4F/wH9Af4B/Qn/ + AYsBrgHyAf8BQgF/AeYB/wFaAYEB6wH/AWgBhwHsAf8BaQGIAe0B/wFqAYkB7QH/AWsBigHuAf8BWAGB + AeEB/wEXAUABjgH//wCBAAEYAUUBnwH/AVsBfgG1Af8BWAF8AbYB/wFHAXABtAH/ASMBVQGtAf8BLAFd + AbIB/wEvAWABtwH/ATMBZAG7Af8BNgFnAcAB/wE5AWsBxAH/ATwBbgHJAf8BPwFyAc0B/wFCAXUB0QH/ + AUQBeAHUAf8BSAF7AdYB/wFAAXgB1wH/AUsBfAHdAf8BeAGLAecF/wFlAYIB4wH/ATEBbgHbAf8BMgFw + Ad0B/wGJAakB7wn/AXwBlgHsAf8BYQGEAeoB/wFmAYYB6wH/AWcBhwHsAf8BaAGHAewB/wFbAYEB4wH/ + ARgBRQGfAf//AIEAARkBRwGkAf8BcQGBAbsB/wFfAYEBtwH/AVkBfgG4Af8BSwF1AbUB/wElAVYBrwH/ + AS4BXwG0Af8BMQFiAbkB/wE1AWYBvgH/ATgBaQHCAf8BOwFtAcYB/wE9AXABygH/AUABcwHOAf8BQwF3 + AdIB/wFGAXoB1QH/ATgBbwHSAf8B2wHlAfUF/wG/AdIB9QH/ATQBbwHYAf8BVgGBAeAB/wFZAYEB4QH/ + ATMBcQHfAf8C/gH9Af8B5AHqAfwB/wFmAYcB6gH/AWIBggHoAf8BZAGDAekB/wFkAYQB6gH/AWUBhAHq + Af8BXQGBAeQB/wEYAUcBpQH//wCBAAEdAU8BtQH/AYEBigHCAf8BZwGBAbkB/wFgAYEBuQH/AWEBgQG+ + Af8BQQFsAbUB/wEpAVkBsQH/ATABYQG2Af8BMwFkAbsB/wE2AWgBwAH/ATMBYwHEAf8BJAFcAcIB/wEy + AWgBygH/ATYBawHQAf8BRAF4AdMB/wEvAWoB1gH/AYMBowHmBf8BrwHHAe8B/wE1AXAB2QH/AVQBgQHe + Af8BVwGBAeAB/wE2AXEB2wH/AfQB+AH9Af8BXQGBAeoB/wFKAYEB5QH/AWABgQHmAf8BYQGBAecB/wFh + AYEB6AH/AWIBgQHoAf8BXQGBAeUB/wEYAU0BtgH//wCBAAEgAVIBtQH/AYMBmQHIAf8BbQGBAboB/wFo + AYEBugH/AWIBgQG7Af8BYgGBAb8B/wEjAVgBsAH/AS4BXwG0Af8BMQFjAbgB/wE1AWYBvQH/ASIBWQG7 + Af8ByAHUAfEF/wEUAU4BwQH/AR8BXAHJAf8BdwGJAd8B/wFnAYEB3gH/ATUBcAHUBf8BLwFqAdYB/wE4 + AXAB2QH/ATYBcQHaAf8BUwGBAeIF/wHUAeEB9AH/AVEBgQHjAf8BXQGBAeQB/wFeAYEB5QH/AV8BgQHm + Af8BXwGBAeYB/wFdAYEB5QH/ARkBTQG1Af//AIEAASMBVAG1Af8BlAGmAc4B/wF0AYEBuwH/AW8BgQG7 + Af8BaQGBAbwB/wFqAYEBwAH/AUIBaAG0Af8BGQFOAasB/wE2AWUBuQH/ARQBRQGsAf8BFAE4Aa4B/wHd + AeIB9AX/AdMB3AHyAf8BjwGpAeMJ/wGBAZYB4Qn/AaIBugHuAf8BsAHEAe8N/wFGAX4B4gH/AVoBgQHi + Af8BWwGBAeMB/wFcAYEB4wH/AVwBgQHkAf8BXAGBAeQB/wEZAU0BtgH//wCBAAEmAVcBtgH/AaMBswHU + Af8BewGCAbwB/wF2AYEBvQH/AXABgQG9Af8BbQGBAb0B/wFWAX0BugH/ASEBUgGqBf8B3wHlAfUB/wHh + AeUB9Bn/AT0BcwHQBf8BiAGrAesD/wH+Bf8BngG3Ae0B/wEjAWUB1wH/AUMBewHfAf8BTgGBAd8B/wFX + AYEB4AH/AVgBgQHhAf8BWQGBAeEB/wFZAYEB4gH/AVkBgQHiAf8BGQFNAbYB//8AgQABKAFYAbcB/wGy + Ab8B2gH/AYEBhwG8Af8BfQGEAb4B/wF3AYEBvgH/AXEBgQG/Af8BcgGBAcIB/wEnAVcBrA3/AZYBrgHg + Af8BLQFfAb4B/wEUAUsBvAH/AVIBfwHPAf8B4wHnAfgF/wHJAdcB9AH/AZIBrQHrAf8BTQGBAdcB/wFP + AYEB2AH/Ae0B8wH9Af8BYwGBAeEB/wFGAXwB2wH/AVIBgQHdAf8BUwGBAd4B/wFUAYEB3wH/AVUBgQHf + Af8BVgGBAeAB/wFWAYEB4AH/AVYBgQHgAf8BGgFOAbYB//8AgQABKAFYAbcB/wHAAcsB4QH/AYEBjAG+ + Af8BgQGJAb8B/wF+AYYBvwH/AXgBgQHAAf8BeQGEAcAB/wEUAT0BmQH/AZIBqAHXBf8BgAGLAdEB/wEU + AUoBrQH/AS0BYQG/Af8BNQFmAcIB/wEsAWMBwQH/ARQBUAHDAf8B5wHvAfoJ/wHiAeoB9wH/ASwBZgHP + Af8BOAFyAdcB/wE/AXcB2QH/AU4BgQHaAf8BTwGBAdsB/wFQAYEB3AH/AVIBgQHdAf8BUgGBAd0B/wFT + AYEB3gH/AVMBgQHeAf8BUwGBAd4B/wEZAU0BtgH//wCBAAEnAVcBtwH/Ac0B1gHmAf8BgQGTAcAB/wGB + AY4BvwH/AYEBiwHBAf8BfwGHAcEB/wF4AYIBvgH/AUsBdgGxCf8BFAE5AaIB/wEpAWMBtwH/ATQBZQG7 + Af8BNwFoAb8B/wE6AWsBwwH/ASwBYgHCAf8BXwGBAdMJ/wFAAXUB1AH/AT0BcwHVAf8BSAF7AdYB/wFK + AX0B1wH/AUsBfwHYAf8BTAGAAdkB/wFOAYEB2gH/AU8BgQHbAf8BTwGBAdsB/wFQAYEB3AH/AVABgQHc + Af8BUAGBAdwB/wEZAU0BtgH//wCBAAEkAVUBtgH/AdgB3gHrAf8BhgGaAcQB/wGBAZMBwQH/AYEBkAHB + Af8BfAGFAb0B/wGzAcQB4Qn/Ac0B1gHtAf8BFAE+AaIB/wEvAWABtAH/ATIBYwG4Af8BNQFmAbwB/wE3 + AWkBwAH/ATMBaAHEAf8BIwFeAcQF/wG4AckB7wH/ARUBVAHJAf8BQAFyAdIB/wFFAXkB1AH/AUcBegHV + Af8BSAF8AdYB/wFKAX0B1wH/AUsBfgHYAf8BTAF/AdkB/wFMAYAB2QH/AU0BgQHaAf8BTQGBAdoB/wFM + AX8B2QH/ARkBTQG1Af//AIEAAR8BUgG1Af8B3wHkAe8B/wGRAaMByQH/AYUBmgHEAf8BgQGUAcIB/wGB + AY0BwgH/AZsBrgHUAf8B+QH4Af0F/wL1AfoB/wEUATUBmwH/AS0BXgGwAf8BMAFhAbUB/wEyAWQBuQH/ + ATUBZgG9Af8BKwFgAcEB/wFDAXMByAn/AXYBhwHeAf8BMQFnAdEB/wFDAXYB0wH/AUQBeAHTAf8BRgF5 + AdUB/wFHAXoB1QH/AUgBewHWAf8BSQF8AdcB/wFKAX0B1wH/AUoBfgHYAf8BSwF+AdgB/wFHAXsB1gH/ + ARgBTAG2Af//AIEAARkBRwGhAf8B4wHoAfEB/wGcAa0BzgH/AY4BoAHHAf8BhgGaAcUB/wGBAZUBwwH/ + AYEBigHAAf8BYwGBAbUB/wHIAdIB6AX/AT4BZwGuAf8BFAFJAaUB/wEuAV4BsQH/ATABYQG1Af8BKQFg + AbkB/wEUAUcBsQH/AbkBxQHsDf8BJwFgAcgB/wFAAXQB0QH/AUIBdQHSAf8BQwF3AdMB/wFEAXgB0wH/ + AUUBeQHUAf8BRgF6AdUB/wFHAXoB1QH/AUcBewHWAf8BSAF7AdYB/wFCAXYB0gH/ARgBRgGiAf//AIEA + ARgBRQGfAf8B3gHkAfAB/wGpAbcB0wH/AZYBpwHKAf8BjgGhAcgB/wGGAZoBxQH/AYEBlgHFAf8BegGE + Ab4B/wG3AcYB4wn/AUcBbgG0Af8BFAE0AZsB/wEUAT4BogH/ARQBQAGqAf8BlAGrAd4F/wGVAa0B4wH/ + AUsBewHLAf8BcAGCAdUB/wEtAWIBxgH/AT0BcQHOAf8BPwFzAdAB/wFAAXQB0QH/AUEBdQHSAf8BQgF2 + AdIB/wFDAXcB0wH/AUQBdwHTAf8BRAF4AdMB/wFFAXgB1AH/AT0BcQHPAf8BGAFFAZ8B//8AgQABFwE/ AYsB/wHUAdwB7wH/AbYBwgHZAf8BngGuAc4B/wGWAagBywH/AY4BoQHIAf8BhgGbAcYB/wGBAZMBwxX/ - AeQB7QH0Df8BEwExAasB/wEjAVoBvQH/AS8BYwHFAf8BOAFrAcgB/wE6AW0BywH/ATsBbwHOAf8BPAFw - Ac8B/wE9AXEB0AH/AT4BcgHQAf8BPwFzAdEB/wFAAXQB0QH/AUABdAHSAf8BQQF0AdIB/wE3AWsBywH/ - ARYBPgGLAf//AIEAARYBOwGBAf8BxAHPAeoB/wHDAc0B3wH/AaYBtQHRAf8BngGuAc4B/wGXAagBywH/ - AY8BogHIAf8BgQGSAb4B/wGjAbMB1QH/AXEBgQG8Af8BEwEfAYUB/wHrAfAB9Qn/AakBuwHhCf8BcwGC - Ac4B/wErAV4BvQH/ATQBZgHBAf8BNgFoAcUB/wE3AWoByAH/ATgBbAHLAf8BOgFtAc0B/wE7AW4BzgH/ - ATwBbwHOAf8BPAFwAc8B/wE9AXEBzwH/AT0BcQHQAf8BPgFyAdAB/wEyAWUBxwH/ARYBOwGBAf//AIEA - ARUBNQGBAf8BrgG+AeQB/wHPAdcB5QH/Aa4BuwHVAf8BpgG1AdEB/wGfAa8BzwH/AZcBqAHMAf8BjwGi - AckB/wGHAZwBxwH/AYQBmwHGAf8BfwGHAcQB/wHQAdwB7QX/AUMBbQGwAf8BEwEkAZUB/wEXAU0BqQH/ - AakBuAHhAf8BFAFKAa0B/wEfAVYBswH/ASsBXQG9Af8BLAFfAcEB/wEuAWcBxAH/ATYBaQHHAf8BNwFq - AcoB/wE4AWwBzAH/ATkBbAHMAf8BOgFtAc0B/wE6AW4BzQH/ATsBbgHNAf8BOwFuAc4B/wEtAWABxAH/ - ARYBNQGBAf//AIUAAZYBqwHdAf8B2gHgAesB/wG3AcIB2AH/Aa8BvAHVAf8BpwG1AdIB/wGfAa8BzwH/ - AZcBqQHMAf8BjwGiAcoB/wGHAZwBxwH/AYEBmAHGAf8BgQGXAc0B/wGnAbYB1wH/AYEBjQHIAf8BdAGC - AcEB/wFqAYEBwwH/AWABgQHEAf8BYgGBAcUB/wFkAYEBxQH/AV8BgQHGAf8BWgGBAcYB/wFQAX0ByQH/ - AUgBdgHJAf8BQwFzAcsB/wE+AXABywH/ATkBbAHLAf8BNwFqAcsB/wE3AWsBywH/ATgBawHMAf8BOAFs - AcwB/wEoAVsBwAH//wCJAAGBAZYB1gH/AeQB6AHwAf8BvwHJAdwB/wG3AcMB2QH/Aa8BvAHVAf8BpwG2 + AeQB7QH0Df8BFAEyAasB/wEkAVsBvQH/ATABZAHFAf8BOQFsAcgB/wE7AW4BywH/ATwBcAHOAf8BPQFx + Ac8B/wE+AXIB0AH/AT8BcwHQAf8BQAF0AdEB/wFBAXUB0QH/AUEBdQHSAf8BQgF1AdIB/wE4AWwBywH/ + ARcBPwGLAf//AIEAARcBPAGBAf8BxAHPAeoB/wHDAc0B3wH/AaYBtQHRAf8BngGuAc4B/wGXAagBywH/ + AY8BogHIAf8BgQGSAb4B/wGjAbMB1QH/AXIBgQG8Af8BFAEgAYUB/wHrAfAB9Qn/AakBuwHhCf8BdAGC + Ac4B/wEsAV8BvQH/ATUBZwHBAf8BNwFpAcUB/wE4AWsByAH/ATkBbQHLAf8BOwFuAc0B/wE8AW8BzgH/ + AT0BcAHOAf8BPQFxAc8B/wE+AXIBzwH/AT4BcgHQAf8BPwFzAdAB/wEzAWYBxwH/ARcBPAGBAf//AIEA + ARYBNgGBAf8BrgG+AeQB/wHPAdcB5QH/Aa4BuwHVAf8BpgG1AdEB/wGfAa8BzwH/AZcBqAHMAf8BjwGi + AckB/wGHAZwBxwH/AYQBmwHGAf8BgAGHAcQB/wHQAdwB7QX/AUQBbgGwAf8BFAElAZUB/wEYAU4BqQH/ + AakBuAHhAf8BFQFLAa0B/wEgAVcBswH/ASwBXgG9Af8BLQFgAcEB/wEvAWgBxAH/ATcBagHHAf8BOAFr + AcoB/wE5AW0BzAH/AToBbQHMAf8BOwFuAc0B/wE7AW8BzQH/ATwBbwHNAf8BPAFvAc4B/wEuAWEBxAH/ + ARcBNgGBAf//AIUAAZYBqwHdAf8B2gHgAesB/wG3AcIB2AH/Aa8BvAHVAf8BpwG1AdIB/wGfAa8BzwH/ + AZcBqQHMAf8BjwGiAcoB/wGHAZwBxwH/AYEBmAHGAf8BgQGXAc0B/wGnAbYB1wH/AYEBjQHIAf8BdQGC + AcEB/wFrAYEBwwH/AWEBgQHEAf8BYwGBAcUB/wFlAYEBxQH/AWABgQHGAf8BWwGBAcYB/wFRAX4ByQH/ + AUkBdwHJAf8BRAF0AcsB/wE/AXEBywH/AToBbQHLAf8BOAFrAcsB/wE4AWwBywH/ATkBbAHMAf8BOQFt + AcwB/wEpAVwBwAH//wCJAAGBAZYB1gH/AeQB6AHwAf8BvwHJAdwB/wG3AcMB2QH/Aa8BvAHVAf8BpwG2 AdIB/wGfAa8BzwH/AZgBqQHNAf8BkAGiAcoB/wGIAZwByAH/AYEBlwHHAf8BgQGUAcgB/wGBAZABxwH/ - AYEBiwHGAf8BfwGHAcYB/wF1AYIBxwH/AW8BgQHHAf8BaQGBAccB/wFjAYEBxwH/AV0BgQHIAf8BVwGA - AcgB/wFRAXwByQH/AUsBeAHKAf8BRQF0AcoB/wE+AW8BywH/ATgBawHKAf8BNQFoAckB/wE1AWkBygH/ - ATUBaQHKAf8BIwFXAb0B//8AiQABbwGBAc0B/wHtAfAB9QH/AccB0AHgAf8BvwHJAd0B/wG3AcMB2QH/ + AYEBiwHGAf8BgAGHAcYB/wF2AYIBxwH/AXABgQHHAf8BagGBAccB/wFkAYEBxwH/AV4BgQHIAf8BWAGB + AcgB/wFSAX0ByQH/AUwBeQHKAf8BRgF1AcoB/wE/AXABywH/ATkBbAHKAf8BNgFpAckB/wE2AWoBygH/ + ATYBagHKAf8BJAFYAb0B//8AiQABcAGBAc0B/wHtAfAB9QH/AccB0AHgAf8BvwHJAd0B/wG3AcMB2QH/ Aa8BvAHWAf8BpwG2AdMB/wGgAbAB0AH/AZgBqQHNAf8BkAGjAcsB/wGIAZ0ByAH/AYEBlwHGAf8BgQGT - AccB/wGBAZAByAH/AYEBiwHHAf8BfAGHAccB/wF1AYIBxwH/AW8BgQHHAf8BaAGBAccB/wFiAYEBxwH/ - AVwBgQHIAf8BVgF/AcgB/wFQAXsByQH/AUkBdgHJAf8BQwFyAcoB/wE8AW0BygH/ATYBaQHJAf8BMgFm - AcgB/wEyAWYByAH/AR4BUgG6Af//AIkAAS4BXQG7Af8B8AHyAfgB/wHTAdkB5gH/AcgB0AHhAf8BwAHK + AccB/wGBAZAByAH/AYEBiwHHAf8BfQGHAccB/wF2AYIBxwH/AXABgQHHAf8BaQGBAccB/wFjAYEBxwH/ + AV0BgQHIAf8BVwGAAcgB/wFRAXwByQH/AUoBdwHJAf8BRAFzAcoB/wE9AW4BygH/ATcBagHJAf8BMwFn + AcgB/wEzAWcByAH/AR8BUwG6Af//AIkAAS8BXgG7Af8B8AHyAfgB/wHTAdkB5gH/AcgB0AHhAf8BwAHK Ad0B/wG4AcMB2gH/AbABvQHWAf8BqAG2AdMB/wGgAbAB0AH/AZgBqgHOAf8BkAGjAcsB/wGIAZ0ByQH/ - AYEBlwHGAf8BgQGSAcYB/wGBAY8BxwH/AYEBiwHHAf8BewGGAccB/wF1AYIBxwH/AW4BgQHHAf8BaAGB - AccB/wFiAYEBxwH/AVsBgQHHAf8BVQF+AcgB/wFOAXoByAH/AUgBdQHIAf8BQQFwAckB/wE6AWwByAH/ - ATQBZgHHAf8BLQFhAcQB/wEYAUsBswH//wCJAAEVATgBgQH/AW0BgQHOAf8B8AHyAfkB/wHlAekB8QH/ + AYEBlwHGAf8BgQGSAcYB/wGBAY8BxwH/AYEBiwHHAf8BfAGGAccB/wF2AYIBxwH/AW8BgQHHAf8BaQGB + AccB/wFjAYEBxwH/AVwBgQHHAf8BVgF/AcgB/wFPAXsByAH/AUkBdgHIAf8BQgFxAckB/wE7AW0ByAH/ + ATUBZwHHAf8BLgFiAcQB/wEZAUwBswH//wCJAAEWATkBgQH/AW4BgQHOAf8B8AHyAfkB/wHlAekB8QH/ AdcB3QHpAf8BywHTAeMB/wG+AckB3QH/AbEBvgHYAf8BqAG3AdQB/wGgAbAB0QH/AZkBqgHOAf8BkQGk - AcwB/wGIAZ0ByQH/AYEBlwHHAf8BgQGRAcUB/wGBAYwBxQH/AYABiQHGAf8BewGGAccB/wF0AYEBxwH/ - AW0BgQHGAf8BZwGBAcYB/wFhAYEBxgH/AVoBgQHHAf8BVAF8AccB/wFNAXgBxwH/AUYBcwHIAf8BPwFv - AcgB/wE1AWYBxQH/AR0BUQG5Af8BFQE0AX8B//8AjQABFgE4AYEB/wErAVsBugH/AWcBgQHMAf8BgQGQ + AcwB/wGIAZ0ByQH/AYEBlwHHAf8BgQGRAcUB/wGBAYwBxQH/AYEBiQHGAf8BfAGGAccB/wF1AYEBxwH/ + AW4BgQHGAf8BaAGBAcYB/wFiAYEBxgH/AVsBgQHHAf8BVQF9AccB/wFOAXkBxwH/AUcBdAHIAf8BQAFw + AcgB/wE2AWcBxQH/AR4BUgG5Af8BFgE1AYAB//8AjQABFwE5AYEB/wEsAVwBugH/AWgBgQHMAf8BgQGQ AdUB/wGOAaUB3AH/AaUBuAHjAf8BuwHJAeoB/wHJAdQB7AH/Ac4B1wHtAf8B0QHZAesB/wHQAdgB6QH/ AcsB1AHnAf8BwQHMAeMB/wG3AcQB3wH/AawBuwHbAf8BnwGwAdcB/wGRAaYB0wH/AYIBmgHQAf8BgQGN - AcwB/wFxAYEByQH/AV4BgQHFAf8BSwF1AcIB/wFAAWwBwAH/ATUBZAG+Af8BLAFdAb0B/wEkAVYBugH/ - ARkBTQG2Af8BFQE1AYEB//8ApQABFgE3AYEB/wEWAT0BiAH/ARcBQgGWAf8BFwFEAZ8B/wEXAUkBrQH/ - ARgBTAG2Af8BFwFMAbYB/wEaAU0BtgH/ARsBTgG2Af8BGwFOAbYB/wEZAUwBtgH/ARcBTAG2Af8BGAFM - AbYB/wEXAUcBpwH/ARcBRAGfAf8BFwFAAZAB/wEWATwBhQH/ARYBNgGBAf//AJ0AAUIBTQE+BwABPgMA + AcwB/wFyAYEByQH/AV8BgQHFAf8BTAF2AcIB/wFBAW0BwAH/ATYBZQG+Af8BLQFeAb0B/wElAVcBugH/ + ARoBTgG2Af8BFgE2AYEB//8ApQABFwE4AYEB/wEXAT4BiAH/ARgBQwGWAf8BGAFFAZ8B/wEYAUoBrQH/ + ARkBTQG2Af8BGAFNAbYB/wEbAU4BtgH/ARwBTwG2Af8BHAFPAbYB/wEaAU0BtgH/ARgBTQG2Af8BGQFN + AbYB/wEYAUgBpwH/ARgBRQGfAf8BGAFBAZAB/wEXAT0BhQH/ARcBNwGBAf//AJ0AAUIBTQE+BwABPgMA ASgDAAGAAwABIAMAAQEBAAEBBgABAhYAA/8BAAH8AgABPwwAAcACAAEDDAABgAIAAQEMAAGAAgABAQwA AYACAAEBDAABgAIAAQH/AD0AAYACAAEBDAABgAIAAQEMAAGAAgABAQwAAYACAAEBDAABgAIAAQEMAAHA AgABAwwAAf4CAAF/DAAL Modified: trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-04-17 17:00:41 UTC (rev 338) +++ trunk/plugins/mpinstaler/MPInstaler/wizard/wizard_1.cs 2007-04-17 17:42:39 UTC (rev 339) @@ -15,6 +15,7 @@ public MPpackageStruct package; MPInstallHelper inst = new MPInstallHelper(); List<ActionInfo> actions = new List<ActionInfo>(); + bool update = false; public wizard_1() { package = new MPpackageStruct(); @@ -29,6 +30,45 @@ if (MessageBox.Show("Extension already installed. Do you want continue ?", "", MessageBoxButtons.YesNo) == DialogResult.Yes) nextStep(1); } + public void StartUpdate() + { + update = true; + inst.LoadFromFile(); + nextStep(1); + //if (!this.Visible) this.Show(); + //this.Text = "MediaPortal extension instaler"; + //skinlister.Items.Clear(); + //foreach (string sk in package.SkinList) + //{ + // skinlister.Items.Add(sk, true); + //} + //if (package._intalerStruct.Logo != null) + //{ + // pictureBox2.Visible = true; + // pictureBox2.Image = package._intalerStruct.Logo; + //} + //else + //{ + // pictureBox2.Visible = false; + //} + //for (int i = 0; i < skinlister.Items.Count; i++) + //{ + // if (skinlister.GetItemChecked(i)) + // package.InstallableSkinList.Add(skinlister.Items[i].ToString()); + //} + //label2.Visible = true; + //progressBar1.Visible = true; + //progressBar2.Visible = true; + //listBox1.Visible = true; ; + //title_label.Text = package._intalerStruct.Name; + //label2.Text = "Instaling ..."; + //button_next.Visible = false; + //button_back.Visible = true; + //richTextBox1.Text = ""; + //richTextBox1.Visible = false; + //step = 7; + //install(); + } public void nextStep(int m) { @@ -142,6 +182,7 @@ } case 7: { + if (!this.Visible) this.ShowDialog(); for (int i = 0; i < skinlister.Items.Count; i++) { if (skinlister.GetItemChecked(i)) @@ -207,6 +248,7 @@ case 1: break; case 2: + if (update) step = 6; if (String.IsNullOrEmpty(package.txt_EULA)) { step+=m; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gre...@us...> - 2007-04-17 17:00:42
|
Revision: 338 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=338&view=rev Author: gregmac45 Date: 2007-04-17 10:00:41 -0700 (Tue, 17 Apr 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/OnlineVideos/Source/FLV Player/FlashVideoPlayer.csproj trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.csproj Added Paths: ----------- trunk/plugins/OnlineVideos/Source/OnlineVideos.sln trunk/plugins/OnlineVideos/Source/OnlineVideos.suo Removed Paths: ------------- trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.sln trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.suo Modified: trunk/plugins/OnlineVideos/Source/FLV Player/FlashVideoPlayer.csproj =================================================================== --- trunk/plugins/OnlineVideos/Source/FLV Player/FlashVideoPlayer.csproj 2007-04-17 09:31:10 UTC (rev 337) +++ trunk/plugins/OnlineVideos/Source/FLV Player/FlashVideoPlayer.csproj 2007-04-17 17:00:41 UTC (rev 338) @@ -28,26 +28,22 @@ </UpgradeBackupLocation> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <OutputPath>bin\Debug\</OutputPath> + <OutputPath>..\..\..\..\..\Program Files\Team MediaPortal\MediaPortal\Plugins\ExternalPlayers\</OutputPath> <AllowUnsafeBlocks>false</AllowUnsafeBlocks> <BaseAddress>285212672</BaseAddress> <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> <ConfigurationOverrideFile> </ConfigurationOverrideFile> <DefineConstants>DEBUG;TRACE</DefineConstants> - <DocumentationFile> - </DocumentationFile> <DebugSymbols>true</DebugSymbols> <FileAlignment>4096</FileAlignment> <NoStdLib>false</NoStdLib> - <NoWarn> - </NoWarn> - <Optimize>false</Optimize> + <Optimize>true</Optimize> <RegisterForComInterop>false</RegisterForComInterop> <RemoveIntegerChecks>false</RemoveIntegerChecks> <TreatWarningsAsErrors>false</TreatWarningsAsErrors> <WarningLevel>4</WarningLevel> - <DebugType>full</DebugType> + <DebugType>Full</DebugType> <ErrorReport>prompt</ErrorReport> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> @@ -58,13 +54,9 @@ <ConfigurationOverrideFile> </ConfigurationOverrideFile> <DefineConstants>TRACE</DefineConstants> - <DocumentationFile> - </DocumentationFile> <DebugSymbols>false</DebugSymbols> <FileAlignment>4096</FileAlignment> <NoStdLib>false</NoStdLib> - <NoWarn> - </NoWarn> <Optimize>true</Optimize> <RegisterForComInterop>false</RegisterForComInterop> <RemoveIntegerChecks>false</RemoveIntegerChecks> @@ -73,14 +65,20 @@ <DebugType>none</DebugType> <ErrorReport>prompt</ErrorReport> </PropertyGroup> + <PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' "> + <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies> + <PlatformTarget>AnyCPU</PlatformTarget> + </PropertyGroup> <ItemGroup> <Reference Include="Core"> - <HintPath>..\..\..\MediaPortal\Core\bin\Release\Core.DLL</HintPath> + <HintPath>..\..\..\..\MediaPortal\Core\bin\Release\Core.DLL</HintPath> <SpecificVersion>False</SpecificVersion> + <Private>False</Private> </Reference> <Reference Include="Databases"> <HintPath>..\..\..\MediaPortal\Databases\bin\Release\Databases.DLL</HintPath> <SpecificVersion>False</SpecificVersion> + <Private>False</Private> </Reference> <Reference Include="System"> <Name>System</Name> @@ -100,6 +98,7 @@ <Reference Include="Utils"> <HintPath>..\..\..\MediaPortal\Utils\bin\Release\Utils.DLL</HintPath> <SpecificVersion>False</SpecificVersion> + <Private>False</Private> </Reference> <COMReference Include="AxShockwaveFlashObjects"> <Guid>{D27CDB6B-AE6D-11CF-96B8-444553540000}</Guid> Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.csproj =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.csproj 2007-04-17 09:31:10 UTC (rev 337) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.csproj 2007-04-17 17:00:41 UTC (rev 338) @@ -22,7 +22,7 @@ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>Full</DebugType> - <Optimize>false</Optimize> + <Optimize>true</Optimize> <OutputPath>..\..\..\..\..\..\..\Program Files\Team MediaPortal\MediaPortal\Plugins\Windows\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> Deleted: trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.sln =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.sln 2007-04-17 09:31:10 UTC (rev 337) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.sln 2007-04-17 17:00:41 UTC (rev 338) @@ -1,41 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -# SharpDevelop 2.1.0.2429 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OnlineVideos", "OnlineVideos.csproj", "{E0D9D390-CDD6-4B98-86F3-6EB04A958882}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Runner", "Runner.csproj", "{EFABB07B-B050-45AD-A93F-C5047F15512F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlashVideoPlayer", "..\..\..\..\Documents and Settings\GZamor1\Desktop\OnlineVideos_0.22\source code\MP_External_FlashPlayer\FlashVideoPlayer.csproj", "{9C825F0E-ED58-4DBC-A8FB-C69569CC830C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E0D9D390-CDD6-4B98-86F3-6EB04A958882}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E0D9D390-CDD6-4B98-86F3-6EB04A958882}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E0D9D390-CDD6-4B98-86F3-6EB04A958882}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E0D9D390-CDD6-4B98-86F3-6EB04A958882}.Release|Any CPU.Build.0 = Release|Any CPU - {7541B258-A607-47C0-8F28-761ACC5F727A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7541B258-A607-47C0-8F28-761ACC5F727A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7541B258-A607-47C0-8F28-761ACC5F727A}.Release|Any CPU.Build.0 = Release|Any CPU - {7541B258-A607-47C0-8F28-761ACC5F727A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EFABB07B-B050-45AD-A93F-C5047F15512F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EFABB07B-B050-45AD-A93F-C5047F15512F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EFABB07B-B050-45AD-A93F-C5047F15512F}.Release|Any CPU.Build.0 = Release|Any CPU - {EFABB07B-B050-45AD-A93F-C5047F15512F}.Release|Any CPU.ActiveCfg = Release|Any CPU - 38EA1FC7-3151-43FF-8E0B-545524016799.Debug|Any CPU.Build.0 = Debug|Any CPU - 38EA1FC7-3151-43FF-8E0B-545524016799.Debug|Any CPU.ActiveCfg = Debug|Any CPU - 38EA1FC7-3151-43FF-8E0B-545524016799.Release|Any CPU.Build.0 = Release|Any CPU - 38EA1FC7-3151-43FF-8E0B-545524016799.Release|Any CPU.ActiveCfg = Release|Any CPU - {9C825F0E-ED58-4DBC-A8FB-C69569CC830C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9C825F0E-ED58-4DBC-A8FB-C69569CC830C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9C825F0E-ED58-4DBC-A8FB-C69569CC830C}.Release|Any CPU.Build.0 = Release|Any CPU - {9C825F0E-ED58-4DBC-A8FB-C69569CC830C}.Release|Any CPU.ActiveCfg = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal Deleted: trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.suo =================================================================== (Binary files differ) Copied: trunk/plugins/OnlineVideos/Source/OnlineVideos.sln (from rev 335, trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.sln) =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos.sln (rev 0) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos.sln 2007-04-17 17:00:41 UTC (rev 338) @@ -0,0 +1,41 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +# SharpDevelop 2.1.0.2429 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OnlineVideos", "OnlineVideos\OnlineVideos.csproj", "{E0D9D390-CDD6-4B98-86F3-6EB04A958882}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Runner", "OnlineVideos\Runner.csproj", "{EFABB07B-B050-45AD-A93F-C5047F15512F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlashVideoPlayer", "FLV Player\FlashVideoPlayer.csproj", "{9C825F0E-ED58-4DBC-A8FB-C69569CC830C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E0D9D390-CDD6-4B98-86F3-6EB04A958882}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0D9D390-CDD6-4B98-86F3-6EB04A958882}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0D9D390-CDD6-4B98-86F3-6EB04A958882}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0D9D390-CDD6-4B98-86F3-6EB04A958882}.Release|Any CPU.Build.0 = Release|Any CPU + {7541B258-A607-47C0-8F28-761ACC5F727A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7541B258-A607-47C0-8F28-761ACC5F727A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7541B258-A607-47C0-8F28-761ACC5F727A}.Release|Any CPU.Build.0 = Release|Any CPU + {7541B258-A607-47C0-8F28-761ACC5F727A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EFABB07B-B050-45AD-A93F-C5047F15512F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EFABB07B-B050-45AD-A93F-C5047F15512F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EFABB07B-B050-45AD-A93F-C5047F15512F}.Release|Any CPU.Build.0 = Release|Any CPU + {EFABB07B-B050-45AD-A93F-C5047F15512F}.Release|Any CPU.ActiveCfg = Release|Any CPU + 38EA1FC7-3151-43FF-8E0B-545524016799.Debug|Any CPU.Build.0 = Debug|Any CPU + 38EA1FC7-3151-43FF-8E0B-545524016799.Debug|Any CPU.ActiveCfg = Debug|Any CPU + 38EA1FC7-3151-43FF-8E0B-545524016799.Release|Any CPU.Build.0 = Release|Any CPU + 38EA1FC7-3151-43FF-8E0B-545524016799.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C825F0E-ED58-4DBC-A8FB-C69569CC830C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C825F0E-ED58-4DBC-A8FB-C69569CC830C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C825F0E-ED58-4DBC-A8FB-C69569CC830C}.Release|Any CPU.Build.0 = Release|Any CPU + {9C825F0E-ED58-4DBC-A8FB-C69569CC830C}.Release|Any CPU.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Copied: trunk/plugins/OnlineVideos/Source/OnlineVideos.suo (from rev 335, trunk/plugins/OnlineVideos/Source/OnlineVideos/OnlineVideos.suo) =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <soa...@us...> - 2007-04-17 09:31:23
|
Revision: 337 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=337&view=rev Author: soapskyway Date: 2007-04-17 02:31:10 -0700 (Tue, 17 Apr 2007) Log Message: ----------- Added configuration for deinterlace support in VLC Modified Paths: -------------- trunk/plugins/VideoLAN/ConfigurationForm.cs trunk/plugins/VideoLAN/VideoLanPlugin.cs Modified: trunk/plugins/VideoLAN/ConfigurationForm.cs =================================================================== --- trunk/plugins/VideoLAN/ConfigurationForm.cs 2007-04-16 22:15:24 UTC (rev 336) +++ trunk/plugins/VideoLAN/ConfigurationForm.cs 2007-04-17 09:31:10 UTC (rev 337) @@ -45,6 +45,7 @@ private string m_enabledExt = ""; private string m_enabledStreams = ""; private string bufsize = ""; + private string m_deinterlace = "Disable"; private MediaPortal.UserInterface.Controls.MPButton buttonEnable; private MediaPortal.UserInterface.Controls.MPTextBox extensionBox; private TextBox streamBox; @@ -53,6 +54,8 @@ private Label label2; private TextBox bufBox; private Label label3; + private Label label4; + private ComboBox deintBox; /// <summary> /// Required designer variable. /// </summary> @@ -93,6 +96,8 @@ this.streamBox = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.deintBox = new System.Windows.Forms.ComboBox(); + this.label4 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.bufBox = new System.Windows.Forms.TextBox(); @@ -101,7 +106,7 @@ // // buttonEnable // - this.buttonEnable.Location = new System.Drawing.Point(11, 132); + this.buttonEnable.Location = new System.Drawing.Point(12, 163); this.buttonEnable.Name = "buttonEnable"; this.buttonEnable.Size = new System.Drawing.Size(75, 23); this.buttonEnable.TabIndex = 3; @@ -135,6 +140,8 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.deintBox); + this.groupBox1.Controls.Add(this.label4); this.groupBox1.Controls.Add(this.bufBox); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.label2); @@ -143,20 +150,44 @@ this.groupBox1.Controls.Add(this.extensionBox); this.groupBox1.Location = new System.Drawing.Point(11, 12); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(411, 114); + this.groupBox1.Size = new System.Drawing.Size(411, 145); this.groupBox1.TabIndex = 7; this.groupBox1.TabStop = false; this.groupBox1.Text = "General"; // - // label2 + // deintBox // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(6, 55); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(108, 13); - this.label2.TabIndex = 7; - this.label2.Text = "Associated protocols:"; + this.deintBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.deintBox.FormattingEnabled = true; + this.deintBox.Items.AddRange(new object[] { + "Disable", + "Blend", + "Bob", + "Discard", + "Linear", + "Mean", + "X"}); + this.deintBox.Location = new System.Drawing.Point(135, 107); + this.deintBox.Name = "deintBox"; + this.deintBox.Size = new System.Drawing.Size(256, 21); + this.deintBox.TabIndex = 11; // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(6, 107); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(64, 13); + this.label4.TabIndex = 10; + this.label4.Text = "Deinterlace:"; + // + // bufBox + // + this.bufBox.Location = new System.Drawing.Point(135, 80); + this.bufBox.Name = "bufBox"; + this.bufBox.Size = new System.Drawing.Size(59, 20); + this.bufBox.TabIndex = 9; + // // label3 // this.label3.AutoSize = true; @@ -166,17 +197,19 @@ this.label3.TabIndex = 8; this.label3.Text = "Buffer size:"; // - // bufBox + // label2 // - this.bufBox.Location = new System.Drawing.Point(135, 80); - this.bufBox.Name = "bufBox"; - this.bufBox.Size = new System.Drawing.Size(59, 20); - this.bufBox.TabIndex = 9; + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(6, 55); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(108, 13); + this.label2.TabIndex = 7; + this.label2.Text = "Associated protocols:"; // // ConfigurationForm // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); - this.ClientSize = new System.Drawing.Size(440, 167); + this.ClientSize = new System.Drawing.Size(440, 198); this.Controls.Add(this.groupBox1); this.Controls.Add(this.buttonEnable); this.Name = "ConfigurationForm"; @@ -193,11 +226,12 @@ private void ConfigurationForm_Load(object sender, System.EventArgs e) { - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Directory.GetCurrentDirectory() + @"\MediaPortal.xml")) + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Directory.GetCurrentDirectory() + @"\MediaPortal.xml")) { m_enabledExt = xmlreader.GetValueAsString("vlcplugin", "enabledextensions", ".ts,.gary"); m_enabledStreams = xmlreader.GetValueAsString("vlcplugin", "enabledstreams", "udp"); bufsize = xmlreader.GetValueAsString("vlcplugin", "buffer", "5000"); + m_deinterlace = xmlreader.GetValueAsString("vlcplugin", "deinterlace", "Disable"); m_enabledExt.Replace(":", ","); // in case it was using the old plugin code where the separator was ":" } if (m_enabledExt != null && m_enabledExt.Length > 0) @@ -206,28 +240,29 @@ this.extensionBox.Text = m_enabledExt; this.streamBox.Text = m_enabledStreams; this.bufBox.Text = bufsize; - + this.deintBox.SelectedItem = m_deinterlace; } private void ConfigurationForm_Closing(object sender, System.ComponentModel.CancelEventArgs e) { - using (MediaPortal.Profile.Settings xmlWriter = new MediaPortal.Profile.Settings(Directory.GetCurrentDirectory() + @"\MediaPortal.xml")) - { - xmlWriter.SetValue("vlcplugin", "enabledextensions", extensionBox.Text); - xmlWriter.SetValue("vlcplugin", "enabledstreams", streamBox.Text); - xmlWriter.SetValue("vlcplugin", "buffer", bufBox.Text); - } + writeConfiguration(); } private void buttonEnable_Click(object sender, System.EventArgs e) { + writeConfiguration(); + this.Close(); + } + + private void writeConfiguration() + { using (MediaPortal.Profile.Settings xmlWriter = new MediaPortal.Profile.Settings(Directory.GetCurrentDirectory() + @"\MediaPortal.xml")) - { - xmlWriter.SetValue("vlcplugin", "enabledextensions", extensionBox.Text); - xmlWriter.SetValue("vlcplugin", "enabledstreams", streamBox.Text); - xmlWriter.SetValue("vlcplugin", "buffer", bufBox.Text); - } - this.Close(); + { + xmlWriter.SetValue("vlcplugin", "enabledextensions", extensionBox.Text); + xmlWriter.SetValue("vlcplugin", "enabledstreams", streamBox.Text); + xmlWriter.SetValue("vlcplugin", "buffer", bufBox.Text); + xmlWriter.SetValue("vlcplugin", "deinterlace", deintBox.Text); + } } } } Modified: trunk/plugins/VideoLAN/VideoLanPlugin.cs =================================================================== --- trunk/plugins/VideoLAN/VideoLanPlugin.cs 2007-04-16 22:15:24 UTC (rev 336) +++ trunk/plugins/VideoLAN/VideoLanPlugin.cs 2007-04-17 09:31:10 UTC (rev 337) @@ -145,19 +145,35 @@ string vlciptvdir = Directory.GetCurrentDirectory() + @"\vlciptv"; if (!Directory.Exists(vlciptvdir)) Directory.CreateDirectory(vlciptvdir); - string[] option = new string[]{ - ":http-caching=" + getBufferSize(), - ":mms-caching=" + getBufferSize(), - ":realrtsp-caching=" + getBufferSize(), - //":tcp-caching==" + getBufferSize(), - //":udp-caching==" + getBufferSize(), - ":smb-caching=" + getBufferSize(), - ":snapshot-path=" + vlciptvdir, - ":record-path=" + vlciptvdir, - ":timeshift-dir=" + vlciptvdir, - ":access-filter=record" - }; + string deinterlace = getDeinterlace(); + string[] option; + + if (!deinterlace.Equals("disable")) + { + option= new string[]{ + ":http-caching=" + getBufferSize(), + ":mms-caching=" + getBufferSize(), + ":realrtsp-caching=" + getBufferSize(), + ":smb-caching=" + getBufferSize(), + ":snapshot-path=" + vlciptvdir, + ":record-path=" + vlciptvdir, + ":timeshift-dir=" + vlciptvdir, + ":access-filter=record", + ":vout-filter=deinterlace", ":deinterlace-mode=" + deinterlace + }; + } else { + option = new string[]{ + ":http-caching=" + getBufferSize(), + ":mms-caching=" + getBufferSize(), + ":realrtsp-caching=" + getBufferSize(), + ":smb-caching=" + getBufferSize(), + ":snapshot-path=" + vlciptvdir, + ":record-path=" + vlciptvdir, + ":timeshift-dir=" + vlciptvdir, + ":access-filter=record", + }; + } vlcControl.Stop(); vlcControl.ClearPlayList(); @@ -668,6 +684,14 @@ return result; } + private string getDeinterlace() + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Directory.GetCurrentDirectory() + @"\MediaPortal.xml")) + { + string deinterlace = xmlreader.GetValueAsString("vlcplugin", "deinterlace", "Disable"); + return deinterlace.ToLowerInvariant(); + } + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-04-16 22:15:32
|
Revision: 336 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=336&view=rev Author: saamand Date: 2007-04-16 15:15:24 -0700 (Mon, 16 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/SimpleLRCTimeAndLine.cs trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs trunk/plugins/MyLyrics/LyricsEngine/LyricDiagnostics.cs trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsDatabase.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/EvilLabs.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/SeekLyrics.cs trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Wiki.cs trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/LyricsEngine/Setup.cs trunk/plugins/MyLyrics/My Lyrics/Convert/ConvertFromXMLtoLyricsDatabase.cs trunk/plugins/MyLyrics/My Lyrics/DatabaseUtil.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj trunk/plugins/MyLyrics/My Lyrics/MyLyricsSettings.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_AddNewSong.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_SearchTitleDialog.cs trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/MyLyrics.sln trunk/plugins/MyLyrics/MyLyrics.suo Modified: trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRC.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRC.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRC.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -3,7 +3,7 @@ using System.Text; using System.IO; -namespace LRC +namespace LyricsEngine.LRC { public class SimpleLRC { @@ -161,21 +161,21 @@ else if ((m = LRC.SimpleLRCFormat.Artist_LineStart_Regex.Match(line)).Success) { artist = line.Substring(m.Index + m.Length); - artist = LyricsEngine.LyricUtil.capatalizeString(artist.Substring(0, artist.LastIndexOf("]"))); + artist = LyricsEngine.LyricUtil.CapatalizeString(artist.Substring(0, artist.LastIndexOf("]"))); return true; } else if ((m = LRC.SimpleLRCFormat.Title_LineStart_Regex.Match(line)).Success) { title = line.Substring(m.Index + m.Length); - title = LyricsEngine.LyricUtil.capatalizeString(title.Substring(0, title.LastIndexOf("]"))); + title = LyricsEngine.LyricUtil.CapatalizeString(title.Substring(0, title.LastIndexOf("]"))); return true; } else if ((m = LRC.SimpleLRCFormat.Album_LineStart_Regex.Match(line)).Success) { album = line.Substring(m.Index + m.Length); - album = LyricsEngine.LyricUtil.capatalizeString((album.Substring(0, album.LastIndexOf("]")))); + album = LyricsEngine.LyricUtil.CapatalizeString((album.Substring(0, album.LastIndexOf("]")))); return true; } else Modified: trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCFormat.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCFormat.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCFormat.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -3,7 +3,7 @@ using System.Windows.Forms; using System.Text.RegularExpressions; -namespace LRC +namespace LyricsEngine.LRC { public static class SimpleLRCFormat { Modified: trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLine.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLine.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLine.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text; -namespace LRC +namespace LyricsEngine.LRC { public class SimpleLRCTimeAndLine : IComparable { Modified: trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LRC/SimpleLRCTimeAndLineCollection.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -2,12 +2,12 @@ using System.Collections; using System.Text; -namespace LRC +namespace LyricsEngine.LRC { public class SimpleLRCTimeAndLineCollection : IEnumerable, ICollection { - private object[] items = null; + private object[] items; public SimpleLRCTimeAndLineCollection(object[] array) { Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricDiagnostics.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricDiagnostics.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricDiagnostics.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -37,7 +37,7 @@ objTraceListener = new TextWriterTraceListener(objStream); objTraceListener.Filter = new EventTypeFilter(SourceLevels.All); ts.Listeners.Add(objTraceListener); - startTimer(); + StartTimer(); } } @@ -47,7 +47,7 @@ { ts.Flush(); ts.Close(); - stopTimer(); + StopTimer(); objStream.Close(); objStream.Dispose(); @@ -78,18 +78,18 @@ } } - private static void startTimer() + private static void StartTimer() { stopWatch = new Stopwatch(); stopWatch.Start(); } - private static void stopTimer() + private static void StopTimer() { stopWatch.Stop(); } - public static string elapsedTimeString() + public static string ElapsedTimeString() { long time = stopWatch.ElapsedMilliseconds; long sec = time / 1000; Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricSearch.cs =================================================================== (Binary files differ) Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricUtil.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -6,32 +6,26 @@ { public class LyricUtil { - static string[] parenthesesAndAlike = new string[6] { "(album", "(acoustic", "(live", "(radio", "[", "{" }; static string[] charsToDelete = new string[11] { ".", ",", "&", "'", "!", "\"", "&", "?", "(", ")", "+" /*, "ä", "ö", "ü", "Ä", "Ö", "Ü", "ß" */ }; - // capatalize string and make ready for XML - public static string capatalizeString(string s) + public static string CapatalizeString(string s) { - string[] strings = new String[1] {"\""}; + s = s.Replace("\"", ""); - for (int i = 0; i < strings.Length; i += 1) - { - s = s.Replace(strings[i], ""); - } - - char[] space = new char[] { ' ' }; + char[] space = new char[1] { ' ' }; string[] words = s.Split(space, StringSplitOptions.RemoveEmptyEntries); - string capatalizedTitle = ""; + + StringBuilder result = new StringBuilder(); for (int i = 0; i < words.Length; i++) { - capatalizedTitle += words[i].Substring(0, 1).ToUpper() + (words[i].Length > 1 ? words[i].Substring(1, words[i].Length - 1).ToLower() : "") + " "; + result.Append(words[i].Substring(0, 1).ToUpper() + (words[i].Length > 1 ? words[i].Substring(1, words[i].Length - 1).ToLower() : "") + " "); } - return capatalizedTitle.Trim(); + return result.ToString().Trim(); } - public static string removeFeatComment(string str) + public static string RemoveFeatComment(string str) { int index = str.IndexOf("(Feat"); if (index != -1) @@ -39,7 +33,7 @@ return str; } - public static void trimForParenthesis(ref string str) + public static string TrimForParenthesis(string str) { for (int i = 0; i < parenthesesAndAlike.Length; i++) { @@ -49,17 +43,19 @@ str = str.Substring(0, index).Trim(); } } + return str; } - public static void deleteSpecificChars(ref string str) + public static string DeleteSpecificChars(string str) { for (int i = 0; i < charsToDelete.Length; i++) { str = str.Replace(charsToDelete[i], ""); } + return str; } - public static string changeAnd_and_and(string str) + public static string ChangeAnd_and_and(string str) { string strTemp = str; if (str.Contains("&")) Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsController.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -7,21 +7,10 @@ using System.Threading; using System.IO; using System.Diagnostics; -using LyricsEngineConfig; using LyricsEngine; namespace LyricsEngine { - - #region Public Delegates - // delegates used to call MainForm functions from worker thread - public delegate void Delegate_LC_updateString(String s); - public delegate void Delegate_LC_UpdateStatus(Boolean b1); - public delegate void Delegate_LC_ErrorLog_LyricNotFound(String s); - public delegate void Delegate_LC_WriteFoundLyric(String[] s, String artist, String track); - public delegate void Delegate_LC_ThreadFinished(); - #endregion - public class LyricsController : IDisposable { private ILyricForm m_Form; @@ -32,10 +21,9 @@ private int noOfLyricsFound; private int noOfLyricsNotFound; - private bool m_StopSearches = false; + private bool m_StopSearches; ArrayList threadList = new ArrayList(); - ArrayList suspendedThreadList = new ArrayList(); // Main thread sets this event to stop LyricController ManualResetEvent m_EventStop_LyricController; @@ -44,13 +32,8 @@ ManualResetEvent m_EventStopped_LyricController; private string[] lyricsSites; + internal static bool ALLOW_ALL_TO_SEARCH; - internal static bool ALLOW_ALL_TO_SEARCH = false; - - - - - public LyricsController(ILyricForm mainForm, ManualResetEvent eventStopThread, string[] lyricSites, bool allowAllToSearch) @@ -128,6 +111,9 @@ public void Dispose() { + m_EventStop_LyricController.Close(); + m_EventStopped_LyricController.Close(); + // clean-up operations may be placed here for (int i = 0; i < threadList.Count; i++) { @@ -144,10 +130,10 @@ stillThreadsAlive = true; } } - finishThread("", "", "The search has ended.", ""); + FinishThread("", "", "The search has ended.", ""); } - public void addNewLyricSearch(string artist, string title) + public void AddNewLyricSearch(string artist, string title) { if (lyricsSites.Length > 0) { @@ -168,12 +154,12 @@ - internal void updateString(String message, String site) + internal void UpdateString(String message, String site) { m_Form.UpdateString = new Object[] { message, site }; } - internal void statusUpdate(string artist, string title, string site, bool lyricFound) + internal void StatusUpdate(string artist, string title, string site, bool lyricFound) { //LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + artist + " - " + title + " - " + site + " - " +lyricFound.ToString() ); if (lyricFound) @@ -187,30 +173,30 @@ if ((noOfLyricsSearched >= noOfLyricsToSearch) && ALLOW_ALL_TO_SEARCH == false) { - finishThread(artist, title, "All songs have been searched!", site); + FinishThread(artist, title, "All songs have been searched!", site); } } - internal void lyricFound(String lyricStrings, String artist, String title, String site) + internal void LyricFound(String lyricStrings, String artist, String title, String site) { if (m_StopSearches == false) { m_Form.LyricFound = new Object[] { lyricStrings, artist, title, site }; - statusUpdate(artist, title, site, true); + StatusUpdate(artist, title, site, true); } } - internal void lyricNotFound(String artist, String title, String message, String site) + internal void LyricNotFound(String artist, String title, String message, String site) { if (m_StopSearches == false) { m_Form.LyricNotFound = new Object[] { artist, title, message, site }; - statusUpdate(artist, title, site, false); + StatusUpdate(artist, title, site, false); } } - public void finishThread(String artist, String title, String message, String site) + public void FinishThread(String artist, String title, String message, String site) { m_StopSearches = true; m_EventStop_LyricController.Set(); Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsDatabase.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsDatabase.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsDatabase.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -3,7 +3,7 @@ using System.Text; using System.Runtime.Serialization; -namespace MyLyrics +namespace LyricsEngine.Database { [Serializable] public class LyricsDatabase : IDictionary<string, LyricsItem>, ISerializable Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsDatabase/LyricsItem.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -3,7 +3,7 @@ using System.Text; using System.Runtime.Serialization; -namespace MyLyrics +namespace LyricsEngine.Database { [Serializable] public class LyricsItem Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsEngine.csproj 2007-04-16 22:15:24 UTC (rev 336) @@ -46,7 +46,7 @@ <Compile Include="LRC\SimpleLRCTimeAndLineCollection.cs" /> <Compile Include="LyricsDatabase\LyricsDatabase.cs" /> <Compile Include="LyricsDatabase\LyricsItem.cs" /> - <Compile Include="LyricsSites\LyricSearch.cs" /> + <Compile Include="LyricSearch.cs" /> <Compile Include="LyricDiagnostics.cs" /> <Compile Include="LyricsSites\HotLyrics.cs" /> <Compile Include="LyricsSites\EvilLabs.cs" /> @@ -57,7 +57,6 @@ <Compile Include="ICommand.cs" /> <Compile Include="ILyricForm.cs" /> <Compile Include="LyricsController.cs" /> - <Compile Include="LyricSiteInfo.cs" /> <EmbeddedResource Include="Properties\Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> @@ -70,7 +69,6 @@ <DesignTime>True</DesignTime> </Compile> <None Include="app.config" /> - <None Include="ClassDiagram1.cd" /> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/EvilLabs.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/EvilLabs.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/EvilLabs.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -10,7 +10,7 @@ class EvilLabs { string lyric = ""; - bool complete = false; + bool complete; public string Lyric { @@ -19,13 +19,13 @@ public EvilLabs(string artist, string title) { - if (LyricDiagnostics.TraceSource != null) LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + "EvilLabs(" + artist + ", " + title + ")"); + if (LyricDiagnostics.TraceSource != null) LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.ElapsedTimeString() + "EvilLabs(" + artist + ", " + title + ")"); - artist = LyricUtil.removeFeatComment(artist); - LyricUtil.trimForParenthesis(ref artist); + artist = LyricUtil.RemoveFeatComment(artist); + artist = LyricUtil.TrimForParenthesis(artist); artist = artist.Replace(" ", "+"); - title = LyricUtil.removeFeatComment(title); - LyricUtil.trimForParenthesis(ref title); + title = LyricUtil.RemoveFeatComment(title); + title = LyricUtil.TrimForParenthesis(title); title = title.Replace(" ", "+"); string urlString = "http://www.evillabs.sk/lyrics/" + artist + "+-+" + title; @@ -44,7 +44,6 @@ private void callbackMethod(object sender, OpenReadCompletedEventArgs e) { bool thisMayBeTheCorrectLyric = true; - System.Collections.ArrayList strLyric = new System.Collections.ArrayList(); StringBuilder lyricTemp = new StringBuilder(); WebClient client = (WebClient)sender; Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -10,7 +10,7 @@ class HotLyrics { string lyric = ""; - bool complete = false; + bool complete; public string Lyric { @@ -19,11 +19,11 @@ public HotLyrics(string artist, string title) { - if (LyricDiagnostics.TraceSource != null) LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + "SeekLyrics(" + artist + ", " + title + ")"); + if (LyricDiagnostics.TraceSource != null) LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.ElapsedTimeString() + "SeekLyrics(" + artist + ", " + title + ")"); - artist = LyricUtil.removeFeatComment(artist); - LyricUtil.trimForParenthesis(ref artist); - artist = LyricUtil.capatalizeString(artist); + artist = LyricUtil.RemoveFeatComment(artist); + artist = LyricUtil.TrimForParenthesis(artist); + artist = LyricUtil.CapatalizeString(artist); artist = artist.Replace(" ", "_"); artist = artist.Replace(",", "_"); @@ -50,9 +50,9 @@ // French letters artist = artist.Replace("\xE9", "%E9"); - title = LyricUtil.removeFeatComment(title); - LyricUtil.trimForParenthesis(ref title); - title = LyricUtil.capatalizeString(title); + title = LyricUtil.RemoveFeatComment(title); + title = LyricUtil.TrimForParenthesis(title); + title = LyricUtil.CapatalizeString(title); title = title.Replace(" ", "_"); title = title.Replace(",", "_"); @@ -108,7 +108,6 @@ private void callbackMethod(object sender, OpenReadCompletedEventArgs e) { bool thisMayBeTheCorrectLyric = true; - System.Collections.ArrayList strLyric = new System.Collections.ArrayList(); StringBuilder lyricTemp = new StringBuilder(); WebClient client = (WebClient)sender; Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Lyrics007.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -10,7 +10,7 @@ class Lyrics007 { string lyric = ""; - bool complete = false; + bool complete; public string Lyric { @@ -19,13 +19,13 @@ public Lyrics007(string artist, string title) { - if (LyricDiagnostics.TraceSource != null) LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + "Lyrics007(" + artist + ", " + title + ")"); + if (LyricDiagnostics.TraceSource != null) LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.ElapsedTimeString() + "Lyrics007(" + artist + ", " + title + ")"); - artist = LyricUtil.removeFeatComment(artist); - LyricUtil.trimForParenthesis(ref artist); + artist = LyricUtil.RemoveFeatComment(artist); + artist = LyricUtil.TrimForParenthesis(artist); artist = artist.Replace("#", ""); - title = LyricUtil.removeFeatComment(title); - LyricUtil.trimForParenthesis(ref title); + title = LyricUtil.RemoveFeatComment(title); + title = LyricUtil.TrimForParenthesis(title); title = title.Replace("#", ""); // Cannot find lyrics contaning non-English letters! @@ -48,7 +48,6 @@ private void callbackMethod(object sender, OpenReadCompletedEventArgs e) { bool thisMayBeTheCorrectLyric = true; - System.Collections.ArrayList strLyric = new System.Collections.ArrayList(); StringBuilder lyricTemp = new StringBuilder(); WebClient client = (WebClient)sender; Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/LyricsOnDemand.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -10,7 +10,7 @@ class LyricsOnDemand { string lyric = ""; - bool complete = false; + bool complete; public string Lyric { @@ -19,11 +19,11 @@ public LyricsOnDemand(string artist, string title) { - if (LyricDiagnostics.TraceSource != null) LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + "LyricsOnDemand(" + artist + ", " + title + ")"); + if (LyricDiagnostics.TraceSource != null) LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.ElapsedTimeString() + "LyricsOnDemand(" + artist + ", " + title + ")"); - artist = LyricUtil.removeFeatComment(artist); - LyricUtil.trimForParenthesis(ref artist); - LyricUtil.deleteSpecificChars(ref artist); + artist = LyricUtil.RemoveFeatComment(artist); + artist = LyricUtil.TrimForParenthesis(artist); + artist = LyricUtil.DeleteSpecificChars(artist); artist = artist.Replace(" ", ""); artist = artist.Replace("The ", ""); artist = artist.Replace("the ", ""); @@ -33,9 +33,9 @@ // Cannot find lyrics contaning non-English letters! - title = LyricUtil.removeFeatComment(title); - LyricUtil.trimForParenthesis(ref title); - LyricUtil.deleteSpecificChars(ref title); + title = LyricUtil.RemoveFeatComment(title); + title = LyricUtil.TrimForParenthesis(title); + title = LyricUtil.DeleteSpecificChars(title); title = title.Replace(" ", ""); title = title.Replace("#", ""); artist = artist.Replace("-", ""); @@ -54,12 +54,11 @@ if (artist.Length > 0) firstLetter = artist[0].ToString(); - try + int firstNumber = 0; + if (int.TryParse(firstLetter, out firstNumber)) { - int.Parse(firstLetter); firstLetter = "0"; } - catch { ;}; string urlString = "http://www.lyricsondemand.com/" + firstLetter + "/" + artist + "lyrics/" + title + "lyrics.html"; @@ -78,7 +77,6 @@ private void callbackMethod(object sender, OpenReadCompletedEventArgs e) { bool thisMayBeTheCorrectLyric = true; - System.Collections.ArrayList strLyric = new System.Collections.ArrayList(); StringBuilder lyricTemp = new StringBuilder(); WebClient client = (WebClient)sender; Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/SeekLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/SeekLyrics.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/SeekLyrics.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -10,7 +10,7 @@ class SeekLyrics { string lyric = ""; - bool complete = false; + bool complete; public string Lyric { @@ -19,10 +19,10 @@ public SeekLyrics(string artist, string title) { - if (LyricDiagnostics.TraceSource != null) LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + "SeekLyrics(" + artist + ", " + title + ")"); + if (LyricDiagnostics.TraceSource != null) LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.ElapsedTimeString() + "SeekLyrics(" + artist + ", " + title + ")"); - artist = LyricUtil.removeFeatComment(artist); - LyricUtil.trimForParenthesis(ref artist); + artist = LyricUtil.RemoveFeatComment(artist); + artist = LyricUtil.TrimForParenthesis(artist); artist = artist.Replace(" ", "-"); artist = artist.Replace("'", "-"); artist = artist.Replace("(", ""); @@ -42,8 +42,8 @@ // French letters artist = artist.Replace("\xE9", "%E9"); - title = LyricUtil.removeFeatComment(title); - LyricUtil.trimForParenthesis(ref title); + title = LyricUtil.RemoveFeatComment(title); + title = LyricUtil.TrimForParenthesis(title); title = title.Replace(" ", "-"); title = title.Replace("'", "-"); title = title.Replace("(", ""); @@ -82,7 +82,6 @@ private void callbackMethod(object sender, OpenReadCompletedEventArgs e) { bool thisMayBeTheCorrectLyric = true; - System.Collections.ArrayList strLyric = new System.Collections.ArrayList(); StringBuilder lyricTemp = new StringBuilder(); WebClient client = (WebClient)sender; Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Wiki.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Wiki.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/Wiki.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -5,18 +5,17 @@ using LyricsEngine.org.lyricwiki; using LyricsEngine; -namespace MyLyricWiki +namespace LyricsEngine.LyricSites { public class Wiki { - private LyricWiki lyricWiki; - private LyricsResult lyricsResult = null; + private LyricsResult lyricsResult; private string artist = ""; private string title = ""; - private int noOfTries = 0; - public static bool Abort = false; - LyricSearch lyricSearch = null; + private int noOfTries; + public static bool Abort; + LyricSearch lyricSearch ; private string[] commonReplacementsLyricWiki = new string[16] { "<br>", "", "<BR>", "", "?d", "'d", "?s", "'s", "?t", "'t", "?v", "'v", "?e", "'e", "?r", "'r" }; private string[] commonRemoveFromLyricWiki = new string[2] { "[[category", "[[Category" }; @@ -29,7 +28,7 @@ delegate LyricsResult DelegateClass(string artist, string title); - private bool searchForWiki(string artist, string title) + private bool SearchForWiki() { DelegateClass del = lyricWiki.getSong; @@ -53,7 +52,7 @@ ++noOfTries; } - if (lyricsResult != null && isLyric(lyricsResult.lyrics)) + if (lyricsResult != null && IsLyric(lyricsResult.lyrics)) { return true; } @@ -62,64 +61,45 @@ noOfTries = 0; return false; } - } - public string getLyricAsynch(string artist, string title) + public string GetLyricAsynch(string artist, string title) { this.artist = artist; this.title = title; try { - // Step 1: search title as it is - //if (Abort == false && searchForWiki(this.artist, this.title)) - //{ - // return makeLyricFit(lyricsResult.lyrics); - //} - - // Step 2: search with parentheses and other disturbance removed - optimizeString(ref this.artist, ref this.title); - if (Abort == false && searchForWiki(this.artist, this.title)) + // search with parentheses and other disturbance removed + OptimizeString(ref this.artist, ref this.title); + if (Abort == false && SearchForWiki()) { - return (lyricsResult.lyrics); + return MakeLyricFit(lyricsResult.lyrics); } - // Step 3: search with altered and strings if any - //this.artist = LyricUtil.changeAnd_and_and(this.artist); - //this.title = LyricUtil.changeAnd_and_and(this.title); - //if (Abort == false && searchForWiki(this.artist, this.title)) - //{ - // return (lyricsResult.lyrics); - //} - - // final step: return "Not found" if no lyric found return "Not found"; } - catch (Exception e) + catch (Exception) { - //System.Windows.Forms.MessageBox.Show(e.ToString()); - //System.Windows.Forms.MessageBox.Show(lyricsResult.); - Console.Write(e.Message); return ""; } } - private bool isLyric(string lyric) + private bool IsLyric(string lyric) { - if (lyricsResult != null && !lyricsResult.lyrics.Equals("Not found") && !lyricsResult.lyrics.Equals("")) + if (lyricsResult != null && !lyricsResult.lyrics.Equals("Not found") && lyricsResult.lyrics.Length != 0) return true; else return false; } - private void optimizeString(ref string artist, ref string title) + private void OptimizeString(ref string artist, ref string title) { - LyricUtil.trimForParenthesis(ref artist); - LyricUtil.trimForParenthesis(ref title); + artist = LyricUtil.TrimForParenthesis(artist); + title = LyricUtil.TrimForParenthesis(title); } - private string makeLyricFit(string lyric) + private string MakeLyricFit(string lyric) { for (int i = 0; i < commonReplacementsLyricWiki.Length; i = i + 2) { @@ -135,7 +115,6 @@ break; } } - return lyric; } } Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -26,7 +26,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.19")] +[assembly: AssemblyVersion("0.20")] // // In order to sign your assembly you must specify a key to use. Refer to the Modified: trunk/plugins/MyLyrics/LyricsEngine/Setup.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/LyricsEngine/Setup.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -2,7 +2,7 @@ using System.Collections; using System.Text; -namespace LyricsEngineConfig +namespace LyricsEngine { public static class Setup { Modified: trunk/plugins/MyLyrics/My Lyrics/Convert/ConvertFromXMLtoLyricsDatabase.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/Convert/ConvertFromXMLtoLyricsDatabase.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/My Lyrics/Convert/ConvertFromXMLtoLyricsDatabase.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -4,6 +4,8 @@ using System.IO; using System.Xml; +using LyricsEngine.Database; + namespace MyLyrics { class ConvertFromXMLtoLyricsDatabase Modified: trunk/plugins/MyLyrics/My Lyrics/DatabaseUtil.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/DatabaseUtil.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/My Lyrics/DatabaseUtil.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -5,6 +5,7 @@ using System.Runtime.Serialization.Formatters.Binary; using LyricsEngine; +using LyricsEngine.Database; namespace MyLyrics { @@ -21,8 +22,8 @@ string lyricText = ""; try { - string capatalizedArtist = LyricUtil.capatalizeString(artist); - string capatalizedTitle = LyricUtil.capatalizeString(title); + string capatalizedArtist = LyricUtil.CapatalizeString(artist); + string capatalizedTitle = LyricUtil.CapatalizeString(title); lyricText = lyricDB[CorrectKeyFormat(capatalizedArtist, capatalizedTitle)].Lyrics; } @@ -46,7 +47,7 @@ string lyricsText = ""; try { - lyricsText = lyricMarkedDB[DatabaseUtil.CorrectKeyFormat(LyricUtil.capatalizeString(artist), LyricUtil.capatalizeString(title))].Lyrics; + lyricsText = lyricMarkedDB[DatabaseUtil.CorrectKeyFormat(LyricUtil.CapatalizeString(artist), LyricUtil.CapatalizeString(title))].Lyrics; } catch { @@ -61,7 +62,7 @@ string lyricText = ""; try { - lyricText = lyricDB[CorrectKeyFormat(LyricUtil.capatalizeString(artist), LyricUtil.capatalizeString(title))].Lyrics; + lyricText = lyricDB[CorrectKeyFormat(LyricUtil.CapatalizeString(artist), LyricUtil.CapatalizeString(title))].Lyrics; return lyricText.Replace("\n", "\r\n"); } catch Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-04-16 22:06:02 UTC (rev 335) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-04-16 22:15:24 UTC (rev 336) @@ -11,7 +11,8 @@ using System.Timers; using LyricsEngine; -using LyricsEngineConfig; +using LyricsEngine.Database; +using LyricsEngine.LRC; using MediaPortal.GUI.Library; using MediaPortal.Dialogs; @@ -30,7 +31,7 @@ /// Summary description for Class1. /// </summary> - public class GUIMyLyrics : GUIWindow, ILyricForm, ISetupForm + public partial class GUIMyLyrics : GUIWindow, ILyricForm, ISetupForm { #region Fields related to the MyLyrics in general @@ -130,7 +131,7 @@ #region Fields related to LRC mode internal const int BASIC_WIDE_LIMIT = 45; - LRC.SimpleLRC lrc; + SimpleLRC lrc; IEnumerator enumerator; System.Windows.Forms.Timer timer; Stopwatch stopwatch; @@ -181,8 +182,8 @@ alreadyValidLRC = false; CurrentTrackTag = new MusicTag(); - CurrentTrackTag.Artist = LyricUtil.capatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Artist")); - CurrentTrackTag.Title = LyricUtil.capatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Title")); + CurrentTrackTag.Artist = LyricUtil.CapatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Artist")); + CurrentTrackTag.Title = LyricUtil.CapatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Title")); if (selectedScreen == (int)MyLyricsSettings.Screen.LRC_BASIC || selectedScreen == (int)MyLyricsSettings.Screen.LRC_WIDE) { @@ -194,7 +195,7 @@ m_title = CurrentTrackTag.Title; // Get lyric - if (!CurrentTrackTag.Artist.Equals("")) + if (CurrentTrackTag.Artist.Length != 0) { findLyric(); } @@ -216,8 +217,8 @@ { newTrack = false; - m_artist = LyricUtil.capatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Artist")); - m_title = LyricUtil.capatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Title")); + m_artist = LyricUtil.CapatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Artist")); + m_title = LyricUtil.CapatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Title")); if (DatabaseUtil.IsTrackInLyricsDatabase(LyricsDB, m_artist, m_title).Equals(DatabaseUtil.LYRIC_FOUND)) { @@ -239,53 +240,14 @@ base.Process(); } - public void getAlbumArt() - { - ImagePathContainer.Clear(); - CurrentTrackFileName = g_Player.CurrentFile; - GetTrackTags(); - CurrentThumbFileName = GUIMusicFiles.GetCoverArt(false, CurrentTrackFileName, CurrentTrackTag); - if (CurrentThumbFileName.Length > 0) - { - // let us test if there is a larger cover art image - string strLarge = MediaPortal.Util.Utils.ConvertToLargeCoverArt(CurrentThumbFileName); - if (System.IO.File.Exists(strLarge)) - CurrentThumbFileName = strLarge; - AddImageToImagePathContainer(CurrentThumbFileName); - } - - CurrentThumbFileName = GUIMusicFiles.GetArtistCoverArtName(CurrentTrackTag.Artist); - if (CurrentThumbFileName.Length > 0) - { - // let us test if there is a larger cover art image - string strLarge = MediaPortal.Util.Utils.ConvertToLargeCoverArt(CurrentThumbFileName); - if (System.IO.File.Exists(strLarge)) - CurrentThumbFileName = strLarge; - AddImageToImagePathContainer(CurrentThumbFileName); - } - - UpdateImagePathContainer(); - } - - private void UpdateTrackPosition() - { - double trackDuration = g_Player.Duration; - double curTrackPostion = g_Player.CurrentPosition; - - int progPrecent = (int)(curTrackPostion / trackDuration * 100d); - - this.GUIelement_ProgTrack.Percentage = progPrecent; - GUIelement_ProgTrack.Visible = GUIelement_ProgTrack.Percentage > 0; - } - private void startSearch() { lyricsFound = false; StopThread(); newTrack = false; - if (!CurrentTrackTag.Artist.Equals("")) findLyric(); + if (CurrentTrackTag.Artist.Length != 0) findLyric(); else { m_artist = ""; @@ -301,7 +263,7 @@ private void showLRCtoEdit() { - LRC.SimpleLRC lrc = new LRC.SimpleLRC(m_artist, m_title, m_LyricText); + SimpleLRC lrc = new SimpleLRC(m_artist, m_title, m_LyricText); if (lrc.IsValid) { @@ -401,14 +363,14 @@ LoadSettings(); LyricDiagnostics.OpenLog(MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Log, logName)); - LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Start, 0, LyricDiagnostics.elapsedTimeString() + "MyLyrics opens."); + LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Start, 0, LyricDiagnostics.ElapsedTimeString() + "MyLyrics opens."); return true; } case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT: { StopThread(); resetAll(); - LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Stop, 0, LyricDiagnostics.elapsedTimeString() + "MyLyrics closes."); + LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Stop, 0, LyricDiagnostics.ElapsedTimeString() + "MyLyrics closes."); break; } } @@ -435,46 +397,7 @@ //} } - private void OnImageTimerTickEvent(object trash_, ElapsedEventArgs args_) - { - FlipPictures(); - } - private void FlipPictures() - { - //// Check if we should let the visualization window handle image flipping - //if (_usingBassEngine && _showVisualization) - // return; - - if (GUIelement_ImgCoverArt != null) - { - GUIelement_ImgCoverArt.FreeResources(); - if (ImagePathContainer.Count > 0) - { - if (ImagePathContainer.Count > 1) - { - int currentImage = 0; - // get the next image - foreach (string image in ImagePathContainer) - { - currentImage++; - if (GUIelement_ImgCoverArt.FileName == image) - break; - } - if (currentImage < ImagePathContainer.Count) - GUIelement_ImgCoverArt.SetFileName(ImagePathContainer[currentImage]); - else - // start loop again - GUIelement_ImgCoverArt.SetFileName(ImagePathContainer[0]); - } - else - GUIelement_ImgCoverArt.SetFileName(ImagePathContainer[0]); - } - GUIelement_ImgCoverArt.AllocResources(); - } - } - - public override void OnAction(Action action) { switch (action.wID) @@ -543,7 +466,7 @@ { if (tag2.Equals("#Play.Current.Track") && !exitingMyLyrics) // track has changed { - if (!value.Equals("")) // additional check + if (value.Length != 0) // additional check { basicScreenSelected = null; resetGUI(selectedScreen); @@ -570,229 +493,7 @@ } } - private void GetTrackTags() - { - bool isCurSongCdTrack = IsCdTrack(CurrentTrackFileName); - bool isNextSongCdTrack = IsCdTrack(NextTrackFileName); - MusicDatabase dbs = new MusicDatabase(); - if (CurrentTrackTag != null) - PreviousTrackTag = CurrentTrackTag; - - if (!isCurSongCdTrack) - CurrentTrackTag = GetTrackTag(dbs, CurrentTrackFileName, UseID3); - - if (!isNextSongCdTrack) - NextTrackTag = GetTrackTag(dbs, NextTrackFileName, UseID3); - - if (isCurSongCdTrack || isNextSongCdTrack) - { - PlayList curPlaylist = PlaylistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC); - - int iCurItemIndex = PlaylistPlayer.CurrentSong; - PlayListItem curPlaylistItem = curPlaylist[iCurItemIndex]; - - if (curPlaylistItem == null) - { - CurrentTrackTag = null; - NextTrackTag = null; - return; - } - - int playListItemCount = curPlaylist.Count; - int nextItemIndex = 0; - - if (iCurItemIndex < playListItemCount - 1) - nextItemIndex = iCurItemIndex + 1; - - PlayListItem nextPlaylistItem = curPlaylist[nextItemIndex]; - - if (isCurSongCdTrack) - CurrentTrackTag = (MusicTag)curPlaylistItem.MusicTag; - - if (isNextSongCdTrack && nextPlaylistItem != null) - NextTrackTag = (MusicTag)nextPlaylistItem.MusicTag; - - // There's no MusicTag info in the Playlist so check is we have a valid - // GUIMusicFiles.MusicCD object - if ((CurrentTrackTag == null || NextTrackTag == null) && GUIMusicFiles.MusicCD != null) - { - int curCDTrackNum = GetCDATrackNumber(CurrentTrackFileName); - int nextCDTrackNum = GetCDATrackNumber(NextTrackFileName); - - if (curCDTrackNum < GUIMusicFiles.MusicCD.Tracks.Length) - { - MediaPortal.Freedb.CDTrackDetail curTrack = GUIMusicFiles.MusicCD.getTrack(curCDTrackNum); - CurrentTrackTag = GetTrackTag(curTrack); - } - if (nextCDTrackNum < GUIMusicFiles.MusicCD.Tracks.Length) - { - MediaPortal.Freedb.CDTrackDetail nextTrack = GUIMusicFiles.MusicCD.getTrack(nextCDTrackNum); - NextTrackTag = GetTrackTag(nextTrack); - } - } - } - } - - private bool IsCdTrack(string fileName) - { - return System.IO.Path.GetExtension(CurrentTrackFileName).ToLower() == ".cda"; - } - - int GetCDATrackNumber(string strFile) - { - string strTrack = string.Empty; - int pos = strFile.IndexOf(".cda"); - if (pos >= 0) - { - pos--; - while (Char.IsDigit(strFile[pos]) && pos > 0) - { - strTrack = strFile[pos] + strTrack; - pos--; - } - } - - try - { - int iTrack = Convert.ToInt32(strTrack); - return iTrack; - } - catch (Exception) - { - } - - return 1; - } - - private MusicTag GetTrackTag(MediaPortal.Freedb.CDTrackDetail cdTrack) - { - if (GUIMusicFiles.MusicCD == null) - return null; - MusicTag tag = new MusicTag(); - tag.Artist = GUIMusicFiles.MusicCD.Artist; - tag.Album = GUIMusicFiles.MusicCD.Title; - tag.Genre = GUIMusicFiles.MusicCD.Genre; - tag.Year = GUIMusicFiles.MusicCD.Year; - tag.Duration = cdTrack.Duration; - tag.Title = cdTrack.Title; - return tag; - } - - private MusicTag GetTrackTag(MusicDatabase dbs, string strFile, bool useID3) - { - MusicTag tag = null; - Song song = new Song(); - bool bFound = dbs.GetSongByFileName(strFile, ref song); - if (!bFound) - { - if (useID3) - tag = TagReader.ReadTag(strFile); - } - else - { - tag = new MusicTag(); - tag = BuildMusicTagFromSong(song); - } - return tag; - } - - private MusicTag BuildMusicTagFromSong(Song Song_) - { - MusicTag tmpTag = new MusicTag(); - - tmpTag.Title = Song_.Title; - tmpTag.Album = Song_.Album; - tmpTag.Artist = Song_.Artist; - tmpTag.Duration = Song_.Duration; - tmpTag.Genre = Song_.Genre; - tmpTag.Track = Song_.Track; - tmpTag.Year = Song_.Year; - tmpTag.Rating = Song_.Rating; - - return tmpTag; - } - - - private void UpdateImagePathContainer() - { - if (ImagePathContainer.Count <= 0) - { - try - { - GUIelement_ImgCoverArt.SetFileName(GUIGraphicsContext.Skin + @"\media\missing_coverart.png"); - } - catch (Exception ex) - { - Log.Debug("GUIMusicPlayingNow: could not set default image - {0}", ex.Message); - } - } - - if (g_Player.Duration > 0 && ImagePathContainer.Count > 1) - // ImageChangeTimer.Interval = (g_Player.Duration * 1000) / (ImagePathContainer.Count * 8); // change each cover 8x - ImageChangeTimer.Interval = 15 * 1000; // change covers every 15 seconds - else - ImageChangeTimer.Interval = 3600 * 1000; - - ImageChangeTimer.Stop(); - ImageChangeTimer.Start(); - } - - private bool AddImageToImagePathContainer(string newImage) - { - lock (_imageMutex) - { - string ImagePath = Convert.ToString(newImage); - if (ImagePath.IndexOf(@"missing_coverart") > 0)// && (ImagePathContainer.Count > 0)) - { - Log.Debug("GUIMusicPlayingNow: Found placeholder - not inserting image {0}", ImagePath); - return false; - } - - bool success = false; - if (ImagePathContainer != null) - { - if (ImagePathContainer.Contains(ImagePath)) - return false; - - //// check for placeholder - //int indexDel = 0; - //bool found = false; - //foreach (string pic in ImagePathContainer) - //{ - // indexDel++; - // if (pic.IndexOf("missing_coverart.png") > 0) - // { - // found = true; - // break; - // } - //} - //if (found) - // ImagePathContainer.RemoveAt(indexDel - 1); - - if (System.IO.File.Exists(ImagePath)) - { - try - { - Log.Debug("GUIMusicPlayingNow: adding image to container - {0}", ImagePath); - ImagePathContainer.Add(ImagePath); - success = true; - } - catch (Exception ex) - { - Log.Error("GUIMusicPlayingNow: error adding image ({0}) - {1}", ImagePath, ex.Message); - } - - // display the first pic automatically - if (ImagePathContainer.Count == 1) - FlipPictures(); - } - } - - return success; - } - } - //event driven handler to detect track change private void timeHandler(string tag2, string value) { @@ -834,7 +535,7 @@ m_StatusText = "Searching for a matching lyric..."; GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, m_StatusText); - LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + "findLyric(" + m_artist + ", " + m_title + ")"); + LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.ElapsedTimeString() + "findLyric(" + m_artist + ", " + m_title + ")"); /* The search order for a lyric of the currently played file is as follows: 1) LRC in music tag @@ -847,8 +548,8 @@ // 1) + 2) Check if LRC in music tag or Database string lyricText = MyLyrics.DatabaseUtil.LookUpLyricInDatabase(LyricsDB, m_artist, m_title); - if ((!CurrentTrackTag.Lyrics.Equals("") && (lrc = new LRC.SimpleLRC(m_artist, m_title, CurrentTrackTag.Lyrics)).IsValid) - || (!lyricText.Equals("") && (lrc = new LRC.SimpleLRC(m_artist, m_title, lyricText)).IsValid)) + 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(); @@ -893,7 +594,7 @@ enumerator = lrc.SimpleLRCTimeAndLineCollection.GetEnumerator(); - if (!lrc.Artist.Equals("") && !lrc.Title.Equals("")) + if (lrc.Artist.Length != 0 && lrc.Title.Length != 0) { m_StatusText = ""; m_LyricText = ""; @@ -923,13 +624,13 @@ } // 2) Lyric in music tag - else if (!CurrentTrackTag.Lyrics.Equals("")) + else if (CurrentTrackTag.Lyrics.Length != 0) { ShowLyricOnScreen(CurrentTrackTag.Lyrics, CurrentTrackTag.FileName); } // 3) if lyric in music database - else if (!lyricText.Equals("")) + else if (lyricText.Length != 0) { LyricFound = new Object[] { lyricText, m_artist, m_title, "lyrics database" }; } @@ -950,7 +651,7 @@ m_LyricControllerThread.Name = "lyricSearch Thread"; // looks nice in Output window m_LyricControllerThread.Start(); - lc.addNewLyricSearch(m_artist, m_title); + lc.AddNewLyricSearch(m_artist, m_title); } } @@ -1020,8 +721,8 @@ } lyric.Replace("\r", ""); - string artist = LyricUtil.capatalizeString(m_artist); - string title = LyricUtil.capatalizeString(m_title); + string artist = LyricUtil.CapatalizeString(m_artist); + string title = LyricUtil.CapatalizeString(m_title); string lyricAsString = lyric.ToString(); int lastLineShift = lyricAsString.LastIndexOf("\n"); @@ -1085,14 +786,14 @@ { if (enumerator.MoveNext()) { - LRC.SimpleLRCTimeAndLine currentLine = (LRC.SimpleLRCTimeAndLine)enumerator.Current; + SimpleLRCTimeAndLine currentLine = (SimpleLRCTimeAndLine)enumerator.Current; while (currentLine.Time == 0) { m_LyricText += (currentLine.Line); ++currentLRCLine; enumerator.MoveNext(); - currentLine = (LRC.SimpleLRCTimeAndLine)enumerator.Current; + currentLine = (SimpleLRCTimeAndLine)enumerator.Current; } nextTimeToShow = currentLine.TimeString; @@ -1126,7 +827,7 @@ private void ShowLyricOnScreen(string lyricText, string source) { - LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + "Lyric found: " + m_artist + " - " + m_title + ". Place: " + source); + LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.ElapsedTimeString() + "Lyric found: " + m_artist + " - " + m_title + ". Place: " + source); lyricsFound = true; m_LyricText = lyricText; @@ -1157,8 +858,8 @@ private void SaveLyricToDatabase(string site) { - string capArtist = LyricUtil.capatalizeString(m_artist); - string capTitle = LyricUtil.capatalizeString(m_title); + string capArtist = LyricUtil.CapatalizeString(m_artist); + string capTitle = LyricUtil.CapatalizeString(m_title); if (DatabaseUtil.IsTrackInLyricsDatabase(LyricsDB, capArtist, capTitle).Equals(DatabaseUtil.LYRIC_NOT_FOUND)) { @@ -1506,7 +1207,7 @@ if (!lyricsFound && m_artist.Equals(artist) && m_title.Equals(title)) { - LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.elapsedTimeString() + "Search terminates: No lyric found..."); + LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Information, 0, LyricDiagnostics.ElapsedTimeString() + "Search terminates: No lyric found..."); m_StatusText = "No lyric found"; GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, m_StatusText); } @@ -1518,7 +1219,7 @@ set ... [truncated message content] |
From: <gre...@us...> - 2007-04-16 22:06:07
|
Revision: 335 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=335&view=rev Author: gregmac45 Date: 2007-04-16 15:06:02 -0700 (Mon, 16 Apr 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/OnlineVideos/Source/FLV Player/FlashVideoPlayer.csproj Added Paths: ----------- trunk/plugins/OnlineVideos/Source/FLV Player/ trunk/plugins/OnlineVideos/Source/OnlineVideos/ Removed Paths: ------------- trunk/plugins/OnlineVideos/FLV Player/ trunk/plugins/OnlineVideos/OnlineVideos/ Copied: trunk/plugins/OnlineVideos/Source/FLV Player (from rev 333, trunk/plugins/OnlineVideos/FLV Player) Modified: trunk/plugins/OnlineVideos/Source/FLV Player/FlashVideoPlayer.csproj =================================================================== --- trunk/plugins/OnlineVideos/FLV Player/FlashVideoPlayer.csproj 2007-04-16 18:39:50 UTC (rev 333) +++ trunk/plugins/OnlineVideos/Source/FLV Player/FlashVideoPlayer.csproj 2007-04-16 22:06:02 UTC (rev 335) @@ -74,15 +74,13 @@ <ErrorReport>prompt</ErrorReport> </PropertyGroup> <ItemGroup> - <Reference Include="Core, Version=1.0.2398.37984, Culture=neutral, processorArchitecture=x86"> + <Reference Include="Core"> + <HintPath>..\..\..\MediaPortal\Core\bin\Release\Core.DLL</HintPath> <SpecificVersion>False</SpecificVersion> - <HintPath>..\MediaPortal2\xbmc\bin\Release\Core.dll</HintPath> - <Private>False</Private> </Reference> - <Reference Include="Databases, Version=1.0.2398.37988, Culture=neutral, processorArchitecture=x86"> + <Reference Include="Databases"> + <HintPath>..\..\..\MediaPortal\Databases\bin\Release\Databases.DLL</HintPath> <SpecificVersion>False</SpecificVersion> - <HintPath>..\MediaPortal2\xbmc\bin\Release\Databases.dll</HintPath> - <Private>False</Private> </Reference> <Reference Include="System"> <Name>System</Name> @@ -99,10 +97,9 @@ <Reference Include="System.Xml"> <Name>System.XML</Name> </Reference> - <Reference Include="Utils, Version=1.0.2398.37976, Culture=neutral, processorArchitecture=x86"> + <Reference Include="Utils"> + <HintPath>..\..\..\MediaPortal\Utils\bin\Release\Utils.DLL</HintPath> <SpecificVersion>False</SpecificVersion> - <HintPath>..\MediaPortal2\xbmc\bin\Release\Utils.dll</HintPath> - <Private>False</Private> </Reference> <COMReference Include="AxShockwaveFlashObjects"> <Guid>{D27CDB6B-AE6D-11CF-96B8-444553540000}</Guid> @@ -136,9 +133,6 @@ <DependentUpon>FlashControl.cs</DependentUpon> </EmbeddedResource> </ItemGroup> - <ItemGroup> - <Folder Include="bin\" /> - </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <PreBuildEvent> Copied: trunk/plugins/OnlineVideos/Source/OnlineVideos (from rev 333, trunk/plugins/OnlineVideos/OnlineVideos) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gre...@us...> - 2007-04-16 22:04:24
|
Revision: 334 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=334&view=rev Author: gregmac45 Date: 2007-04-16 15:03:52 -0700 (Mon, 16 Apr 2007) Log Message: ----------- Added Paths: ----------- trunk/plugins/OnlineVideos/Source/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gre...@us...> - 2007-04-16 18:41:33
|
Revision: 333 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=333&view=rev Author: gregmac45 Date: 2007-04-16 11:39:50 -0700 (Mon, 16 Apr 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/OnlineVideos/OnlineVideos/OnlineVideos.sln Added Paths: ----------- trunk/plugins/OnlineVideos/FLV Player/ trunk/plugins/OnlineVideos/FLV Player/AssemblyInfo.cs trunk/plugins/OnlineVideos/FLV Player/FlashControl.Designer.cs trunk/plugins/OnlineVideos/FLV Player/FlashControl.cs trunk/plugins/OnlineVideos/FLV Player/FlashControl.resx trunk/plugins/OnlineVideos/FLV Player/FlashVideoPlayer.csproj trunk/plugins/OnlineVideos/FLV Player/FlashVideoPlayer.csproj.user trunk/plugins/OnlineVideos/FLV Player/FlashVideoPlayer.suo trunk/plugins/OnlineVideos/FLV Player/MyFlashPlayer.cs trunk/plugins/OnlineVideos/FLV Player/player.fla trunk/plugins/OnlineVideos/FLV Player/player.swf trunk/plugins/OnlineVideos/OnlineVideos/ Removed Paths: ------------- trunk/plugins/OnlineVideos/Source/ Added: trunk/plugins/OnlineVideos/FLV Player/AssemblyInfo.cs =================================================================== --- trunk/plugins/OnlineVideos/FLV Player/AssemblyInfo.cs (rev 0) +++ trunk/plugins/OnlineVideos/FLV Player/AssemblyInfo.cs 2007-04-16 18:39:50 UTC (rev 333) @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("MyFLVPlayer")] +[assembly: AssemblyDescription("MediaPortal video player to view FLV encoded videos.")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("2.0.0")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\<configuration>. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] Added: trunk/plugins/OnlineVideos/FLV Player/FlashControl.Designer.cs =================================================================== --- trunk/plugins/OnlineVideos/FLV Player/FlashControl.Designer.cs (rev 0) +++ trunk/plugins/OnlineVideos/FLV Player/FlashControl.Designer.cs 2007-04-16 18:39:50 UTC (rev 333) @@ -0,0 +1,65 @@ +namespace MediaPortal.MyFLVPlayer +{ + partial class FlashControl + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FlashControl)); + this.axShockwaveFlash1 = new AxShockwaveFlashObjects.AxShockwaveFlash(); + ((System.ComponentModel.ISupportInitialize)(this.axShockwaveFlash1)).BeginInit(); + this.SuspendLayout(); + // + // axShockwaveFlash1 + // + this.axShockwaveFlash1.Dock = System.Windows.Forms.DockStyle.Fill; + this.axShockwaveFlash1.Enabled = true; + this.axShockwaveFlash1.Location = new System.Drawing.Point(0, 0); + this.axShockwaveFlash1.Name = "axShockwaveFlash1"; + this.axShockwaveFlash1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axShockwaveFlash1.OcxState"))); + this.axShockwaveFlash1.Size = new System.Drawing.Size(150, 150); + this.axShockwaveFlash1.TabIndex = 0; + // + // FlashControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.axShockwaveFlash1); + this.Name = "FlashControl"; + ((System.ComponentModel.ISupportInitialize)(this.axShockwaveFlash1)).EndInit(); + this.ResumeLayout(false); + this.axShockwaveFlash1.BackgroundColor = 0; + + } + + #endregion + + + + private AxShockwaveFlashObjects.AxShockwaveFlash axShockwaveFlash1; + + } +} Added: trunk/plugins/OnlineVideos/FLV Player/FlashControl.cs =================================================================== --- trunk/plugins/OnlineVideos/FLV Player/FlashControl.cs (rev 0) +++ trunk/plugins/OnlineVideos/FLV Player/FlashControl.cs 2007-04-16 18:39:50 UTC (rev 333) @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; + +namespace MediaPortal.MyFLVPlayer +{ + public partial class FlashControl : UserControl + { + public FlashControl() + { + InitializeComponent(); + } + public AxShockwaveFlashObjects.AxShockwaveFlash Player + { + get { return axShockwaveFlash1; } + } + } + +} Added: trunk/plugins/OnlineVideos/FLV Player/FlashControl.resx =================================================================== --- trunk/plugins/OnlineVideos/FLV Player/FlashControl.resx (rev 0) +++ trunk/plugins/OnlineVideos/FLV Player/FlashControl.resx 2007-04-16 18:39:50 UTC (rev 333) @@ -0,0 +1,131 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="axShockwaveFlash1.OcxState" mimetype="application/x-microsoft.net.object.binary.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAA2QAAAAIB + AAAAAQAAAAAAAAAAAAAAAMQAAABnVWZVEAcAAIEPAACBDwAACAACAAAAAAAIAAAAAAAIAAAAAAAIAA4A + AABXAGkAbgBkAG8AdwAAAAsA//8LAP//CAAKAAAASABpAGcAaAAAAAgAAgAAAAAACwD//wgAAAAAAAgA + AgAAAAAACAAQAAAAUwBoAG8AdwBBAGwAbAAAAAsAAAALAAAACAACAAAAAAAIAAAAAAAIAAIAAAAAAA0A + AAAAAAAAAAAAAAAAAAAAAAsAAQALAAAACAAAAAAAAwAAAAAACw== +</value> + </data> +</root> \ No newline at end of file Added: trunk/plugins/OnlineVideos/FLV Player/FlashVideoPlayer.csproj =================================================================== --- trunk/plugins/OnlineVideos/FLV Player/FlashVideoPlayer.csproj (rev 0) +++ trunk/plugins/OnlineVideos/FLV Player/FlashVideoPlayer.csproj 2007-04-16 18:39:50 UTC (rev 333) @@ -0,0 +1,149 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectType>Local</ProjectType> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{9C825F0E-ED58-4DBC-A8FB-C69569CC830C}</ProjectGuid> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ApplicationIcon> + </ApplicationIcon> + <AssemblyKeyContainerName> + </AssemblyKeyContainerName> + <AssemblyName>FLVPlayer</AssemblyName> + <AssemblyOriginatorKeyFile> + </AssemblyOriginatorKeyFile> + <DefaultClientScript>JScript</DefaultClientScript> + <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> + <DefaultTargetSchema>IE50</DefaultTargetSchema> + <DelaySign>false</DelaySign> + <OutputType>Library</OutputType> + <RootNamespace>FLVPlayer</RootNamespace> + <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> + <StartupObject> + </StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <OutputPath>bin\Debug\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>true</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>false</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>full</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <OutputPath>..\MediaPortal2\xbmc\bin\Debug\plugins\ExternalPlayers\</OutputPath> + <AllowUnsafeBlocks>false</AllowUnsafeBlocks> + <BaseAddress>285212672</BaseAddress> + <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow> + <ConfigurationOverrideFile> + </ConfigurationOverrideFile> + <DefineConstants>TRACE</DefineConstants> + <DocumentationFile> + </DocumentationFile> + <DebugSymbols>false</DebugSymbols> + <FileAlignment>4096</FileAlignment> + <NoStdLib>false</NoStdLib> + <NoWarn> + </NoWarn> + <Optimize>true</Optimize> + <RegisterForComInterop>false</RegisterForComInterop> + <RemoveIntegerChecks>false</RemoveIntegerChecks> + <TreatWarningsAsErrors>false</TreatWarningsAsErrors> + <WarningLevel>4</WarningLevel> + <DebugType>none</DebugType> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <ItemGroup> + <Reference Include="Core, Version=1.0.2398.37984, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\MediaPortal2\xbmc\bin\Release\Core.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="Databases, Version=1.0.2398.37988, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\MediaPortal2\xbmc\bin\Release\Databases.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="System"> + <Name>System</Name> + </Reference> + <Reference Include="System.Data"> + <Name>System.Data</Name> + </Reference> + <Reference Include="System.Drawing"> + <Name>System.Drawing</Name> + </Reference> + <Reference Include="System.Windows.Forms"> + <Name>System.Windows.Forms</Name> + </Reference> + <Reference Include="System.Xml"> + <Name>System.XML</Name> + </Reference> + <Reference Include="Utils, Version=1.0.2398.37976, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\MediaPortal2\xbmc\bin\Release\Utils.dll</HintPath> + <Private>False</Private> + </Reference> + <COMReference Include="AxShockwaveFlashObjects"> + <Guid>{D27CDB6B-AE6D-11CF-96B8-444553540000}</Guid> + <VersionMajor>1</VersionMajor> + <VersionMinor>0</VersionMinor> + <Lcid>0</Lcid> + <WrapperTool>aximp</WrapperTool> + <Isolated>False</Isolated> + </COMReference> + <COMReference Include="stdole"> + <Guid>{00020430-0000-0000-C000-000000000046}</Guid> + <VersionMajor>2</VersionMajor> + <VersionMinor>0</VersionMinor> + <Lcid>0</Lcid> + <WrapperTool>primary</WrapperTool> + </COMReference> + </ItemGroup> + <ItemGroup> + <Compile Include="AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="FlashControl.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="FlashControl.Designer.cs"> + <DependentUpon>FlashControl.cs</DependentUpon> + </Compile> + <Compile Include="MyFlashPlayer.cs" /> + <EmbeddedResource Include="FlashControl.resx"> + <SubType>Designer</SubType> + <DependentUpon>FlashControl.cs</DependentUpon> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <Folder Include="bin\" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent> + </PreBuildEvent> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Added: trunk/plugins/OnlineVideos/FLV Player/FlashVideoPlayer.csproj.user =================================================================== --- trunk/plugins/OnlineVideos/FLV Player/FlashVideoPlayer.csproj.user (rev 0) +++ trunk/plugins/OnlineVideos/FLV Player/FlashVideoPlayer.csproj.user 2007-04-16 18:39:50 UTC (rev 333) @@ -0,0 +1,58 @@ +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <LastOpenVersion>7.10.3077</LastOpenVersion> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ReferencePath> + </ReferencePath> + <CopyProjectDestinationFolder> + </CopyProjectDestinationFolder> + <CopyProjectUncPath> + </CopyProjectUncPath> + <CopyProjectOption>0</CopyProjectOption> + <ProjectView>ShowAllFiles</ProjectView> + <ProjectTrust>0</ProjectTrust> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <EnableASPDebugging>false</EnableASPDebugging> + <EnableASPXDebugging>false</EnableASPXDebugging> + <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> + <EnableSQLServerDebugging>false</EnableSQLServerDebugging> + <RemoteDebugEnabled>false</RemoteDebugEnabled> + <RemoteDebugMachine> + </RemoteDebugMachine> + <StartAction>Project</StartAction> + <StartArguments> + </StartArguments> + <StartPage> + </StartPage> + <StartProgram> + </StartProgram> + <StartURL> + </StartURL> + <StartWorkingDirectory> + </StartWorkingDirectory> + <StartWithIE>true</StartWithIE> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <EnableASPDebugging>false</EnableASPDebugging> + <EnableASPXDebugging>false</EnableASPXDebugging> + <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging> + <EnableSQLServerDebugging>false</EnableSQLServerDebugging> + <RemoteDebugEnabled>false</RemoteDebugEnabled> + <RemoteDebugMachine> + </RemoteDebugMachine> + <StartAction>Project</StartAction> + <StartArguments> + </StartArguments> + <StartPage> + </StartPage> + <StartProgram> + </StartProgram> + <StartURL> + </StartURL> + <StartWorkingDirectory> + </StartWorkingDirectory> + <StartWithIE>true</StartWithIE> + </PropertyGroup> +</Project> \ No newline at end of file Added: trunk/plugins/OnlineVideos/FLV Player/FlashVideoPlayer.suo =================================================================== (Binary files differ) Property changes on: trunk/plugins/OnlineVideos/FLV Player/FlashVideoPlayer.suo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/OnlineVideos/FLV Player/MyFlashPlayer.cs =================================================================== --- trunk/plugins/OnlineVideos/FLV Player/MyFlashPlayer.cs (rev 0) +++ trunk/plugins/OnlineVideos/FLV Player/MyFlashPlayer.cs 2007-04-16 18:39:50 UTC (rev 333) @@ -0,0 +1,672 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Drawing; +using AxShockwaveFlashObjects; +using MediaPortal.Player; +using MediaPortal.GUI.Library; +//using MediaPortal.Utils.Services; +using System.Xml; + +namespace MediaPortal.MyFLVPlayer +{ + public class FlvPlayerPlugin : IExternalPlayer + { + //public static bool _playerIsPaused; + string _currentFile = String.Empty; + //bool _started; + //bool _ended; + bool _notifyPlaying = false; + double _duration; + double _currentPosition; + DateTime _updateTimer; + bool _needUpdate = true; + //private string[] _supportedExtension = new string[5]; + + bool _isFullScreen = false; + int _positionX = 10, _positionY = 10, _videoWidth = 100, _videoHeight = 100; + //protected ILog _log; + + public static FlashControl FlvControl = null; + + public enum PlayState + { + Init, + Playing, + Paused, + Ended + } + PlayState _playState = PlayState.Init; + public FlvPlayerPlugin() + { + //ServiceProvider services = GlobalServiceProvider.Instance; + //_log = services.Get<ILog>(); + } + + public override string Description() + { + return "Flash Player"; + } + + public override string PlayerName + { + get { return "FlvPlayer"; } + } + + public override string AuthorName + { + get { return "Gregmac45"; } + } + + public override string VersionNumber + { + get { return "0.1"; } + } + + public override string[] GetAllSupportedExtensions() + { + String[] laSupported = new String[1]; + laSupported[0] = ".flv"; + return laSupported; + } + + public override bool SupportsFile(string filename) + { + string ext = null; + int dot = filename.LastIndexOf("."); // couldn't find the dot to get the extension + if (dot == -1) return false; + + ext = filename.Substring(dot).Trim(); + if (ext.Length == 0) return false; // no extension so return false; + + ext = ext.ToLower(); + if (".flv".Equals(ext)) { return true; }; + return false; + } + + public override bool Play(string strFile) + { + try + { + //if (FlvControl == null) + //{ + // FlvControl.Player.u + //} + FlvControl = new FlashControl(); + //FlvControl.Player.BackgroundColor = ; + FlvControl.Player.OnReadyStateChange += new _IShockwaveFlashEvents_OnReadyStateChangeEventHandler(OnReady); + FlvControl.Player.FlashCall += new _IShockwaveFlashEvents_FlashCallEventHandler(OnFlashCall); + //FlvControl.Player.LoadMovie(0, @"C:\Dev\FlashExternalAPI\player.swf"); + //Log.Write("player path:{0}", System.IO.Directory.GetCurrentDirectory() + "\\player.swf"); + FlvControl.Player.LoadMovie(0, System.IO.Directory.GetCurrentDirectory()+"\\player.swf"); + + GUIGraphicsContext.form.Controls.Add(FlvControl); + GUIWindowManager.OnNewAction +=new OnActionHandler(OnAction2); + //} + FlvControl.Player.CallFunction("<invoke name=\"loadAndPlayVideo\" returntype=\"xml\"><arguments><string>"+strFile+"</string></arguments></invoke>"); + + //FlvControl.Player.FSCommand += new _IShockwaveFlashEvents_FSCommandEventHandler(OnFSCommand); + //FlvControl.Player.OnProgress += new _IShockwaveFlashEvents_OnProgressEventHandler(OnProgress); + //FlvControl.Player.Play(); + + //} + + GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_PLAYBACK_STARTED, 0, 0, 0, 0, 0, null); + msg.Label = strFile; + GUIWindowManager.SendThreadMessage(msg); + + + + + //_started = false; + //_ended = false; + _notifyPlaying = true; + + + //FlvControl.Visible = true; + //FlvControl.Enabled = true; + FlvControl.ClientSize = new Size(0, 0); + FlvControl.Visible = true; + FlvControl.Enabled = true; + //GUIGraphicsContext.form.Focus(); + + _needUpdate = true; + _isFullScreen = GUIGraphicsContext.IsFullScreenVideo; + _positionX = GUIGraphicsContext.VideoWindow.Left; + _positionY = GUIGraphicsContext.VideoWindow.Top; + _videoWidth = GUIGraphicsContext.VideoWindow.Width; + _videoHeight = GUIGraphicsContext.VideoWindow.Height; + + //_started = true; + //SetWindows(); + + //_playerIsPaused = false; + _currentFile = strFile; + _duration = -1; + _currentPosition = -1; + _playState = PlayState.Playing; + _updateTimer = DateTime.Now; + SetVideoWindow(); + return true; + } + catch (Exception) + { + } + return false; + } + + public void OnReady(object sender,_IShockwaveFlashEvents_OnReadyStateChangeEvent foEvent) + { + /* + + Log.Write("OnReady2 reached with value {0}", foEvent.newState); + if (foEvent.newState == 4 && _duration <=0) + { + + String lsXml = FlvControl.Player.CallFunction("<invoke name=\"getVideoTotalTime\" returntype=\"string\"></invoke>"); + //Log.Write("flash request received with :{0}",lsXml); + XmlDocument document = new XmlDocument(); + document.LoadXml(lsXml); + XmlNodeList list = document.GetElementsByTagName("number"); + _duration = Convert.ToDouble(list[0].InnerText); + Log.Write("Duration Set to {0}",_duration); + } + * */ + + } + public void OnFlashCall(object sender, _IShockwaveFlashEvents_FlashCallEvent foEvent) + { + Log.Write("OnFlashCall reached with value request:{0},Object:{1}", foEvent.request, sender); + XmlDocument document = new XmlDocument(); + document.LoadXml(foEvent.request); + + // Get all the arguments + XmlNodeList list = document.GetElementsByTagName("invoke"); + String lsName = list[0].Attributes["name"].Value; + list = document.GetElementsByTagName("arguments"); + String lsState = list[0].FirstChild.InnerText; + //Log.Write("invoke:{0} argument:{1}",lsName,lsState); + //if (lsName.Equals("UpdateDuration")) + //{ + // Log.Write("received update duration with value {0}", lsState); + //} + if (lsName.Equals("updateStatus")) + { + switch (lsState) + { + case "stopped": + _playState = PlayState.Init; + break; + case "buffering": + if (_playState == PlayState.Playing) + { + //_playState = PlayState.Ended; + } + else + { + _playState = PlayState.Playing; + } + break; + case "playing": + _playState = PlayState.Playing; + String lsXml = FlvControl.Player.CallFunction("<invoke name=\"getVideoTotalTime\" returntype=\"string\"></invoke>"); + //Log.Write("flash request received with :{0}",lsXml); + document = new XmlDocument(); + document.LoadXml(lsXml); + list = document.GetElementsByTagName("number"); + _duration = Convert.ToDouble(list[0].InnerText); + Log.Write("Duration Set to {0}", _duration); + break; + case "paused": + _playState = PlayState.Paused; + break; + } + } + } + + public void OnAction2(Action foAction) + { + } + public override double Duration + { + get + { + return _duration; + } + } + + public override double CurrentPosition + { + get + { + if (FlvControl == null) return 0.0d; + //UpdateStatus(); + //if (_started == false) return 0; + try + { + TimeSpan loTimeSinceUpdate = DateTime.Now - _updateTimer; + if (loTimeSinceUpdate.Seconds > 1) + { + //Log.Write("Flash Player - Updating Position"); + String lsXml = FlvControl.Player.CallFunction("<invoke name=\"getVideoCurrentTime\" returntype=\"string\"></invoke>"); + + XmlDocument document = new XmlDocument(); + document.LoadXml(lsXml); + XmlNodeList list = document.GetElementsByTagName("number"); + _currentPosition = Convert.ToDouble(list[0].InnerText); + _updateTimer = DateTime.Now; + //Log.Write("Flash Player - current time {0}", _currentPosition); + + } + } + catch (Exception e) + { + //_log.Error(e); + Log.Write(e); + } + try + { + return _currentPosition; + } + catch (Exception) + { + FlvControl = null; + return 0.0d; + } + } + + } + /* + public override int Speed + { + get + { + if (_playState == PlayState.Init) return 1; + if (FlvControl == null) return 1; + int liSpeed = 1; + try + { + String lsXml = FlvControl.Player.CallFunction("<invoke name=\"getVideoSpeed\" returntype=\"string\"></invoke>"); + XmlDocument document = new XmlDocument(); + document.LoadXml(lsXml); + XmlNodeList list = document.GetElementsByTagName("number"); + liSpeed = Convert.ToInt32(list[0].InnerText); + //Log.Write("lsTest - total time {0}", lsTest); + } + catch (Exception e) + { + _log.Error(e); + } + + return liSpeed; + } + set + { + if (FlvControl == null) return; + if (_playState != PlayState.Init) + { + if (value < 0) + { + int liNewSpeed = Speed + value; + try + { + FlvControl.Player.CallFunction("<invoke name=\"setVideoSpeed\" returntype=\"string\"><arguments><number>" + liNewSpeed + "</number></arguments></invoke>"); + //XmlDocument document = new XmlDocument(); + //document.LoadXml(lsXml); + //XmlNodeList list = document.GetElementsByTagName("number"); + //_currentPosition = Convert.ToDouble(list[0].InnerText); + //Log.Write("lsTest - total time {0}", lsTest); + } + catch (Exception e) + { + _log.Error(e); + } + + } + else + { + try + { + FlvControl.Player.CallFunction("<invoke name=\"setVideoSpeed\" returntype=\"string\"><arguments><number>" + value + "</number></arguments></invoke>"); + } + catch (Exception e) + { + _log.Error(e); + } + } + } + } + } + * */ + public override bool Ended + { + get + { + return (_playState==PlayState.Ended); + } + } + public override bool Playing + { + get + { + try + { + if (FlvControl == null) + return false; + //UpdateStatus(); + //String lsPlaying = FlvControl.Player.CallFunction("<invoke name=\"videoPlaying\" returntype=\"xml\"></invoke>"); + //Log.Write("Flv Playing:{0}", lsPlaying); + //Log.Write("Player.playing:{0}", FlvControl.Player.Playing); + //Log.Write("control.playing:{0}", FlvControl.Playing); + //if (_started == false) + // return false; + //if (Paused) return true; + //return true; + return (_playState == PlayState.Playing || _playState == PlayState.Paused); + + + } + catch (Exception) + { + FlvControl = null; + return false; + } + + } + } + + public override void Pause() + { + if (FlvControl == null) return; + //UpdateStatus(); + //if (_started == false) return; + try + { + if (_playState == PlayState.Paused) + { + //FlvControl.Player.Play(); + FlvControl.Player.CallFunction("<invoke name=\"playVideo\" returntype=\"xml\"></invoke>"); + //_playerIsPaused = false; + } + else + { + FlvControl.Player.CallFunction("<invoke name=\"pauseVideo\" returntype=\"xml\"></invoke>"); + //FlvControl.Player.StopPlay(); + //_playerIsPaused = true; + } + } + catch (Exception) + { + FlvControl = null; + return; + } + } + + public override bool Paused + { + get + { + try + { + //if (_started == false) return false; + //return _playerIsPaused; + return (_playState == PlayState.Paused); + } + catch (Exception) + { + FlvControl = null; + return false; + } + } + } + + + public override string CurrentFile + { + get + { + return _currentFile; + } + } + + + public override void Process() + { + //Log.Write("in Process"); + //UpdateStatus(); + if (_needUpdate) + { + SetVideoWindow(); + } + if (CurrentPosition >= 10.0) + { + if (_notifyPlaying) + { + _notifyPlaying = false; + GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_PLAYING_10SEC, 0, 0, 0, 0, 0, null); + msg.Label = CurrentFile; + GUIWindowManager.SendThreadMessage(msg); + //Log.Write("Message Playing 10 sec sent"); + } + } + } + public override void SetVideoWindow() + { + //Log.Write("set video called fullscreen = {0} and grphic.Fullscreen {0}",_isFullScreen,GUIGraphicsContext.IsFullScreenVideo); + if (FlvControl == null) return; + if (GUIGraphicsContext.IsFullScreenVideo != _isFullScreen) + { + _isFullScreen = GUIGraphicsContext.IsFullScreenVideo; + _needUpdate = true; + } + if (!_needUpdate) return; + _needUpdate = false; + + + if (_isFullScreen) + { + Log.Write("Flv:Fullscreen"); + + _positionX = GUIGraphicsContext.OverScanLeft; + _positionY = GUIGraphicsContext.OverScanTop; + _videoWidth = GUIGraphicsContext.OverScanWidth; + _videoHeight = GUIGraphicsContext.OverScanHeight; + + FlvControl.Location = new Point(0, 0); + FlvControl.ClientSize = new System.Drawing.Size(GUIGraphicsContext.Width, GUIGraphicsContext.Height); + FlvControl.Size = new System.Drawing.Size(GUIGraphicsContext.Width, GUIGraphicsContext.Height); + + _videoRectangle = new Rectangle(0, 0, FlvControl.ClientSize.Width, FlvControl.ClientSize.Height); + _sourceRectangle = _videoRectangle; + + //FlvControl.fullScreen=true; + //FlvControl.stretchToFit = true; + //Log.Write("FlvPlayer:done"); + return; + } + else + { + + FlvControl.ClientSize = new System.Drawing.Size(_videoWidth, _videoHeight); + FlvControl.Location = new Point(_positionX, _positionY); + + _videoRectangle = new Rectangle(_positionX, _positionY, FlvControl.ClientSize.Width, FlvControl.ClientSize.Height); + _sourceRectangle = _videoRectangle; + //Log.Write("AudioPlayer:set window:({0},{1})-({2},{3})",_positionX,_positionY,_positionX+FlvControl.ClientSize.Width,_positionY+FlvControl.ClientSize.Height); + } + //FlvControl.uiMode = "none"; + //FlvControl.windowlessVideo = true; + //FlvControl.enableContextMenu = false; + //FlvControl.Ctlenabled = false; + GUIGraphicsContext.form.Controls[0].Enabled = false; + } + + public override void Stop() + { + if (FlvControl == null) return; + try + { + //Log.Write("before {0}", Playing); + //FlvControl.Player.Stop(); + FlvControl.Player.CallFunction("<invoke name=\"stopVideo\" returntype=\"xml\"></invoke>"); + FlvControl.Visible = false; + FlvControl.ClientSize = new Size(0, 0); + FlvControl.Dispose(); + //_playerIsPaused = false; + //_started = false; + //Playing = false; + //GUIGraphicsContext.OnNewAction -= new OnActionHandler(OnAction2); + //Log.Write("after {0}", Playing); + } + catch (Exception) + { + FlvControl = null; + } + } + + public override bool HasVideo + { + get + { + return true; + } + } + + public override bool FullScreen + { + + get + { + return _isFullScreen; + } + set + { + if (value != _isFullScreen) + { + //Log.Write("setting fullscreen to {0}", value); + _isFullScreen = value; + _needUpdate = true; + } + } + } + + public override int PositionX + { + get { return _positionX; } + set + { + if (value != _positionX) + { + //Log.Write("setting position x to {0}", value); + _positionX = value; + _needUpdate = true; + } + } + } + + public override int PositionY + { + get { return _positionY; } + set + { + if (value != _positionY) + { + //Log.Write("setting position y to {0}", value); + _positionY = value; + _needUpdate = true; + } + } + } + + public override int RenderWidth + { + get { return _videoWidth; } + set + { + if (value != _videoWidth) + { + //Log.Write("setting width to {0}", value); + _videoWidth = value; + _needUpdate = true; + } + } + } + public override int RenderHeight + { + get { return _videoHeight; } + set + { + if (value != _videoHeight) + { + //Log.Write("setting position height to {0}", value); + _videoHeight = value; + _needUpdate = true; + } + } + } + + + + + public override void SeekRelative(double dTime) + { + double dCurTime = CurrentPosition; + dTime = dCurTime + dTime; + if (dTime < 0.0d) dTime = 0.0d; + if (dTime < Duration) + { + SeekAbsolute(dTime); + } + } + + public override void SeekAbsolute(double dTime) + { + if (dTime < 0.0d) dTime = 0.0d; + if (dTime < Duration) + { + if (FlvControl == null) return; + try + { + Log.Write("Attempting to seek..."); + FlvControl.Player.CallFunction("<invoke name=\"videoSeek\" returntype=\"xml\"><arguments><number>" + dTime + "</number></arguments></invoke>"); + //FlvControl.Player.CurrentFrame() = (int)dTime; + Log.Write("seeking complete"); + } + catch (Exception e) { + Log.Write(e); + } + } + } + + public override void SeekRelativePercentage(int iPercentage) + { + double dCurrentPos = CurrentPosition; + double dDuration = Duration; + + double fCurPercent = (dCurrentPos / Duration) * 100.0d; + double fOnePercent = Duration / 100.0d; + fCurPercent = fCurPercent + (double)iPercentage; + fCurPercent *= fOnePercent; + if (fCurPercent < 0.0d) fCurPercent = 0.0d; + if (fCurPercent < Duration) + { + SeekAbsolute(fCurPercent); + } + } + + + public override void SeekAsolutePercentage(int iPercentage) + { + if (iPercentage < 0) iPercentage = 0; + if (iPercentage >= 100) iPercentage = 100; + double fPercent = Duration / 100.0f; + fPercent *= (double)iPercentage; + SeekAbsolute(fPercent); + } + //private void VideoEnded + //{ + + //} + + } +} \ No newline at end of file Added: trunk/plugins/OnlineVideos/FLV Player/player.fla =================================================================== (Binary files differ) Property changes on: trunk/plugins/OnlineVideos/FLV Player/player.fla ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/OnlineVideos/FLV Player/player.swf =================================================================== (Binary files differ) Property changes on: trunk/plugins/OnlineVideos/FLV Player/player.swf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Copied: trunk/plugins/OnlineVideos/OnlineVideos (from rev 332, trunk/plugins/OnlineVideos/Source) Modified: trunk/plugins/OnlineVideos/OnlineVideos/OnlineVideos.sln =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos.sln 2007-04-16 18:25:28 UTC (rev 332) +++ trunk/plugins/OnlineVideos/OnlineVideos/OnlineVideos.sln 2007-04-16 18:39:50 UTC (rev 333) @@ -1,4 +1,4 @@ - + Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 # SharpDevelop 2.1.0.2429 @@ -6,6 +6,8 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Runner", "Runner.csproj", "{EFABB07B-B050-45AD-A93F-C5047F15512F}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlashVideoPlayer", "..\..\..\..\Documents and Settings\GZamor1\Desktop\OnlineVideos_0.22\source code\MP_External_FlashPlayer\FlashVideoPlayer.csproj", "{9C825F0E-ED58-4DBC-A8FB-C69569CC830C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -24,6 +26,14 @@ {EFABB07B-B050-45AD-A93F-C5047F15512F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EFABB07B-B050-45AD-A93F-C5047F15512F}.Release|Any CPU.Build.0 = Release|Any CPU {EFABB07B-B050-45AD-A93F-C5047F15512F}.Release|Any CPU.ActiveCfg = Release|Any CPU + 38EA1FC7-3151-43FF-8E0B-545524016799.Debug|Any CPU.Build.0 = Debug|Any CPU + 38EA1FC7-3151-43FF-8E0B-545524016799.Debug|Any CPU.ActiveCfg = Debug|Any CPU + 38EA1FC7-3151-43FF-8E0B-545524016799.Release|Any CPU.Build.0 = Release|Any CPU + 38EA1FC7-3151-43FF-8E0B-545524016799.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C825F0E-ED58-4DBC-A8FB-C69569CC830C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C825F0E-ED58-4DBC-A8FB-C69569CC830C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C825F0E-ED58-4DBC-A8FB-C69569CC830C}.Release|Any CPU.Build.0 = Release|Any CPU + {9C825F0E-ED58-4DBC-A8FB-C69569CC830C}.Release|Any CPU.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gre...@us...> - 2007-04-16 18:25:31
|
Revision: 332 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=332&view=rev Author: gregmac45 Date: 2007-04-16 11:25:28 -0700 (Mon, 16 Apr 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/OnlineVideos/Source/OnlineVideos.suo Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gre...@us...> - 2007-04-16 17:56:45
|
Revision: 331 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=331&view=rev Author: gregmac45 Date: 2007-04-16 10:52:44 -0700 (Mon, 16 Apr 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/OnlineVideos/OnlineVideoSettings.xml trunk/plugins/OnlineVideos/Source/GoogleVideoUtil.cs trunk/plugins/OnlineVideos/Source/YouTubeUtil.cs Modified: trunk/plugins/OnlineVideos/OnlineVideoSettings.xml =================================================================== --- trunk/plugins/OnlineVideos/OnlineVideoSettings.xml 2007-04-15 14:09:40 UTC (rev 330) +++ trunk/plugins/OnlineVideos/OnlineVideoSettings.xml 2007-04-16 17:52:44 UTC (rev 331) @@ -10,6 +10,7 @@ <!-- set the password if you wish to add/delete favorites to youtube --> <password></password> <!-- set the confirmAge to yes if you wish to confirm your age to view certain videos --> +<!-- The user and password must be set if confirmAge is set to yes <confirmAge>no</confirmAge> <rss name="Top Rated"><![CDATA[http://youtube.com/rss/global/top_rated.rss]]></rss> <rss name="Recently Added"><![CDATA[http://youtube.com/rss/global/recently_added.rss]]></rss> Modified: trunk/plugins/OnlineVideos/Source/GoogleVideoUtil.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/GoogleVideoUtil.cs 2007-04-15 14:09:40 UTC (rev 330) +++ trunk/plugins/OnlineVideos/Source/GoogleVideoUtil.cs 2007-04-16 17:52:44 UTC (rev 331) @@ -36,13 +36,36 @@ video.Description = rssItem.mediaDescription; video.ImageUrl = rssItem.mediaThumbnail; video.Title = rssItem.title; + String flvUrl = String.Empty; + String aviUrl = String.Empty; + String mp4Url = String.Empty; + String youtubeUrl = String.Empty; foreach(MediaContent content in rssItem.contentList){ - if(content.type.Contains("flv")){ - video.VideoUrl = content.url; - break; - } + if(content.type.Contains("msvideo")){ + aviUrl = content.url; + Log.Info("avi url:{0}",content.url); + //break; + }else if(content.type.Contains("flv")){ + flvUrl = content.url; + Log.Info("flv url:{0}", content.url); + } + else if (content.type.Contains("mp4")) + { + + mp4Url = content.url; + Log.Info("mp4 url:{0}", content.url); + } + else + { + + Log.Info("unknown url:{0}", content.url); + } + video.VideoUrl = flvUrl; } - loVideoList.Add(video); + if(String.IsNullOrEmpty(video.VideoUrl)==false){ + + loVideoList.Add(video); + } } return loVideoList; } Modified: trunk/plugins/OnlineVideos/Source/YouTubeUtil.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/YouTubeUtil.cs 2007-04-15 14:09:40 UTC (rev 330) +++ trunk/plugins/OnlineVideos/Source/YouTubeUtil.cs 2007-04-16 17:52:44 UTC (rev 331) @@ -199,17 +199,35 @@ { String lsUrl; String lsNextUrl = ""; - if(foSite.confirmAge){ - lsUrl = "http://www.youtube.com/verify_age?next_url=/watch%%3Fv%%3D"+fsId; - lsNextUrl = "http://youtube.com/watch?v=" + fsId; - if(!isLoggedIn()){ - //try to login - login(foSite.username,foSite.password); - } - } - else{ - lsUrl = "http://youtube.com/watch?v=" + fsId; - } + String lsPostData = ""; + if (foSite.confirmAge) + { + Log.Info("confirmAge is set to yes"); + lsUrl = "http://www.youtube.com/verify_age?next_url=/watch?v=" + fsId; + lsNextUrl = "/watch?v=" + fsId; + lsPostData = "next_url=" + lsNextUrl + "&action_confirm=Confirm"; + if (!isLoggedIn()) + { + Log.Info("Not currently logged in. Trying to log in"); + //try to login + if (login(foSite.username, foSite.password)) + { + Log.Info("logged in successfully"); + //foreach(Cookie cookie in moCookies){ + // Log.Info("Found cookie:" + cookie.Name); + //} + + } + else + { + Log.Info("login failed"); + } + } + } + else + { + lsUrl = "http://youtube.com/watch?v=" + fsId; + } //String lsHtml = getHTMLData(lsUrl); //WebClient loClient1 = new WebClient(); @@ -218,17 +236,21 @@ Request.ContentType = "application/x-www-form-urlencoded"; Request.CookieContainer = new CookieContainer(); - - Request.CookieContainer.Add(moCookies); + if (moCookies!=null) + { + Log.Info("setting the cookies for the request"); + Request.CookieContainer.Add(moCookies); + } Stream RequestStream = Request.GetRequestStream(); ASCIIEncoding ASCIIEncoding = new ASCIIEncoding(); //Byte [] PostData = ASCIIEncoding.GetBytes("username=" + fsUser +"&password="+ fsPassword); - Byte [] PostData = ASCIIEncoding.GetBytes("next_url="+lsNextUrl+"&action_confirm=Confirm"); + Byte [] PostData = ASCIIEncoding.GetBytes(lsPostData); RequestStream.Write(PostData, 0, PostData.Length); RequestStream.Close(); HttpWebResponse response = (HttpWebResponse)Request.GetResponse(); StreamReader Reader = new StreamReader(Request.GetResponse().GetResponseStream()); - String lsHtml = Reader.ReadToEnd(); + String lsHtml = Reader.ReadToEnd(); + //Log.Info("Session Html:{0}",lsHtml); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-04-15 14:09:45
|
Revision: 330 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=330&view=rev Author: saamand Date: 2007-04-15 07:09:40 -0700 (Sun, 15 Apr 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.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_LyricsLibrary.Designer.cs trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs trunk/plugins/MyLyrics/MyLyrics.suo Modified: trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs 2007-04-15 13:28:10 UTC (rev 329) +++ trunk/plugins/MyLyrics/LyricsEngine/LyricsSites/HotLyrics.cs 2007-04-15 14:09:40 UTC (rev 330) @@ -121,7 +121,6 @@ sr = new StreamReader(reply); string line = ""; - int noOfLinesCount = 0; while (line.IndexOf("GOOGLE END") == -1) { Modified: trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2007-04-15 13:28:10 UTC (rev 329) +++ trunk/plugins/MyLyrics/LyricsEngine/Properties/AssemblyInfo.cs 2007-04-15 14:09:40 UTC (rev 330) @@ -26,7 +26,7 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.18")] +[assembly: AssemblyVersion("0.19")] // // In order to sign your assembly you must specify a key to use. Refer to the Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-04-15 13:28:10 UTC (rev 329) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-04-15 14:09:40 UTC (rev 330) @@ -38,6 +38,7 @@ public static int WINDOW_MYLYRICS = 90478; private int selectedScreen = 0; + private Nullable<bool> basicScreenSelected = null; string lyricsScreenXML = "MyLyrics.xml"; bool exitingMyLyrics = false; @@ -88,12 +89,14 @@ enum GUI_General_Controls { CONTROL_BACKGROUND = 1, + CONTROL_TITLE = 2, CONTROL_LBStatus = 11 } enum GUI_Lyrics_Controls { - CONTROL_Lyric = 20 + CONTROL_Lyric = 20, + CONTROL_LyricWide = 21 } enum GUI_LRC_Controls : int @@ -126,7 +129,7 @@ #region Fields related to LRC mode - internal const int BASIC_WIDE_LIMIT = 40; + internal const int BASIC_WIDE_LIMIT = 45; LRC.SimpleLRC lrc; IEnumerator enumerator; System.Windows.Forms.Timer timer; @@ -148,7 +151,6 @@ internal int msec = 0; string[] lines; - ArrayList times; #endregion @@ -166,33 +168,8 @@ public override bool Init() { - int lyricsScreen = 0; - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) - { - lyricsScreen = (int)xmlreader.GetValueAsInt("myLyrics", "myLyricsScreen", (int)MyLyricsSettings.Screen.LYRICS_BASIC); - } - - switch (lyricsScreen) - { - case (int)MyLyricsSettings.Screen.LYRICS_BASIC: - selectedScreen = (int)MyLyricsSettings.Screen.LYRICS_BASIC; - break; - case (int)MyLyricsSettings.Screen.LYRICS_WIDE: - selectedScreen = (int)MyLyricsSettings.Screen.LYRICS_WIDE; - break; - case (int)MyLyricsSettings.Screen.LRC_BASIC: - selectedScreen = (int)MyLyricsSettings.Screen.LRC_BASIC; - break; - case (int)MyLyricsSettings.Screen.LRC_EDITOR: - selectedScreen = (int)MyLyricsSettings.Screen.LRC_EDITOR; - break; - default: - selectedScreen = (int)MyLyricsSettings.Screen.LYRICS_BASIC; - break; - } - timer = new System.Windows.Forms.Timer(); - + selectedScreen = (int)MyLyricsSettings.Screen.LYRICS_BASIC; return Load(GUIGraphicsContext.Skin + @"\" + lyricsScreenXML); } @@ -226,10 +203,11 @@ m_artist = ""; m_title = ""; m_TrackText = ""; + m_LyricText = ""; m_StatusText = "No music file playing"; + + resetGUI(selectedScreen); GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, m_StatusText); - m_LyricText = ""; - GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric, m_LyricText); } getAlbumArt(); @@ -313,10 +291,11 @@ m_artist = ""; m_title = ""; m_TrackText = ""; + m_LyricText = ""; m_StatusText = "No music file playing"; + + resetGUI(selectedScreen); GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, m_StatusText); - m_LyricText = ""; - GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric, m_LyricText); } } @@ -422,14 +401,14 @@ LoadSettings(); LyricDiagnostics.OpenLog(MediaPortal.Configuration.Config.GetFile(MediaPortal.Configuration.Config.Dir.Log, logName)); - LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Start, 0, LyricDiagnostics.elapsedTimeString() + "MyLyrics opens, screen: " + lyricsScreenXML); + LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Start, 0, LyricDiagnostics.elapsedTimeString() + "MyLyrics opens."); return true; } case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT: { StopThread(); resetAll(); - LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Stop, 0, LyricDiagnostics.elapsedTimeString() + "MyLyrics closes, screen: " + lyricsScreenXML); + LyricDiagnostics.TraceSource.TraceEvent(TraceEventType.Stop, 0, LyricDiagnostics.elapsedTimeString() + "MyLyrics closes."); break; } } @@ -511,7 +490,7 @@ { tagLine(); } - if (action.m_key.KeyChar.Equals(40)) + else if (action.m_key.KeyChar.Equals(40) || action.m_key.KeyChar.Equals(101)) { lyricsFound = false; if (selectedScreen != (int)MyLyricsSettings.Screen.LRC_EDITOR) @@ -528,6 +507,31 @@ newTrack = true; Process(); } + else if (action.m_key.KeyChar.Equals(35) || action.m_key.KeyChar.Equals(119)) + { + if (selectedScreen == (int)MyLyricsSettings.Screen.LYRICS_BASIC) + { + basicScreenSelected = false; + resetGUI((int)MyLyricsSettings.Screen.LYRICS_WIDE); + GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide, m_LyricText); + } + 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); + } + else if (selectedScreen == (int)MyLyricsSettings.Screen.LRC_BASIC) + { + basicScreenSelected = false; + findLyric(); + } + else if (selectedScreen == (int)MyLyricsSettings.Screen.LRC_WIDE) + { + basicScreenSelected = true; + findLyric(); + } + } break; } } @@ -541,6 +545,7 @@ { if (!value.Equals("")) // additional check { + basicScreenSelected = null; resetGUI(selectedScreen); StopThread(); resetAll(); @@ -552,10 +557,11 @@ m_artist = ""; m_title = ""; m_TrackText = ""; + m_LyricText = ""; m_StatusText = "No music file playing"; + + resetGUI(selectedScreen); GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, m_StatusText); - m_LyricText = ""; - GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric, m_LyricText); } } else if (selectedScreen == (int)MyLyricsSettings.Screen.LYRICS_BASIC || selectedScreen == (int)MyLyricsSettings.Screen.LRC_BASIC) @@ -817,6 +823,8 @@ GUIControl.ClearControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric, ""); + GUIControl.ClearControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide); + GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide, ""); if (CurrentTrackTag != null && CurrentTrackTag.Artist != "") { @@ -857,13 +865,27 @@ } } - if (aLongLinePresent) + if (basicScreenSelected.HasValue) { - resetGUI((int)MyLyricsSettings.Screen.LRC_WIDE); + if (basicScreenSelected.Value) + { + resetGUI((int)MyLyricsSettings.Screen.LRC_BASIC); + } + else + { + resetGUI((int)MyLyricsSettings.Screen.LRC_WIDE); + } } else { - resetGUI((int)MyLyricsSettings.Screen.LRC_BASIC); + if (aLongLinePresent) + { + resetGUI((int)MyLyricsSettings.Screen.LRC_WIDE); + } + else + { + resetGUI((int)MyLyricsSettings.Screen.LRC_BASIC); + } } m_StatusText = ""; @@ -1067,7 +1089,6 @@ while (currentLine.Time == 0) { m_LyricText += (currentLine.Line); - GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric, m_LyricText); ++currentLRCLine; enumerator.MoveNext(); @@ -1119,8 +1140,18 @@ } else { - resetGUI((int)MyLyricsSettings.Screen.LYRICS_BASIC); - GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric, m_LyricText); + if (basicScreenSelected.HasValue == false || basicScreenSelected.Value) + { + resetGUI((int)MyLyricsSettings.Screen.LYRICS_BASIC); + GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric, m_LyricText); + } + else + { + resetGUI((int)MyLyricsSettings.Screen.LYRICS_WIDE); + GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide, m_LyricText); + } + + } } @@ -1208,7 +1239,6 @@ sec = 0; msec = 0; lines = null; - times = null; } private void resetGUI(int screenID) @@ -1223,12 +1253,16 @@ if (selectedScreen == (int)MyLyricsSettings.Screen.LYRICS_BASIC) { GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(trackChangeHandler); - times = new ArrayList(); + + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_TITLE, "Lyrics basic"); + // Reset general and lyrics controls GUIControl.ShowControl(GetID, (int)GUI_General_Controls.CONTROL_LBStatus); GUIControl.ShowControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric, ""); + GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide); + GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide, ""); // album art only visible for basic screen GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_CURRENTLY); @@ -1257,13 +1291,16 @@ else if (selectedScreen == (int)MyLyricsSettings.Screen.LYRICS_WIDE) { GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(trackChangeHandler); - times = new ArrayList(); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_TITLE, "Lyrics wide"); + // Reset general and lyrics controls GUIControl.ShowControl(GetID, (int)GUI_General_Controls.CONTROL_LBStatus); //GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, ""); - GUIControl.ShowControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); + GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric, ""); + GUIControl.ShowControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide); + GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide, ""); // album art only visible for lyrics_basic screen GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_CURRENTLY); @@ -1291,17 +1328,17 @@ else if (selectedScreen == (int)MyLyricsSettings.Screen.LRC_BASIC) { - if (alreadyValidLRC == false) - { - GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(trackChangeHandler); - GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(timeHandler); - timer.Tick += new System.EventHandler(OnTimerEvent); - } + 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"); + // Lyrics controls GUIControl.ShowControl(GetID, (int)GUI_General_Controls.CONTROL_LBStatus); GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, ""); GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); + GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide); // album art only visible for basic screen GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_CURRENTLY); @@ -1331,17 +1368,17 @@ else if (selectedScreen == (int)MyLyricsSettings.Screen.LRC_WIDE) { - if (alreadyValidLRC == false) - { - GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(trackChangeHandler); - GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(timeHandler); - timer.Tick += new System.EventHandler(OnTimerEvent); - } + 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"); + // Lyrics controls GUIControl.ShowControl(GetID, (int)GUI_General_Controls.CONTROL_LBStatus); GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, ""); GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); + GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide); // album art only visible for basic screen GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_CURRENTLY); @@ -1352,7 +1389,7 @@ GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_ALBUMART); GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_PROGRESS); GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_PROGRESSIMAGE); - + // LRC controls GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_TAGBUTTON); @@ -1374,10 +1411,13 @@ GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(trackChangeHandler); GUIPropertyManager.OnPropertyChanged += new GUIPropertyManager.OnPropertyChangedHandler(timeHandler); + GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_TITLE, "LRC editor"); + // Lyrics controls GUIControl.ShowControl(GetID, (int)GUI_General_Controls.CONTROL_LBStatus); GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, ""); GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); + GUIControl.HideControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_LyricWide); // album art only visible for lyrics_basic screen GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_CURRENTLY); Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-04-15 13:28:10 UTC (rev 329) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.Designer.cs 2007-04-15 14:09:40 UTC (rev 330) @@ -78,8 +78,6 @@ this.cbMoveSongFrom = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.cbAutoFetch = new MediaPortal.UserInterface.Controls.MPCheckBox(); this.mpGroupBox2 = new MediaPortal.UserInterface.Controls.MPGroupBox(); - this.comboLyricsPage = new MediaPortal.UserInterface.Controls.MPComboBox(); - this.lbLyricsPage = new MediaPortal.UserInterface.Controls.MPLabel(); this.tbPluginName = new MediaPortal.UserInterface.Controls.MPTextBox(); this.lbPluginName = new MediaPortal.UserInterface.Controls.MPLabel(); this.gbLyricSites = new MediaPortal.UserInterface.Controls.MPGroupBox(); @@ -119,8 +117,8 @@ // tabControl // this.tabControl.Controls.Add(this.tabPageLyricsDatabase); - this.tabControl.Controls.Add(this.tabPageDatabase); this.tabControl.Controls.Add(this.tabPageSetup); + this.tabControl.Controls.Add(this.tabPageDatabase); this.tabControl.Location = new System.Drawing.Point(7, 12); this.tabControl.Name = "tabControl"; this.tabControl.SelectedIndex = 0; @@ -587,7 +585,7 @@ 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, 109); + 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; @@ -633,41 +631,16 @@ // // mpGroupBox2 // - this.mpGroupBox2.AutoSize = true; - this.mpGroupBox2.Controls.Add(this.comboLyricsPage); - this.mpGroupBox2.Controls.Add(this.lbLyricsPage); 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, 98); + this.mpGroupBox2.Size = new System.Drawing.Size(538, 59); this.mpGroupBox2.TabIndex = 29; this.mpGroupBox2.TabStop = false; this.mpGroupBox2.Text = "Basic settings"; // - // comboLyricsPage - // - this.comboLyricsPage.BorderColor = System.Drawing.Color.Empty; - this.comboLyricsPage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboLyricsPage.FormattingEnabled = true; - this.comboLyricsPage.Items.AddRange(new object[] { - "Lyrics screen (view)", - "Lyrics screen (editor)"}); - this.comboLyricsPage.Location = new System.Drawing.Point(96, 58); - this.comboLyricsPage.Name = "comboLyricsPage"; - this.comboLyricsPage.Size = new System.Drawing.Size(144, 21); - this.comboLyricsPage.TabIndex = 16; - // - // lbLyricsPage - // - this.lbLyricsPage.AutoSize = true; - this.lbLyricsPage.Location = new System.Drawing.Point(13, 61); - this.lbLyricsPage.Name = "lbLyricsPage"; - this.lbLyricsPage.Size = new System.Drawing.Size(72, 13); - this.lbLyricsPage.TabIndex = 15; - this.lbLyricsPage.Text = "Lyrics screen:"; - // // tbPluginName // this.tbPluginName.BorderColor = System.Drawing.Color.Empty; @@ -695,7 +668,7 @@ 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, 207); + 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; @@ -927,7 +900,6 @@ this.gbProgress.ResumeLayout(false); this.gbMusicDBSearchStats.ResumeLayout(false); this.tabPageSetup.ResumeLayout(false); - this.tabPageSetup.PerformLayout(); this.mpGroupBox3.ResumeLayout(false); this.mpGroupBox3.PerformLayout(); this.mpGroupBox2.ResumeLayout(false); @@ -1011,8 +983,6 @@ private MediaPortal.UserInterface.Controls.MPCheckBox cbDisregardSongsWithNoLyric; private MediaPortal.UserInterface.Controls.MPCheckBox cbMarkSongsWithNoLyrics; private MediaPortal.UserInterface.Controls.MPCheckBox cbDisconsiderTitlesWithLyrics; - private MediaPortal.UserInterface.Controls.MPLabel lbLyricsPage; - private MediaPortal.UserInterface.Controls.MPComboBox comboLyricsPage; private MediaPortal.UserInterface.Controls.MPGroupBox mpGroupBox3; internal MediaPortal.UserInterface.Controls.MPCheckBox cbAutoFetch; internal MediaPortal.UserInterface.Controls.MPCheckBox cbMoveSongFrom; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-04-15 13:28:10 UTC (rev 329) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup.cs 2007-04-15 14:09:40 UTC (rev 330) @@ -137,9 +137,6 @@ cbAutomaticUpdate.Checked = xmlreader.GetValueAsBool("myLyrics", "automaticUpdateWhenFirstFound", false); cbMoveSongFrom.Checked = xmlreader.GetValueAsBool("myLyrics", "moveLyricFromMarkedDatabase", true); - int xmlScreen = xmlreader.GetValueAsInt("myLyrics", "myLyricsScreen", (int)MyLyricsSettings.Screen.LYRICS_BASIC); - comboLyricsPage.SelectedIndex = xmlScreen; - lbSongsLimitNote.Text = ("(You have currently " + m_TotalTitles.ToString() + " titles in your music database)"); rdDefault.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useDefaultSitesMode", "True")).ToString().Equals("True") ? true : false; @@ -157,31 +154,6 @@ cbLyricsOnDemand.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useLyricsOnDemand", "True")).ToString().Equals("True") ? true : false; cbSeekLyrics.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useSeekLyrics", "True")).ToString().Equals("True") ? true : false; cbHotLyrics.Checked = ((string)xmlreader.GetValueAsString("myLyrics", "useHotLyrics", "True")).ToString().Equals("True") ? true : false; - - //if (Setup.IsMember("LyricWiki") == false) - //{ - // cbLyricWiki.Visible = false; - //} - //if (Setup.IsMember("EvilLabs") == false) - //{ - // cbEvilLabs.Visible = false; - //} - //if (Setup.IsMember("Lyrics007") == false) - //{ - // cbLyrics007.Visible = false; - //} - //if (Setup.IsMember("LyricsOnDemand") == false) - //{ - // cbLyricsOnDemand.Visible = false; - //} - //if (Setup.IsMember("SeekLyrics") == false) - //{ - // cbSeekLyrics.Visible = false; - //} - //if (Setup.IsMember("HotLyrics") == false) - //{ - // cbHotLyrics.Visible = false; - //} } } catch { @@ -326,9 +298,6 @@ xmlwriter.SetValueAsBool("myLyrics", "automaticFetch", cbAutoFetch.Checked); xmlwriter.SetValueAsBool("myLyrics", "automaticUpdateWhenFirstFound", cbAutomaticUpdate.Checked); xmlwriter.SetValueAsBool("myLyrics", "moveLyricFromMarkedDatabase", cbMoveSongFrom.Checked); - - int xmlScreen = comboLyricsPage.SelectedIndex; - xmlwriter.SetValue("myLyrics", "myLyricsScreen", xmlScreen); } } Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.Designer.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.Designer.cs 2007-04-15 13:28:10 UTC (rev 329) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.Designer.cs 2007-04-15 14:09:40 UTC (rev 330) @@ -345,7 +345,6 @@ private System.Windows.Forms.Label lbLRCTest; private MediaPortal.UserInterface.Controls.MPLabel lbTitle; private MediaPortal.UserInterface.Controls.MPLabel lbSource; - private System.ComponentModel.IContainer components; private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1; internal System.Windows.Forms.TreeView treeView; internal MediaPortal.UserInterface.Controls.MPButton btSearchSingle; Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs 2007-04-15 13:28:10 UTC (rev 329) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyricsSetup_LyricsLibrary.cs 2007-04-15 14:09:40 UTC (rev 330) @@ -42,8 +42,6 @@ private int currentDBIndex = 0; enum TYPEOFLYRICS : int {NONE, NORMAL, LRC}; - static string lastChosenArtist = ""; - static string lastChosenTitle = ""; public MyLyricsSetup_LyricsLibrary(Form form) { Modified: trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2007-04-15 13:28:10 UTC (rev 329) +++ trunk/plugins/MyLyrics/My Lyrics/Properties/AssemblyInfo.cs 2007-04-15 14:09:40 UTC (rev 330) @@ -31,5 +31,5 @@ // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.18")] -[assembly: AssemblyFileVersion("0.18")] +[assembly: AssemblyVersion("0.19")] +[assembly: AssemblyFileVersion("0.19")] Modified: trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs 2007-04-15 13:28:10 UTC (rev 329) +++ trunk/plugins/MyLyrics/MyLyric Windows Application/MyLyric Windows Application/Properties/AssemblyInfo.cs 2007-04-15 14:09:40 UTC (rev 330) @@ -29,5 +29,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.18")] -[assembly: AssemblyFileVersion("0.18")] +[assembly: AssemblyVersion("0.19")] +[assembly: AssemblyFileVersion("0.19")] Modified: trunk/plugins/MyLyrics/MyLyrics.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <du...@us...> - 2007-04-15 13:28:15
|
Revision: 329 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=329&view=rev Author: dukus Date: 2007-04-15 06:28:10 -0700 (Sun, 15 Apr 2007) Log Message: ----------- properties saving Modified Paths: -------------- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs trunk/plugins/mpinstaler/MPInstaler/properties.cs Modified: trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-04-14 14:28:15 UTC (rev 328) +++ trunk/plugins/mpinstaler/MPInstaler/MPinstalerStruct.cs 2007-04-15 13:28:10 UTC (rev 329) @@ -165,6 +165,7 @@ FileList.Clear(); Language.Clear(); Actions.Clear(); + ProiectProperties.Clear(); BuildFileName = string.Empty; ProiectdFileName = string.Empty; Author = string.Empty; @@ -242,7 +243,10 @@ writer.WriteElementString("Group", this.Group); WriteLogoElement(writer); writer.WriteEndElement(); + writer.WriteStartElement("Properties"); + ProiectProperties.Save(writer); writer.WriteEndElement(); + writer.WriteEndElement(); writer.Flush(); //------------------------------------- @@ -330,6 +334,7 @@ doc.Load(fil); FileList.Clear(); Language.Clear(); + ProiectProperties.Clear(); XmlNode ver = doc.DocumentElement.SelectSingleNode("/MPinstaler"); XmlNodeList fileList = ver.SelectNodes("FileList/File"); foreach (XmlNode nodefile in fileList) @@ -385,6 +390,9 @@ } } + XmlNode nodeproperties = ver.SelectSingleNode("Properties"); + ProiectProperties.Load(nodeproperties); + } public MPIFileList FindList(string typ, string stpy) Modified: trunk/plugins/mpinstaler/MPInstaler/properties.cs =================================================================== --- trunk/plugins/mpinstaler/MPInstaler/properties.cs 2007-04-14 14:28:15 UTC (rev 328) +++ trunk/plugins/mpinstaler/MPInstaler/properties.cs 2007-04-15 13:28:10 UTC (rev 329) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Text; +using System.Xml; namespace MPInstaler { @@ -11,6 +12,7 @@ public ProiectPropertiesClass() { + Clear(); } public string MPMinVersion @@ -36,5 +38,33 @@ return mpmaxversion; } } + + public void Save(XmlWriter writer) + { + writer.WriteElementString("MPMaxVersion", MPMaxVersion); + writer.WriteElementString("MPMinVersion", MPMinVersion); + } + + public void Load(XmlNode basenode) + { + if (basenode != null) + { + XmlNode node; + node = basenode.SelectSingleNode("MPMaxVersion"); + if (node != null && node.InnerText != null) + MPMaxVersion = node.InnerText; + node = basenode.SelectSingleNode("MPMinVersion"); + if (node != null && node.InnerText != null) + MPMinVersion = node.InnerText; + + } + + } + + public void Clear() + { + MPMaxVersion = String.Empty; + MPMinVersion = String.Empty; + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sa...@us...> - 2007-04-14 14:28:18
|
Revision: 328 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=328&view=rev Author: saamand Date: 2007-04-14 07:28:15 -0700 (Sat, 14 Apr 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj trunk/plugins/MyLyrics/MyLyrics.suo Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-04-14 04:44:03 UTC (rev 327) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.cs 2007-04-14 14:28:15 UTC (rev 328) @@ -7,6 +7,8 @@ using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.Text; +using System.Collections.Generic; +using System.Timers; using LyricsEngine; using LyricsEngineConfig; @@ -18,6 +20,8 @@ using MediaPortal.Music.Database; using MediaPortal.Playlists; using MediaPortal.Util; +using MediaPortal.GUI.Music; + using System.Collections; namespace MyLyrics @@ -40,6 +44,19 @@ bool newTrack = false; bool alreadyValidLRC = false; + private string CurrentThumbFileName = string.Empty; + private MusicTag PreviousTrackTag = null; + private MusicTag CurrentTrackTag = null; + private MusicTag NextTrackTag = null; + private bool UseID3 = false; + private List<String> ImagePathContainer = null; + private System.Timers.Timer ImageChangeTimer = null; + private object _imageMutex = null; + private string CurrentTrackFileName = string.Empty; + private string NextTrackFileName = string.Empty; + private PlayListPlayer PlaylistPlayer = null; + + // worker thread Thread m_LyricControllerThread; LyricsController lc; @@ -99,6 +116,12 @@ CONTROL_VIEW_LINE = 400, CONTROL_VIEW_LINE_DONE = 500 } + + [SkinControlAttribute((int)GUI_LRC_Controls.CONTROL_ART_ALBUMART)] + protected GUIImage GUIelement_ImgCoverArt = null; + [SkinControlAttribute((int)GUI_LRC_Controls.CONTROL_ART_PROGRESS)] + protected GUIProgressControl GUIelement_ProgTrack = null; + #endregion #region Fields related to LRC mode @@ -110,6 +133,7 @@ Stopwatch stopwatch; string nextTimeToShow; string nextLineToShow; + bool shiftPageNextTime = false; #endregion @@ -132,6 +156,10 @@ { m_EventStopThread = new ManualResetEvent(false); + ImagePathContainer = new List<string>(); + _imageMutex = new Object(); + PlaylistPlayer = PlayListPlayer.SingletonPlayer; + GetID = (int)GUIMyLyrics.WINDOW_MYLYRICS; } @@ -175,22 +203,23 @@ { alreadyValidLRC = false; + CurrentTrackTag = new MusicTag(); + CurrentTrackTag.Artist = LyricUtil.capatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Artist")); + CurrentTrackTag.Title = LyricUtil.capatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Title")); + if (selectedScreen == (int)MyLyricsSettings.Screen.LRC_BASIC || selectedScreen == (int)MyLyricsSettings.Screen.LRC_WIDE) { lyricsFound = false; StopThread(); newTrack = false; - MusicTag tag = new MusicTag(); - tag.Artist = LyricUtil.capatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Artist")); - tag.Title = LyricUtil.capatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Title")); - m_artist = tag.Artist; - m_title = tag.Title; + m_artist = CurrentTrackTag.Artist; + m_title = CurrentTrackTag.Title; // Get lyric - if (!tag.Artist.Equals("")) + if (!CurrentTrackTag.Artist.Equals("")) { - findLyric(tag); + findLyric(); } else { @@ -202,6 +231,8 @@ m_LyricText = ""; GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric, m_LyricText); } + + getAlbumArt(); } else if (selectedScreen == (int)MyLyricsSettings.Screen.LRC_EDITOR) { @@ -223,23 +254,60 @@ } else if (!exitingMyLyrics) { + getAlbumArt(); startSearch(); } } base.Process(); } + public void getAlbumArt() + { + ImagePathContainer.Clear(); + CurrentTrackFileName = g_Player.CurrentFile; + GetTrackTags(); + + CurrentThumbFileName = GUIMusicFiles.GetCoverArt(false, CurrentTrackFileName, CurrentTrackTag); + if (CurrentThumbFileName.Length > 0) + { + // let us test if there is a larger cover art image + string strLarge = MediaPortal.Util.Utils.ConvertToLargeCoverArt(CurrentThumbFileName); + if (System.IO.File.Exists(strLarge)) + CurrentThumbFileName = strLarge; + AddImageToImagePathContainer(CurrentThumbFileName); + } + + CurrentThumbFileName = GUIMusicFiles.GetArtistCoverArtName(CurrentTrackTag.Artist); + if (CurrentThumbFileName.Length > 0) + { + // let us test if there is a larger cover art image + string strLarge = MediaPortal.Util.Utils.ConvertToLargeCoverArt(CurrentThumbFileName); + if (System.IO.File.Exists(strLarge)) + CurrentThumbFileName = strLarge; + AddImageToImagePathContainer(CurrentThumbFileName); + } + + UpdateImagePathContainer(); + } + + private void UpdateTrackPosition() + { + double trackDuration = g_Player.Duration; + double curTrackPostion = g_Player.CurrentPosition; + + int progPrecent = (int)(curTrackPostion / trackDuration * 100d); + + this.GUIelement_ProgTrack.Percentage = progPrecent; + GUIelement_ProgTrack.Visible = GUIelement_ProgTrack.Percentage > 0; + } + private void startSearch() { lyricsFound = false; StopThread(); newTrack = false; - MusicTag tag = new MusicTag(); - tag.Artist = LyricUtil.capatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Artist")); - tag.Title = LyricUtil.capatalizeString(GUIPropertyManager.GetProperty("#Play.Current.Title")); - - if (!tag.Artist.Equals("")) findLyric(tag); + if (!CurrentTrackTag.Artist.Equals("")) findLyric(); else { m_artist = ""; @@ -287,6 +355,7 @@ using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml")) { + UseID3 = xmlreader.GetValueAsBool("musicfiles", "showid3", true); 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; @@ -367,7 +436,66 @@ return base.OnMessage(message); } + protected override void OnPageLoad() + { + base.OnPageLoad(); + if (ImageChangeTimer == null) + { + ImageChangeTimer = new System.Timers.Timer(); + ImageChangeTimer.Interval = 3600 * 1000; + ImageChangeTimer.Elapsed += new ElapsedEventHandler(OnImageTimerTickEvent); + ImageChangeTimer.Start(); + } + + //if (g_Player.Playing) + //{ + // g_Player_PlayBackStarted(g_Player.MediaType.Music, g_Player.CurrentFile); + + // SetVisualizationWindow(); + //} + } + + private void OnImageTimerTickEvent(object trash_, ElapsedEventArgs args_) + { + FlipPictures(); + } + + private void FlipPictures() + { + //// Check if we should let the visualization window handle image flipping + //if (_usingBassEngine && _showVisualization) + // return; + + if (GUIelement_ImgCoverArt != null) + { + GUIelement_ImgCoverArt.FreeResources(); + if (ImagePathContainer.Count > 0) + { + if (ImagePathContainer.Count > 1) + { + int currentImage = 0; + // get the next image + foreach (string image in ImagePathContainer) + { + currentImage++; + if (GUIelement_ImgCoverArt.FileName == image) + break; + } + if (currentImage < ImagePathContainer.Count) + GUIelement_ImgCoverArt.SetFileName(ImagePathContainer[currentImage]); + else + // start loop again + GUIelement_ImgCoverArt.SetFileName(ImagePathContainer[0]); + } + else + GUIelement_ImgCoverArt.SetFileName(ImagePathContainer[0]); + } + GUIelement_ImgCoverArt.AllocResources(); + } + } + + public override void OnAction(Action action) { switch (action.wID) @@ -430,8 +558,235 @@ GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric, m_LyricText); } } + else if (selectedScreen == (int)MyLyricsSettings.Screen.LYRICS_BASIC || selectedScreen == (int)MyLyricsSettings.Screen.LRC_BASIC) + { + UpdateTrackPosition(); + } } + private void GetTrackTags() + { + bool isCurSongCdTrack = IsCdTrack(CurrentTrackFileName); + bool isNextSongCdTrack = IsCdTrack(NextTrackFileName); + MusicDatabase dbs = new MusicDatabase(); + + if (CurrentTrackTag != null) + PreviousTrackTag = CurrentTrackTag; + + if (!isCurSongCdTrack) + CurrentTrackTag = GetTrackTag(dbs, CurrentTrackFileName, UseID3); + + if (!isNextSongCdTrack) + NextTrackTag = GetTrackTag(dbs, NextTrackFileName, UseID3); + + if (isCurSongCdTrack || isNextSongCdTrack) + { + PlayList curPlaylist = PlaylistPlayer.GetPlaylist(PlayListType.PLAYLIST_MUSIC); + + int iCurItemIndex = PlaylistPlayer.CurrentSong; + PlayListItem curPlaylistItem = curPlaylist[iCurItemIndex]; + + if (curPlaylistItem == null) + { + CurrentTrackTag = null; + NextTrackTag = null; + return; + } + + int playListItemCount = curPlaylist.Count; + int nextItemIndex = 0; + + if (iCurItemIndex < playListItemCount - 1) + nextItemIndex = iCurItemIndex + 1; + + PlayListItem nextPlaylistItem = curPlaylist[nextItemIndex]; + + if (isCurSongCdTrack) + CurrentTrackTag = (MusicTag)curPlaylistItem.MusicTag; + + if (isNextSongCdTrack && nextPlaylistItem != null) + NextTrackTag = (MusicTag)nextPlaylistItem.MusicTag; + + // There's no MusicTag info in the Playlist so check is we have a valid + // GUIMusicFiles.MusicCD object + if ((CurrentTrackTag == null || NextTrackTag == null) && GUIMusicFiles.MusicCD != null) + { + int curCDTrackNum = GetCDATrackNumber(CurrentTrackFileName); + int nextCDTrackNum = GetCDATrackNumber(NextTrackFileName); + + if (curCDTrackNum < GUIMusicFiles.MusicCD.Tracks.Length) + { + MediaPortal.Freedb.CDTrackDetail curTrack = GUIMusicFiles.MusicCD.getTrack(curCDTrackNum); + CurrentTrackTag = GetTrackTag(curTrack); + } + if (nextCDTrackNum < GUIMusicFiles.MusicCD.Tracks.Length) + { + MediaPortal.Freedb.CDTrackDetail nextTrack = GUIMusicFiles.MusicCD.getTrack(nextCDTrackNum); + NextTrackTag = GetTrackTag(nextTrack); + } + } + } + } + + private bool IsCdTrack(string fileName) + { + return System.IO.Path.GetExtension(CurrentTrackFileName).ToLower() == ".cda"; + } + + int GetCDATrackNumber(string strFile) + { + string strTrack = string.Empty; + int pos = strFile.IndexOf(".cda"); + if (pos >= 0) + { + pos--; + while (Char.IsDigit(strFile[pos]) && pos > 0) + { + strTrack = strFile[pos] + strTrack; + pos--; + } + } + + try + { + int iTrack = Convert.ToInt32(strTrack); + return iTrack; + } + catch (Exception) + { + } + + return 1; + } + + private MusicTag GetTrackTag(MediaPortal.Freedb.CDTrackDetail cdTrack) + { + if (GUIMusicFiles.MusicCD == null) + return null; + MusicTag tag = new MusicTag(); + tag.Artist = GUIMusicFiles.MusicCD.Artist; + tag.Album = GUIMusicFiles.MusicCD.Title; + tag.Genre = GUIMusicFiles.MusicCD.Genre; + tag.Year = GUIMusicFiles.MusicCD.Year; + tag.Duration = cdTrack.Duration; + tag.Title = cdTrack.Title; + return tag; + } + + private MusicTag GetTrackTag(MusicDatabase dbs, string strFile, bool useID3) + { + MusicTag tag = null; + Song song = new Song(); + bool bFound = dbs.GetSongByFileName(strFile, ref song); + if (!bFound) + { + if (useID3) + tag = TagReader.ReadTag(strFile); + } + else + { + tag = new MusicTag(); + tag = BuildMusicTagFromSong(song); + } + return tag; + } + + private MusicTag BuildMusicTagFromSong(Song Song_) + { + MusicTag tmpTag = new MusicTag(); + + tmpTag.Title = Song_.Title; + tmpTag.Album = Song_.Album; + tmpTag.Artist = Song_.Artist; + tmpTag.Duration = Song_.Duration; + tmpTag.Genre = Song_.Genre; + tmpTag.Track = Song_.Track; + tmpTag.Year = Song_.Year; + tmpTag.Rating = Song_.Rating; + + return tmpTag; + } + + + private void UpdateImagePathContainer() + { + if (ImagePathContainer.Count <= 0) + { + try + { + GUIelement_ImgCoverArt.SetFileName(GUIGraphicsContext.Skin + @"\media\missing_coverart.png"); + } + catch (Exception ex) + { + Log.Debug("GUIMusicPlayingNow: could not set default image - {0}", ex.Message); + } + } + + if (g_Player.Duration > 0 && ImagePathContainer.Count > 1) + // ImageChangeTimer.Interval = (g_Player.Duration * 1000) / (ImagePathContainer.Count * 8); // change each cover 8x + ImageChangeTimer.Interval = 15 * 1000; // change covers every 15 seconds + else + ImageChangeTimer.Interval = 3600 * 1000; + + ImageChangeTimer.Stop(); + ImageChangeTimer.Start(); + } + + private bool AddImageToImagePathContainer(string newImage) + { + lock (_imageMutex) + { + string ImagePath = Convert.ToString(newImage); + if (ImagePath.IndexOf(@"missing_coverart") > 0)// && (ImagePathContainer.Count > 0)) + { + Log.Debug("GUIMusicPlayingNow: Found placeholder - not inserting image {0}", ImagePath); + return false; + } + + bool success = false; + if (ImagePathContainer != null) + { + if (ImagePathContainer.Contains(ImagePath)) + return false; + + //// check for placeholder + //int indexDel = 0; + //bool found = false; + //foreach (string pic in ImagePathContainer) + //{ + // indexDel++; + // if (pic.IndexOf("missing_coverart.png") > 0) + // { + // found = true; + // break; + // } + //} + //if (found) + // ImagePathContainer.RemoveAt(indexDel - 1); + + if (System.IO.File.Exists(ImagePath)) + { + try + { + Log.Debug("GUIMusicPlayingNow: adding image to container - {0}", ImagePath); + ImagePathContainer.Add(ImagePath); + success = true; + } + catch (Exception ex) + { + Log.Error("GUIMusicPlayingNow: error adding image ({0}) - {1}", ImagePath, ex.Message); + } + + // display the first pic automatically + if (ImagePathContainer.Count == 1) + FlipPictures(); + } + } + + return success; + } + } + //event driven handler to detect track change private void timeHandler(string tag2, string value) { @@ -456,17 +811,17 @@ /// </summary> /// <param name="tag"></param> - private void findLyric(MusicTag tag) + private void findLyric() { m_EventStopThread.Reset(); GUIControl.ClearControl(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric); GUIControl.SetControlLabel(GetID, (int)GUI_Lyrics_Controls.CONTROL_Lyric, ""); - if (tag != null && tag.Artist != "") + if (CurrentTrackTag != null && CurrentTrackTag.Artist != "") { - m_artist = tag.Artist.Trim(); - m_title = tag.Title.Trim(); + m_artist = CurrentTrackTag.Artist.Trim(); + m_title = CurrentTrackTag.Title.Trim(); m_TrackText = m_artist + " - " + m_title; m_StatusText = "Searching for a matching lyric..."; GUIControl.SetControlLabel(GetID, (int)GUI_General_Controls.CONTROL_LBStatus, m_StatusText); @@ -484,7 +839,7 @@ // 1) + 2) Check if LRC in music tag or Database string lyricText = MyLyrics.DatabaseUtil.LookUpLyricInDatabase(LyricsDB, m_artist, m_title); - if ((!tag.Lyrics.Equals("") && (lrc = new LRC.SimpleLRC(m_artist, m_title, tag.Lyrics)).IsValid) + if ((!CurrentTrackTag.Lyrics.Equals("") && (lrc = new LRC.SimpleLRC(m_artist, m_title, CurrentTrackTag.Lyrics)).IsValid) || (!lyricText.Equals("") && (lrc = new LRC.SimpleLRC(m_artist, m_title, lyricText)).IsValid)) { resetLrcFields(); @@ -546,9 +901,9 @@ } // 2) Lyric in music tag - else if (!tag.Lyrics.Equals("")) + else if (!CurrentTrackTag.Lyrics.Equals("")) { - ShowLyricOnScreen(tag.Lyrics, tag.FileName); + ShowLyricOnScreen(CurrentTrackTag.Lyrics, CurrentTrackTag.FileName); } // 3) if lyric in music database @@ -604,6 +959,14 @@ currentLRCLine = 0; ++tagRoundFinished; + + for (int i = 0; i < TAG_IN_ROUND; i++) + { + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_TIME + i, ""); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE + i, ""); + GUIControl.SetControlLabel(GetID, (int)GUI_LRC_Controls.CONTROL_EDIT_LINE_DONE + i, ""); + } + try { for (int i = 0; i < TAG_IN_ROUND && LRCLinesTotal + i < lines.Length; i++) @@ -619,7 +982,15 @@ } else { - MessageBox.Show("The lyric has now completely been converted into a lrc!"); + GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow( + (int)GUIWindow.Window.WINDOW_DIALOG_OK); + dlg.SetHeading("Creating of LRC"); + dlg.SetLine(1, "The lyric has been converted"); + dlg.SetLine(2, "to a LRC!"); + dlg.SetLine(3, String.Empty); + dlg.DoModal(GUIWindowManager.ActiveWindow); + + StringBuilder lyric = new StringBuilder(); for (int i = 0; i < lines.Length; i++) { @@ -651,6 +1022,22 @@ public void OnTimerEvent(object source, EventArgs e) { + if (shiftPageNextTime) + { + try + { + resetGUI(selectedScreen); + for (int i = 0; i < TAG_IN_ROUND; i++) + { + 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]); + } + } + catch { ;}; + } + GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE + currentLRCLine); GUIControl.ShowControl(GetID, (int)GUI_LRC_Controls.CONTROL_VIEW_LINE_DONE + currentLRCLine); @@ -663,18 +1050,7 @@ currentLRCLine = 0; ++tagRoundFinished; - try - { - resetGUI(selectedScreen); - for (int i = 0; i < TAG_IN_ROUND; i++) - { - 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]); - } - } - catch {;}; + shiftPageNextTime = true; } } @@ -838,6 +1214,7 @@ private void resetGUI(int screenID) { selectedScreen = screenID; + shiftPageNextTime = false; GUIPropertyManager.OnPropertyChanged -= new GUIPropertyManager.OnPropertyChangedHandler(trackChangeHandler); GUIPropertyManager.OnPropertyChanged -= new GUIPropertyManager.OnPropertyChangedHandler(timeHandler); @@ -975,7 +1352,7 @@ GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_ALBUMART); GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_PROGRESS); GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_ART_PROGRESSIMAGE); - + // LRC controls GUIControl.HideControl(GetID, (int)GUI_LRC_Controls.CONTROL_TAGBUTTON); @@ -1030,6 +1407,7 @@ } } + #region ILyricForm properties public Object[] UpdateString { Modified: trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj =================================================================== --- trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj 2007-04-14 04:44:03 UTC (rev 327) +++ trunk/plugins/MyLyrics/My Lyrics/MyLyrics.csproj 2007-04-14 14:28:15 UTC (rev 328) @@ -59,6 +59,10 @@ <SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\..\..\..\..\..\Program Files\Team Mediaportal\MediaPortal\Utils.DLL</HintPath> </Reference> + <Reference Include="WindowPlugins, Version=0.2.2.0, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\..\..\..\..\..\Program Files\Team Mediaportal\MediaPortal\Plugins\Windows\WindowPlugins.dll</HintPath> + </Reference> </ItemGroup> <ItemGroup> <Compile Include="Convert\ConvertFromXMLtoLyricsDatabase.cs" /> Modified: trunk/plugins/MyLyrics/MyLyrics.suo =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <an...@us...> - 2007-04-14 04:44:06
|
Revision: 327 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=327&view=rev Author: and-81 Date: 2007-04-13 21:44:03 -0700 (Fri, 13 Apr 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MCEReplacement/Forms/MacroEditor.cs trunk/plugins/MCEReplacement/Forms/MessageCommand.Designer.cs trunk/plugins/MCEReplacement/Forms/MessageCommand.cs trunk/plugins/MCEReplacement/Forms/MessageCommand.resx trunk/plugins/MCEReplacement/MCEReplacement.cs trunk/plugins/MCEReplacement/MCEReplacement.csproj Modified: trunk/plugins/MCEReplacement/Forms/MacroEditor.cs =================================================================== --- trunk/plugins/MCEReplacement/Forms/MacroEditor.cs 2007-04-14 03:44:42 UTC (rev 326) +++ trunk/plugins/MCEReplacement/Forms/MacroEditor.cs 2007-04-14 04:44:03 UTC (rev 327) @@ -18,30 +18,6 @@ public partial class MacroEditor : Form { - #region Constants - - public const string RunProgramText = "Run Program"; - public const string PauseText = "Pause"; - public const string SerialCommandText = "Serial Command"; - public const string MessageCommandText = "Message Command"; - public const string KeystrokesCommandText = "Keystrokes Command"; - public const string GoToScreenText = "Go To Screen"; - public const string PopupMessageText = "Popup Message"; - public const string ForceBlasterPortText = "Force Blaster Port"; - public const string ForceBlasterSpeedText = "Force Blaster Speed"; - public const string SetMultiMappingText = "Set Multi-Mapping"; - public const string SetMouseModeText = "Set Mouse Mode"; - public const string ToggleInputLayerText = "Toggle Input Handler Layer"; - public const string ChangeWindowStateText = "Change Window State"; - public const string GetFocusText = "Get Focus"; - public const string ExitCommandText = "Exit MediaPortal"; - public const string StandByCommandText = "Standby"; - public const string HibernateCommandText = "Hibernate"; - public const string RebootCommandText = "Reboot"; - public const string ShutdownCommandText = "Shutdown"; - - #endregion Constants - #region Variables MceIrApi.BlasterPort _blastPort; @@ -71,25 +47,25 @@ { comboBoxCommands.Items.Clear(); - comboBoxCommands.Items.Add(RunProgramText); - comboBoxCommands.Items.Add(PauseText); - comboBoxCommands.Items.Add(SerialCommandText); - comboBoxCommands.Items.Add(MessageCommandText); - comboBoxCommands.Items.Add(KeystrokesCommandText); - comboBoxCommands.Items.Add(GoToScreenText); - comboBoxCommands.Items.Add(PopupMessageText); - comboBoxCommands.Items.Add(ForceBlasterPortText); - comboBoxCommands.Items.Add(ForceBlasterSpeedText); - comboBoxCommands.Items.Add(SetMultiMappingText); - comboBoxCommands.Items.Add(SetMouseModeText); - comboBoxCommands.Items.Add(ToggleInputLayerText); - comboBoxCommands.Items.Add(ChangeWindowStateText); - comboBoxCommands.Items.Add(GetFocusText); - comboBoxCommands.Items.Add(ExitCommandText); - comboBoxCommands.Items.Add(StandByCommandText); - comboBoxCommands.Items.Add(HibernateCommandText); - comboBoxCommands.Items.Add(RebootCommandText); - comboBoxCommands.Items.Add(ShutdownCommandText); + comboBoxCommands.Items.Add(MCEReplacement.RunProgramText); + comboBoxCommands.Items.Add(MCEReplacement.PauseText); + comboBoxCommands.Items.Add(MCEReplacement.SerialCommandText); + comboBoxCommands.Items.Add(MCEReplacement.MessageCommandText); + comboBoxCommands.Items.Add(MCEReplacement.KeystrokesCommandText); + comboBoxCommands.Items.Add(MCEReplacement.GoToScreenText); + comboBoxCommands.Items.Add(MCEReplacement.PopupMessageText); + comboBoxCommands.Items.Add(MCEReplacement.ForceBlasterPortText); + comboBoxCommands.Items.Add(MCEReplacement.ForceBlasterSpeedText); + comboBoxCommands.Items.Add(MCEReplacement.SetMultiMappingText); + comboBoxCommands.Items.Add(MCEReplacement.SetMouseModeText); + comboBoxCommands.Items.Add(MCEReplacement.ToggleInputLayerText); + //comboBoxCommands.Items.Add(MCEReplacement.ChangeWindowStateText); + comboBoxCommands.Items.Add(MCEReplacement.GetFocusText); + comboBoxCommands.Items.Add(MCEReplacement.ExitCommandText); + comboBoxCommands.Items.Add(MCEReplacement.StandByCommandText); + comboBoxCommands.Items.Add(MCEReplacement.HibernateCommandText); + comboBoxCommands.Items.Add(MCEReplacement.RebootCommandText); + comboBoxCommands.Items.Add(MCEReplacement.ShutdownCommandText); comboBoxCommands.Items.AddRange(MCEReplacement.GetIRList()); } @@ -178,11 +154,13 @@ writer.WriteAttributeString("command", MCEReplacement.InputLayerMacroText); writer.WriteAttributeString("cmdproperty", "TOGGLE"); } + /* else if (item.StartsWith(MCEReplacement.WindowStateCommand)) { writer.WriteAttributeString("command", MCEReplacement.WindowStateMacroText); writer.WriteAttributeString("cmdproperty", "TOGGLE"); } + */ else if (item.StartsWith(MCEReplacement.GetFocusCommand)) { writer.WriteAttributeString("command", MCEReplacement.GetFocusMacroText); @@ -300,11 +278,11 @@ case MCEReplacement.InputLayerMacroText: listBoxMacro.Items.Add(MCEReplacement.InputLayerCommand); break; - +/* case MCEReplacement.WindowStateMacroText: listBoxMacro.Items.Add(MCEReplacement.WindowStateCommand); break; - +*/ case MCEReplacement.GetFocusMacroText: listBoxMacro.Items.Add(MCEReplacement.GetFocusCommand); break; @@ -352,7 +330,7 @@ string selected = (string)comboBoxCommands.SelectedItem; - if (selected == RunProgramText) + if (selected == MCEReplacement.RunProgramText) { ExternalProgram externalProgram = new ExternalProgram(); @@ -361,7 +339,7 @@ listBoxMacro.Items.Add(MCEReplacement.RunCommandPrefix + externalProgram.CommandString); } - else if (selected == PauseText) + else if (selected == MCEReplacement.PauseText) { PauseTime pauseTime = new PauseTime(); @@ -370,7 +348,7 @@ listBoxMacro.Items.Add(MCEReplacement.PauseCommandPrefix + pauseTime.Time.ToString()); } - else if (selected == SerialCommandText) + else if (selected == MCEReplacement.SerialCommandText) { SerialCommand serialCommand = new SerialCommand(); if (serialCommand.ShowDialog(this) == DialogResult.Cancel) @@ -378,7 +356,7 @@ listBoxMacro.Items.Add(MCEReplacement.SerialCommandPrefix + serialCommand.CommandString); } - else if (selected == MessageCommandText) + else if (selected == MCEReplacement.MessageCommandText) { MessageCommand messageCommand = new MessageCommand(); if (messageCommand.ShowDialog(this) == DialogResult.Cancel) @@ -386,7 +364,7 @@ listBoxMacro.Items.Add(MCEReplacement.MessageCommandPrefix + messageCommand.CommandString); } - else if (selected == KeystrokesCommandText) + else if (selected == MCEReplacement.KeystrokesCommandText) { KeysCommand keysCommand = new KeysCommand(); if (keysCommand.ShowDialog(this) == DialogResult.Cancel) @@ -394,7 +372,7 @@ listBoxMacro.Items.Add(MCEReplacement.KeyCommandPrefix + keysCommand.CommandString); } - else if (selected == GoToScreenText) + else if (selected == MCEReplacement.GoToScreenText) { GoToScreen goToScreen = new GoToScreen(); if (goToScreen.ShowDialog(this) == DialogResult.Cancel) @@ -402,7 +380,7 @@ listBoxMacro.Items.Add(MCEReplacement.GoToCommandPrefix + goToScreen.Screen); } - else if (selected == PopupMessageText) + else if (selected == MCEReplacement.PopupMessageText) { PopupMessage popupMessage = new PopupMessage(); if (popupMessage.ShowDialog(this) == DialogResult.Cancel) @@ -410,7 +388,7 @@ listBoxMacro.Items.Add(MCEReplacement.PopupCommandPrefix + popupMessage.CommandString); } - else if (selected == ForceBlasterPortText) + else if (selected == MCEReplacement.ForceBlasterPortText) { SelectBlasterPort selectBlasterPort = new SelectBlasterPort(_blastPort); if (selectBlasterPort.ShowDialog(this) == DialogResult.Cancel) @@ -418,7 +396,7 @@ listBoxMacro.Items.Add(MCEReplacement.PortCommandPrefix + selectBlasterPort.CommandString); } - else if (selected == ForceBlasterSpeedText) + else if (selected == MCEReplacement.ForceBlasterSpeedText) { SelectBlasterSpeed selectBlasterSpeed = new SelectBlasterSpeed(_blastSpeed); if (selectBlasterSpeed.ShowDialog(this) == DialogResult.Cancel) @@ -426,7 +404,7 @@ listBoxMacro.Items.Add(MCEReplacement.SpeedCommandPrefix + selectBlasterSpeed.CommandString); } - else if (selected == SetMultiMappingText) + else if (selected == MCEReplacement.SetMultiMappingText) { //SelectBlasterSpeed selectBlasterSpeed = new SelectBlasterSpeed(_blastSpeed); //if (selectBlasterSpeed.ShowDialog(this) == DialogResult.Cancel) @@ -434,7 +412,7 @@ listBoxMacro.Items.Add(MCEReplacement.SetMapCommandPrefix + "TOGGLE"); } - else if (selected == SetMouseModeText) + else if (selected == MCEReplacement.SetMouseModeText) { //SelectBlasterSpeed selectBlasterSpeed = new SelectBlasterSpeed(_blastSpeed); //if (selectBlasterSpeed.ShowDialog(this) == DialogResult.Cancel) @@ -442,35 +420,37 @@ listBoxMacro.Items.Add(MCEReplacement.SetMouseCommandPrefix + "TOGGLE"); } - else if (selected == ToggleInputLayerText) + else if (selected == MCEReplacement.ToggleInputLayerText) { listBoxMacro.Items.Add(MCEReplacement.InputLayerCommand); } - else if (selected == ChangeWindowStateText) + /* + else if (selected == MCEReplacement.ChangeWindowStateText) { listBoxMacro.Items.Add(MCEReplacement.WindowStateCommand); } - else if (selected == GetFocusText) + */ + else if (selected == MCEReplacement.GetFocusText) { listBoxMacro.Items.Add(MCEReplacement.GetFocusCommand); } - else if (selected == ExitCommandText) + else if (selected == MCEReplacement.ExitCommandText) { listBoxMacro.Items.Add(MCEReplacement.ExitCommand); } - else if (selected == StandByCommandText) + else if (selected == MCEReplacement.StandByCommandText) { listBoxMacro.Items.Add(MCEReplacement.StandByCommand); } - else if (selected == HibernateCommandText) + else if (selected == MCEReplacement.HibernateCommandText) { listBoxMacro.Items.Add(MCEReplacement.HibernateCommand); } - else if (selected == RebootCommandText) + else if (selected == MCEReplacement.RebootCommandText) { listBoxMacro.Items.Add(MCEReplacement.RebootCommand); } - else if (selected == ShutdownCommandText) + else if (selected == MCEReplacement.ShutdownCommandText) { listBoxMacro.Items.Add(MCEReplacement.ShutdownCommand); } Modified: trunk/plugins/MCEReplacement/Forms/MessageCommand.Designer.cs =================================================================== --- trunk/plugins/MCEReplacement/Forms/MessageCommand.Designer.cs 2007-04-14 03:44:42 UTC (rev 326) +++ trunk/plugins/MCEReplacement/Forms/MessageCommand.Designer.cs 2007-04-14 04:44:03 UTC (rev 327) @@ -31,10 +31,8 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - this.checkBoxMsgCurrApp = new System.Windows.Forms.CheckBox(); - this.labelMsgApp = new System.Windows.Forms.Label(); - this.buttonFindMsgApp = new System.Windows.Forms.Button(); - this.textBoxMsgApp = new System.Windows.Forms.TextBox(); + this.buttonFindMsgTarget = new System.Windows.Forms.Button(); + this.textBoxMsgTarget = new System.Windows.Forms.TextBox(); this.numericUpDownLParam = new System.Windows.Forms.NumericUpDown(); this.numericUpDownWParam = new System.Windows.Forms.NumericUpDown(); this.numericUpDownMsg = new System.Windows.Forms.NumericUpDown(); @@ -46,93 +44,85 @@ this.labelMessage = new System.Windows.Forms.Label(); this.buttonCancel = new System.Windows.Forms.Button(); this.buttonOK = new System.Windows.Forms.Button(); + this.groupBoxTarget = new System.Windows.Forms.GroupBox(); + this.groupBoxDetails = new System.Windows.Forms.GroupBox(); + this.toolTip = new System.Windows.Forms.ToolTip(this.components); + this.radioButtonActiveWindow = new System.Windows.Forms.RadioButton(); + this.radioButtonApplication = new System.Windows.Forms.RadioButton(); + this.radioButtonClass = new System.Windows.Forms.RadioButton(); + this.radioButtonWindowTitle = new System.Windows.Forms.RadioButton(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownLParam)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownWParam)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMsg)).BeginInit(); this.contextMenuStripWM.SuspendLayout(); + this.groupBoxTarget.SuspendLayout(); + this.groupBoxDetails.SuspendLayout(); this.SuspendLayout(); // - // checkBoxMsgCurrApp + // buttonFindMsgTarget // - this.checkBoxMsgCurrApp.Location = new System.Drawing.Point(96, 32); - this.checkBoxMsgCurrApp.Name = "checkBoxMsgCurrApp"; - this.checkBoxMsgCurrApp.Size = new System.Drawing.Size(160, 16); - this.checkBoxMsgCurrApp.TabIndex = 3; - this.checkBoxMsgCurrApp.Text = "Send to active window"; - this.checkBoxMsgCurrApp.UseVisualStyleBackColor = true; - this.checkBoxMsgCurrApp.CheckedChanged += new System.EventHandler(this.checkBoxMsgCurrApp_CheckedChanged); + this.buttonFindMsgTarget.Location = new System.Drawing.Point(240, 80); + this.buttonFindMsgTarget.Name = "buttonFindMsgTarget"; + this.buttonFindMsgTarget.Size = new System.Drawing.Size(24, 20); + this.buttonFindMsgTarget.TabIndex = 5; + this.buttonFindMsgTarget.Text = "..."; + this.toolTip.SetToolTip(this.buttonFindMsgTarget, "Locate a target for the message"); + this.buttonFindMsgTarget.UseVisualStyleBackColor = true; + this.buttonFindMsgTarget.Click += new System.EventHandler(this.buttonFindMsgApp_Click); // - // labelMsgApp + // textBoxMsgTarget // - this.labelMsgApp.Location = new System.Drawing.Point(8, 8); - this.labelMsgApp.Name = "labelMsgApp"; - this.labelMsgApp.Size = new System.Drawing.Size(88, 20); - this.labelMsgApp.TabIndex = 0; - this.labelMsgApp.Text = "Application:"; - this.labelMsgApp.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.textBoxMsgTarget.Location = new System.Drawing.Point(8, 80); + this.textBoxMsgTarget.Name = "textBoxMsgTarget"; + this.textBoxMsgTarget.Size = new System.Drawing.Size(224, 20); + this.textBoxMsgTarget.TabIndex = 4; + this.toolTip.SetToolTip(this.textBoxMsgTarget, "Message target"); // - // buttonFindMsgApp - // - this.buttonFindMsgApp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.buttonFindMsgApp.Location = new System.Drawing.Point(352, 8); - this.buttonFindMsgApp.Name = "buttonFindMsgApp"; - this.buttonFindMsgApp.Size = new System.Drawing.Size(24, 20); - this.buttonFindMsgApp.TabIndex = 2; - this.buttonFindMsgApp.Text = "..."; - this.buttonFindMsgApp.UseVisualStyleBackColor = true; - this.buttonFindMsgApp.Click += new System.EventHandler(this.buttonFindMsgApp_Click); - // - // textBoxMsgApp - // - this.textBoxMsgApp.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.textBoxMsgApp.Location = new System.Drawing.Point(96, 8); - this.textBoxMsgApp.Name = "textBoxMsgApp"; - this.textBoxMsgApp.Size = new System.Drawing.Size(248, 20); - this.textBoxMsgApp.TabIndex = 1; - // // numericUpDownLParam // - this.numericUpDownLParam.Location = new System.Drawing.Point(96, 128); + this.numericUpDownLParam.Location = new System.Drawing.Point(144, 88); this.numericUpDownLParam.Maximum = new decimal(new int[] { -1, 0, 0, 0}); this.numericUpDownLParam.Name = "numericUpDownLParam"; - this.numericUpDownLParam.Size = new System.Drawing.Size(104, 20); - this.numericUpDownLParam.TabIndex = 9; + this.numericUpDownLParam.Size = new System.Drawing.Size(120, 20); + this.numericUpDownLParam.TabIndex = 5; this.numericUpDownLParam.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.numericUpDownLParam.ThousandsSeparator = true; + this.toolTip.SetToolTip(this.numericUpDownLParam, "Long Parameter (or LParam)"); // // numericUpDownWParam // - this.numericUpDownWParam.Location = new System.Drawing.Point(96, 96); + this.numericUpDownWParam.Location = new System.Drawing.Point(144, 56); this.numericUpDownWParam.Maximum = new decimal(new int[] { -1, 0, 0, 0}); this.numericUpDownWParam.Name = "numericUpDownWParam"; - this.numericUpDownWParam.Size = new System.Drawing.Size(104, 20); - this.numericUpDownWParam.TabIndex = 7; + this.numericUpDownWParam.Size = new System.Drawing.Size(120, 20); + this.numericUpDownWParam.TabIndex = 3; this.numericUpDownWParam.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.numericUpDownWParam.ThousandsSeparator = true; + this.toolTip.SetToolTip(this.numericUpDownWParam, "Word Paramater (or WParam)"); // // numericUpDownMsg // this.numericUpDownMsg.ContextMenuStrip = this.contextMenuStripWM; - this.numericUpDownMsg.Location = new System.Drawing.Point(96, 64); + this.numericUpDownMsg.Location = new System.Drawing.Point(144, 24); this.numericUpDownMsg.Maximum = new decimal(new int[] { -1, 0, 0, 0}); this.numericUpDownMsg.Name = "numericUpDownMsg"; - this.numericUpDownMsg.Size = new System.Drawing.Size(104, 20); - this.numericUpDownMsg.TabIndex = 5; + this.numericUpDownMsg.Size = new System.Drawing.Size(120, 20); + this.numericUpDownMsg.TabIndex = 1; this.numericUpDownMsg.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.numericUpDownMsg.ThousandsSeparator = true; + this.toolTip.SetToolTip(this.numericUpDownMsg, "Message identifier"); // // contextMenuStripWM // @@ -158,28 +148,28 @@ // // labelLParam // - this.labelLParam.Location = new System.Drawing.Point(8, 128); + this.labelLParam.Location = new System.Drawing.Point(8, 88); this.labelLParam.Name = "labelLParam"; - this.labelLParam.Size = new System.Drawing.Size(88, 20); - this.labelLParam.TabIndex = 8; + this.labelLParam.Size = new System.Drawing.Size(128, 20); + this.labelLParam.TabIndex = 4; this.labelLParam.Text = "Long Param:"; this.labelLParam.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // labelWParam // - this.labelWParam.Location = new System.Drawing.Point(8, 96); + this.labelWParam.Location = new System.Drawing.Point(8, 56); this.labelWParam.Name = "labelWParam"; - this.labelWParam.Size = new System.Drawing.Size(88, 20); - this.labelWParam.TabIndex = 6; + this.labelWParam.Size = new System.Drawing.Size(128, 20); + this.labelWParam.TabIndex = 2; this.labelWParam.Text = "Word Param:"; this.labelWParam.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // labelMessage // - this.labelMessage.Location = new System.Drawing.Point(8, 64); + this.labelMessage.Location = new System.Drawing.Point(8, 24); this.labelMessage.Name = "labelMessage"; - this.labelMessage.Size = new System.Drawing.Size(88, 20); - this.labelMessage.TabIndex = 4; + this.labelMessage.Size = new System.Drawing.Size(128, 20); + this.labelMessage.TabIndex = 0; this.labelMessage.Text = "Message:"; this.labelMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // @@ -187,10 +177,10 @@ // this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(312, 152); + this.buttonCancel.Location = new System.Drawing.Point(216, 256); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(64, 24); - this.buttonCancel.TabIndex = 11; + this.buttonCancel.TabIndex = 3; this.buttonCancel.Text = "Cancel"; this.buttonCancel.UseVisualStyleBackColor = true; this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); @@ -198,35 +188,104 @@ // buttonOK // this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.buttonOK.Location = new System.Drawing.Point(240, 152); + this.buttonOK.Location = new System.Drawing.Point(144, 256); this.buttonOK.Name = "buttonOK"; this.buttonOK.Size = new System.Drawing.Size(64, 24); - this.buttonOK.TabIndex = 10; + this.buttonOK.TabIndex = 2; this.buttonOK.Text = "OK"; this.buttonOK.UseVisualStyleBackColor = true; this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click); // + // groupBoxTarget + // + this.groupBoxTarget.Controls.Add(this.radioButtonWindowTitle); + this.groupBoxTarget.Controls.Add(this.radioButtonClass); + this.groupBoxTarget.Controls.Add(this.radioButtonApplication); + this.groupBoxTarget.Controls.Add(this.radioButtonActiveWindow); + this.groupBoxTarget.Controls.Add(this.textBoxMsgTarget); + this.groupBoxTarget.Controls.Add(this.buttonFindMsgTarget); + this.groupBoxTarget.Location = new System.Drawing.Point(8, 8); + this.groupBoxTarget.Name = "groupBoxTarget"; + this.groupBoxTarget.Size = new System.Drawing.Size(272, 112); + this.groupBoxTarget.TabIndex = 0; + this.groupBoxTarget.TabStop = false; + this.groupBoxTarget.Text = "Target"; + // + // groupBoxDetails + // + this.groupBoxDetails.Controls.Add(this.labelMessage); + this.groupBoxDetails.Controls.Add(this.labelWParam); + this.groupBoxDetails.Controls.Add(this.labelLParam); + this.groupBoxDetails.Controls.Add(this.numericUpDownMsg); + this.groupBoxDetails.Controls.Add(this.numericUpDownWParam); + this.groupBoxDetails.Controls.Add(this.numericUpDownLParam); + this.groupBoxDetails.Location = new System.Drawing.Point(8, 128); + this.groupBoxDetails.Name = "groupBoxDetails"; + this.groupBoxDetails.Size = new System.Drawing.Size(272, 120); + this.groupBoxDetails.TabIndex = 1; + this.groupBoxDetails.TabStop = false; + this.groupBoxDetails.Text = "Message Details"; + // + // radioButtonActiveWindow + // + this.radioButtonActiveWindow.Location = new System.Drawing.Point(8, 24); + this.radioButtonActiveWindow.Name = "radioButtonActiveWindow"; + this.radioButtonActiveWindow.Size = new System.Drawing.Size(112, 16); + this.radioButtonActiveWindow.TabIndex = 0; + this.radioButtonActiveWindow.Text = "Active window"; + this.toolTip.SetToolTip(this.radioButtonActiveWindow, "Send the message to the active window"); + this.radioButtonActiveWindow.UseVisualStyleBackColor = true; + this.radioButtonActiveWindow.CheckedChanged += new System.EventHandler(this.radioButtonActiveWindow_CheckedChanged); + // + // radioButtonApplication + // + this.radioButtonApplication.Location = new System.Drawing.Point(152, 24); + this.radioButtonApplication.Name = "radioButtonApplication"; + this.radioButtonApplication.Size = new System.Drawing.Size(112, 16); + this.radioButtonApplication.TabIndex = 1; + this.radioButtonApplication.TabStop = true; + this.radioButtonApplication.Text = "Application"; + this.toolTip.SetToolTip(this.radioButtonApplication, "Send the message to the specified application"); + this.radioButtonApplication.UseVisualStyleBackColor = true; + this.radioButtonApplication.CheckedChanged += new System.EventHandler(this.radioButtonApplication_CheckedChanged); + // + // radioButtonClass + // + this.radioButtonClass.Location = new System.Drawing.Point(8, 48); + this.radioButtonClass.Name = "radioButtonClass"; + this.radioButtonClass.Size = new System.Drawing.Size(112, 16); + this.radioButtonClass.TabIndex = 2; + this.radioButtonClass.TabStop = true; + this.radioButtonClass.Text = "Class"; + this.toolTip.SetToolTip(this.radioButtonClass, "Send the message to the specified class"); + this.radioButtonClass.UseVisualStyleBackColor = true; + this.radioButtonClass.CheckedChanged += new System.EventHandler(this.radioButtonClass_CheckedChanged); + // + // radioButtonWindowTitle + // + this.radioButtonWindowTitle.Location = new System.Drawing.Point(152, 48); + this.radioButtonWindowTitle.Name = "radioButtonWindowTitle"; + this.radioButtonWindowTitle.Size = new System.Drawing.Size(112, 16); + this.radioButtonWindowTitle.TabIndex = 3; + this.radioButtonWindowTitle.TabStop = true; + this.radioButtonWindowTitle.Text = "Window title"; + this.toolTip.SetToolTip(this.radioButtonWindowTitle, "Send the message to the window with the specified title"); + this.radioButtonWindowTitle.UseVisualStyleBackColor = true; + this.radioButtonWindowTitle.CheckedChanged += new System.EventHandler(this.radioButtonWindowTitle_CheckedChanged); + // // MessageCommand // this.AcceptButton = this.buttonOK; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.CancelButton = this.buttonCancel; - this.ClientSize = new System.Drawing.Size(384, 185); - this.Controls.Add(this.checkBoxMsgCurrApp); + this.ClientSize = new System.Drawing.Size(288, 288); + this.Controls.Add(this.groupBoxDetails); + this.Controls.Add(this.groupBoxTarget); this.Controls.Add(this.buttonCancel); this.Controls.Add(this.buttonOK); - this.Controls.Add(this.labelMsgApp); - this.Controls.Add(this.buttonFindMsgApp); - this.Controls.Add(this.textBoxMsgApp); - this.Controls.Add(this.numericUpDownLParam); - this.Controls.Add(this.numericUpDownWParam); - this.Controls.Add(this.numericUpDownMsg); - this.Controls.Add(this.labelLParam); - this.Controls.Add(this.labelWParam); - this.Controls.Add(this.labelMessage); this.MinimizeBox = false; - this.MinimumSize = new System.Drawing.Size(392, 212); + this.MinimumSize = new System.Drawing.Size(296, 322); this.Name = "MessageCommand"; this.ShowIcon = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; @@ -235,17 +294,17 @@ ((System.ComponentModel.ISupportInitialize)(this.numericUpDownWParam)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDownMsg)).EndInit(); this.contextMenuStripWM.ResumeLayout(false); + this.groupBoxTarget.ResumeLayout(false); + this.groupBoxTarget.PerformLayout(); + this.groupBoxDetails.ResumeLayout(false); this.ResumeLayout(false); - this.PerformLayout(); } #endregion - private System.Windows.Forms.CheckBox checkBoxMsgCurrApp; - private System.Windows.Forms.Label labelMsgApp; - private System.Windows.Forms.Button buttonFindMsgApp; - private System.Windows.Forms.TextBox textBoxMsgApp; + private System.Windows.Forms.Button buttonFindMsgTarget; + private System.Windows.Forms.TextBox textBoxMsgTarget; private System.Windows.Forms.NumericUpDown numericUpDownLParam; private System.Windows.Forms.NumericUpDown numericUpDownWParam; private System.Windows.Forms.NumericUpDown numericUpDownMsg; @@ -257,6 +316,13 @@ private System.Windows.Forms.ContextMenuStrip contextMenuStripWM; private System.Windows.Forms.ToolStripMenuItem wMAPPToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem wMUSERToolStripMenuItem; + private System.Windows.Forms.GroupBox groupBoxTarget; + private System.Windows.Forms.GroupBox groupBoxDetails; + private System.Windows.Forms.ToolTip toolTip; + private System.Windows.Forms.RadioButton radioButtonActiveWindow; + private System.Windows.Forms.RadioButton radioButtonWindowTitle; + private System.Windows.Forms.RadioButton radioButtonClass; + private System.Windows.Forms.RadioButton radioButtonApplication; } } Modified: trunk/plugins/MCEReplacement/Forms/MessageCommand.cs =================================================================== --- trunk/plugins/MCEReplacement/Forms/MessageCommand.cs 2007-04-14 03:44:42 UTC (rev 326) +++ trunk/plugins/MCEReplacement/Forms/MessageCommand.cs 2007-04-14 04:44:03 UTC (rev 327) @@ -19,8 +19,29 @@ { get { - return string.Format("{0}|{1}|{2}|{3}", - checkBoxMsgCurrApp.Checked ? "*" : textBoxMsgApp.Text, + string target = "error"; + + if (radioButtonActiveWindow.Checked) + { + target = "active"; + textBoxMsgTarget.Text = "*"; + } + else if (radioButtonApplication.Checked) + { + target = "application"; + } + else if (radioButtonClass.Checked) + { + target = "class"; + } + else if (radioButtonWindowTitle.Checked) + { + target = "window"; + } + + return string.Format("{0}|{1}|{2}|{3}|{4}", + target, + textBoxMsgTarget.Text, numericUpDownMsg.Value.ToString(), numericUpDownWParam.Value.ToString(), numericUpDownLParam.Value.ToString()); @@ -31,27 +52,33 @@ #region Constructors - public MessageCommand() : this(null) { } + public MessageCommand() : this(new string[] { "active", "", "32768", "0", "0" }) { } public MessageCommand(string[] commands) { InitializeComponent(); if (commands != null) { - if (commands[0] == "*") + switch (commands[0].ToLowerInvariant()) { - checkBoxMsgCurrApp.Checked = true; - textBoxMsgApp.Text = ""; + case "active": + radioButtonActiveWindow.Checked = true; + break; + case "application": + radioButtonApplication.Checked = true; + break; + case "class": + radioButtonClass.Checked = true; + break; + case "window": + radioButtonWindowTitle.Checked = true; + break; } - else - { - checkBoxMsgCurrApp.Checked = false; - textBoxMsgApp.Text = commands[0]; - } - numericUpDownMsg.Value = decimal.Parse(commands[1]); - numericUpDownWParam.Value = decimal.Parse(commands[2]); - numericUpDownLParam.Value = decimal.Parse(commands[3]); + textBoxMsgTarget.Text = commands[1]; + numericUpDownMsg.Value = decimal.Parse(commands[2]); + numericUpDownWParam.Value = decimal.Parse(commands[3]); + numericUpDownLParam.Value = decimal.Parse(commands[4]); } } @@ -59,13 +86,24 @@ private void buttonFindMsgApp_Click(object sender, EventArgs e) { - OpenFileDialog find = new OpenFileDialog(); - find.Filter = "All files|*.*"; - find.Multiselect = false; - find.Title = "Application to send message to"; + if (radioButtonApplication.Checked) + { + OpenFileDialog find = new OpenFileDialog(); + find.Filter = "All files|*.*"; + find.Multiselect = false; + find.Title = "Application to send message to"; - if (find.ShowDialog(this) == DialogResult.OK) - textBoxMsgApp.Text = find.FileName; + if (find.ShowDialog(this) == DialogResult.OK) + textBoxMsgTarget.Text = find.FileName; + } + /* + else if (radioButtonClass.Checked) + { + } + else if (radioButtonWindowTitle.Checked) + { + } + */ } private void buttonOK_Click(object sender, EventArgs e) @@ -84,17 +122,31 @@ { numericUpDownMsg.Value = new decimal(Win32.WM_APP); } - private void wMUSERToolStripMenuItem_Click(object sender, EventArgs e) { numericUpDownMsg.Value = new decimal(Win32.WM_USER); } - private void checkBoxMsgCurrApp_CheckedChanged(object sender, EventArgs e) + private void radioButtonActiveWindow_CheckedChanged(object sender, EventArgs e) { - textBoxMsgApp.Enabled = !checkBoxMsgCurrApp.Checked; - buttonFindMsgApp.Enabled = !checkBoxMsgCurrApp.Checked; + buttonFindMsgTarget.Enabled = false; + textBoxMsgTarget.Enabled = false; } + private void radioButtonApplication_CheckedChanged(object sender, EventArgs e) + { + buttonFindMsgTarget.Enabled = true; + textBoxMsgTarget.Enabled = true; + } + private void radioButtonClass_CheckedChanged(object sender, EventArgs e) + { + buttonFindMsgTarget.Enabled = false; + textBoxMsgTarget.Enabled = true; + } + private void radioButtonWindowTitle_CheckedChanged(object sender, EventArgs e) + { + buttonFindMsgTarget.Enabled = false; + textBoxMsgTarget.Enabled = true; + } } Modified: trunk/plugins/MCEReplacement/Forms/MessageCommand.resx =================================================================== --- trunk/plugins/MCEReplacement/Forms/MessageCommand.resx 2007-04-14 03:44:42 UTC (rev 326) +++ trunk/plugins/MCEReplacement/Forms/MessageCommand.resx 2007-04-14 04:44:03 UTC (rev 327) @@ -117,7 +117,13 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>174, 17</value> + </metadata> <metadata name="contextMenuStripWM.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> + <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>174, 17</value> + </metadata> </root> \ No newline at end of file Modified: trunk/plugins/MCEReplacement/MCEReplacement.cs =================================================================== --- trunk/plugins/MCEReplacement/MCEReplacement.cs 2007-04-14 03:44:42 UTC (rev 326) +++ trunk/plugins/MCEReplacement/MCEReplacement.cs 2007-04-14 04:44:03 UTC (rev 327) @@ -52,7 +52,7 @@ public const string SetMapCommandPrefix = "Multi-Mapping: "; public const string SetMouseCommandPrefix = "Mouse Mode: "; public const string InputLayerCommand = "Toggle Input Layer"; - public const string WindowStateCommand = "Toggle Window State"; + //public const string WindowStateCommand = "Toggle Window State"; public const string GetFocusCommand = "Get Focus"; public const string ExitCommand = "Exit MediaPortal"; public const string StandByCommand = "Standby"; @@ -74,7 +74,7 @@ public const string MapMacroText = "MULTI_MAPPING"; public const string MouseMacroText = "MOUSE_MODE"; public const string InputLayerMacroText = "INPUT_LAYER"; - public const string WindowStateMacroText = "WINDOW_STATE"; + //public const string WindowStateMacroText = "WINDOW_STATE"; public const string GetFocusMacroText = "GET_FOCUS"; public const string ExitMacroText = "EXIT"; public const string StandbyMacroText = "STANDBY"; @@ -82,6 +82,27 @@ public const string RebootMacroText = "REBOOT"; public const string ShutdownMacroText = "SHUTDOWN"; + // English text for Macro commands + public const string RunProgramText = "Run Program"; + public const string PauseText = "Pause"; + public const string SerialCommandText = "Serial Command"; + public const string MessageCommandText = "Message Command"; + public const string KeystrokesCommandText = "Keystrokes Command"; + public const string GoToScreenText = "Go To Screen"; + public const string PopupMessageText = "Popup Message"; + public const string ForceBlasterPortText = "Force Blaster Port"; + public const string ForceBlasterSpeedText = "Force Blaster Speed"; + public const string SetMultiMappingText = "Set Multi-Mapping"; + public const string SetMouseModeText = "Set Mouse Mode"; + public const string ToggleInputLayerText = "Toggle Input Handler Layer"; + //public const string ChangeWindowStateText = "Change Window State"; + public const string GetFocusText = "Get Focus"; + public const string ExitCommandText = "Exit MediaPortal"; + public const string StandByCommandText = "Standby"; + public const string HibernateCommandText = "Hibernate"; + public const string RebootCommandText = "Reboot"; + public const string ShutdownCommandText = "Shutdown"; + public static readonly string AppDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\MediaPortal MCE Replacement Plugin\\"; @@ -1697,7 +1718,7 @@ break; } - +/* case WindowStateMacroText: { if (InConfiguration) @@ -1714,7 +1735,7 @@ GUIWindowManager.SendMessage(msg); break; } - +*/ case GetFocusMacroText: { if (InConfiguration) @@ -2179,7 +2200,7 @@ string[] commands = messageCommand.Split(new char[] { '|' }, StringSplitOptions.None); - if (commands.Length != 4) + if (commands.Length != 5) { Log.Error("MCEReplacement: Message command structure is invalid: {0}", messageCommand); return null; @@ -2207,34 +2228,36 @@ { IntPtr windowHandle = IntPtr.Zero; - if (commands[0] == "*") + switch (commands[0].ToLowerInvariant()) { - windowHandle = Win32.GetForegroundWindow(); - } - else - { - foreach (Process proc in Process.GetProcesses()) - { - try + case "active": + windowHandle = Win32.GetForegroundWindow(); + break; + + case "application": + foreach (Process proc in Process.GetProcesses()) { - if (proc.MainModule.FileName == commands[0]) + try { - windowHandle = proc.MainWindowHandle; - break; + if (proc.MainModule.FileName == commands[1]) + { + windowHandle = proc.MainWindowHandle; + break; + } } + catch + { + } } - catch - { - } - } - - // if it wasn't an application, try a class - if (windowHandle == IntPtr.Zero) - windowHandle = Win32.FindWindow(commands[0], null); - - // if still not found, try window title - if (windowHandle == IntPtr.Zero) - windowHandle = Win32.FindWindow(null, commands[0]); + break; + + case "class": + windowHandle = Win32.FindWindow(commands[1], null); + break; + + case "window": + windowHandle = Win32.FindWindow(null, commands[1]); + break; } if (windowHandle == IntPtr.Zero) @@ -2243,14 +2266,14 @@ return false; } - int msg = int.Parse(commands[1]); - IntPtr wordParam = new IntPtr(int.Parse(commands[2])); - IntPtr longParam = new IntPtr(int.Parse(commands[3])); + int msg = int.Parse(commands[2]); + IntPtr wordParam = new IntPtr(int.Parse(commands[3])); + IntPtr longParam = new IntPtr(int.Parse(commands[4])); Win32.SendMessage(windowHandle, msg, wordParam, longParam); if (LogVerbose) - Log.Info("MCEReplacement: Message Sent({0}, {1}, {2}, {3})", commands[0], msg, wordParam, longParam); + Log.Info("MCEReplacement: Message Sent({0}, {1}, {2}, {3}, {4})", commands[0], commands[1], msg, wordParam, longParam); return true; } Modified: trunk/plugins/MCEReplacement/MCEReplacement.csproj =================================================================== --- trunk/plugins/MCEReplacement/MCEReplacement.csproj 2007-04-14 03:44:42 UTC (rev 326) +++ trunk/plugins/MCEReplacement/MCEReplacement.csproj 2007-04-14 04:44:03 UTC (rev 327) @@ -167,11 +167,6 @@ <HintPath>..\..\MediaPortal\Dialogs\bin\Release\Dialogs.dll</HintPath> <Private>False</Private> </Reference> - <Reference Include="Microsoft.DirectX.Direct3D, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\MediaPortal\xbmc\bin\Release\Microsoft.DirectX.Direct3D.dll</HintPath> - <Private>False</Private> - </Reference> <Reference Include="RemotePlugins, Version=1.0.2581.1913, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\MediaPortal\RemotePlugins\bin\Release\RemotePlugins.dll</HintPath> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gre...@us...> - 2007-04-14 03:44:43
|
Revision: 326 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=326&view=rev Author: gregmac45 Date: 2007-04-13 20:44:42 -0700 (Fri, 13 Apr 2007) Log Message: ----------- Set the copy local to false on all reference dlls Modified Paths: -------------- trunk/plugins/OnlineVideos/Source/OnlineVideos.csproj Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos.csproj =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos.csproj 2007-04-14 00:41:35 UTC (rev 325) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos.csproj 2007-04-14 03:44:42 UTC (rev 326) @@ -40,14 +40,17 @@ <Reference Include="Core"> <HintPath>..\..\..\Mediaportal\Core\bin\Release\Core.DLL</HintPath> <SpecificVersion>False</SpecificVersion> + <Private>False</Private> </Reference> <Reference Include="Databases"> <HintPath>..\..\..\Mediaportal\Databases\bin\Release\Databases.DLL</HintPath> <SpecificVersion>False</SpecificVersion> + <Private>False</Private> </Reference> <Reference Include="Dialogs"> <HintPath>..\..\..\Mediaportal\Dialogs\bin\Release\Dialogs.DLL</HintPath> <SpecificVersion>False</SpecificVersion> + <Private>False</Private> </Reference> <Reference Include="System"> <Private>False</Private> @@ -67,6 +70,7 @@ <Reference Include="Utils"> <HintPath>..\..\..\Mediaportal\Utils\bin\Release\Utils.DLL</HintPath> <SpecificVersion>False</SpecificVersion> + <Private>False</Private> </Reference> </ItemGroup> <ItemGroup> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gre...@us...> - 2007-04-14 00:41:36
|
Revision: 325 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=325&view=rev Author: gregmac45 Date: 2007-04-13 17:41:35 -0700 (Fri, 13 Apr 2007) Log Message: ----------- Removed file/folder Removed Paths: ------------- trunk/plugins/Source/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gre...@us...> - 2007-04-14 00:41:30
|
Revision: 324 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=324&view=rev Author: gregmac45 Date: 2007-04-13 17:41:29 -0700 (Fri, 13 Apr 2007) Log Message: ----------- Copied remotely Added Paths: ----------- trunk/plugins/OnlineVideos/Source/ Copied: trunk/plugins/OnlineVideos/Source (from rev 323, trunk/plugins/Source) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gre...@us...> - 2007-04-14 00:41:15
|
Revision: 323 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=323&view=rev Author: gregmac45 Date: 2007-04-13 17:41:13 -0700 (Fri, 13 Apr 2007) Log Message: ----------- Removed file/folder Removed Paths: ------------- trunk/plugins/Skin/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |