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: <kro...@us...> - 2007-07-27 09:53:20
|
Revision: 773 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=773&view=rev Author: kroko_koenig Date: 2007-07-27 02:53:16 -0700 (Fri, 27 Jul 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/My Minesweeper/Source/MyMinesweeper/MyMinesweeper.cs Modified: trunk/plugins/My Minesweeper/Source/MyMinesweeper/MyMinesweeper.cs =================================================================== --- trunk/plugins/My Minesweeper/Source/MyMinesweeper/MyMinesweeper.cs 2007-07-27 08:05:05 UTC (rev 772) +++ trunk/plugins/My Minesweeper/Source/MyMinesweeper/MyMinesweeper.cs 2007-07-27 09:53:16 UTC (rev 773) @@ -270,8 +270,6 @@ pt.X = x; pt.Y = y; - OnRenderSound("tick.wav"); - SetPlace(pt); } } @@ -636,7 +634,6 @@ GUIPropertyManager.SetProperty("#NF" + (500+(30*(by+1))), @"\Minesweeper\Board\bottomleftcorner.png"); GUIPropertyManager.SetProperty("#F" + (501+(30*(by+1)+bx)), @"\Minesweeper\Board\bottomrightcorner.png"); GUIPropertyManager.SetProperty("#NF" + (501+(30*(by+1)+bx)), @"\Minesweeper\Board\bottomrightcorner.png"); - } GUIControl.FocusControl(GetID, 531); @@ -657,6 +654,9 @@ { board[pos.X, pos.Y] = GetValue(pos); SetPoint(pos); + + OnRenderSound("tick.wav"); + if (board[pos.X, pos.Y] == 0) { EmptyPos(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kro...@us...> - 2007-07-27 08:05:11
|
Revision: 772 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=772&view=rev Author: kroko_koenig Date: 2007-07-27 01:05:05 -0700 (Fri, 27 Jul 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/My Minesweeper/Release/skin/BlueTwo/MyMinesweeper.xml trunk/plugins/My Minesweeper/Release/skin/SimpleMP/MyMinesweeper.xml trunk/plugins/My Minesweeper/Source/MyMinesweeper/MyMinesweeper.cs trunk/plugins/My Minesweeper/Source/MyMinesweeper/MyMinesweeper.csproj trunk/plugins/My Minesweeper/Source/MyMinesweeper/Properties/AssemblyInfo.cs trunk/plugins/My Minesweeper/readme.txt Added Paths: ----------- trunk/plugins/My Minesweeper/Release/language/MyMinesweeper/strings_de.xml trunk/plugins/My Minesweeper/Release/language/MyMinesweeper/strings_en.xml trunk/plugins/My Minesweeper/Source/MyMinesweeper/LocalizeStrings.cs Added: trunk/plugins/My Minesweeper/Release/language/MyMinesweeper/strings_de.xml =================================================================== --- trunk/plugins/My Minesweeper/Release/language/MyMinesweeper/strings_de.xml (rev 0) +++ trunk/plugins/My Minesweeper/Release/language/MyMinesweeper/strings_de.xml 2007-07-27 08:05:05 UTC (rev 772) @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<Language name="German" characters="255"> + <Section name="unmapped"> + <String id="0" prefix="Mein ">Minesweeper</String> + <String id="1">Neues Spiel</String> + <String id="4">Zeit</String> + <String id="6">GAME OVER</String> + <String id="9">Spielgeräusche</String> + <String id="10">Stufe: </String> + <String id="11">leicht</String> + <String id="12">mittel</String> + <String id="13">schwer</String> + <String id="31">Was ist Minesweeper?</String> + <String id="32">Das Ziel bei Minesweeper ist es,alle +versteckten Minen so schnell wie möglich zu finden. Wenn du +auf eine versteckte Mine klickt's, explodiert diese und das +Spiel ist zu Ende. + +Spielfeld Design von Mikael Söderström + +OK prüfe aktuelle Position +1 markiere als Bombe +2 markiere als Fragezeichen +3 prüfe die Umgebung +0 neues Spiel + +Viel Glück +Mark König 2007 (kroko)</String> + + </Section> +</Language> \ No newline at end of file Added: trunk/plugins/My Minesweeper/Release/language/MyMinesweeper/strings_en.xml =================================================================== --- trunk/plugins/My Minesweeper/Release/language/MyMinesweeper/strings_en.xml (rev 0) +++ trunk/plugins/My Minesweeper/Release/language/MyMinesweeper/strings_en.xml 2007-07-27 08:05:05 UTC (rev 772) @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<Language name="English" characters="255"> + <Section name="unmapped"> + <String id="0" prefix="My ">Minesweeper</String> + <String id="1">New Game</String> + <String id="4">Time</String> + <String id="6">GAME OVER</String> + <String id="9">Sounds</String> + <String id="10">Level: </String> + <String id="11">easy</String> + <String id="12">medium</String> + <String id="13">difficult</String> + <String id="31">What's Minesweeper</String> + <String id="32">Your goal in Minesweeper is to discover all +hidden mines as soon as possible. If you click +on a hidden mine it will explode and the game +ends. + +Game board design by Mikael Söderström + +OK check actual position +1 mark as bomb +2 mark as not sure +3 check surrounding +0 new game + +Good luck +Mark Koenig 2007 (kroko)</String> + </Section> +</Language> \ No newline at end of file Modified: trunk/plugins/My Minesweeper/Release/skin/BlueTwo/MyMinesweeper.xml =================================================================== --- trunk/plugins/My Minesweeper/Release/skin/BlueTwo/MyMinesweeper.xml 2007-07-26 16:23:52 UTC (rev 771) +++ trunk/plugins/My Minesweeper/Release/skin/BlueTwo/MyMinesweeper.xml 2007-07-27 08:05:05 UTC (rev 772) @@ -13,7 +13,7 @@ <posY>20</posY> <align>left</align> <font>font48</font> - <label>Minesweeper</label> + <label>#header_label</label> <textcolor>20ffffff</textcolor> <id>1</id> <animation effect="fade" time="150">WindowOpen</animation> @@ -35,7 +35,7 @@ <id>11</id> <posX>250</posX> <posY>70</posY> - <label>Minesweeper</label> + <label>#header_label</label> <font>font16</font> <align>right</align> <textcolor>ffffffff</textcolor> @@ -48,10 +48,10 @@ <id>2</id> <posX>60</posX> <posY>97</posY> - <label>Start</label> + <label>New game</label> <onleft>2</onleft> <onright>21</onright> - <onup>8</onup> + <onup>10</onup> <ondown>4</ondown> <animation effect="fade" time="150">WindowOpen</animation> <animation effect="fade" time="150">WindowClose</animation> @@ -62,20 +62,32 @@ <id>4</id> <posX>60</posX> <posY>131</posY> - <label>Level: Amateur</label> + <label>Level: easy</label> <onleft>4</onleft> <onright>21</onright> <onup>2</onup> - <ondown>8</ondown> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> + <ondown>5</ondown> + <animation effect="fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowClose</animation> </control> + <control> + <description>Sounds</description> + <type>togglebutton</type> + <id>5</id> + <posX>60</posX> + <posY>165</posY> + <label>Sounds</label> + <onleft>5</onleft> + <onright>21</onright> + <onup>4</onup> + <ondown>10</ondown> + </control> <control> <description>Smily</description> <type>image</type> - <id>1</id> + <id>6</id> <posX>60</posX> - <posY>185</posY> + <posY>220</posY> <width>60</width> <height>60</height> <texture>#minesweeper_smiley</texture> @@ -83,9 +95,9 @@ <control> <description>text label</description> <type>label</type> - <id>5</id> + <id>7</id> <posX>70</posX> - <posY>264</posY> + <posY>300</posY> <label>#minesweeper_bombs</label> <font>font12</font> <align>Left</align> @@ -96,9 +108,9 @@ <control> <description>text label</description> <type>label</type> - <id>6</id> + <id>8</id> <posX>70</posX> - <posY>298</posY> + <posY>330</posY> <label>#minesweeper_seconds</label> <font>font12</font> <align>Left</align> @@ -109,9 +121,9 @@ <control> <description>text label</description> <type>label</type> - <id>7</id> + <id>9</id> <posX>70</posX> - <posY>332</posY> + <posY>350</posY> <label>#minesweeper_record</label> <font>font12</font> <align>Left</align> @@ -122,20 +134,20 @@ <control> <description>Whatsthis</description> <type>button</type> - <id>8</id> + <id>10</id> <posX>60</posX> - <posY>361</posY> + <posY>400</posY> <label>What's this?</label> <onleft>8</onleft> <onright>21</onright> - <onup>4</onup> + <onup>5</onup> <ondown>2</ondown> <animation effect="fade" time="150">WindowOpen</animation> <animation effect="fade" time="150">WindowClose</animation> </control> <control> - <description>hidden hex</description> + <description>hidden corner</description> <type>image</type> <id>1200</id> <posX>280</posX> Modified: trunk/plugins/My Minesweeper/Release/skin/SimpleMP/MyMinesweeper.xml =================================================================== --- trunk/plugins/My Minesweeper/Release/skin/SimpleMP/MyMinesweeper.xml 2007-07-26 16:23:52 UTC (rev 771) +++ trunk/plugins/My Minesweeper/Release/skin/SimpleMP/MyMinesweeper.xml 2007-07-27 08:05:05 UTC (rev 772) @@ -13,7 +13,7 @@ <posY>20</posY> <align>left</align> <font>font48</font> - <label>Minesweeper</label> + <label>#header_label</label> <textcolor>20ffffff</textcolor> <id>1</id> <animation effect="fade" time="150">WindowOpen</animation> @@ -35,7 +35,7 @@ <id>11</id> <posX>250</posX> <posY>70</posY> - <label>Minesweeper</label> + <label>#header_label</label> <font>font16</font> <align>right</align> <textcolor>ffffffff</textcolor> @@ -48,10 +48,10 @@ <id>2</id> <posX>60</posX> <posY>97</posY> - <label>Start</label> + <label>New game</label> <onleft>2</onleft> <onright>21</onright> - <onup>8</onup> + <onup>10</onup> <ondown>4</ondown> <animation effect="fade" time="150">WindowOpen</animation> <animation effect="fade" time="150">WindowClose</animation> @@ -62,20 +62,32 @@ <id>4</id> <posX>60</posX> <posY>131</posY> - <label>Level: Amateur</label> + <label>Level: easy</label> <onleft>4</onleft> <onright>21</onright> <onup>2</onup> - <ondown>8</ondown> - <animation effect="fade" time="150">WindowOpen</animation> - <animation effect="fade" time="150">WindowClose</animation> + <ondown>5</ondown> + <animation effect="fade" time="150">WindowOpen</animation> + <animation effect="fade" time="150">WindowClose</animation> </control> + <control> + <description>Sounds</description> + <type>togglebutton</type> + <id>5</id> + <posX>60</posX> + <posY>165</posY> + <label>Sounds</label> + <onleft>5</onleft> + <onright>21</onright> + <onup>4</onup> + <ondown>10</ondown> + </control> <control> <description>Smily</description> <type>image</type> - <id>1</id> + <id>6</id> <posX>60</posX> - <posY>185</posY> + <posY>220</posY> <width>60</width> <height>60</height> <texture>#minesweeper_smiley</texture> @@ -83,9 +95,9 @@ <control> <description>text label</description> <type>label</type> - <id>5</id> + <id>7</id> <posX>70</posX> - <posY>264</posY> + <posY>300</posY> <label>#minesweeper_bombs</label> <font>font12</font> <align>Left</align> @@ -96,9 +108,9 @@ <control> <description>text label</description> <type>label</type> - <id>6</id> + <id>8</id> <posX>70</posX> - <posY>298</posY> + <posY>330</posY> <label>#minesweeper_seconds</label> <font>font12</font> <align>Left</align> @@ -109,9 +121,9 @@ <control> <description>text label</description> <type>label</type> - <id>7</id> + <id>9</id> <posX>70</posX> - <posY>332</posY> + <posY>350</posY> <label>#minesweeper_record</label> <font>font12</font> <align>Left</align> @@ -122,20 +134,20 @@ <control> <description>Whatsthis</description> <type>button</type> - <id>8</id> + <id>10</id> <posX>60</posX> - <posY>361</posY> + <posY>400</posY> <label>What's this?</label> <onleft>8</onleft> <onright>21</onright> - <onup>4</onup> + <onup>5</onup> <ondown>2</ondown> <animation effect="fade" time="150">WindowOpen</animation> <animation effect="fade" time="150">WindowClose</animation> </control> <control> - <description>hidden hex</description> + <description>hidden corner</description> <type>image</type> <id>1200</id> <posX>280</posX> Added: trunk/plugins/My Minesweeper/Source/MyMinesweeper/LocalizeStrings.cs =================================================================== --- trunk/plugins/My Minesweeper/Source/MyMinesweeper/LocalizeStrings.cs (rev 0) +++ trunk/plugins/My Minesweeper/Source/MyMinesweeper/LocalizeStrings.cs 2007-07-27 08:05:05 UTC (rev 772) @@ -0,0 +1,260 @@ +#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.IO; +using System.Globalization; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Xml; +using MediaPortal.Util; +using MediaPortal.GUI.Library; +using MediaPortal.Configuration; +using MediaPortal.Localisation; + +namespace MediaPortal.GUI.MyMinesweeper +{ + /// <summary> + /// This class will hold all text used in the application + /// The text is loaded for the current language from + /// the file language/[language]/strings.xml + /// </summary> + public class GUILocalizeStrings + { + #region Variables + static LocalisationProvider _stringProvider; + static Dictionary<string, string> _cultures; + static string[] _languages; + #endregion + + #region Constructors/Destructors + // singleton. Dont allow any instance of this class + private GUILocalizeStrings() + { + } + + static public void Dispose() + { + if (_stringProvider != null) + _stringProvider.Dispose(); + } + #endregion + + #region Public Methods + /// <summary> + /// Public method to load the text from a strings/xml file into memory + /// </summary> + /// <param name="strFileName">Contains the filename+path for the string.xml file</param> + /// <returns> + /// true when text is loaded + /// false when it was unable to load the text + /// </returns> + //[Obsolete("This method has changed", true)] + static public bool Load(string language) + { + bool isPrefixEnabled = true; + + using (MediaPortal.Profile.Settings reader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + isPrefixEnabled = reader.GetValueAsBool("general", "myprefix", true); + + string directory = Config.GetSubFolder(Config.Dir.Language, "MyMinesweeper"); + string cultureName = null; + if (language != null) + cultureName = GetCultureName(language); + + Log.Info(" Loading localised Strings - Path: {0} Culture: {1} Language: {2} Prefix: {3}", directory, cultureName, language, isPrefixEnabled); + + _stringProvider = new LocalisationProvider(directory, cultureName, isPrefixEnabled); + + GUIGraphicsContext.CharsInCharacterSet = _stringProvider.Characters; + + return true; + } + + static public string CurrentLanguage() + { + if (_stringProvider == null) + Load(null); + + return _stringProvider.CurrentLanguage.EnglishName; + } + + static public void ChangeLanguage(string language) + { + if (_stringProvider == null) + Load(language); + else + _stringProvider.ChangeLanguage(GetCultureName(language)); + } + + /// <summary> + /// Get the translation for a given id and format the sting with + /// the given parameters + /// </summary> + /// <param name="dwCode">id of text</param> + /// <param name="parameters">parameters used in the formating</param> + /// <returns> + /// string containing the translated text + /// </returns> + static public string Get(int dwCode, object[] parameters) + { + if (_stringProvider == null) + Load(null); + + string translation = _stringProvider.GetString("unmapped", dwCode); + // if parameters or the translation is null, return the translation. + if ((translation == null) || (parameters == null)) + { + return translation; + } + // return the formatted string. If formatting fails, log the error + // and return the unformatted string. + try + { + return String.Format(translation, parameters); + } + catch (System.FormatException e) + { + Log.Error("Error formatting translation with id {0}", dwCode); + Log.Error("Unformatted translation: {0}", translation); + Log.Error(e); + return translation; + } + } + + /// <summary> + /// Get the translation for a given id + /// </summary> + /// <param name="dwCode">id of text</param> + /// <returns> + /// string containing the translated text + /// </returns> + static public string Get(int dwCode) + { + if (_stringProvider == null) + Load(null); + + string translation = _stringProvider.GetString("unmapped", dwCode); + + if (translation == null) + { + Log.Error("No translation found for id {0}", dwCode); + return String.Empty; + } + + return translation; + } + + static public void LocalizeLabel(ref string strLabel) + { + if (_stringProvider == null) + Load(null); + + if (strLabel == null) strLabel = String.Empty; + if (strLabel == "-") strLabel = ""; + if (strLabel == "") return; + // This can't be a valid string code if the first character isn't a number. + // This check will save us from catching unnecessary exceptions. + if (!char.IsNumber(strLabel, 0)) + return; + + int dwLabelID; + + try + { + dwLabelID = System.Int32.Parse(strLabel); + } + catch (FormatException e) + { + Log.Error(e); + strLabel = String.Empty; + return; + } + + strLabel = _stringProvider.GetString("unmapped", dwLabelID); + if (strLabel == null) + { + Log.Error("No translation found for id {0}", dwLabelID); + strLabel = String.Empty; + } + } + + public static string LocalSupported() + { + if (_stringProvider == null) + Load(null); + + CultureInfo culture = _stringProvider.GetBestLanguage(); + + return culture.EnglishName; + } + + public static string[] SupportedLanguages() + { + if (_languages == null) + { + if (_stringProvider == null) + Load(null); + + CultureInfo[] cultures = _stringProvider.AvailableLanguages(); + + SortedList sortedLanguages = new SortedList(); + foreach (CultureInfo culture in cultures) + sortedLanguages.Add(culture.EnglishName, culture.EnglishName); + + _languages = new string[sortedLanguages.Count]; + + for (int i = 0; i < sortedLanguages.Count; i++) + { + _languages[i] = (string)sortedLanguages.GetByIndex(i); + } + } + + return _languages; + } + + static public string GetCultureName(string language) + { + if (_cultures == null) + { + _cultures = new Dictionary<string, string>(); + + CultureInfo[] cultureList = CultureInfo.GetCultures(CultureTypes.AllCultures); + + for (int i = 0; i < cultureList.Length; i++) + { + _cultures.Add(cultureList[i].EnglishName, cultureList[i].Name); + } + } + + if (_cultures.ContainsKey(language)) + return _cultures[language]; + + return null; + } + #endregion + } +} \ No newline at end of file Modified: trunk/plugins/My Minesweeper/Source/MyMinesweeper/MyMinesweeper.cs =================================================================== --- trunk/plugins/My Minesweeper/Source/MyMinesweeper/MyMinesweeper.cs 2007-07-26 16:23:52 UTC (rev 771) +++ trunk/plugins/My Minesweeper/Source/MyMinesweeper/MyMinesweeper.cs 2007-07-27 08:05:05 UTC (rev 772) @@ -34,28 +34,43 @@ using MediaPortal.Dialogs; using MediaPortal.Util; using MediaPortal.Configuration; +using MediaPortal.Localisation; namespace MediaPortal.GUI.MyMinesweeper { [PluginIcons("MyMinesweeper.minesweeper.png", "MyMinesweeper.minesweeperDisabled.png")] - public class MyMinesweeper : GUIWindow, ISetupForm + public class MyMinesweeperGUI : GUIWindow, ISetupForm { + #region enums + + private enum Level + { + Easy = 0, + Medium = 1, + Hard = 2 + } + + #endregion + #region SkinControl [SkinControlAttribute(2)] - protected GUIButtonControl BtnStart = null; + protected GUIButtonControl btnStart = null; [SkinControlAttribute(4)] - protected GUIButtonControl BtnLevel = null; - [SkinControlAttribute(8)] - protected GUIButtonControl BtnWhatsThis = null; + protected GUIButtonControl btnLevel = null; + [SkinControlAttribute(5)] + protected GUIToggleButtonControl btnSound = null; + [SkinControlAttribute(10)] + protected GUIButtonControl btnWhatsThis = null; #endregion #region Private variables - string Level = "Am"; // Choosen level + Level _currentLevel = Level.Easy; bool GameOver = false; // not game over bool GameON = false; // Game is on + bool _soundOn = true; int[,] board = new int[30, 30]; int[,] bombs = new int[30, 30]; @@ -153,19 +168,7 @@ public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) { - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) - { - if (xmlreader.GetValue("general", "myprefix")=="no") - { - strButtonText = "Minesweeper"; - } - else - { - strButtonText = "My Minesweeper"; - } - - } - //strButtonText = PluginName(); + strButtonText = MyMinesweeper.GUILocalizeStrings.Get(0); ; strButtonImage = String.Empty; strButtonImageFocus = String.Empty; strPictureImage = @"hover_my_minesweeper.png"; @@ -174,6 +177,8 @@ #endregion + #region Overrides + public override int GetID { get @@ -188,59 +193,23 @@ public override bool Init() { + MyMinesweeper.GUILocalizeStrings.Load(GUI.Library.GUILocalizeStrings.CurrentLanguage()); + if (ah == null) ah = new OnActionHandler(OnAction2); + bool result = Load(GUIGraphicsContext.Skin + @"\MyMinesweeper.xml"); return result; } - #region Actions - - public override void OnAction(Action action) - { - base.OnAction(action); - } - - public void OnAction2(Action action) - { - switch (action.wID) - { - case Action.ActionType.ACTION_KEY_PRESSED: - switch (action.m_key.KeyChar) - { - case '1': - SetBomb(); - break; - case '2': - SetQuest(); - break; - case '3': - Check9(); - break; - case '0': - NewGame(); - break; - } - break; - } - } - - #endregion - public override bool OnMessage(GUIMessage message) { if (message.Message == GUI.Library.GUIMessage.MessageType.GUI_MSG_SETFOCUS) { - ID = message.TargetControlId; + ID = message.TargetControlId; } return base.OnMessage(message); } - public void Dispose() - { - _Game.Stop(); - _Game.Tick -= new EventHandler(_Game_Tick); - } - protected override void OnPageLoad() { @@ -253,8 +222,7 @@ LoadSettings(); - NewGame(); - ShowLevel(); + OnBtnStart(); GUIGraphicsContext.OnNewAction -= ah; GUIGraphicsContext.OnNewAction += ah; @@ -264,6 +232,13 @@ GUIPropertyManager.SetProperty("#minesweeper_smiley", @"\Minesweeper\smile.png"); + // set localized labels for static controls + GUIPropertyManager.SetProperty("#header_label", MyMinesweeper.GUILocalizeStrings.Get(0)); // MyMinesweeper + GUIControl.SetControlLabel(GetID, btnStart.GetID, MyMinesweeper.GUILocalizeStrings.Get(1)); // New Game + GUIControl.SetControlLabel(GetID, btnSound.GetID, MyMinesweeper.GUILocalizeStrings.Get(9)); // Sounds + GUIControl.SetControlLabel(GetID, btnWhatsThis.GetID, MyMinesweeper.GUILocalizeStrings.Get(31)); // What is MyMinesweeper? + + UpdateButtonStates(); } protected override void OnPageDestroy(int new_windowId) @@ -295,24 +270,29 @@ pt.X = x; pt.Y = y; + OnRenderSound("tick.wav"); + SetPlace(pt); } } - if (control == BtnWhatsThis) + if (control == btnWhatsThis) { OnBtnWhatsThis(); } - if (control == BtnLevel) + if (control == btnLevel) { OnBtnLevel(); } - if (control == BtnStart) + if (control == btnStart) { - NewGame(); + OnBtnStart(); } - + if (control == btnSound ) + { + OnBtnSound(); + } } @@ -321,76 +301,226 @@ base.OnShowContextMenu(); } - private void CreateButton(int ID, int posx, int posy, int height, int width, string focusimg, string nofocusimg) + #endregion + + #region Implementation + + private void OnBtnStart() { - GUIButtonControl button = new GUIButtonControl(GetID, ID, posx, posy, width, height, focusimg, nofocusimg); - button.AllocResources(); - GUIControl btnControl = (GUIControl)button; - Add(ref btnControl); + GameOver = false; + GameON = false; + time = 0; + ID = 0; + + GUIPropertyManager.SetProperty("#minesweeper_smiley", @"\Minesweeper\smile.png"); + + if (_currentLevel == Level.Easy) + { + bx = 10; + by = 10; + bcnt = 10; + time_rec = t_am; + time_name = n_am; + } + if (_currentLevel == Level.Medium) + { + bx = 15; + by = 15; + bcnt = 40; + time_rec = t_nor; + time_name = n_nor; + } + if (_currentLevel == Level.Hard) + { + bx = 20; + by = 20; + bcnt = 100; + time_rec = t_pro; + time_name = n_pro; + } + + GUIPropertyManager.SetProperty("#minesweeper_record", "Record: " + time_rec + "s - " + time_name); + + // remove controls from form + try + { + for (int i = 500; i < 1180; i++) + { + Remove(i); + } + } + catch + { + + } + + for (int i = 0; i < 30; i++) + { + for (int j = 0; j < 30; j++) + { // 20 = not checked + board[i, j] = 20; + // no bombs + bombs[i, j] = 0; + } + } + + Random rnd = new Random(); + + for (int i = 0; i < bcnt; i++) + { + int x = rnd.Next(0, bx); + int y = rnd.Next(0, by); + if (bombs[x, y] == 1) + { // already bomb + i = i - 1; + } + else + { + Point px = new Point(); + px.X = x; + px.Y = y; + if (GetValue(px) < 4) + { + bombs[x, y] = 1; + } + else + { + i = i - 1; + } + } + + } + + Init_board(); } - void _Game_Tick(object sender, EventArgs e) - { - if ((!GameOver) && (time<999) && (GameON == true)) + private void OnBtnLevel() + { //Choose level for the game { - time++; + switch (_currentLevel) + { + case Level.Easy: + _currentLevel = Level.Medium; + break; + case Level.Medium: + _currentLevel = Level.Hard; + break; + case Level.Hard: + _currentLevel = Level.Easy; + break; + } + + OnBtnStart(); + + UpdateButtonStates(); } - GUIPropertyManager.SetProperty("#minesweeper_seconds", "Time: " + time.ToString()); - GUIPropertyManager.SetProperty("#minesweeper_bombs", "Bombs: " + bcnt.ToString()); } + private void OnBtnSound() + { + _soundOn = btnSound.Selected; + UpdateButtonStates(); + } + private void OnBtnWhatsThis() { GUIDialogText dlg = (GUIDialogText)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_TEXT); - dlg.SetHeading("What's Minesweeper"); - dlg.SetText("Your goal in Minesweeper is to discover all\n" + - "hidden mines as soon as possible. If you click\n" + - "on a hidden mine it will explode and the game\n" + - "ends.\n" + - "Game board design by Mikael S\xF6derstr\xF6m\n\n" + - "OK check actual position\n" + - "1 mark as bomb\n" + - "2 mark as not sure\n" + - "3 check surrounding\n" + - "0 new game\n\n" + - "Good luck\nMark Koenig (kroko)"); + dlg.SetHeading(MyMinesweeper.GUILocalizeStrings.Get(31)); // help dialog heading + dlg.SetText(MyMinesweeper.GUILocalizeStrings.Get(32)); // help dialog text dlg.DoModal(GetID); } - private void OnBtnLevel() - { //Choose level for the game + private void OnRenderSound(string strFilePath) + { + if (_soundOn) { - if (Level == "Nor") - { - Level = "Pro"; - } - else if (Level == "Pro") - { - Level = "Am"; - } - else - { - Level = "Nor"; - } - NewGame(); - ShowLevel(); + MediaPortal.Util.Utils.PlaySound(strFilePath, false, true); } } - private void ShowLevel() + private void UpdateButtonStates() { - if (Level == "Pro") + // enable/disable buttons + btnSound.Selected = _soundOn; + + // refresh label for btnLevel + string strLine = MyMinesweeper.GUILocalizeStrings.Get(10); // Level: + switch (_currentLevel) { - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Professional"); + case Level.Easy: + strLine += MyMinesweeper.GUILocalizeStrings.Get(11); // easy + break; + case Level.Medium: + strLine += MyMinesweeper.GUILocalizeStrings.Get(12); // medium + break; + case Level.Hard: + strLine += MyMinesweeper.GUILocalizeStrings.Get(13); // difficult + break; } - if (Level == "Am") + GUIControl.SetControlLabel(GetID, btnLevel.GetID, strLine); + + // refresh label for btnMode + strLine = MyMinesweeper.GUILocalizeStrings.Get(20); // Mode: Play vs + + } + + #endregion + + public void Dispose() + { + _Game.Stop(); + _Game.Tick -= new EventHandler(_Game_Tick); + } + + #region Actions + + public override void OnAction(Action action) + { + base.OnAction(action); + } + + public void OnAction2(Action action) + { + switch (action.wID) { - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Amateur"); + case Action.ActionType.ACTION_KEY_PRESSED: + switch (action.m_key.KeyChar) + { + case '1': + SetBomb(); + break; + case '2': + SetQuest(); + break; + case '3': + Check9(); + break; + case '0': + OnBtnStart(); + break; + } + break; } - if (Level == "Nor") + } + + #endregion + + private void CreateButton(int ID, int posx, int posy, int height, int width, string focusimg, string nofocusimg) + { + GUIButtonControl button = new GUIButtonControl(GetID, ID, posx, posy, width, height, focusimg, nofocusimg); + button.AllocResources(); + GUIControl btnControl = (GUIControl)button; + Add(ref btnControl); + } + + void _Game_Tick(object sender, EventArgs e) + { + if ((!GameOver) && (time<999) && (GameON == true)) { - GUIControl.SetControlLabel(GetID, BtnLevel.GetID, "Level: Normal"); + time++; } + GUIPropertyManager.SetProperty("#minesweeper_seconds", "Time: " + time.ToString()); + GUIPropertyManager.SetProperty("#minesweeper_bombs", "Bombs: " + bcnt.ToString()); } private void Init_board() @@ -518,7 +648,7 @@ { GUIPropertyManager.SetProperty("#minesweeper_smiley", @"\Minesweeper\sad.png"); GameOver = true; - MediaPortal.Util.Utils.PlaySound("bomb.wav", false, true); + OnRenderSound ("bomb.wav"); EndGame(); board[pos.X, pos.Y] = 12; SetPoint(pos); @@ -615,97 +745,8 @@ GUIPropertyManager.SetProperty("#F" + nr, @"\Minesweeper\Board\unchecksel.png"); GUIPropertyManager.SetProperty("#NF" + nr, @"\Minesweeper\Board\uncheckunsel.png"); } - } + } - private void NewGame() - { - GameOver = false; - GameON = false; - time = 0; - ID = 0; - - GUIPropertyManager.SetProperty("#minesweeper_smiley", @"\Minesweeper\smile.png"); - - if (Level == "Am") - { - bx = 10; - by = 10; - bcnt = 10; - time_rec = t_am; - time_name = n_am; - } - if (Level == "Nor") - { - bx = 15; - by = 15; - bcnt = 40; - time_rec = t_nor; - time_name = n_nor; - } - if (Level == "Pro") - { - bx = 20; - by = 20; - bcnt = 100; - time_rec = t_pro; - time_name = n_pro; - } - - GUIPropertyManager.SetProperty("#minesweeper_record", "Record: " + time_rec + "s - " + time_name); - - // remove controls from form - try - { - for (int i = 500; i < 1180; i++) - { - Remove(i); - } - } - catch - { - - } - - for (int i = 0; i < 30; i++) - { - for (int j = 0; j < 30; j++) - { // 20 = not checked - board[i, j] = 20; - // no bombs - bombs[i, j] = 0; - } - } - - Random rnd = new Random(); - - for (int i = 0; i < bcnt ; i++) - { - int x = rnd.Next(0,bx); - int y = rnd.Next(0,by); - if (bombs[x, y] == 1) - { // already bomb - i = i - 1; - } - else - { - Point px = new Point(); - px.X=x; - px.Y=y; - if (GetValue(px) < 4) - { - bombs[x, y] = 1; - } - else - { - i = i - 1; - } - } - - } - - Init_board(); - } - private int GetValue(Point pos) { int val=0; @@ -994,6 +1035,7 @@ { if (time < int.Parse (time_rec)) { + OnRenderSound("highscore.wav"); time_rec = time.ToString(); VirtualKeyboard menu = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD); @@ -1015,17 +1057,17 @@ private void SetScore() { - if (Level == "Pro") + if (_currentLevel == Level.Hard) { t_pro = time_rec; n_pro = time_name; } - if (Level == "Am") + if (_currentLevel == Level.Easy ) { t_am = time_rec; n_am = time_name; } - if (Level == "Nor") + if (_currentLevel == Level.Medium) { t_nor = time_rec; n_nor = time_name; Modified: trunk/plugins/My Minesweeper/Source/MyMinesweeper/MyMinesweeper.csproj =================================================================== --- trunk/plugins/My Minesweeper/Source/MyMinesweeper/MyMinesweeper.csproj 2007-07-26 16:23:52 UTC (rev 771) +++ trunk/plugins/My Minesweeper/Source/MyMinesweeper/MyMinesweeper.csproj 2007-07-27 08:05:05 UTC (rev 772) @@ -14,7 +14,7 @@ <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> + <OutputPath>..\..\..\..\..\..\Mediaportal\xbmc\bin\Debug\plugins\Windows\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> @@ -30,12 +30,12 @@ <ItemGroup> <Reference Include="Core, Version=1.0.2681.38747, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\..\MediaPortal\xbmc\bin\Debug\Core.dll</HintPath> + <HintPath>..\..\..\..\..\..\Mediaportal\xbmc\bin\Debug\Core.dll</HintPath> <Private>False</Private> </Reference> <Reference Include="Dialogs, Version=0.0.0.0, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\..\MediaPortal\xbmc\bin\Debug\plugins\windows\Dialogs.dll</HintPath> + <HintPath>..\..\..\..\..\..\Mediaportal\xbmc\bin\Debug\plugins\Windows\Dialogs.dll</HintPath> <Private>False</Private> </Reference> <Reference Include="System" /> @@ -45,11 +45,12 @@ <Reference Include="System.Xml" /> <Reference Include="Utils, Version=1.0.2681.38745, Culture=neutral, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\..\..\..\MediaPortal\xbmc\bin\Debug\Utils.dll</HintPath> + <HintPath>..\..\..\..\..\..\Mediaportal\xbmc\bin\Debug\Utils.dll</HintPath> <Private>False</Private> </Reference> </ItemGroup> <ItemGroup> + <Compile Include="LocalizeStrings.cs" /> <Compile Include="MyMinesweeper.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> @@ -66,7 +67,7 @@ </Target> --> <PropertyGroup> - <PostBuildEvent>cd "$(SolutionDir)" -call postbuild.bat "$(TargetPath)" "$(TargetFileName)"</PostBuildEvent> + <PostBuildEvent> + </PostBuildEvent> </PropertyGroup> </Project> \ No newline at end of file Modified: trunk/plugins/My Minesweeper/Source/MyMinesweeper/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/My Minesweeper/Source/MyMinesweeper/Properties/AssemblyInfo.cs 2007-07-26 16:23:52 UTC (rev 771) +++ trunk/plugins/My Minesweeper/Source/MyMinesweeper/Properties/AssemblyInfo.cs 2007-07-27 08:05:05 UTC (rev 772) @@ -31,5 +31,5 @@ // // Sie können alle Werte angeben oder die standardmäßigen Revisions- und Buildnummern // übernehmen, indem Sie "*" eingeben: -[assembly: AssemblyVersion("0.1.0.0")] -[assembly: AssemblyFileVersion("0.1.0")] +[assembly: AssemblyVersion("0.2.0.0")] +[assembly: AssemblyFileVersion("0.2.0")] Modified: trunk/plugins/My Minesweeper/readme.txt =================================================================== --- trunk/plugins/My Minesweeper/readme.txt 2007-07-26 16:23:52 UTC (rev 771) +++ trunk/plugins/My Minesweeper/readme.txt 2007-07-27 08:05:05 UTC (rev 772) @@ -1,7 +1,16 @@ Minesweeper ------------------- +Version 0.2 +----------- + - MediaPortal 0.2.3.0 ready + - added option to enable/disable sounds, while playing + - added sound for click and highscore + - plugin should be full localisable now + - minor improvements + Version 0.1 +----------- -Initial release Copy the plugin and skin files into your favorite skin folder. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rs...@us...> - 2007-07-26 16:39:29
|
Revision: 771 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=771&view=rev Author: rsparey Date: 2007-07-26 09:23:52 -0700 (Thu, 26 Jul 2007) Log Message: ----------- In process of adding sub-menu's to basic home page Added Paths: ----------- trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/top-strip.png Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/top-strip.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/top-strip.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rs...@us...> - 2007-07-26 16:23:35
|
Revision: 770 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=770&view=rev Author: rsparey Date: 2007-07-26 09:23:26 -0700 (Thu, 26 Jul 2007) Log Message: ----------- In process of adding sub-menu's to basic home page Modified Paths: -------------- trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/background.png Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml 2007-07-26 13:36:46 UTC (rev 769) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml 2007-07-26 16:23:26 UTC (rev 770) @@ -33,78 +33,105 @@ <animation effect="fade" time="250" delay="2000" >WindowOpen</animation> <animation effect="fade" time="500" delay="5">WindowClose</animation> </control> + <control> + <type>image</type> + <decription>mid_strip</decription> + <id>1</id> + <posX>12</posX> + <posY>186</posY> + <width>1342</width> + <height>365</height> + <texture>mid_strip.png</texture> + <animation effect="fade" time="1000">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + </control> + <control> + <type>image</type> + <decription>bottom_strip</decription> + <id>1</id> + <posX>12</posX> + <posY>547</posY> + <width>1342</width> + <height>18</height> + <texture>bottom_strip.png</texture> + <animation effect="fade" time="1000">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + </control> + <control> + <type>image</type> + <decription>top-strip</decription> + <id>1</id> + <posX>12</posX> + <posY>155</posY> + <width>1342</width> + <height>36</height> + <texture>top-strip.png</texture> + <animation effect="fade" time="1000">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + </control> - - <control> + <control> <description>home BM Radio</description> <type>button</type> <id>2</id> <posX>61</posX> - <posY>320</posY> + <posY>250</posY> <width>200</width> <height>400</height> <textureFocus>Radio.png</textureFocus> <textureNoFocus>Radio.png</textureNoFocus> <thumbZoom>yes</thumbZoom> <hyperlink>30</hyperlink> - <hover>-</hover> - <hoverX>502</hoverX> - <hoverY>320</hoverY> - <hoverWidth>272</hoverWidth> - <hoverHeight>306</hoverHeight> <label>665</label> <textcolor>00ffffff</textcolor> <textcolorNoFocus>00ffffff</textcolorNoFocus> <onleft>6</onleft> <onright>3</onright> - <onup>11</onup> - <ondown>21</ondown> + <onup>21</onup> + <ondown>11</ondown> <animation effect="fade" time="1000" delay="1000" >WindowOpen</animation> <animation effect="slide" time="1000" start="-161,0" end="0,0" delay="1000" acceleration="-1" >WindowOpen</animation> <animation effect="fade" time="1000">WindowClose</animation> <animation effect="slide" time="1000" start="0,0" end="-161,0" acceleration="-1" >WindowClose</animation> - <animation effect="zoom" start="100,100" end="150,150" center="161,520" time="1000" acceleration ="-1" >Focus</animation> + <animation effect="zoom" start="100,100" end="120,120" center="161,450" time="1000" acceleration ="-1" >Focus</animation> - <animation effect="zoom" start="150,150" end="100,100" center="161,520" time="1000" acceleration ="-1" >Unfocus</animation> - <animation effect="zoom" start="100,100" end="5,5" center="161,520" time="1000" acceleration ="-1" >Control.HasFocus(101)</animation> - - - - </control> + <animation effect="zoom" start="120,120" end="100,100" center="161,450" time="1000" acceleration ="-1" >Unfocus</animation> + <animation effect="zoom" start="100,100" end="5,5" center="161,450" time="1000" acceleration ="-1" >Control.HasFocus(21)</animation> + </control> <control> - <description>LAST FM BUTTON</description> + <description>MY LAST FM</description> <type>button</type> <id>21</id> - <posX>100</posX> - <posY>687</posY> + <posY>155</posY> + <posX>12</posX> <height>36</height> <width>209</width> <align>left</align> <textureFocus>tab_left_corner_down.png</textureFocus> <textureNoFocus>tab_left_corner_up.png</textureNoFocus> - <label>last fm</label> <hyperlink>7890</hyperlink> <font>font10</font> <textcolor>white</textcolor> <textYOff>1</textYOff> - <onup>2</onup> - <ondown>11</ondown> + <onup>11</onup> + <ondown>2</ondown> <onleft>21</onleft> <onright>21</onright> <visible>Control.HasFocus(2)|Control.HasFocus(21)</visible> - <animation effect="fade" time="300">Visible</animation> + <animation effect="fade" time="300" >Visible</animation> <animation effect="fade" time="400">WindowOpen</animation> - <animation effect="fade" time="400">WindowClose</animation> - </control> + <animation effect="fade" time="400">WindowClose</animation> + </control> + <control> <description>home BM Video</description> <type>button</type> <id>3</id> <posX>322</posX> - <posY>320</posY> + <posY>250</posY> <width>200</width> <height>400</height> <textureFocus>Video.png</textureFocus> @@ -112,7 +139,7 @@ <hyperlink>6</hyperlink> <hover>-</hover> <hoverX>502</hoverX> - <hoverY>320</hoverY> + <hoverY>250</hoverY> <hoverWidth>272</hoverWidth> <hoverHeight>306</hoverHeight> <label>3</label> @@ -126,8 +153,8 @@ <animation effect="slide" time="1000" start="-422,0" end="0,0" delay="750" acceleration="-1" >WindowOpen</animation> <animation effect="fade" time="1000" delay="250" >WindowClose</animation> <animation effect="slide" time="1000" start="0,0" end="-422,0" delay="250" acceleration="-1" >Windowclose</animation> - <animation effect="zoom" start="100,100" end="150,150" center="422,520" time="1000" acceleration ="-1" >Focus</animation> - <animation effect="zoom" start="150,150" end="100,100" center="422,520" time="1000" acceleration ="-1" >Unfocus</animation> + <animation effect="zoom" start="100,100" end="120,120" center="422,450" time="1000" acceleration ="-1" >Focus</animation> + <animation effect="zoom" start="120,120" end="100,100" center="422,450" time="1000" acceleration ="-1" >Unfocus</animation> </control> @@ -138,7 +165,7 @@ <type>button</type> <id>4</id> <posX>583</posX> - <posY>360</posY> + <posY>250</posY> <width>200</width> <height>400</height> <textureFocus>TV.png</textureFocus> @@ -146,7 +173,7 @@ <hyperlink>1</hyperlink> <hover>-</hover> <hoverX>502</hoverX> - <hoverY>360</hoverY> + <hoverY>250</hoverY> <hoverWidth>272</hoverWidth> <hoverHeight>306</hoverHeight> <label>605</label> @@ -160,15 +187,15 @@ <animation effect="slide" time="1000" start="-683,0" end="0,0" delay="500" acceleration="-1" >WindowOpen</animation> <animation effect="fade" time="1000" delay="500">WindowClose</animation> <animation effect="slide" time="1000" start="0,0" end="-683,0" delay="500" acceleration="-1" >Windowclose</animation> - <animation effect="zoom" start="100,100" end="150,150" center="683,520" time="1000" acceleration ="-1" >Focus</animation> - <animation effect="zoom" start="150,150" end="100,100" center="683,520" time="1000" acceleration ="-1" >Unfocus</animation> + <animation effect="zoom" start="100,100" end="120,120" center="683,450" time="1000" acceleration ="-1" >Focus</animation> + <animation effect="zoom" start="120,120" end="100,100" center="683,450" time="1000" acceleration ="-1" >Unfocus</animation> </control> <control> <description>home BM Music</description> <type>button</type> <id>5</id> <posX>844</posX> - <posY>320</posY> + <posY>250</posY> <width>200</width> <height>400</height> <textureFocus>Music.png</textureFocus> @@ -176,7 +203,7 @@ <hyperlink>501</hyperlink> <hover>-</hover> <hoverX>502</hoverX> - <hoverY>360</hoverY> + <hoverY>250</hoverY> <hoverWidth>272</hoverWidth> <hoverHeight>306</hoverHeight> <label>2</label> @@ -190,8 +217,8 @@ <animation effect="slide" time="1000" start="-944,0" end="0,0" delay="250" acceleration="-1" >WindowOpen</animation> <animation effect="fade" time="1000" delay="750">WindowClose</animation> <animation effect="slide" time="1000" start="0,0" end="-944,0" delay="750" acceleration="-1" >Windowclose</animation> - <animation effect="zoom" start="100,100" end="150,150" center="944,520" time="1000" acceleration ="-1" >Focus</animation> - <animation effect="zoom" start="150,150" end="100,100" center="944,520" time="1000" acceleration ="-1" >Unfocus</animation> + <animation effect="zoom" start="100,100" end="120,120" center="944,450" time="1000" acceleration ="-1" >Focus</animation> + <animation effect="zoom" start="120,120" end="100,100" center="944,450" time="1000" acceleration ="-1" >Unfocus</animation> @@ -202,7 +229,7 @@ <type>button</type> <id>6</id> <posX>1105</posX> - <posY>320</posY> + <posY>250</posY> <width>200</width> <height>400</height> <textureFocus>Pictures.png</textureFocus> @@ -210,7 +237,7 @@ <hyperlink>2</hyperlink> <hover>-</hover> <hoverX>502</hoverX> - <hoverY>360</hoverY> + <hoverY>250</hoverY> <hoverWidth>272</hoverWidth> <hoverHeight>306</hoverHeight> <label>1</label> @@ -223,8 +250,8 @@ <animation effect="slide" time="500" start="-1205,0" end="0,0" acceleration="-1" >WindowOpen</animation> <animation effect="fade" time="1000" delay="1000">WindowClose</animation> <animation effect="slide" time="1000" start="0,0" end="-1205,0" delay="1000" acceleration="-1" >Windowclose</animation> - <animation effect="zoom" start="100,100" end="150,150" center="1205,520" time="1000" acceleration ="-1" >Focus</animation> - <animation effect="zoom" start="150,150" end="100,100" center="1205,520" time="1000" acceleration ="-1" >Unfocus</animation> + <animation effect="zoom" start="100,100" end="120,120" center="1205,450" time="1000" acceleration ="-1" >Focus</animation> + <animation effect="zoom" start="120,120" end="100,100" center="1205,450" time="1000" acceleration ="-1" >Unfocus</animation> </control> Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/background.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rs...@us...> - 2007-07-26 13:36:48
|
Revision: 769 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=769&view=rev Author: rsparey Date: 2007-07-26 06:36:46 -0700 (Thu, 26 Jul 2007) Log Message: ----------- In process of adding sub-menu's to basic home page Modified Paths: -------------- trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml Added Paths: ----------- trunk/skins/Foofaraw/Development Skin/Foofaraw/Foofaraw Backgrounds/green blade.png trunk/skins/Foofaraw/Development Skin/Foofaraw/mypvrguide.xml trunk/skins/Foofaraw/Development Skin/Foofaraw/mypvrscheduler.xml Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml 2007-07-26 13:34:47 UTC (rev 768) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml 2007-07-26 13:36:46 UTC (rev 769) @@ -71,6 +71,34 @@ </control> + + <control> + <description>LAST FM BUTTON</description> + <type>button</type> + <id>21</id> + <posX>100</posX> + <posY>687</posY> + <height>36</height> + <width>209</width> + <align>left</align> + <textureFocus>tab_left_corner_down.png</textureFocus> + <textureNoFocus>tab_left_corner_up.png</textureNoFocus> + + <label>last fm</label> + <hyperlink>7890</hyperlink> + <font>font10</font> + <textcolor>white</textcolor> + <textYOff>1</textYOff> + <onup>2</onup> + <ondown>11</ondown> + <onleft>21</onleft> + <onright>21</onright> + <visible>Control.HasFocus(2)|Control.HasFocus(21)</visible> + <animation effect="fade" time="300">Visible</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + <control> <description>home BM Video</description> <type>button</type> @@ -238,31 +266,7 @@ </control> <showNumberofFilesLabel>no</showNumberofFilesLabel> - <control> - <description>LAST FM BUTTON</description> - <type>button</type> - <id>21</id> - <posX>100</posX> - <posY>687</posY> - <height>25</height> - <width>200</width> - <align>left</align> - <textureFocus>menu_list_focus.png</textureFocus> - <textureNoFocus>menu_list_nofocus.png</textureNoFocus> - <visible>Control.HasFocus(2)|Control.HasFocus(21)</visible> - <label>last fm</label> - <hyperlink>7890</hyperlink> - <font>font10</font> - <textcolor>white</textcolor> - <textYOff>1</textYOff> - <onup>2</onup> - <ondown>11</ondown> - <onleft>21</onleft> - <onright>21</onright> - <animation effect="fade" time="300">Visible</animation> - <animation effect="fade" time="400">WindowOpen</animation> - <animation effect="fade" time="400">WindowClose</animation> - </control> + <control> <description>TV SERIES BUTTON</description> @@ -524,5 +528,21 @@ <animation effect="fade" time="400">WindowOpen</animation> <animation effect="fade" time="400">WindowClose</animation> </control> + + <control> + <description>MINI RADIO</description> + <type>image</type> + <id>1</id> + <posX>676</posX> + <posY>600</posY> + <height>80</height> + <width>40</width> + <align>left</align> + <texture>Radio.png</texture> + <visible>Control.HasFocus(21)</visible> + <animation effect="fade" time="300">Visible</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> </controls> </window> \ No newline at end of file Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Foofaraw Backgrounds/green blade.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Foofaraw Backgrounds/green blade.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/mypvrguide.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/mypvrguide.xml (rev 0) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/mypvrguide.xml 2007-07-26 13:36:46 UTC (rev 769) @@ -0,0 +1,278 @@ +<window> + <id>560</id> + <defaultcontrol>2</defaultcontrol> + <allowoverlay>no</allowoverlay> +<controls> + <control> + <description>BG</description> + <type>image</type> + <id>1</id> + <posX>0</posX> + <posY>0</posY> + <width>720</width> + <height>576</height> + <texture>background.png</texture> + </control> + <control> + <type>image</type> + <id>1</id> + <posX>60</posX> + <posY>20</posY> + <texture>television_logo.png</texture> + </control> + <control> + <description>Guide Text Label</description> + <type>label</type> + <id>1</id> + <posX>250</posX> + <posY>70</posY> + <label>PVR Scheduler EPG</label> + <font>font16</font> + <align>right</align> + <textcolor>FFFFFFFF</textcolor> + </control> + <control> + <description>TVGUIDE Panel</description> + <type>image</type> + <id>2</id> + <posX>60</posX> + <posY>90</posY> + <width>605</width> + <height>315</height> + <colordiffuse>60ffffff</colordiffuse> + <texture>-</texture> + </control> + + <!-- Timeheader background must be dedfined before Timeheader label template --> + <!-- b/c Timeheader is on the background and will be rendered first --> + <control> + <description>time header background image template</description> + <type>image</type> + <id>90</id> + <posX>186</posX> + <posY>90</posY> + <width>115</width> + <height>28</height> + <texture>button_small_settings_nofocus.png</texture> + </control> + <control> + <description>time header label template</description> + <type>label</type> + <id>40</id> + <posX>186</posX> + <posY>90</posY> + <font>font13</font> + <textcolor>FFB2D4F5</textcolor> + </control> + <control> + <description>day spin control</description> + <type>spincontrol</type> + <id>6</id> + <posX>60</posX> + <posY>92</posY> + <showrange>no</showrange> + <orientation>horizontal</orientation> + <align>center</align> + <reverse>yes</reverse> + <onleft>6</onleft> + <onright>8</onright> + <textureUp>arrow_round_right_nofocus.png</textureUp> + <textureDown>arrow_round_left_nofocus.png</textureDown> + <textureUpFocus>arrow_round_right_focus.png</textureUpFocus> + <textureDownFocus>arrow_round_left_focus.png</textureDownFocus> + </control> + <control> + <description>time interval spin control</description> + <type>spincontrol</type> + <id>8</id> + <posX>165</posX> + <posY>100</posY> + <showrange>no</showrange> + <orientation>vertical</orientation> + <align>center</align> + <reverse>yes</reverse> + <textureUp>arrow_round_up_nofocus.png</textureUp> + <textureDown>arrow_round_down_nofocus.png</textureDown> + <textureUpFocus>arrow_round_up_focus.png</textureUpFocus> + <textureDownFocus>arrow_round_down_focus.png</textureDownFocus> + <onleft>6</onleft> + <onright>8</onright> + </control> + <control> + <description>Channel template</description> + <type>image</type> + <id>20</id> + <posX>62</posX> + <posY>125</posY> + <width>124</width> + <height>34</height> + </control> + <control> + <description>Channel image template</description> + <type>image</type> + <id>7</id> + <posX>0</posX> + <posY>0</posY> + <width>32</width> + <height>32</height> + <keepaspectratio>yes</keepaspectratio> + <centered>no</centered> + <zoom>yes</zoom> + <texture>defaultVideoBig.png</texture> + </control> + <control> + <description>channel Label template</description> + <type>label</type> + <id>18</id> + <posX>35</posX> + <posY>5</posY> + <width>65</width> + <height>15</height> + <font>font13</font> + <textcolor>FFFFFFFF</textcolor> + </control> + <control> + <description>Current program title</description> + <type>fadelabel</type> + <id>13</id> + <posX>250</posX> + <posY>420</posY> + <width>350</width> + <align>left</align> + <label>#TV.Guide.Title</label> + <font>font16</font> + <textcolor>FFFFFFFF</textcolor> + </control> + <control> + <description>Current program time</description> + <type>label</type> + <id>14</id> + <posX>250</posX> + <posY>530</posY> + <label>#TV.Guide.Time</label> + <align>left</align> + <font>font16</font> + <textcolor>FFB2D4F5</textcolor> + </control> + <control> + <description>Current program genre</description> + <type>label</type> + <id>27</id> + <posX>470</posX> + <posY>530</posY> + <label>#TV.Guide.Genre</label> + <align>left</align> + <font>font16</font> + <textcolor>FFB2D4F5</textcolor> + </control> + <control> + <description>Description1</description> + <type>textboxscrollup</type> + <id>15</id> + <posX>250</posX> + <posY>450</posY> + <width>400</width> + <height>65</height> +<seperator>----------------------------------------------------------------------------------------------</seperator> + <label>#TV.Guide.Description</label> + <font>font14</font> + <textcolor>FFFFFFFF</textcolor> + </control> +<!-- <control> + <description>template for program genre light area</description> + <type>label</type> + <id>23</id> + <label>-</label> + <font>font10</font> + <textcolor>FF101010</textcolor> + </control> --> + <control> + <description>template for program title light area</description> + <type>label</type> + <id>24</id> + <visible>no</visible> + <label>-</label> + <font>font13</font> + <textcolor>FF101010</textcolor> + </control> + <control> + <description>vertical timeline</description> + <type>image</type> + <id>25</id> + <posX>30</posX> + <posY>125</posY> + <height>270</height> + <colordiffuse>c0ffffff</colordiffuse> + <texture>tvguide_slider.png</texture> + </control> + <control> + <description>template for program title darkarea </description> + <type>label</type> + <visible>no</visible> + <id>26</id> + <label>-</label> + <font>font13</font> + <textcolor>FFFFFFFF</textcolor> + </control> +<!-- <control> + <description>template for genre dark area</description> + <type>label</type> + <visible>no</visible> + <id>30</id> + <label>-</label> + <font>font13</font> + <textcolor>FFFFFFFF</textcolor> + </control> --> + <control> + <description>TV background</description> + <type>image</type> + <id>1</id> + <posX>60</posX> + <posY>420</posY> + <width>180</width> + <height>135</height> + <colordiffuse>60ffffff</colordiffuse> + <texture>previewbackground.png</texture> + </control> + <control> + <description>TV preview window</description> + <type>videowindow</type> + <id>1</id> + <posX>65</posX> + <posY>425</posY> + <width>170</width> + <height>125</height> + <action>18</action> + <textureFocus>video_window_focus.png</textureFocus> + </control> + <control> + <description>Horizontal scrollbar</description> + <type>hscrollbar</type> + <id>28</id> + <posX>50</posX> + <posY>399</posY> + <width>607</width> + <height>20</height> + <visible>yes</visible> + </control> + <control> + <description>Vertical scrollbar</description> + <type>vscrollbar</type> + <id>29</id> + <posX>658</posX> + <posY>125</posY> + <width>20</width> + <height>294</height> + <visible>yes</visible> + </control> + <control> + <description>record pin</description> + <type>image</type> + <id>31</id> + <posX>440</posX> + <posY>530</posY> + <texture>tvguide_record_button.png</texture> + <visible>no</visible> + </control> +</controls> +</window> \ No newline at end of file Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/mypvrscheduler.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/mypvrscheduler.xml (rev 0) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/mypvrscheduler.xml 2007-07-26 13:36:46 UTC (rev 769) @@ -0,0 +1,287 @@ +<window> + <id>558</id> + <defaultcontrol>2</defaultcontrol> + <allowoverlay>no</allowoverlay> + <controls> + <control> + <description>BG</description> + <type>image</type> + <id>1</id> + <posX>0</posX> + <posY>0</posY> + <width>720</width> + <height>576</height> + <texture>background.png</texture> + </control> + <control> + <type>image</type> + <id>1</id> + <posX>60</posX> + <posY>20</posY> + <texture>television_logo.png</texture> + </control> + <control> + <description>PVR Scheduler Text Label</description> + <type>label</type> + <id>1</id> + <posX>250</posX> + <posY>70</posY> + <label>PVR Scheduler</label> + <font>font16</font> + <align>right</align> + <textcolor>FFFFFFFF</textcolor> + </control> + <control> + <description>Date</description> + <type>label</type> + <id>200</id> + <posX>690</posX> + <posY>30</posY> + <label>#date</label> + <align>right</align> + <font>font13</font> + <textcolor>ffa9d0f7</textcolor> + </control> + <control> + <description>Time</description> + <type>label</type> + <id>201</id> + <posX>690</posX> + <posY>50</posY> + <label>#time</label> + <align>right</align> + <font>font13</font> + <textcolor>ffa9d0f7</textcolor> + </control> + + <control> + <description>Selected item Label</description> + <type>fadelabel</type> + <id>1</id> + <posX>660</posX> + <posY>70</posY> + <width>400</width> + <label>#selecteditem</label> + <font>font14</font> + <align>right</align> + <textcolor>ffffffff</textcolor> + </control> + <control> + <type>group</type> + <description>group element</description> + <animation>FlyInFromLeft</animation> + <control> + <description>Sort-by button</description> + <type>button</type> + <id>2</id> + <posX>60</posX> + <posY>97</posY> + <label>620</label> + <onleft>10</onleft> + <onright>10</onright> + <onup>17</onup> + <ondown>4</ondown> + </control> + <control> + <description>Sort Asc</description> + <type>togglebutton</type> + <id>4</id> + <posX>225</posX> + <posY>105</posY> + <label>-</label> + <onleft>10</onleft> + <onright>10</onright> + <onup>2</onup> + <ondown>20</ondown> + </control> + <control> + <description>New button</description> + <type>button</type> + <id>20</id> + <posX>60</posX> + <posY>131</posY> + <label>617</label> + <onleft>10</onleft> + <onright>10</onright> + <onup>4</onup> + <ondown>21</ondown> + </control> + <control> + <description>Guide</description> + <type>button</type> + <id>21</id> + <posX>60</posX> + <posY>165</posY> + <label>600</label> + <hyperlink>560</hyperlink> + <onleft>10</onleft> + <onright>10</onright> + <onup>20</onup> + <ondown>22</ondown> + </control> + <control> + <description>Update</description> + <type>button</type> + <id>22</id> + <posX>60</posX> + <posY>199</posY> + <label>Update</label> + <onleft>10</onleft> + <onright>10</onright> + <onup>21</onup> + <ondown>24</ondown> + </control> + <control> + <description>SyncEPG</description> + <type>button</type> + <id>24</id> + <posX>60</posX> + <posY>233</posY> + <label>Synchronize</label> + <onleft>10</onleft> + <onright>10</onright> + <onup>22</onup> + <ondown>26</ondown> + </control> + <control> + <description>Standby</description> + <type>button</type> + <id>26</id> + <posX>60</posX> + <posY>267</posY> + <label>Standby</label> + <onleft>10</onleft> + <onright>10</onright> + <onup>24</onup> + <ondown>27</ondown> + </control> + <control> + <description>Hibernate</description> + <type>button</type> + <id>27</id> + <posX>60</posX> + <posY>301</posY> + <label>Hibernate</label> + <onleft>10</onleft> + <onright>10</onright> + <onup>26</onup> + <ondown>28</ondown> + </control> + <control> + <description>Shutdown</description> + <type>button</type> + <id>28</id> + <posX>60</posX> + <posY>335</posY> + <label>Shutdown</label> + <onleft>10</onleft> + <onright>10</onright> + <onup>27</onup> + <ondown>30</ondown> + </control> + <control> + <description>About</description> + <type>button</type> + <id>30</id> + <posX>60</posX> + <posY>369</posY> + <label>About</label> + <onleft>10</onleft> + <onright>10</onright> + <onup>28</onup> + <ondown>99</ondown> + </control> + </control> + <control> + <type>group</type> + <description>group element</description> + <animation>FlyInFromTop</animation> + <control> + <description>scheduler recordings listcontrol</description> + <type>listcontrol</type> + <id>10</id> + <width>425</width> + <height>370</height> + <textXOff>25</textXOff> + <textYOff>4</textYOff> + <textXOff2>420</textXOff2> + <textYOff2>55</textYOff2> + <textXOff3>100</textXOff3> + <textYOff3>55</textYOff3> + <IconXOff>12</IconXOff> + <IconYOff>8</IconYOff> + <spinPosX>606</spinPosX> + <spinPosY>403</spinPosY> + <itemWidth>65</itemWidth> + <itemHeight>65</itemHeight> + <textureFocus>recording_background_focus.png</textureFocus> + <textureNoFocus>recording_background_nofocus.png</textureNoFocus> + <spaceBetweenItems>14</spaceBetweenItems> + <textureHeight>90</textureHeight> + <keepaspectratio>no</keepaspectratio> + <onleft>2</onleft> + <onright>2</onright> + <onup>2</onup> + <ondown>2</ondown> + </control> + <control> + <description>Current program title</description> + <type>label</type> + <id>13</id> + <posX>260</posX> + <posY>440</posY> + <width>250</width> + <label>#TV.RecordedTV.Title</label> + <font>font14</font> + <align>left</align> + <textcolor>FFFFFFFF</textcolor> + </control> + <control> + <description>Current program time</description> + <type>label</type> + <id>14</id> + <posX>260</posX> + <posY>460</posY> + <label>#TV.RecordedTV.Time</label> + <align>left</align> + <font>font14</font> + <textcolor>FFB2D4F5</textcolor> + </control> + <control> + <description>Description1</description> + <type>textbox</type> + <id>15</id> + <posX>260</posX> + <posY>450</posY> + <width>430</width> + <height>80</height> + <label>#TV.RecordedTV.Description</label> + <font>font14</font> + <textcolor>FFFFFFFF</textcolor> + </control> + </control> + <control> + <description>Current program background</description> + <type>image</type> + <id>1</id> + <posX>60</posX> + <posY>420</posY> + <width>180</width> + <height>135</height> + <colordiffuse>60ffffff</colordiffuse> + <texture>previewbackground.png</texture> + </control> + <control> + <description>TV preview window</description> + <type>videowindow</type> + <id>99</id> + <posX>65</posX> + <posY>425</posY> + <width>170</width> + <height>125</height> + <onup>30</onup> + <action>18</action> + <textureFocus>video_window_focus.png</textureFocus> + </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: <rs...@us...> - 2007-07-26 13:34:55
|
Revision: 768 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=768&view=rev Author: rsparey Date: 2007-07-26 06:34:47 -0700 (Thu, 26 Jul 2007) Log Message: ----------- In process of adding sub-menu's to basic home page Modified Paths: -------------- trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/background.png Added Paths: ----------- trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/SubMenu_Indicator.png Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/SubMenu_Indicator.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/SubMenu_Indicator.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/background.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mis...@us...> - 2007-07-26 13:05:17
|
Revision: 767 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=767&view=rev Author: misterd_sf Date: 2007-07-26 06:05:15 -0700 (Thu, 26 Jul 2007) Log Message: ----------- Fix in configuration form of the gui plugin. Leave event of Share name wasn't handled correctly. Modified Paths: -------------- trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs Modified: trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs 2007-07-25 19:07:12 UTC (rev 766) +++ trunk/plugins/My MPlayer/MPlayer_GUIPlugin/ConfigurationForm.cs 2007-07-26 13:05:15 UTC (rev 767) @@ -35,213 +35,216 @@ using MediaPortal.Configuration; namespace MPlayer { + /// <summary> + /// Configuration of the window plugin for MPlayer + /// </summary> + public partial class ConfigurationForm : Form { + + #region variables /// <summary> - /// Configuration of the window plugin for MPlayer + /// Last selected Share in the form /// </summary> - public partial class ConfigurationForm : Form { + private MPlayer_Share lastShare; + #endregion - #region variables - /// <summary> - /// Last selected Share in the form - /// </summary> - private MPlayer_Share lastShare; - #endregion + #region ctor + /// <summary> + /// Standard constructor + /// </summary> + public ConfigurationForm() { + InitializeComponent(); + } + #endregion - #region ctor - /// <summary> - /// Standard constructor - /// </summary> - public ConfigurationForm() { - InitializeComponent(); - } - #endregion + #region Event handling + /// <summary> + /// Handles the form load event + /// </summary> + /// <param name="sender">Sender object</param> + /// <param name="e">Event Arguments</param> + private void ConfigurationForm_Load(object sender, System.EventArgs e) { + loadConfiguration(); + } - #region Event handling - /// <summary> - /// Handles the form load event - /// </summary> - /// <param name="sender">Sender object</param> - /// <param name="e">Event Arguments</param> - private void ConfigurationForm_Load(object sender, System.EventArgs e) { - loadConfiguration(); - } + /// <summary> + /// Handles the OK-Button click event + /// </summary> + /// <param name="sender">Sender object</param> + /// <param name="e">Event Arguments</param> + private void okButton_Click(object sender, System.EventArgs e) { + saveConfiguration(); + this.Close(); + } - /// <summary> - /// Handles the OK-Button click event - /// </summary> - /// <param name="sender">Sender object</param> - /// <param name="e">Event Arguments</param> - private void okButton_Click(object sender, System.EventArgs e) { - saveConfiguration(); - this.Close(); - } - - /// <summary> - /// Handles the Cancel-Button click event - /// </summary> - /// <param name="sender">Sender object</param> - /// <param name="e">Event Arguments</param> - private void cancelButton_Click(object sender, EventArgs e) { - this.Close(); - } - - /// <summary> - /// Handles the Add-Button click event - /// </summary> - /// <param name="sender">Sender object</param> - /// <param name="e">Event Arguments</param> - private void shareAdd_Click(object sender, EventArgs e) { - MPlayer_Share temp = new MPlayer_Share(); - temp.Name = "NewLocation"; - shareList.Items.Add(temp); - shareList.SelectedItem = temp; + /// <summary> + /// Handles the Cancel-Button click event + /// </summary> + /// <param name="sender">Sender object</param> + /// <param name="e">Event Arguments</param> + private void cancelButton_Click(object sender, EventArgs e) { + this.Close(); + } - } + /// <summary> + /// Handles the Add-Button click event + /// </summary> + /// <param name="sender">Sender object</param> + /// <param name="e">Event Arguments</param> + private void shareAdd_Click(object sender, EventArgs e) { + MPlayer_Share temp = new MPlayer_Share(); + temp.Name = "NewLocation"; + shareList.Items.Add(temp); + shareList.SelectedItem = temp; - /// <summary> - /// Handles the Delete-Button click event - /// </summary> - /// <param name="sender">Sender object</param> - /// <param name="e">Event Arguments</param> - private void shareDelete_Click(object sender, EventArgs e) { - if (shareList.SelectedIndex > -1) { - shareList.Items.RemoveAt(shareList.SelectedIndex); - if (shareList.Items.Count > 0) { - shareList.SelectedIndex = 0; - } else { - shareList.SelectedIndex = -1; - } - } + } + /// <summary> + /// Handles the Delete-Button click event + /// </summary> + /// <param name="sender">Sender object</param> + /// <param name="e">Event Arguments</param> + private void shareDelete_Click(object sender, EventArgs e) { + if (shareList.SelectedIndex > -1) { + shareList.Items.RemoveAt(shareList.SelectedIndex); + if (shareList.Items.Count > 0) { + shareList.SelectedIndex = 0; + } else { + shareList.SelectedIndex = -1; } + } - /// <summary> - /// Handles the Selected index change on the share list - /// </summary> - /// <param name="sender">Sender object</param> - /// <param name="e">Event Arguments</param> - private void shareList_SelectedIndexChanged(object sender, EventArgs e) { - if (lastShare != null) { - lastShare.Path = shareLocation.Text; - } + } - if (shareList.SelectedIndex > -1) { - lastShare = shareList.SelectedItem as MPlayer_Share; - shareName.Text = lastShare.Name; - shareLocation.Text = lastShare.Path; - shareName.Enabled = true; - shareLocation.Enabled = true; - } else { - shareName.Text = String.Empty; - shareLocation.Text = String.Empty; - shareName.Enabled = false; - shareLocation.Enabled = false; - lastShare = null; - } + /// <summary> + /// Handles the Selected index change on the share list + /// </summary> + /// <param name="sender">Sender object</param> + /// <param name="e">Event Arguments</param> + private void shareList_SelectedIndexChanged(object sender, EventArgs e) { + if (lastShare != null) { + lastShare.Path = shareLocation.Text; + } - } + if (shareList.SelectedIndex > -1) { + lastShare = shareList.SelectedItem as MPlayer_Share; + shareName.Text = lastShare.Name; + shareLocation.Text = lastShare.Path; + shareName.Enabled = true; + shareLocation.Enabled = true; + } else { + shareName.Text = String.Empty; + shareLocation.Text = String.Empty; + shareName.Enabled = false; + shareLocation.Enabled = false; + lastShare = null; + } - /// <summary> - /// Handles the Leave event on the extension Textfield - /// </summary> - /// <param name="sender">Sender object</param> - /// <param name="e">Event Arguments</param> - private void shareName_Leave(object sender, EventArgs e) { - if (lastShare != null) { - lastShare.Name = shareName.Text; - shareList.Items[shareList.SelectedIndex] = lastShare; - } + } + /// <summary> + /// Handles the Leave event on the extension Textfield + /// </summary> + /// <param name="sender">Sender object</param> + /// <param name="e">Event Arguments</param> + private void shareName_Leave(object sender, EventArgs e) { + if (lastShare != null) { + int selectedIndex = shareList.SelectedIndex; + if (selectedIndex != -1) { + lastShare.Name = shareName.Text; + shareList.Items[selectedIndex] = lastShare; } + } - /// <summary> - /// Handles the Leave event on the extension Textfield - /// </summary> - /// <param name="sender">Sender object</param> - /// <param name="e">Event Arguments</param> - private void shareLocation_Leave(object sender, EventArgs e) { - if (lastShare != null) { - lastShare.Path = shareLocation.Text; - shareList.Items[shareList.SelectedIndex] = lastShare; - } + } + /// <summary> + /// Handles the Leave event on the extension Textfield + /// </summary> + /// <param name="sender">Sender object</param> + /// <param name="e">Event Arguments</param> + private void shareLocation_Leave(object sender, EventArgs e) { + if (lastShare != null) { + lastShare.Path = shareLocation.Text; + shareList.Items[shareList.SelectedIndex] = lastShare; + } - } - /// <summary> - /// Handles the Browse-Button click event - /// </summary> - /// <param name="sender">Sender object</param> - /// <param name="e">Event Arguments</param> - private void browseButton_Click(object sender, EventArgs e) { - folderBrowserDialog1.SelectedPath = shareLocation.Text; - folderBrowserDialog1.ShowDialog(); - shareLocation.Text = folderBrowserDialog1.SelectedPath; - } - #endregion + } - #region Configuration Methods - /// <summary> - /// Loads the configuration with the shares - /// </summary> - private void loadConfiguration() { - try { - MPlayer_Share share = null; - XmlDocument doc = new XmlDocument(); - string path = Config.GetFile(Config.Dir.Config,"MPlayer_GUIPlugin.xml"); - doc.Load(path); - XmlNodeList listShare = doc.DocumentElement.SelectNodes("/mplayergui/Share"); - foreach (XmlNode nodeShare in listShare) { - share = new MPlayer_Share(); - share.Name = nodeShare.Attributes["name"].Value; - share.Path = nodeShare.Attributes["path"].Value; - shareList.Items.Add(share); - } - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { - pluginName.Text = xmlreader.GetValueAsString("mplayer", "displayNameOfGUI", "My MPlayer GUI"); - myVideoShare.Checked = xmlreader.GetValueAsBool("mplayer", "useMyVideoShares", true); - myMusicShare.Checked = xmlreader.GetValueAsBool("mplayer", "useMyMusicShares", true); - } - } catch (Exception e) { - Log.Info("MPlayer GUI Error: Configuration could not be loaded: " + e.Message); - } + /// <summary> + /// Handles the Browse-Button click event + /// </summary> + /// <param name="sender">Sender object</param> + /// <param name="e">Event Arguments</param> + private void browseButton_Click(object sender, EventArgs e) { + folderBrowserDialog1.SelectedPath = shareLocation.Text; + folderBrowserDialog1.ShowDialog(); + shareLocation.Text = folderBrowserDialog1.SelectedPath; + } + #endregion + #region Configuration Methods + /// <summary> + /// Loads the configuration with the shares + /// </summary> + private void loadConfiguration() { + try { + MPlayer_Share share = null; + XmlDocument doc = new XmlDocument(); + string path = Config.GetFile(Config.Dir.Config, "MPlayer_GUIPlugin.xml"); + doc.Load(path); + XmlNodeList listShare = doc.DocumentElement.SelectNodes("/mplayergui/Share"); + foreach (XmlNode nodeShare in listShare) { + share = new MPlayer_Share(); + share.Name = nodeShare.Attributes["name"].Value; + share.Path = nodeShare.Attributes["path"].Value; + shareList.Items.Add(share); } - - /// <summary> - /// Stores the configuration with the shares - /// </summary> - private void saveConfiguration() { - shareList.SelectedIndex = -1; - XmlTextWriter writer = new XmlTextWriter(Config.GetFile(Config.Dir.Config,"MPlayer_GUIPlugin.xml"), System.Text.Encoding.UTF8); - writer.Formatting = Formatting.Indented; - writer.Indentation = 1; - writer.IndentChar = (char)9; - writer.WriteStartDocument(true); - writer.WriteStartElement("mplayergui"); //<mplayer> - writer.WriteAttributeString("version", "1"); - MPlayer_Share temp; - for (int i = 0; i < shareList.Items.Count; i++) { - temp = shareList.Items[i] as MPlayer_Share; - writer.WriteStartElement("Share"); //<Share> - writer.WriteAttributeString("name", temp.Name); - writer.WriteAttributeString("path", temp.Path); - writer.WriteEndElement(); //</Share> - } - writer.WriteEndElement(); //</mplayer> - writer.WriteEndDocument(); - writer.Close(); - using (MediaPortal.Profile.Settings xmlWriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { - if (String.IsNullOrEmpty(pluginName.Text)) { - xmlWriter.SetValue("mplayer", "displayNameOfGUI", "My MPlayer"); - } else { - xmlWriter.SetValue("mplayer", "displayNameOfGUI", pluginName.Text); - } - xmlWriter.SetValueAsBool("mplayer", "useMyMusicShares", myMusicShare.Checked); - xmlWriter.SetValueAsBool("mplayer", "useMyVideoShares", myVideoShare.Checked); - } + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { + pluginName.Text = xmlreader.GetValueAsString("mplayer", "displayNameOfGUI", "My MPlayer GUI"); + myVideoShare.Checked = xmlreader.GetValueAsBool("mplayer", "useMyVideoShares", true); + myMusicShare.Checked = xmlreader.GetValueAsBool("mplayer", "useMyMusicShares", true); } - #endregion + } catch (Exception e) { + Log.Info("MPlayer GUI Error: Configuration could not be loaded: " + e.Message); + } } + + /// <summary> + /// Stores the configuration with the shares + /// </summary> + private void saveConfiguration() { + shareList.SelectedIndex = -1; + XmlTextWriter writer = new XmlTextWriter(Config.GetFile(Config.Dir.Config, "MPlayer_GUIPlugin.xml"), System.Text.Encoding.UTF8); + writer.Formatting = Formatting.Indented; + writer.Indentation = 1; + writer.IndentChar = (char)9; + writer.WriteStartDocument(true); + writer.WriteStartElement("mplayergui"); //<mplayer> + writer.WriteAttributeString("version", "1"); + MPlayer_Share temp; + for (int i = 0; i < shareList.Items.Count; i++) { + temp = shareList.Items[i] as MPlayer_Share; + writer.WriteStartElement("Share"); //<Share> + writer.WriteAttributeString("name", temp.Name); + writer.WriteAttributeString("path", temp.Path); + writer.WriteEndElement(); //</Share> + } + writer.WriteEndElement(); //</mplayer> + writer.WriteEndDocument(); + writer.Close(); + using (MediaPortal.Profile.Settings xmlWriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) { + if (String.IsNullOrEmpty(pluginName.Text)) { + xmlWriter.SetValue("mplayer", "displayNameOfGUI", "My MPlayer"); + } else { + xmlWriter.SetValue("mplayer", "displayNameOfGUI", pluginName.Text); + } + xmlWriter.SetValueAsBool("mplayer", "useMyMusicShares", myMusicShare.Checked); + xmlWriter.SetValueAsBool("mplayer", "useMyVideoShares", myVideoShare.Checked); + } + } + #endregion + + } } \ 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: <mis...@us...> - 2007-07-25 19:07:14
|
Revision: 766 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=766&view=rev Author: misterd_sf Date: 2007-07-25 12:07:12 -0700 (Wed, 25 Jul 2007) Log Message: ----------- Added support for video output drivers: OpenGL and OpenGL2 (DirectX is still recommend) Added volume handling to the osd Added feature to activate subtitles by default Added .flv to the list of supported video formats Modified Paths: -------------- trunk/plugins/My MPlayer/Liesmich.pdf trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationManager.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ExtensionSettings.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/MPlayer_ExtPlayer.cs trunk/plugins/My MPlayer/MPlayer_ExtPlayer/SampleConfiguration/MPlayer_ExtPlayer.xml trunk/plugins/My MPlayer/Readme.pdf Modified: trunk/plugins/My MPlayer/Liesmich.pdf =================================================================== (Binary files differ) Modified: trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs =================================================================== --- trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs 2007-07-25 14:21:17 UTC (rev 765) +++ trunk/plugins/My MPlayer/MPlayer_ExtPlayer/ConfigurationForm.Designer.cs 2007-07-25 19:07:12 UTC (rev 766) @@ -23,1041 +23,1082 @@ #endregion namespace MPlayer { - partial class ConfigurationForm { + partial class ConfigurationForm { - #region Dispose - /// <summary> - /// Verwendete Ressourcen bereinigen. - /// </summary> - /// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param> - protected override void Dispose(bool disposing) { - if (disposing && (components != null)) { - components.Dispose(); - } - base.Dispose(disposing); - } - #endregion + #region Dispose + /// <summary> + /// Verwendete Ressourcen bereinigen. + /// </summary> + /// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param> + protected override void Dispose(bool disposing) { + if (disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + #endregion - #region Vom Windows Form-Designer generierter Code + #region Vom Windows Form-Designer generierter Code - /// <summary> - /// Erforderliche Methode für die Designerunterstützung. - /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. - /// </summary> - private void InitializeComponent() { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConfigurationForm)); - this.okButton = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.rebuildIndex = new System.Windows.Forms.CheckBox(); - this.priorityBoost = new System.Windows.Forms.CheckBox(); - this.label5 = new System.Windows.Forms.Label(); - this.optionalArguments = new System.Windows.Forms.TextBox(); - this.soundOutputDriver = new System.Windows.Forms.ComboBox(); - this.postProcessing = new System.Windows.Forms.ComboBox(); - this.aspectRatio = new System.Windows.Forms.ComboBox(); - this.deinterlace = new System.Windows.Forms.ComboBox(); - this.cancelButton = new System.Windows.Forms.Button(); - this.mplayerPath = new System.Windows.Forms.TextBox(); - this.label8 = new System.Windows.Forms.Label(); - this.folderSearch = new System.Windows.Forms.Button(); - this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); - this.tabControl1 = new System.Windows.Forms.TabControl(); - this.general_Tab = new System.Windows.Forms.TabPage(); - this.label30 = new System.Windows.Forms.Label(); - this.cacheSize = new System.Windows.Forms.ComboBox(); - this.label29 = new System.Windows.Forms.Label(); - this.soundOutputDevice = new System.Windows.Forms.ComboBox(); - this.passthroughAC3_DTS = new System.Windows.Forms.CheckBox(); - this.label22 = new System.Windows.Forms.Label(); - this.osdFont = new System.Windows.Forms.ComboBox(); - this.audioNormalize = new System.Windows.Forms.CheckBox(); - this.framedrop = new System.Windows.Forms.CheckBox(); - this.directRendering = new System.Windows.Forms.CheckBox(); - this.doubleBuffering = new System.Windows.Forms.CheckBox(); - this.label21 = new System.Windows.Forms.Label(); - this.label7 = new System.Windows.Forms.Label(); - this.noiseDenoise = new System.Windows.Forms.ComboBox(); - this.audioChannels = new System.Windows.Forms.ComboBox(); - this.video_audio_Tab = new System.Windows.Forms.TabPage(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.label26 = new System.Windows.Forms.Label(); - this.audioPlayerUse = new System.Windows.Forms.CheckBox(); - this.audioArgument = new System.Windows.Forms.TextBox(); - this.label27 = new System.Windows.Forms.Label(); - this.label28 = new System.Windows.Forms.Label(); - this.audioExtension = new System.Windows.Forms.TextBox(); - this.audioDelete = new System.Windows.Forms.Button(); - this.audioAdd = new System.Windows.Forms.Button(); - this.audioExtList = new System.Windows.Forms.ListBox(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.videoExtList = new System.Windows.Forms.ListBox(); - this.videoDelete = new System.Windows.Forms.Button(); - this.label24 = new System.Windows.Forms.Label(); - this.label23 = new System.Windows.Forms.Label(); - this.label25 = new System.Windows.Forms.Label(); - this.videoExtension = new System.Windows.Forms.TextBox(); - this.videoPlayerUse = new System.Windows.Forms.CheckBox(); - this.videoAdd = new System.Windows.Forms.Button(); - this.videoArgument = new System.Windows.Forms.TextBox(); - this.dvd_vcd_svcd_streams_Tab = new System.Windows.Forms.TabPage(); - this.label20 = new System.Windows.Forms.Label(); - this.unsvArguments = new System.Windows.Forms.TextBox(); - this.label19 = new System.Windows.Forms.Label(); - this.udpArguments = new System.Windows.Forms.TextBox(); - this.label18 = new System.Windows.Forms.Label(); - this.sdpArguments = new System.Windows.Forms.TextBox(); - this.label17 = new System.Windows.Forms.Label(); - this.rtspArguments = new System.Windows.Forms.TextBox(); - this.label16 = new System.Windows.Forms.Label(); - this.mpstArguments = new System.Windows.Forms.TextBox(); - this.label15 = new System.Windows.Forms.Label(); - this.mmsArguments = new System.Windows.Forms.TextBox(); - this.label14 = new System.Windows.Forms.Label(); - this.httpArguments = new System.Windows.Forms.TextBox(); - this.label13 = new System.Windows.Forms.Label(); - this.ftpArguments = new System.Windows.Forms.TextBox(); - this.label12 = new System.Windows.Forms.Label(); - this.cueArguments = new System.Windows.Forms.TextBox(); - this.label11 = new System.Windows.Forms.Label(); - this.svcdArguments = new System.Windows.Forms.TextBox(); - this.label10 = new System.Windows.Forms.Label(); - this.vcdArguments = new System.Windows.Forms.TextBox(); - this.label9 = new System.Windows.Forms.Label(); - this.dvdArguments = new System.Windows.Forms.TextBox(); - this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); - this.fontDialog1 = new System.Windows.Forms.FontDialog(); - this.tabControl1.SuspendLayout(); - this.general_Tab.SuspendLayout(); - this.video_audio_Tab.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.groupBox1.SuspendLayout(); - this.dvd_vcd_svcd_streams_Tab.SuspendLayout(); - this.SuspendLayout(); - // - // okButton - // - this.okButton.Location = new System.Drawing.Point(16, 475); - this.okButton.Name = "okButton"; - this.okButton.Size = new System.Drawing.Size(75, 23); - this.okButton.TabIndex = 3; - this.okButton.Text = "&OK"; - this.okButton.UseVisualStyleBackColor = true; - this.okButton.Click += new System.EventHandler(this.okButton_Click); - // - // label1 - // - this.label1.Location = new System.Drawing.Point(3, 14); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(117, 23); - this.label1.TabIndex = 8; - this.label1.Text = "Sound output driver:"; - // - // label2 - // - this.label2.Location = new System.Drawing.Point(3, 68); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(117, 23); - this.label2.TabIndex = 9; - this.label2.Text = "Postprocessing:"; - // - // label3 - // - this.label3.Location = new System.Drawing.Point(3, 95); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(117, 23); - this.label3.TabIndex = 10; - this.label3.Text = "Aspect Ratio:"; - // - // label4 - // - this.label4.Location = new System.Drawing.Point(3, 122); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(117, 23); - this.label4.TabIndex = 11; - this.label4.Text = "Deinterlace:"; - // - // rebuildIndex - // - this.rebuildIndex.Location = new System.Drawing.Point(6, 291); - this.rebuildIndex.Name = "rebuildIndex"; - this.rebuildIndex.Size = new System.Drawing.Size(188, 23); - this.rebuildIndex.TabIndex = 12; - this.rebuildIndex.Text = "Rebuild file index if necessary"; - this.rebuildIndex.UseVisualStyleBackColor = true; - // - // priorityBoost - // - this.priorityBoost.Location = new System.Drawing.Point(6, 320); - this.priorityBoost.Name = "priorityBoost"; - this.priorityBoost.Size = new System.Drawing.Size(188, 23); - this.priorityBoost.TabIndex = 13; - this.priorityBoost.Text = "Priority Boost"; - this.priorityBoost.UseVisualStyleBackColor = true; - // - // label5 - // - this.label5.Location = new System.Drawing.Point(3, 259); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(117, 23); - this.label5.TabIndex = 14; - this.label5.Text = "Optional Arguments:"; - // - // optionalArguments - // - this.optionalArguments.Location = new System.Drawing.Point(122, 256); - this.optionalArguments.Name = "optionalArguments"; - this.optionalArguments.Size = new System.Drawing.Size(260, 20); - this.optionalArguments.TabIndex = 15; - // - // soundOutputDriver - // - this.soundOutputDriver.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.soundOutputDriver.FormattingEnabled = true; - this.soundOutputDriver.Items.AddRange(new object[] { + /// <summary> + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// </summary> + private void InitializeComponent() { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConfigurationForm)); + this.okButton = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.rebuildIndex = new System.Windows.Forms.CheckBox(); + this.priorityBoost = new System.Windows.Forms.CheckBox(); + this.label5 = new System.Windows.Forms.Label(); + this.optionalArguments = new System.Windows.Forms.TextBox(); + this.soundOutputDriver = new System.Windows.Forms.ComboBox(); + this.postProcessing = new System.Windows.Forms.ComboBox(); + this.aspectRatio = new System.Windows.Forms.ComboBox(); + this.deinterlace = new System.Windows.Forms.ComboBox(); + this.cancelButton = new System.Windows.Forms.Button(); + this.mplayerPath = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.folderSearch = new System.Windows.Forms.Button(); + this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.general_Tab = new System.Windows.Forms.TabPage(); + this.label6 = new System.Windows.Forms.Label(); + this.videoOutputDriver = new System.Windows.Forms.ComboBox(); + this.subtitles = new System.Windows.Forms.CheckBox(); + this.label30 = new System.Windows.Forms.Label(); + this.cacheSize = new System.Windows.Forms.ComboBox(); + this.label29 = new System.Windows.Forms.Label(); + this.soundOutputDevice = new System.Windows.Forms.ComboBox(); + this.passthroughAC3_DTS = new System.Windows.Forms.CheckBox(); + this.label22 = new System.Windows.Forms.Label(); + this.osdFont = new System.Windows.Forms.ComboBox(); + this.audioNormalize = new System.Windows.Forms.CheckBox(); + this.framedrop = new System.Windows.Forms.CheckBox(); + this.directRendering = new System.Windows.Forms.CheckBox(); + this.doubleBuffering = new System.Windows.Forms.CheckBox(); + this.label21 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.noiseDenoise = new System.Windows.Forms.ComboBox(); + this.audioChannels = new System.Windows.Forms.ComboBox(); + this.video_audio_Tab = new System.Windows.Forms.TabPage(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.label26 = new System.Windows.Forms.Label(); + this.audioPlayerUse = new System.Windows.Forms.CheckBox(); + this.audioArgument = new System.Windows.Forms.TextBox(); + this.label27 = new System.Windows.Forms.Label(); + this.label28 = new System.Windows.Forms.Label(); + this.audioExtension = new System.Windows.Forms.TextBox(); + this.audioDelete = new System.Windows.Forms.Button(); + this.audioAdd = new System.Windows.Forms.Button(); + this.audioExtList = new System.Windows.Forms.ListBox(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.videoExtList = new System.Windows.Forms.ListBox(); + this.videoDelete = new System.Windows.Forms.Button(); + this.label24 = new System.Windows.Forms.Label(); + this.label23 = new System.Windows.Forms.Label(); + this.label25 = new System.Windows.Forms.Label(); + this.videoExtension = new System.Windows.Forms.TextBox(); + this.videoPlayerUse = new System.Windows.Forms.CheckBox(); + this.videoAdd = new System.Windows.Forms.Button(); + this.videoArgument = new System.Windows.Forms.TextBox(); + this.dvd_vcd_svcd_streams_Tab = new System.Windows.Forms.TabPage(); + this.label20 = new System.Windows.Forms.Label(); + this.unsvArguments = new System.Windows.Forms.TextBox(); + this.label19 = new System.Windows.Forms.Label(); + this.udpArguments = new System.Windows.Forms.TextBox(); + this.label18 = new System.Windows.Forms.Label(); + this.sdpArguments = new System.Windows.Forms.TextBox(); + this.label17 = new System.Windows.Forms.Label(); + this.rtspArguments = new System.Windows.Forms.TextBox(); + this.label16 = new System.Windows.Forms.Label(); + this.mpstArguments = new System.Windows.Forms.TextBox(); + this.label15 = new System.Windows.Forms.Label(); + this.mmsArguments = new System.Windows.Forms.TextBox(); + this.label14 = new System.Windows.Forms.Label(); + this.httpArguments = new System.Windows.Forms.TextBox(); + this.label13 = new System.Windows.Forms.Label(); + this.ftpArguments = new System.Windows.Forms.TextBox(); + this.label12 = new System.Windows.Forms.Label(); + this.cueArguments = new System.Windows.Forms.TextBox(); + this.label11 = new System.Windows.Forms.Label(); + this.svcdArguments = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.vcdArguments = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); + this.dvdArguments = new System.Windows.Forms.TextBox(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.fontDialog1 = new System.Windows.Forms.FontDialog(); + this.tabControl1.SuspendLayout(); + this.general_Tab.SuspendLayout(); + this.video_audio_Tab.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.dvd_vcd_svcd_streams_Tab.SuspendLayout(); + this.SuspendLayout(); + // + // okButton + // + this.okButton.Location = new System.Drawing.Point(18, 511); + this.okButton.Name = "okButton"; + this.okButton.Size = new System.Drawing.Size(75, 23); + this.okButton.TabIndex = 3; + this.okButton.Text = "&OK"; + this.okButton.UseVisualStyleBackColor = true; + this.okButton.Click += new System.EventHandler(this.okButton_Click); + // + // label1 + // + this.label1.Location = new System.Drawing.Point(3, 14); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(117, 23); + this.label1.TabIndex = 8; + this.label1.Text = "Sound output driver:"; + // + // label2 + // + this.label2.Location = new System.Drawing.Point(3, 95); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(117, 23); + this.label2.TabIndex = 9; + this.label2.Text = "Postprocessing:"; + // + // label3 + // + this.label3.Location = new System.Drawing.Point(3, 122); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(117, 23); + this.label3.TabIndex = 10; + this.label3.Text = "Aspect Ratio:"; + // + // label4 + // + this.label4.Location = new System.Drawing.Point(3, 149); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(117, 23); + this.label4.TabIndex = 11; + this.label4.Text = "Deinterlace:"; + // + // rebuildIndex + // + this.rebuildIndex.Location = new System.Drawing.Point(6, 318); + this.rebuildIndex.Name = "rebuildIndex"; + this.rebuildIndex.Size = new System.Drawing.Size(188, 23); + this.rebuildIndex.TabIndex = 12; + this.rebuildIndex.Text = "Rebuild file index if necessary"; + this.rebuildIndex.UseVisualStyleBackColor = true; + // + // priorityBoost + // + this.priorityBoost.Location = new System.Drawing.Point(6, 347); + this.priorityBoost.Name = "priorityBoost"; + this.priorityBoost.Size = new System.Drawing.Size(188, 23); + this.priorityBoost.TabIndex = 13; + this.priorityBoost.Text = "Priority Boost"; + this.priorityBoost.UseVisualStyleBackColor = true; + // + // label5 + // + this.label5.Location = new System.Drawing.Point(3, 286); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(117, 23); + this.label5.TabIndex = 14; + this.label5.Text = "Optional Arguments:"; + // + // optionalArguments + // + this.optionalArguments.Location = new System.Drawing.Point(122, 283); + this.optionalArguments.Name = "optionalArguments"; + this.optionalArguments.Size = new System.Drawing.Size(260, 20); + this.optionalArguments.TabIndex = 15; + // + // soundOutputDriver + // + this.soundOutputDriver.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.soundOutputDriver.FormattingEnabled = true; + this.soundOutputDriver.Items.AddRange(new object[] { "(don\'t decode sound)", "(don\'t play sound)", "Win32", "DirectSound"}); - this.soundOutputDriver.Location = new System.Drawing.Point(122, 11); - this.soundOutputDriver.Name = "soundOutputDriver"; - this.soundOutputDriver.Size = new System.Drawing.Size(260, 21); - this.soundOutputDriver.TabIndex = 16; - this.soundOutputDriver.SelectedIndexChanged += new System.EventHandler(this.soundOutputDriver_SelectedIndexChanged); - // - // postProcessing - // - this.postProcessing.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.postProcessing.FormattingEnabled = true; - this.postProcessing.Items.AddRange(new object[] { + this.soundOutputDriver.Location = new System.Drawing.Point(122, 11); + this.soundOutputDriver.Name = "soundOutputDriver"; + this.soundOutputDriver.Size = new System.Drawing.Size(260, 21); + this.soundOutputDriver.TabIndex = 16; + this.soundOutputDriver.SelectedIndexChanged += new System.EventHandler(this.soundOutputDriver_SelectedIndexChanged); + // + // postProcessing + // + this.postProcessing.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.postProcessing.FormattingEnabled = true; + this.postProcessing.Items.AddRange(new object[] { "Off", "Automatic", "Maximum quality"}); - this.postProcessing.Location = new System.Drawing.Point(122, 65); - this.postProcessing.Name = "postProcessing"; - this.postProcessing.Size = new System.Drawing.Size(260, 21); - this.postProcessing.TabIndex = 17; - // - // aspectRatio - // - this.aspectRatio.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.aspectRatio.FormattingEnabled = true; - this.aspectRatio.Items.AddRange(new object[] { + this.postProcessing.Location = new System.Drawing.Point(122, 92); + this.postProcessing.Name = "postProcessing"; + this.postProcessing.Size = new System.Drawing.Size(260, 21); + this.postProcessing.TabIndex = 17; + // + // aspectRatio + // + this.aspectRatio.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.aspectRatio.FormattingEnabled = true; + this.aspectRatio.Items.AddRange(new object[] { "Autodetect", "4:3", "16:9", "2,35"}); - this.aspectRatio.Location = new System.Drawing.Point(122, 92); - this.aspectRatio.Name = "aspectRatio"; - this.aspectRatio.Size = new System.Drawing.Size(260, 21); - this.aspectRatio.TabIndex = 18; - // - // deinterlace - // - this.deinterlace.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.deinterlace.FormattingEnabled = true; - this.deinterlace.Items.AddRange(new object[] { + this.aspectRatio.Location = new System.Drawing.Point(122, 119); + this.aspectRatio.Name = "aspectRatio"; + this.aspectRatio.Size = new System.Drawing.Size(260, 21); + this.aspectRatio.TabIndex = 18; + // + // deinterlace + // + this.deinterlace.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.deinterlace.FormattingEnabled = true; + this.deinterlace.Items.AddRange(new object[] { "Off", "Simple", "Adaptive"}); - this.deinterlace.Location = new System.Drawing.Point(122, 119); - this.deinterlace.Name = "deinterlace"; - this.deinterlace.Size = new System.Drawing.Size(260, 21); - this.deinterlace.TabIndex = 19; - // - // cancelButton - // - this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.cancelButton.Location = new System.Drawing.Point(348, 475); - this.cancelButton.Name = "cancelButton"; - this.cancelButton.Size = new System.Drawing.Size(75, 23); - this.cancelButton.TabIndex = 20; - this.cancelButton.Text = "&Cancel"; - this.cancelButton.UseVisualStyleBackColor = true; - this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); - // - // mplayerPath - // - this.mplayerPath.Location = new System.Drawing.Point(126, 401); - this.mplayerPath.Name = "mplayerPath"; - this.mplayerPath.Size = new System.Drawing.Size(174, 20); - this.mplayerPath.TabIndex = 21; - this.mplayerPath.Text = "C:\\Program Files\\MPlayer"; - // - // label8 - // - this.label8.Location = new System.Drawing.Point(3, 404); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(117, 23); - this.label8.TabIndex = 22; - this.label8.Text = "Path to MPlayer:"; - // - // folderSearch - // - this.folderSearch.Location = new System.Drawing.Point(306, 399); - this.folderSearch.Name = "folderSearch"; - this.folderSearch.Size = new System.Drawing.Size(76, 23); - this.folderSearch.TabIndex = 23; - this.folderSearch.Text = "&Browse ..."; - this.folderSearch.UseVisualStyleBackColor = true; - this.folderSearch.Click += new System.EventHandler(this.folderSearch_Click); - // - // folderBrowserDialog1 - // - this.folderBrowserDialog1.Description = "Select the folger of MPlayer:"; - // - // tabControl1 - // - this.tabControl1.Controls.Add(this.general_Tab); - this.tabControl1.Controls.Add(this.video_audio_Tab); - this.tabControl1.Controls.Add(this.dvd_vcd_svcd_streams_Tab); - this.tabControl1.Location = new System.Drawing.Point(12, 12); - this.tabControl1.Name = "tabControl1"; - this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(411, 457); - this.tabControl1.TabIndex = 24; - // - // general_Tab - // - this.general_Tab.Controls.Add(this.label30); - this.general_Tab.Controls.Add(this.cacheSize); - this.general_Tab.Controls.Add(this.label29); - this.general_Tab.Controls.Add(this.soundOutputDevice); - this.general_Tab.Controls.Add(this.passthroughAC3_DTS); - this.general_Tab.Controls.Add(this.label22); - this.general_Tab.Controls.Add(this.osdFont); - this.general_Tab.Controls.Add(this.audioNormalize); - this.general_Tab.Controls.Add(this.framedrop); - this.general_Tab.Controls.Add(this.directRendering); - this.general_Tab.Controls.Add(this.doubleBuffering); - this.general_Tab.Controls.Add(this.label21); - this.general_Tab.Controls.Add(this.label7); - this.general_Tab.Controls.Add(this.noiseDenoise); - this.general_Tab.Controls.Add(this.audioChannels); - this.general_Tab.Controls.Add(this.label1); - this.general_Tab.Controls.Add(this.folderSearch); - this.general_Tab.Controls.Add(this.label2); - this.general_Tab.Controls.Add(this.label8); - this.general_Tab.Controls.Add(this.mplayerPath); - this.general_Tab.Controls.Add(this.label3); - this.general_Tab.Controls.Add(this.label4); - this.general_Tab.Controls.Add(this.rebuildIndex); - this.general_Tab.Controls.Add(this.deinterlace); - this.general_Tab.Controls.Add(this.priorityBoost); - this.general_Tab.Controls.Add(this.aspectRatio); - this.general_Tab.Controls.Add(this.label5); - this.general_Tab.Controls.Add(this.postProcessing); - this.general_Tab.Controls.Add(this.optionalArguments); - this.general_Tab.Controls.Add(this.soundOutputDriver); - this.general_Tab.Location = new System.Drawing.Point(4, 22); - this.general_Tab.Name = "general_Tab"; - this.general_Tab.Padding = new System.Windows.Forms.Padding(3); - this.general_Tab.Size = new System.Drawing.Size(403, 431); - this.general_Tab.TabIndex = 0; - this.general_Tab.Text = "General"; - this.general_Tab.UseVisualStyleBackColor = true; - // - // label30 - // - this.label30.Location = new System.Drawing.Point(3, 232); - this.label30.Name = "label30"; - this.label30.Size = new System.Drawing.Size(117, 23); - this.label30.TabIndex = 38; - this.label30.Text = "Cachesize:"; - // - // cacheSize - // - this.cacheSize.FormattingEnabled = true; - this.cacheSize.Items.AddRange(new object[] { + this.deinterlace.Location = new System.Drawing.Point(122, 146); + this.deinterlace.Name = "deinterlace"; + this.deinterlace.Size = new System.Drawing.Size(260, 21); + this.deinterlace.TabIndex = 19; + // + // cancelButton + // + this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.cancelButton.Location = new System.Drawing.Point(348, 511); + this.cancelButton.Name = "cancelButton"; + this.cancelButton.Size = new System.Drawing.Size(75, 23); + this.cancelButton.TabIndex = 20; + this.cancelButton.Text = "&Cancel"; + this.cancelButton.UseVisualStyleBackColor = true; + this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click); + // + // mplayerPath + // + this.mplayerPath.Location = new System.Drawing.Point(122, 434); + this.mplayerPath.Name = "mplayerPath"; + this.mplayerPath.Size = new System.Drawing.Size(174, 20); + this.mplayerPath.TabIndex = 21; + this.mplayerPath.Text = "C:\\Program Files\\MPlayer"; + // + // label8 + // + this.label8.Location = new System.Drawing.Point(3, 437); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(117, 23); + this.label8.TabIndex = 22; + this.label8.Text = "Path to MPlayer:"; + // + // folderSearch + // + this.folderSearch.Location = new System.Drawing.Point(302, 432); + this.folderSearch.Name = "folderSearch"; + this.folderSearch.Size = new System.Drawing.Size(76, 23); + this.folderSearch.TabIndex = 23; + this.folderSearch.Text = "&Browse ..."; + this.folderSearch.UseVisualStyleBackColor = true; + this.folderSearch.Click += new System.EventHandler(this.folderSearch_Click); + // + // folderBrowserDialog1 + // + this.folderBrowserDialog1.Description = "Select the folger of MPlayer:"; + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.general_Tab); + this.tabControl1.Controls.Add(this.video_audio_Tab); + this.tabControl1.Controls.Add(this.dvd_vcd_svcd_streams_Tab); + this.tabControl1.Location = new System.Drawing.Point(12, 12); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(411, 493); + this.tabControl1.TabIndex = 24; + // + // general_Tab + // + this.general_Tab.Controls.Add(this.label6); + this.general_Tab.Controls.Add(this.videoOutputDriver); + this.general_Tab.Controls.Add(this.subtitles); + this.general_Tab.Controls.Add(this.label30); + this.general_Tab.Controls.Add(this.cacheSize); + this.general_Tab.Controls.Add(this.label29); + this.general_Tab.Controls.Add(this.soundOutputDevice); + this.general_Tab.Controls.Add(this.passthroughAC3_DTS); + this.general_Tab.Controls.Add(this.label22); + this.general_Tab.Controls.Add(this.osdFont); + this.general_Tab.Controls.Add(this.audioNormalize); + this.general_Tab.Controls.Add(this.framedrop); + this.general_Tab.Controls.Add(this.directRendering); + this.general_Tab.Controls.Add(this.doubleBuffering); + this.general_Tab.Controls.Add(this.label21); + this.general_Tab.Controls.Add(this.label7); + this.general_Tab.Controls.Add(this.noiseDenoise); + this.general_Tab.Controls.Add(this.audioChannels); + this.general_Tab.Controls.Add(this.label1); + this.general_Tab.Controls.Add(this.folderSearch); + this.general_Tab.Controls.Add(this.label2); + this.general_Tab.Controls.Add(this.label8); + this.general_Tab.Controls.Add(this.mplayerPath); + this.general_Tab.Controls.Add(this.label3); + this.general_Tab.Controls.Add(this.label4); + this.general_Tab.Controls.Add(this.rebuildIndex); + this.general_Tab.Controls.Add(this.deinterlace); + this.general_Tab.Controls.Add(this.priorityBoost); + this.general_Tab.Controls.Add(this.aspectRatio); + this.general_Tab.Controls.Add(this.label5); + this.general_Tab.Controls.Add(this.postProcessing); + this.general_Tab.Controls.Add(this.optionalArguments); + this.general_Tab.Controls.Add(this.soundOutputDriver); + this.general_Tab.Location = new System.Drawing.Point(4, 22); + this.general_Tab.Name = "general_Tab"; + this.general_Tab.Padding = new System.Windows.Forms.Padding(3); + this.general_Tab.Size = new System.Drawing.Size(403, 467); + this.general_Tab.TabIndex = 0; + this.general_Tab.Text = "General"; + this.general_Tab.UseVisualStyleBackColor = true; + // + // label6 + // + this.label6.Location = new System.Drawing.Point(3, 68); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(117, 23); + this.label6.TabIndex = 41; + this.label6.Text = "Video output driver:"; + // + // videoOutputDriver + // + this.videoOutputDriver.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.videoOutputDriver.FormattingEnabled = true; + this.videoOutputDriver.Items.AddRange(new object[] { + "DirectX", + "DirectX - No Acceleration", + "OpenGL", + "OpenGL2"}); + this.videoOutputDriver.Location = new System.Drawing.Point(122, 65); + this.videoOutputDriver.Name = "videoOutputDriver"; + this.videoOutputDriver.Size = new System.Drawing.Size(260, 21); + this.videoOutputDriver.TabIndex = 40; + this.videoOutputDriver.SelectedIndexChanged += new System.EventHandler(this.videoOutputDriver_SelectedIndexChanged); + // + // subtitles + // + this.subtitles.Location = new System.Drawing.Point(200, 405); + this.subtitles.Name = "subtitles"; + this.subtitles.Size = new System.Drawing.Size(178, 23); + this.subtitles.TabIndex = 39; + this.subtitles.Text = "Enable subtitles"; + this.subtitles.UseVisualStyleBackColor = true; + // + // label30 + // + this.label30.Location = new System.Drawing.Point(3, 259); + this.label30.Name = "label30"; + this.label30.Size = new System.Drawing.Size(117, 23); + this.label30.TabIndex = 38; + this.label30.Text = "Cachesize:"; + // + // cacheSize + // + this.cacheSize.FormattingEnabled = true; + this.cacheSize.Items.AddRange(new object[] { "2048", "4096", "8192"}); - this.cacheSize.Location = new System.Drawing.Point(122, 229); - this.cacheSize.Name = "cacheSize"; - this.cacheSize.Size = new System.Drawing.Size(260, 21); - this.cacheSize.TabIndex = 37; - this.cacheSize.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.cacheSize_KeyPress); - // - // label29 - // - this.label29.Location = new System.Drawing.Point(3, 41); - this.label29.Name = "label29"; - this.label29.Size = new System.Drawing.Size(117, 23); - this.label29.TabIndex = 36; - this.label29.Text = "Sound output device:"; - // - // soundOutputDevice - // - this.soundOutputDevice.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.soundOutputDevice.FormattingEnabled = true; - this.soundOutputDevice.Items.AddRange(new object[] { + this.cacheSize.Location = new System.Drawing.Point(122, 256); + this.cacheSize.Name = "cacheSize"; + this.cacheSize.Size = new System.Drawing.Size(260, 21); + this.cacheSize.TabIndex = 37; + this.cacheSize.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.cacheSize_KeyPress); + // + // label29 + // + this.label29.Location = new System.Drawing.Point(3, 41); + this.label29.Name = "label29"; + this.label29.Size = new System.Drawing.Size(117, 23); + this.label29.TabIndex = 36; + this.label29.Text = "Sound output device:"; + // + // soundOutputDevice + // + this.soundOutputDevice.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.soundOutputDevice.FormattingEnabled = true; + this.soundOutputDevice.Items.AddRange(new object[] { "(don\'t decode sound)", "(don\'t play sound)", "Win32", "DirectSound"}); - this.soundOutputDevice.Location = new System.Drawing.Point(122, 38); - this.soundOutputDevice.Name = "soundOutputDevice"; - this.soundOutputDevice.Size = new System.Drawing.Size(260, 21); - this.soundOutputDevice.TabIndex = 35; - // - // passthroughAC3_DTS - // - this.passthroughAC3_DTS.Location = new System.Drawing.Point(6, 378); - this.passthroughAC3_DTS.Name = "passthroughAC3_DTS"; - this.passthroughAC3_DTS.Size = new System.Drawing.Size(178, 23); - this.passthroughAC3_DTS.TabIndex = 34; - this.passthroughAC3_DTS.Text = "Passthrough AC3/DTS"; - this.passthroughAC3_DTS.UseVisualStyleBackColor = true; - // - // label22 - // - this.label22.Location = new System.Drawing.Point(3, 205); - this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(117, 23); - this.label22.TabIndex = 33; - this.label22.Text = "Font of OSD:"; - // - // osdFont - // - this.osdFont.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.osdFont.FormattingEnabled = true; - this.osdFont.Location = new System.Drawing.Point(122, 202); - this.osdFont.Name = "osdFont"; - this.osdFont.Size = new System.Drawing.Size(260, 21); - this.osdFont.TabIndex = 32; - // - // audioNormalize - // - this.audioNormalize.Location = new System.Drawing.Point(200, 349); - this.audioNormalize.Name = "audioNormalize"; - this.audioNormalize.Size = new System.Drawing.Size(178, 23); - this.audioNormalize.TabIndex = 31; - this.audioNormalize.Text = "Volume normalize"; - this.audioNormalize.UseVisualStyleBackColor = true; - // - // framedrop - // - this.framedrop.Location = new System.Drawing.Point(6, 349); - this.framedrop.Name = "framedrop"; - this.framedrop.Size = new System.Drawing.Size(188, 23); - this.framedrop.TabIndex = 30; - this.framedrop.Text = "Framedrop"; - this.framedrop.UseVisualStyleBackColor = true; - // - // directRendering - // - this.directRendering.Location = new System.Drawing.Point(200, 291); - this.directRendering.Name = "directRendering"; - this.directRendering.Size = new System.Drawing.Size(178, 23); - this.directRendering.TabIndex = 29; - this.directRendering.Text = "Direct Rendering"; - this.directRendering.UseVisualStyleBackColor = true; - // - // doubleBuffering - // - this.doubleBuffering.Location = new System.Drawing.Point(200, 320); - this.doubleBuffering.Name = "doubleBuffering"; - this.doubleBuffering.Size = new System.Drawing.Size(178, 23); - this.doubleBuffering.TabIndex = 28; - this.doubleBuffering.Text = "Double Buffering"; - this.doubleBuffering.UseVisualStyleBackColor = true; - // - // label21 - // - this.label21.Location = new System.Drawing.Point(3, 178); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(117, 23); - this.label21.TabIndex = 27; - this.label21.Text = "Noise/Denoise:"; - // - // label7 - // - this.label7.Location = new System.Drawing.Point(3, 149); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(117, 23); - this.label7.TabIndex = 26; - this.label7.Text = "Audio Channels:"; - // - // noiseDenoise - // - this.noiseDenoise.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.noiseDenoise.FormattingEnabled = true; - this.noiseDenoise.Items.AddRange(new object[] { + this.soundOutputDevice.Location = new System.Drawing.Point(122, 38); + this.soundOutputDevice.Name = "soundOutputDevice"; + this.soundOutputDevice.Size = new System.Drawing.Size(260, 21); + this.soundOutputDevice.TabIndex = 35; + // + // passthroughAC3_DTS + // + this.passthroughAC3_DTS.Location = new System.Drawing.Point(6, 405); + this.passthroughAC3_DTS.Name = "passthroughAC3_DTS"; + this.passthroughAC3_DTS.Size = new System.Drawing.Size(178, 23); + this.passthroughAC3_DTS.TabIndex = 34; + this.passthroughAC3_DTS.Text = "Passthrough AC3/DTS"; + this.passthroughAC3_DTS.UseVisualStyleBackColor = true; + // + // label22 + // + this.label22.Location = new System.Drawing.Point(3, 232); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(117, 23); + this.label22.TabIndex = 33; + this.label22.Text = "Font of OSD:"; + // + // osdFont + // + this.osdFont.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.osdFont.FormattingEnabled = true; + this.osdFont.Location = new System.Drawing.Point(122, 229); + this.osdFont.Name = "osdFont"; + this.osdFont.Size = new System.Drawing.Size(260, 21); + this.osdFont.TabIndex = 32; + // + // audioNormalize + // + this.audioNormalize.Location = new System.Drawing.Point(200, 376); + this.audioNormalize.Name = "audioNormalize"; + this.audioNormalize.Size = new System.Drawing.Size(178, 23); + this.audioNormalize.TabIndex = 31; + this.audioNormalize.Text = "Volume normalize"; + this.audioNormalize.UseVisualStyleBackColor = true; + // + // framedrop + // + this.framedrop.Location = new System.Drawing.Point(6, 376); + this.framedrop.Name = "framedrop"; + this.framedrop.Size = new System.Drawing.Size(188, 23); + this.framedrop.TabIndex = 30; + this.framedrop.Text = "Framedrop"; + this.framedrop.UseVisualStyleBackColor = true; + // + // directRendering + // + this.directRendering.Location = new System.Drawing.Point(200, 318); + this.directRendering.Name = "directRendering"; + this.directRendering.Size = new System.Drawing.Size(178, 23); + this.directRendering.TabIndex = 29; + this.directRendering.Text = "Direct Rendering"; + this.directRendering.UseVisualStyleBackColor = true; + // + // doubleBuffering + // + this.doubleBuffering.Location = new System.Drawing.Point(200, 347); + this.doubleBuffering.Name = "doubleBuffering"; + this.doubleBuffering.Size = new System.Drawing.Size(178, 23); + this.doubleBuffering.TabIndex = 28; + this.doubleBuffering.Text = "Double Buffering"; + this.doubleBuffering.UseVisualStyleBackColor = true; + // + // label21 + // + this.label21.Location = new System.Drawing.Point(3, 205); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(117, 23); + this.label21.TabIndex = 27; + this.label21.Text = "Noise/Denoise:"; + // + // label7 + // + this.label7.Location = new System.Drawing.Point(3, 176); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(117, 23); + this.label7.TabIndex = 26; + this.label7.Text = "Audio Channels:"; + // + // noiseDenoise + // + this.noiseDenoise.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.noiseDenoise.FormattingEnabled = true; + this.noiseDenoise.Items.AddRange(new object[] { "Nothing", "Noise", "High Quality Denoise", "Denoise"}); - this.noiseDenoise.Location = new System.Drawing.Point(122, 175); - this.noiseDenoise.Name = "noiseDenoise"; - this.noiseDenoise.Size = new System.Drawing.Size(260, 21); - this.noiseDenoise.TabIndex = 25; - // - // audioChannels - // - this.audioChannels.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.audioChannels.FormattingEnabled = true; - this.audioChannels.Items.AddRange(new object[] { + this.noiseDenoise.Location = new System.Drawing.Point(122, 202); + this.noiseDenoise.Name = "noiseDenoise"; + this.noiseDenoise.Size = new System.Drawing.Size(260, 21); + this.noiseDenoise.TabIndex = 25; + // + // audioChannels + // + this.audioChannels.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.audioChannels.FormattingEnabled = true; + this.audioChannels.Items.AddRange(new object[] { "Default", "Stereo", "Surround", "Full 5.1"}); - this.audioChannels.Location = new System.Drawing.Point(122, 146); - this.audioChannels.Name = "audioChannels"; - this.audioChannels.Size = new System.Drawing.Size(260, 21); - this.audioChannels.TabIndex = 24; - // - // video_audio_Tab - // - this.video_audio_Tab.Controls.Add(this.groupBox2); - this.video_audio_Tab.Controls.Add(this.groupBox1); - this.video_audio_Tab.Location = new System.Drawing.Point(4, 22); - this.video_audio_Tab.Name = "video_audio_Tab"; - this.video_audio_Tab.Padding = new System.Windows.Forms.Padding(3); - this.video_audio_Tab.Size = new System.Drawing.Size(403, 431); - this.video_audio_Tab.TabIndex = 1; - this.video_audio_Tab.Text = "Video/Audio"; - this.video_audio_Tab.UseVisualStyleBackColor = true; - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.label26); - this.groupBox2.Controls.Add(this.audioPlayerUse); - this.groupBox2.Controls.Add(this.audioArgument); - this.groupBox2.Controls.Add(this.label27); - this.groupBox2.Controls.Add(this.label28); - this.groupBox2.Controls.Add(this.audioExtension); - this.groupBox2.Controls.Add(this.audioDelete); - this.groupBox2.Controls.Add(this.audioAdd); - this.groupBox2.Controls.Add(this.audioExtList); - this.groupBox2.Location = new System.Drawing.Point(3, 224); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(394, 201); - this.groupBox2.TabIndex = 30; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Audio"; - // - // label26 - // - this.label26.AutoSize = true; - this.label26.Location = new System.Drawing.Point(90, 72); - this.label26.Name = "label26"; - this.label26.Size = new System.Drawing.Size(100, 13); - this.label26.TabIndex = 44; - this.label26.Text = "External Player use:"; - // - // audioPlayerUse - // - this.audioPlayerUse.AutoSize = true; - this.audioPlayerUse.Enabled = false; - this.audioPlayerUse.Location = new System.Drawing.Point(196, 71); - this.audioPlayerUse.Name = "audioPlayerUse"; - this.audioPlayerUse.Size = new System.Drawing.Size(15, 14); - this.audioPlayerUse.TabIndex = 43; - this.audioPlayerUse.UseVisualStyleBackColor = true; - // - // audioArgument - // - this.audioArgument.Enabled = false; - this.audioArgument.Location = new System.Drawing.Point(196, 45); - this.audioArgument.Name = "audioArgument"; - this.audioArgument.Size = new System.Drawing.Size(192, 20); - this.audioArgument.TabIndex = 42; - // - // label27 - // - this.label27.AutoSize = true; - this.label27.Location = new System.Drawing.Point(90, 48); - this.label27.Name = "label27"; - this.label27.Size = new System.Drawing.Size(60, 13); - this.label27.TabIndex = 41; - this.label27.Text = "Arguments:"; - // - // label28 - // - this.label28.AutoSize = true; - this.label28.Location = new System.Drawing.Point(90, 22); - this.label28.Name = "label28"; - this.label28.Size = new System.Drawing.Size(56, 13); - this.label28.TabIndex = 40; - this.label28.Text = "Extension:"; - // - // audioExtension - // - this.audioExtension.Enabled = false; - this.audioExtension.Location = new System.Drawing.Point(196, 19); - this.audioExtension.Name = "audioExtension"; - this.audioExtension.Size = new System.Drawing.Size(192, 20); - this.audioExtension.TabIndex = 39; - this.audioExtension.Leave += new System.EventHandler(this.audioExtension_Leave); - // - // audioDelete - // - this.audioDelete.Location = new System.Drawing.Point(174, 169); - this.audioDelete.Name = "audioDelete"; - this.audioDelete.Size = new System.Drawing.Size(75, 23); - this.audioDelete.TabIndex = 38; - this.audioDelete.Text = "&Delete"; - this.audioDelete.UseVisualStyleBackColor = true; - this.audioDelete.Click += new System.EventHandler(this.audioDelete_Click); - // - // audioAdd - // - this.audioAdd.Location = new System.Drawing.Point(93, 169); - this.audioAdd.Name = "audioAdd"; - this.audioAdd.Size = new System.Drawing.Size(75, 23); - this.audioAdd.TabIndex = 37; - this.audioAdd.Text = "&Add"; - this.audioAdd.UseVisualStyleBackColor = true; - this.audioAdd.Click += new System.EventHandler(this.audioAdd_Click); - // - // audioExtList - // - this.audioExtList.FormattingEnabled = true; - this.audioExtList.Location = new System.Drawing.Point(6, 19); - this.audioExtList.Name = "audioExtList"; - this.audioExtList.Size = new System.Drawing.Size(78, 173); - this.audioExtList.TabIndex = 36; - this.audioExtList.SelectedIndexChanged += new System.EventHandler(this.audioExtList_SelectedIndexChanged); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.videoExtList); - this.groupBox1.Controls.Add(this.videoDelete); - this.groupBox1.Controls.Add(this.label24); - this.groupBox1.Controls.Add(this.label23); - this.groupBox1.Controls.Add(this.label25); - this.groupBox1.Controls.Add(this.videoExtension); - this.groupBox1.Controls.Add(this.videoPlayerUse); - this.groupBox1.Controls.Add(this.videoAdd); - this.groupBox1.Controls.Add(this.videoArgument); - this.groupBox1.Location = new System.Drawing.Point(3, 6); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(394, 201); - this.groupBox1.TabIndex = 29; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Video"; - // - // videoExtList - // - this.videoExtList.FormattingEnabled = true; - this.videoExtList.Location = new System.Drawing.Point(6, 19); - this.videoExtList.Name = "videoExtList"; - this.videoExtList.Size = new System.Drawing.Size(78, 173); - this.videoExtList.TabIndex = 18; - this.videoExtList.SelectedIndexChanged += new System.EventHandler(this.videoExtList_SelectedIndexChanged); - // - // videoDelete - // - this.videoDelete.Location = new System.Drawing.Point(174, 169); - this.videoDelete.Name = "videoDelete"; - this.videoDelete.Size = new System.Drawing.Size(75, 23); - this.videoDelete.TabIndex = 20; - this.videoDelete.Text = "&Delete"; - this.videoDelete.UseVisualStyleBackColor = true; - this.videoDelete.Click += new System.EventHandler(this.videoDelete_Click); - // - // label24 - // - this.label24.AutoSize = true; - this.label24.Location = new System.Drawing.Point(90, 48); - this.label24.Name = "label24"; - this.label24.Size = new System.Drawing.Size(60, 13); - this.label24.TabIndex = 23; - this.label24.Text = "Arguments:"; - // - // label23 - // - this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(90, 22); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(56, 13); - this.label23.TabIndex = 22; - this.label23.Text = "Extension:"; - // - // label25 - // - this.label25.AutoSize = true; - this.label25.Location = new System.Drawing.Point(90, 72); - this.label25.Name = "label25"; - this.label25.Size = new System.Drawing.Size(100, 13); - this.label25.TabIndex = 26; - this.label25.Text = "External Player use:"; - // - // videoExtension - // - this.videoExtension.Enabled = false; - this.videoExtension.Location = new System.Drawing.Point(196, 19); - this.videoExtension.Name = "videoExtension"; - this.videoExtension.Size = new System.Drawing.Size(192, 20); - this.videoExtension.TabIndex = 21; - this.videoExtension.Leave += new System.EventHandler(this.videoExtension_Leave); - // - // videoPlayerUse - // - this.videoPlayerUse.AutoSize = true; - this.videoPlayerUse.Enabled = false; - this.videoPlayerUse.Location = new System.Drawing.Point(196, 71); - this.videoPlayerUse.Name = "videoPlayerUse"; - this.videoPlayerUse.Size = new System.Drawing.Size(15, 14); - this.videoPlayerUse.TabIndex = 25; - this.videoPlayerUse.UseVisualStyleBackColor = true; - // - // videoAdd - // - this.videoAdd.Location = new System.Drawing.Point(93, 169); - this.videoAdd.Name = "videoAdd"; - this.videoAdd.Size = new System.Drawing.Size(75, 23); - this.videoAdd.TabIndex = 19; - this.videoAdd.Text = "&Add"; - this.videoAdd.UseVisualStyleBackColor = true; - this.videoAdd.Click += new System.EventHandler(this.videoAdd_Click); - // - // videoArgument - // - this.videoArgument.Enabled = false; - this.videoArgument.Location = new System.Drawing.Point(196, 45); - this.videoArgument.Name = "videoArgument"; - this.videoArgument.Size = new System.Drawing.Size(192, 20); - this.videoArgument.TabIndex = 24; - // - // dvd_vcd_svcd_streams_Tab - // - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.label20); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.unsvArguments); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.label19); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.udpArguments); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.label18); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.sdpArguments); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.label17); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.rtspArguments); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.label16); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.mpstArguments); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.label15); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.mmsArguments); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.label14); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.httpArguments); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.label13); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.ftpArguments); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.label12); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.cueArguments); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.label11); - this.dvd_vcd_svcd_streams_Tab.Controls.Add(this.svcdArguments); - this.dvd_vcd_sv... [truncated message content] |
From: <rs...@us...> - 2007-07-25 14:21:21
|
Revision: 765 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=765&view=rev Author: rsparey Date: 2007-07-25 07:21:17 -0700 (Wed, 25 Jul 2007) Log Message: ----------- Modified Paths: -------------- trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/background.png Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/background.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rs...@us...> - 2007-07-25 14:19:50
|
Revision: 764 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=764&view=rev Author: rsparey Date: 2007-07-25 07:19:49 -0700 (Wed, 25 Jul 2007) Log Message: ----------- In process of adding sub-menu's to basic home page Modified Paths: -------------- trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/Thumbs.db trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/background.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/defaultVideoBig.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/time_block.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/Thumbs.db trunk/skins/Foofaraw/Development Skin/Foofaraw/myvideo.xml Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml 2007-07-25 13:38:54 UTC (rev 763) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml 2007-07-25 14:19:49 UTC (rev 764) @@ -57,8 +57,8 @@ <textcolorNoFocus>00ffffff</textcolorNoFocus> <onleft>6</onleft> <onright>3</onright> - <onup>21</onup> - <ondown>101</ondown> + <onup>11</onup> + <ondown>21</ondown> <animation effect="fade" time="1000" delay="1000" >WindowOpen</animation> <animation effect="slide" time="1000" start="-161,0" end="0,0" delay="1000" acceleration="-1" >WindowOpen</animation> <animation effect="fade" time="1000">WindowClose</animation> @@ -92,8 +92,8 @@ <textcolorNoFocus>00ffffff</textcolorNoFocus> <onleft>2</onleft> <onright>4</onright> - <onup>21</onup> - <ondown>3</ondown> + <onup>11</onup> + <ondown>31</ondown> <animation effect="fade" time="1000" delay="750" >WindowOpen</animation> <animation effect="slide" time="1000" start="-422,0" end="0,0" delay="750" acceleration="-1" >WindowOpen</animation> <animation effect="fade" time="1000" delay="250" >WindowClose</animation> @@ -106,7 +106,7 @@ <control> - <description>home BM FFS</description> + <description>home BM TV</description> <type>button</type> <id>4</id> <posX>583</posX> @@ -126,8 +126,8 @@ <textcolorNoFocus>00ffffff</textcolorNoFocus> <onleft>3</onleft> <onright>5</onright> - <onup>21</onup> - <ondown>4</ondown> + <onup>11</onup> + <ondown>42</ondown> <animation effect="fade" time="1000" delay="500" >WindowOpen</animation> <animation effect="slide" time="1000" start="-683,0" end="0,0" delay="500" acceleration="-1" >WindowOpen</animation> <animation effect="fade" time="1000" delay="500">WindowClose</animation> @@ -237,5 +237,292 @@ <animation effect="fade" time="500" start="50">WindowClose</animation> </control> <showNumberofFilesLabel>no</showNumberofFilesLabel> - </controls> + + <control> + <description>LAST FM BUTTON</description> + <type>button</type> + <id>21</id> + <posX>100</posX> + <posY>687</posY> + <height>25</height> + <width>200</width> + <align>left</align> + <textureFocus>menu_list_focus.png</textureFocus> + <textureNoFocus>menu_list_nofocus.png</textureNoFocus> + <visible>Control.HasFocus(2)|Control.HasFocus(21)</visible> + <label>last fm</label> + <hyperlink>7890</hyperlink> + <font>font10</font> + <textcolor>white</textcolor> + <textYOff>1</textYOff> + <onup>2</onup> + <ondown>11</ondown> + <onleft>21</onleft> + <onright>21</onright> + <animation effect="fade" time="300">Visible</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + + <control> + <description>TV SERIES BUTTON</description> + <type>button</type> + <id>31</id> + <posX>100</posX> + <posY>687</posY> + <height>25</height> + <width>200</width> + <align>left</align> + <textureFocus>menu_list_focus.png</textureFocus> + <textureNoFocus>menu_list_nofocus.png</textureNoFocus> + <visible>Control.HasFocus(3)|Control.HasFocus(31)|Control.HasFocus(32)</visible> + <label>tv series</label> + <hyperlink>9811</hyperlink> + <font>font10</font> + <textcolor>white</textcolor> + <textYOff>1</textYOff> + <onup>3</onup> + <ondown>11</ondown> + <onleft>31</onleft> + <onright>32</onright> + <animation effect="fade" time="300">Visible</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + + <control> + <description>TRAILERES</description> + <type>button</type> + <id>32</id> + <posX>299</posX> + <posY>687</posY> + <height>25</height> + <width>200</width> + <align>left</align> + <textureFocus>menu_list_focus.png</textureFocus> + <textureNoFocus>menu_list_nofocus.png</textureNoFocus> + <visible>Control.HasFocus(3)|Control.HasFocus(31)|Control.HasFocus(32)</visible> + <label>trailers</label> + <hyperlink>5900</hyperlink> + <font>font10</font> + <textcolor>white</textcolor> + <textYOff>1</textYOff> + <onup>3</onup> + <ondown>11</ondown> + <onleft>31</onleft> + <onright>32</onright> + <animation effect="fade" time="300">Visible</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + <control> + <description>RECORDED TV BUTTON</description> + <type>button</type> + <id>42</id> + + <posX>100</posX> + <posY>687</posY> + <height>25</height> + <width>200</width> + <align>left</align> + <textureFocus>menu_list_focus.png</textureFocus> + <textureNoFocus>menu_list_nofocus.png</textureNoFocus> + <visible>Control.HasFocus(4)|Control.HasFocus(41)|Control.HasFocus(42)|Control.HasFocus(43)</visible> + <label>recorded tv</label> + <hyperlink>603</hyperlink> + <font>font10</font> + <textcolor>white</textcolor> + <textYOff>1</textYOff> + <onup>4</onup> + <ondown>11</ondown> + <onleft>43</onleft> + <onright>41</onright> + <animation effect="fade" time="300">Visible</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + <control> + <description>SCHEDULED TVBUTTONc</description> + <type>button</type> + <id>41</id> + <posX>299</posX> + <posY>687</posY> + <height>25</height> + <width>200</width> + <align>left</align> + <textureFocus>menu_list_focus.png</textureFocus> + <textureNoFocus>menu_list_nofocus.png</textureNoFocus> + <visible>Control.HasFocus(4)|Control.HasFocus(41)|Control.HasFocus(42)|Control.HasFocus(43)</visible> + <label>scheduled rec</label> + <hyperlink>601</hyperlink> + <font>font10</font> + <textcolor>white</textcolor> + <textYOff>1</textYOff> + <onup>4</onup> + <ondown>11</ondown> + <onleft>42</onleft> + <onright>43</onright> + <animation effect="fade" time="300">Visible</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + + + + <control> + <description>TV GUIDE BUTTON</description> + <type>button</type> + <id>43</id> + <posX>498</posX> + <posY>687</posY> + <height>25</height> + <width>200</width> + <align>left</align> + <textureFocus>menu_list_focus.png</textureFocus> + <textureNoFocus>menu_list_nofocus.png</textureNoFocus> + <visible>Control.HasFocus(4)|Control.HasFocus(41)|Control.HasFocus(42)|Control.HasFocus(43)</visible> + <label>tv guide</label> + <hyperlink>600</hyperlink> + <font>font10</font> + <textcolor>white</textcolor> + <textYOff>1</textYOff> + <onup>4</onup> + <ondown>11</ondown> + <onleft>41</onleft> + <onright>42</onright> + <animation effect="fade" time="300">Visible</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + + <control> + <description>Music submenu 1</description> + <type>button</type> + <id>51</id> + <posX>100</posX> + <posY>687</posY> + <height>25</height> + <width>200</width> + <align>left</align> + <textureFocus>menu_list_focus.png</textureFocus> + <textureNoFocus>menu_list_nofocus.png</textureNoFocus> + <visible>Control.HasFocus(5)|Control.HasFocus(51)|Control.HasFocus(52)</visible> + <label>playing now</label> + <hyperlink>510</hyperlink> + <font>font10</font> + <textcolor>white</textcolor> + <textYOff>1</textYOff> + <onup>5</onup> + <ondown>11</ondown> + <onleft>51</onleft> + <onright>52</onright> + <animation effect="fade" time="300">Visible</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + + <control> + <description>Music submenu 2</description> + <type>button</type> + <id>52</id> + <posX>299</posX> + <posY>687</posY> + <height>25</height> + <width>200</width> + <align>left</align> + <textureFocus>menu_list_focus.png</textureFocus> + <textureNoFocus>menu_list_nofocus.png</textureNoFocus> + <visible>Control.HasFocus(5)|Control.HasFocus(51)|Control.HasFocus(52)</visible> + <label>current playlist</label> + <hyperlink>500</hyperlink> + <font>font10</font> + <textcolor>white</textcolor> + <textYOff>1</textYOff> + <onup>5</onup> + <ondown>52</ondown> + <onleft>51</onleft> + <onright>52</onright> + <animation effect="fade" time="300">Visible</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + + <control> + <description>Other submenu 1</description> + <type>button</type> + <id>71</id> + <posX>100</posX> + <posY>687</posY> + <height>25</height> + <width>200</width> + <align>left</align> + <textureFocus>menu_list_focus.png</textureFocus> + <textureNoFocus>menu_list_nofocus.png</textureNoFocus> + <visible>Control.HasFocus(7)|Control.HasFocus(71)|Control.HasFocus(72)|Control.HasFocus(73)</visible> + <label>weather</label> + <hyperlink>2600</hyperlink> + <font>font10</font> + <textcolor>white</textcolor> + <textYOff>1</textYOff> + <onup>7</onup> + <ondown>71</ondown> + <onleft>71</onleft> + <onright>72</onright> + <animation effect="fade" time="300">Visible</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + + <control> + <description>Other submenu 2</description> + <type>button</type> + <id>72</id> + <posX>299</posX> + <posY>687</posY> + <height>25</height> + <width>200</width> + <align>left</align> + <textureFocus>submenu_focus.png</textureFocus> + <textureNoFocus>submenu.png</textureNoFocus> + <visible>Control.HasFocus(7)|Control.HasFocus(71)|Control.HasFocus(72)|Control.HasFocus(73)</visible> + <label>plugins</label> + <hyperlink>34</hyperlink> + <font>font10</font> + <textcolor>white</textcolor> + <textYOff>1</textYOff> + <onup>7</onup> + <ondown>72</ondown> + <onleft>71</onleft> + <onright>73</onright> + <animation effect="fade" time="300">Visible</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + + <control> + <description>Other submenu 3</description> + <type>button</type> + <id>73</id> + <posX>498</posX> + <posY>687</posY> + <height>25</height> + <width>200</width> + <align>left</align> + <textureFocus>submenu_focus.png</textureFocus> + <textureNoFocus>submenu.png</textureNoFocus> + <visible>Control.HasFocus(7)|Control.HasFocus(71)|Control.HasFocus(72)|Control.HasFocus(73)</visible> + <label>news</label> + <hyperlink>2700</hyperlink> + <font>font10</font> + <textcolor>white</textcolor> + <textYOff>1</textYOff> + <onup>7</onup> + <ondown>73</ondown> + <onleft>72</onleft> + <onright>73</onright> + <animation effect="fade" time="300">Visible</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="fade" time="400">WindowClose</animation> + </control> + </controls> </window> \ No newline at end of file Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/Thumbs.db =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/background.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/defaultVideoBig.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/time_block.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/Thumbs.db =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/myvideo.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/myvideo.xml 2007-07-25 13:38:54 UTC (rev 763) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/myvideo.xml 2007-07-25 14:19:49 UTC (rev 764) @@ -343,10 +343,17 @@ <onright>2</onright> <onup>2</onup> <ondown>2</ondown> - <itemWidth>150</itemWidth> + <itemWidth>110</itemWidth> <itemHeight>220</itemHeight> <thumbWidth>80</thumbWidth> - <thumbHeight>115</thumbHeight> + <thumbHeight>111</thumbHeight> + <background>dvd_case.png</background> + <backgroundx>100</backgroundx> + <backgroundy>580</backgroundy> + <backgroundwidth>95</backgroundwidth> + <backgroundheight>180</backgroundheight> + <backgrounddiffuse>ffffffff</backgrounddiffuse> + </control> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <moi...@us...> - 2007-07-25 13:39:01
|
Revision: 763 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=763&view=rev Author: moiristo Date: 2007-07-25 06:38:54 -0700 (Wed, 25 Jul 2007) Log Message: ----------- Removed Paths: ------------- trunk/plugins/UitzendingGemist/images/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <moi...@us...> - 2007-07-25 13:38:07
|
Revision: 762 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=762&view=rev Author: moiristo Date: 2007-07-25 06:38:02 -0700 (Wed, 25 Jul 2007) Log Message: ----------- Removed Paths: ------------- trunk/plugins/UitzendingGemist/skin/[Default Skin]/ trunk/plugins/UitzendingGemist/skin/[Project Mayhem]/ trunk/plugins/UitzendingGemist/skin/[Wide skin]/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <moi...@us...> - 2007-07-25 13:37:34
|
Revision: 761 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=761&view=rev Author: moiristo Date: 2007-07-25 06:37:32 -0700 (Wed, 25 Jul 2007) Log Message: ----------- version 0.9 Modified Paths: -------------- trunk/plugins/UitzendingGemist/Readme.txt trunk/plugins/UitzendingGemist/UitGemist/ConfigurationForm.Designer.cs trunk/plugins/UitzendingGemist/UitGemist/ConfigurationForm.cs trunk/plugins/UitzendingGemist/UitGemist/NLGemist.cs trunk/plugins/UitzendingGemist/UitGemist/NLSecondScreen.cs trunk/plugins/UitzendingGemist/UitGemist/RTLGemist.cs trunk/plugins/UitzendingGemist/UitGemist/ShowWaitCursor.cs trunk/plugins/UitzendingGemist/UitGemist/TienGemist.cs trunk/plugins/UitzendingGemist/UitGemist/TienSecondScreen.cs trunk/plugins/UitzendingGemist/UitGemist/UitGemist.csproj trunk/plugins/UitzendingGemist/UitGemist/UitGemistMain.cs Added Paths: ----------- trunk/plugins/UitzendingGemist/UitGemist/MultipartForm.cs trunk/plugins/UitzendingGemist/UitGemist/TienLogin.cs trunk/plugins/UitzendingGemist/images/hover_nlgemist.png trunk/plugins/UitzendingGemist/images/hover_rtlgemist.png trunk/plugins/UitzendingGemist/images/hover_tiengemist.png trunk/plugins/UitzendingGemist/images/nlgemist.png trunk/plugins/UitzendingGemist/images/tiengemist.png Modified: trunk/plugins/UitzendingGemist/Readme.txt =================================================================== --- trunk/plugins/UitzendingGemist/Readme.txt 2007-07-24 23:02:23 UTC (rev 760) +++ trunk/plugins/UitzendingGemist/Readme.txt 2007-07-25 13:37:32 UTC (rev 761) @@ -3,25 +3,28 @@ This plugin for MediaPortal makes it possible to browse and watch the -internet streams provided by uitzendinggemist.nl and www.rtl.nl. +internet streams provided by uitzendinggemist.nl,www.rtl.nl and tien.tv. This plugin is a frontend to the website and allows the user watch these streams from within Mediaportal. - installation: +- Use Dukus's MPInstaller utility (available in the plugins/utilities download section) to install the plugin -- Unpack -- Use Dukus's MPInstaller utility (available in the plugins/utilities download section) to install the plugin. Be sure to use the 0.2.2_SVN MPI when you are using the latest MP snapshot. +usage: +- First go to the configuration pane and choose default speed +- To be able to watch Tien emissions: + - Get an account at http://www.tien.tv (it's free!) + - Enter the account data in the 'Tien Account' tab -bugs needed to be fixed -- After an emission finishes, MP isn't notified and will not go back to the menu. -(you have to stop the playback manually) +thanks: +A big thanks to ZipperZip for letting me use his original Uitzending_Gemist Plugin code. -thanks: +0.9 +- Added support for Tien Gemist! +- Some minor changes +- No PM3 skin for TienGemist yet -A big thanks to ZipperZip for letting me use his Uitzending_Gemist Plugin code. - 0.8 - Fixed the TopTen screen of RTLGemist - Recompiled against the latest SVN Modified: trunk/plugins/UitzendingGemist/UitGemist/ConfigurationForm.Designer.cs =================================================================== --- trunk/plugins/UitzendingGemist/UitGemist/ConfigurationForm.Designer.cs 2007-07-24 23:02:23 UTC (rev 760) +++ trunk/plugins/UitzendingGemist/UitGemist/ConfigurationForm.Designer.cs 2007-07-25 13:37:32 UTC (rev 761) @@ -33,7 +33,17 @@ this.groupBox1 = new System.Windows.Forms.GroupBox(); this.okBtn = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.Speed = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.passBox = new System.Windows.Forms.MaskedTextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.userBox = new System.Windows.Forms.TextBox(); this.groupBox1.SuspendLayout(); + this.tabControl1.SuspendLayout(); + this.Speed.SuspendLayout(); + this.tabPage2.SuspendLayout(); this.SuspendLayout(); // // sbBtn @@ -62,7 +72,7 @@ // this.groupBox1.Controls.Add(this.bbBtn); this.groupBox1.Controls.Add(this.sbBtn); - this.groupBox1.Location = new System.Drawing.Point(12, 12); + this.groupBox1.Location = new System.Drawing.Point(6, 6); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(169, 70); this.groupBox1.TabIndex = 2; @@ -71,7 +81,7 @@ // // okBtn // - this.okBtn.Location = new System.Drawing.Point(12, 88); + this.okBtn.Location = new System.Drawing.Point(12, 129); this.okBtn.Name = "okBtn"; this.okBtn.Size = new System.Drawing.Size(75, 23); this.okBtn.TabIndex = 3; @@ -81,27 +91,102 @@ // // button1 // - this.button1.Location = new System.Drawing.Point(93, 88); + this.button1.Location = new System.Drawing.Point(93, 129); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 4; this.button1.Text = "Cancel"; this.button1.UseVisualStyleBackColor = true; - + this.button1.Click += new System.EventHandler(this.button1_Click); // + // tabControl1 + // + this.tabControl1.AccessibleName = ""; + this.tabControl1.Controls.Add(this.Speed); + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Location = new System.Drawing.Point(12, 12); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(262, 111); + this.tabControl1.TabIndex = 5; + this.tabControl1.Tag = ""; + // + // Speed + // + this.Speed.Controls.Add(this.groupBox1); + this.Speed.Location = new System.Drawing.Point(4, 22); + this.Speed.Name = "Speed"; + this.Speed.Padding = new System.Windows.Forms.Padding(3); + this.Speed.Size = new System.Drawing.Size(254, 85); + this.Speed.TabIndex = 0; + this.Speed.Text = "Speed"; + this.Speed.UseVisualStyleBackColor = true; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.passBox); + this.tabPage2.Controls.Add(this.label2); + this.tabPage2.Controls.Add(this.label1); + this.tabPage2.Controls.Add(this.userBox); + this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(254, 85); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "Tien Account"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // passBox + // + this.passBox.Location = new System.Drawing.Point(77, 45); + this.passBox.Name = "passBox"; + this.passBox.PasswordChar = '*'; + this.passBox.Size = new System.Drawing.Size(164, 20); + this.passBox.TabIndex = 3; + this.passBox.UseSystemPasswordChar = true; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(6, 48); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(59, 13); + this.label2.TabIndex = 2; + this.label2.Text = "Password: "; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(6, 23); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(61, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Username: "; + // + // userBox + // + this.userBox.Location = new System.Drawing.Point(77, 16); + this.userBox.Name = "userBox"; + this.userBox.Size = new System.Drawing.Size(164, 20); + this.userBox.TabIndex = 0; + // // ConfigurationForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(246, 120); + this.ClientSize = new System.Drawing.Size(292, 156); + this.Controls.Add(this.tabControl1); this.Controls.Add(this.button1); this.Controls.Add(this.okBtn); - this.Controls.Add(this.groupBox1); this.Name = "ConfigurationForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "UitzendingGemist Configuration"; this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); + this.tabControl1.ResumeLayout(false); + this.Speed.ResumeLayout(false); + this.tabPage2.ResumeLayout(false); + this.tabPage2.PerformLayout(); this.ResumeLayout(false); } @@ -113,5 +198,12 @@ private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Button okBtn; private System.Windows.Forms.Button button1; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage Speed; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox userBox; + private System.Windows.Forms.MaskedTextBox passBox; + private System.Windows.Forms.Label label2; } } \ No newline at end of file Modified: trunk/plugins/UitzendingGemist/UitGemist/ConfigurationForm.cs =================================================================== --- trunk/plugins/UitzendingGemist/UitGemist/ConfigurationForm.cs 2007-07-24 23:02:23 UTC (rev 760) +++ trunk/plugins/UitzendingGemist/UitGemist/ConfigurationForm.cs 2007-07-25 13:37:32 UTC (rev 761) @@ -22,6 +22,10 @@ this.sbBtn.Checked = !broadband; this.bbBtn.Checked = broadband; + + string[] account = ShowWaitCursor.getTienAccount(); + userBox.Text = account[0]; + passBox.Text = account[1]; } private void okBtn_Click(object sender, EventArgs e) @@ -36,8 +40,16 @@ if(broadband) writer.SetValue("settings", "broadband", "yes"); else writer.SetValue("settings", "broadband", "no"); + + writer.SetValue("settings", "tienUser", userBox.Text); + writer.SetValue("settings", "tienPassword", passBox.Text); } this.Dispose(true); } + + private void button1_Click(object sender, EventArgs e) + { + this.Dispose(true); + } } } \ No newline at end of file Added: trunk/plugins/UitzendingGemist/UitGemist/MultipartForm.cs =================================================================== --- trunk/plugins/UitzendingGemist/UitGemist/MultipartForm.cs (rev 0) +++ trunk/plugins/UitzendingGemist/UitGemist/MultipartForm.cs 2007-07-25 13:37:32 UTC (rev 761) @@ -0,0 +1,337 @@ +using System; +using System.Net; +using System.Text; +using System.IO; +using System.Collections; +using MediaPortal.GUI.Library; + +namespace MediaPortal.GUI.UitGemist +{ + /// <summary> + /// Allow the transfer of data files using the W3C's specification + /// for HTTP multipart form data. Microsoft's version has a bug + /// where it does not format the ending boundary correctly. + /// Written by: gre...@no... + /// </summary> + public class MultipartForm + { + /// <summary> + /// Holds any form fields and values that you + /// wish to transfer with your data. + /// </summary> + private ArrayList coFormFields; + /// <summary> + /// Used mainly to avoid passing parameters to other routines. + /// Could have been local to sendFile(). + /// </summary> + protected HttpWebRequest coRequest; + /// <summary> + /// Used if we are testing and want to output the raw + /// request, minus http headers, out to a file. + /// </summary> + System.IO.Stream coFileStream; + /// <summary> + /// Difined to build the form field data that is being + /// passed along with the request. + /// </summary> + static string CONTENT_DISP = "Content-Disposition: form-data; name="; + /// <summary> + /// Allows you to specify the specific version of HTTP to use for uploads. + /// The dot NET stuff currently does not allow you to remove the continue-100 header + /// from 1.1 and 1.0 currently has a bug in it where it adds the continue-100. MS + /// has sent a patch to remove the continue-100 in HTTP 1.0. + /// </summary> + public Version TransferHttpVersion + {get{return coHttpVersion;}set{coHttpVersion=value;}} + Version coHttpVersion; + + /// <summary> + /// Used to change the content type of the file being sent. + /// Currently defaults to: text/xml. Other options are + /// text/plain or binary + /// </summary> + public string FileContentType + {get{return coFileContentType;}set{coFileContentType=value;}} + string coFileContentType; + + /// <summary> + /// Initialize our class for use to send data files. + /// </summary> + /// <param name="url">The web address of the recipient of the data transfer.</param> + public MultipartForm(string url) + { + URL = url; + coFormFields = new ArrayList(); + ResponseText = new StringBuilder(); + BufferSize = 1024 * 10; + BeginBoundary = "---------------------------4089736519495"; + TransferHttpVersion = HttpVersion.Version11; + } + //---------- BEGIN PROPERTIES SECTION ---------- + string _BeginBoundary; + /// <summary> + /// The string that defines the begining boundary of + /// our multipart transfer as defined in the w3c specs. + /// This method also sets the Content and Ending + /// boundaries as defined by the w3c specs. + /// </summary> + public string BeginBoundary + { + get{return _BeginBoundary;} + set + { + _BeginBoundary =value; + ContentBoundary = "--" + BeginBoundary; + EndingBoundary = ContentBoundary + "--"; + } + } + /// <summary> + /// The string that defines the content boundary of + /// our multipart transfer as defined in the w3c specs. + /// </summary> + protected string ContentBoundary + {get{return _ContentBoundary;}set{_ContentBoundary=value;}} + string _ContentBoundary; + /// <summary> + /// The string that defines the ending boundary of + /// our multipart transfer as defined in the w3c specs. + /// </summary> + protected string EndingBoundary + {get{return _EndingBoundary;}set{_EndingBoundary=value;}} + string _EndingBoundary; + /// <summary> + /// The cookies returned to us after the transfer is completed. + /// </summary> + public string ResponseCookies + { get { return _ResponseCookies; } set { _ResponseCookies = value; } } + string _ResponseCookies; + /// <summary> + /// The data returned to us after the transfer is completed. + /// </summary> + public StringBuilder ResponseText + {get{return _ResponseText;}set{_ResponseText=value;}} + StringBuilder _ResponseText; + /// <summary> + /// The web address of the recipient of the transfer. + /// </summary> + public string URL + {get{return _URL;}set{_URL = value;}} + string _URL; + /// <summary> + /// Allows us to determine the size of the buffer used + /// to send a piece of the file at a time out the IO + /// stream. Defaults to 1024 * 10. + /// </summary> + public int BufferSize + {get{return _BufferSize;}set{_BufferSize = value;}} + int _BufferSize; + //---------- END PROPERTIES SECTION ---------- + /// <summary> + /// Used to signal we want the output to go to a + /// text file verses being transfered to a URL. + /// </summary> + /// <param name="path"></param> + public void setFilename(string path) + { + coFileStream = new System.IO.FileStream(path,FileMode.Create,FileAccess.Write); + } + /// <summary> + /// Allows you to add some additional field data to be + /// sent along with the transfer. This is usually used + /// for things like userid and password to validate the + /// transfer. + /// </summary> + /// <param name="key">The form field name</param> + /// <param name="str">The form field value</param> + public void setField(string key, string str) + { + coFormFields.Add(new string[]{key,str}); + } + /// <summary> + /// Determines if we have a file stream set, and returns either + /// the HttpWebRequest stream of the file. + /// </summary> + /// <returns></returns> + public virtual System.IO.Stream getStream() + { + System.IO.Stream io; + if( null == coFileStream ) + io = coRequest.GetRequestStream(); + else + io = coFileStream; + return io; + } + /// <summary> + /// Here we actually make the request to the web server and + /// retrieve it's response into a text buffer. + /// </summary> + public virtual void getResponse() + { + if( null == coFileStream ) + { + System.IO.Stream io; + HttpWebResponse oResponse; + + oResponse = (HttpWebResponse)coRequest.GetResponse(); + if( null != oResponse ) + { + _ResponseCookies = oResponse.GetResponseHeader("Set-Cookie"); + io = oResponse.GetResponseStream(); + StreamReader sr = new StreamReader(io); + string str; + ResponseText.Length = 0; + while( (str = sr.ReadLine()) != null ) + ResponseText.Append(str); + oResponse.Close(); + } + else + throw new Exception("MultipartForm: Error retrieving server response"); + } + } + /// <summary> + /// Transmits a file to the web server stated in the + /// URL property. You may call this several times and it + /// will use the values previously set for fields and URL. + /// </summary> + /// <param name="aFilename">The full path of file being transfered.</param> + public void sendFile(string aFilename) + { + // The live of this object is only good during + // this function. Used mainly to avoid passing + // around parameters to other functions. + coRequest = (HttpWebRequest) WebRequest.Create(URL); + // Set use HTTP 1.0 or 1.1. + coRequest.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.0; nl; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5"; + coRequest.ProtocolVersion = TransferHttpVersion; + coRequest.Method = "POST"; + coRequest.ContentType = "multipart/form-data; boundary=" + BeginBoundary; + coRequest.KeepAlive = true; + string strFields = getFormfields(); + string strFileHdr = getFileheader(aFilename); + string strFileTlr = getFiletrailer(); + FileInfo info = new FileInfo(aFilename); + coRequest.ContentLength = strFields.Length + + strFileHdr.Length + + strFileTlr.Length + + info.Length; + System.IO.Stream io; + io = getStream(); + writeString(io,strFields); + writeString(io,strFileHdr); + this.writeFile(io, aFilename); + writeString(io,strFileTlr); + getResponse(); + io.Close(); + // End the life time of this request object. + coRequest = null; + } + + public void sendForm() + { + // The live of this object is only good during + // this function. Used mainly to avoid passing + // around parameters to other functions. + coRequest = (HttpWebRequest)WebRequest.Create(URL); + // Set use HTTP 1.0 or 1.1. + coRequest.ProtocolVersion = TransferHttpVersion; + coRequest.AllowAutoRedirect = false; + coRequest.MaximumAutomaticRedirections = 30; + coRequest.Method = "POST"; + coRequest.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 6.0; nl; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5"; + coRequest.ContentType = "multipart/form-data; boundary=" + BeginBoundary; + coRequest.KeepAlive = true; + string strFields = getFormfields(); + string strTlr = getTrailer(); + coRequest.ContentLength = strFields.Length + strTlr.Length; + System.IO.Stream io; + io = getStream(); + writeString(io, strFields); + writeString(io, strTlr); + getResponse(); + io.Close(); + // End the life time of this request object. + coRequest = null; + } + /// <summary> + /// Mainly used to turn the string into a byte buffer and then + /// write it to our IO stream. + /// </summary> + /// <param name="io">The io stream for output.</param> + /// <param name="str">The data to write.</param> + public void writeString(System.IO.Stream io, string str) + { + byte[] PostData = System.Text.Encoding.ASCII.GetBytes(str); + io.Write(PostData,0,PostData.Length); + } + /// <summary> + /// Builds the proper format of the multipart data that + /// contains the form fields and their respective values. + /// </summary> + /// <returns>The data to send in the multipart upload.</returns> + public string getFormfields() + { + string str=""; + IEnumerator myEnumerator = coFormFields.GetEnumerator(); + while ( myEnumerator.MoveNext() ) + { + string[] field = (string[]) myEnumerator.Current; + str += ContentBoundary + "\r\n" + + CONTENT_DISP + '"' + field[0] + "\"\r\n\r\n" + + field[1] + "\r\n"; + } + return str; + } + /// <summary> + /// Returns the proper content information for the + /// file we are sending. + /// </summary> + /// <remarks> + /// Hits Patel reported a bug when used with ActiveFile. + /// Added semicolon after sendfile to resolve that issue. + /// Tested for compatibility with IIS 5.0 and Java. + /// </remarks> + /// <param name="aFilename"></param> + /// <returns></returns> + public string getFileheader(string aFilename) + { + return ContentBoundary + "\r\n" + + CONTENT_DISP + + "\"sendfile\"; filename=\"" + + Path.GetFileName(aFilename) + "\"\r\n" + + "Content-type: " + FileContentType + "\r\n\r\n"; + } + /// <summary> + /// Creates the proper ending boundary for the multipart upload. + /// </summary> + /// <returns>The ending boundary.</returns> + public string getFiletrailer() + { + return "\r\n" + EndingBoundary; + } + + public string getTrailer() + { + return EndingBoundary + "\r\n"; + } + + /// <summary> + /// Reads in the file a chunck at a time then sends it to the + /// output stream. + /// </summary> + /// <param name="io">The io stream to write the file to.</param> + /// <param name="aFilename">The name of the file to transfer.</param> + public void writeFile(System.IO.Stream io, string aFilename) + { + FileStream readIn = new FileStream(aFilename, FileMode.Open, FileAccess.Read); + readIn.Seek(0, SeekOrigin.Begin); // move to the start of the file + byte[] fileData = new byte[BufferSize]; + int bytes; + while( (bytes = readIn.Read(fileData,0, BufferSize)) > 0 ) + { + // read the file data and send a chunk at a time + io.Write(fileData,0,bytes); + } + readIn.Close(); + } + } +} Modified: trunk/plugins/UitzendingGemist/UitGemist/NLGemist.cs =================================================================== --- trunk/plugins/UitzendingGemist/UitGemist/NLGemist.cs 2007-07-24 23:02:23 UTC (rev 760) +++ trunk/plugins/UitzendingGemist/UitGemist/NLGemist.cs 2007-07-25 13:37:32 UTC (rev 761) @@ -254,9 +254,8 @@ UrlsSecondScreen.Clear(); ViewFavorieten = false; - string result = wc.GetUrl(url, true); + string result = wc.GetUrl(url); - int i = 0; MatchCollection mc = Regex.Matches(result, @"title.\shref=.(?<url>.*?).>(?<name>.*?)<"); foreach (Match m in mc) @@ -365,12 +364,13 @@ Match m = Regex.Match(MainUrlBody, "id=." + search + ".*?</select>", RegexOptions.Singleline); string temp = m.Value; - MatchCollection mc = Regex.Matches(temp, @"value=.(?<url>\d*).*?.>(?<name>.*?)<"); + MatchCollection mc = Regex.Matches(temp, @"value=.(?<url>\d*).*?.>(?<name>.*?)<", RegexOptions.Singleline); foreach (Match m1 in mc) { NavUrls.Add("http://www.uitzendinggemist.nl/index.php/selectie?searchitem=" + search + "&" + search + "=" + m1.Groups["url"].Value); NavNames.Add(m1.Groups["name"].Value); } + NavNames.RemoveAt(0); NavUrls.RemoveAt(0); } @@ -484,7 +484,7 @@ string result = m.Value; int i = 0; - MatchCollection mc = Regex.Matches(result, @"img\ssrc=.(?<image>.*?.png).*?href=.(?<url2>/index.php.*?).\s.*?>(?<name>.*?)<"); + MatchCollection mc = Regex.Matches(result, @"<a\shref=.(?<url2>.*?).\sclass=.title.*?img\ssrc=.(?<image>.*?.png).*?class=.title.>(?<name>.*?)</a>", RegexOptions.Singleline); foreach (Match m1 in mc) { ImageUrls.Add(@"http://www.uitzendinggemist.nl"+m1.Groups["image"].Value); @@ -496,7 +496,7 @@ i++; } i = 0; - mc = Regex.Matches(result, @"(http://player.*?).\starget"); + mc = Regex.Matches(result, @"(http://player.*?).\starget", RegexOptions.Singleline); foreach(Match m1 in mc) { Urls.Add(m1.Groups[1].Value); @@ -504,7 +504,7 @@ i++; } i= 0; - mc = Regex.Matches(result, @"margin:5px..>(.*?)<"); + mc = Regex.Matches(result, @"margin:5px..>(.*?)<", RegexOptions.Singleline); foreach (Match m1 in mc) { Plot.Add(m1.Groups[1].Value); Modified: trunk/plugins/UitzendingGemist/UitGemist/NLSecondScreen.cs =================================================================== --- trunk/plugins/UitzendingGemist/UitGemist/NLSecondScreen.cs 2007-07-24 23:02:23 UTC (rev 760) +++ trunk/plugins/UitzendingGemist/UitGemist/NLSecondScreen.cs 2007-07-25 13:37:32 UTC (rev 761) @@ -112,7 +112,7 @@ Waardering.Clear(); StreamUrl.Clear(); - string result = NLGemist.wc.GetUrl(url, true); + string result = NLGemist.wc.GetUrl(url); result = NLGemist.ConvertString(result); //get image @@ -143,7 +143,7 @@ if (moreEmissions) { string series2url = url.Replace(@"/index.php/serie", @"/index.php/serie2"); - GetAfleveringen(NLGemist.wc.GetUrl(series2url, true), out moreEmissions); + GetAfleveringen(NLGemist.wc.GetUrl(series2url), out moreEmissions); } } Modified: trunk/plugins/UitzendingGemist/UitGemist/RTLGemist.cs =================================================================== --- trunk/plugins/UitzendingGemist/UitGemist/RTLGemist.cs 2007-07-24 23:02:23 UTC (rev 760) +++ trunk/plugins/UitzendingGemist/UitGemist/RTLGemist.cs 2007-07-25 13:37:32 UTC (rev 761) @@ -455,7 +455,7 @@ //sw.Close(); int i = 0; - MatchCollection mc = Regex.Matches(result, @"target=._parent.*?href=.(?<url>.*?.xml).*?>(?<name>.*?)</a>"); + MatchCollection mc = Regex.Matches(result, @"<a.*?href=.(?<url>.*?.xml).*?>(?<name>.*?)</a>"); if (mc.Count == 0) Log.Info("UitGemist: No emissions found"); foreach (Match m1 in mc) { Modified: trunk/plugins/UitzendingGemist/UitGemist/ShowWaitCursor.cs =================================================================== --- trunk/plugins/UitzendingGemist/UitGemist/ShowWaitCursor.cs 2007-07-24 23:02:23 UTC (rev 760) +++ trunk/plugins/UitzendingGemist/UitGemist/ShowWaitCursor.cs 2007-07-25 13:37:32 UTC (rev 761) @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Text; +using System.Text.RegularExpressions; using System.Threading; using MediaPortal.Dialogs; using MediaPortal.GUI.Library; @@ -15,10 +16,8 @@ private string result = String.Empty; private string workUrl = String.Empty; private bool _workerCompleted = true; - private bool Cookies = false; - private string agent = "Mozilla/4.0 (compatible; MSIE 6.0; WindowsNT 5.0; .NET CLR 1 .1.4322)"; + private string agent = "Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)"; private string postType = "application/x-www-form-urlencoded"; - private string secondUrl = String.Empty; private HttpWebRequest firstRequest = null; private HttpWebResponse firstResponse = null; private Stream recstream = null; @@ -67,10 +66,9 @@ return result; } - public string GetUrl(string url, bool useCookies) + public string GetTienUrl(string url, bool showWait) { - Cookies = useCookies; - secondUrl = url; + workUrl = url; if (_workerCompleted) { @@ -78,18 +76,26 @@ BackgroundWorker worker = new BackgroundWorker(); - worker.DoWork += new DoWorkEventHandler(DownloadWorker); + worker.DoWork += new DoWorkEventHandler(TienDownloadWorker); worker.RunWorkerAsync(url); using (WaitCursor cursor = new WaitCursor()) { while (_workerCompleted == false) - GUIWindowManager.Process(); + { + if(showWait) GUIWindowManager.Process(); + } } } return result; } + public string GetTienUrl(string url) + { + return GetTienUrl(url, true); + } + + private void XMLDownloadWorker(object sender, DoWorkEventArgs e) { System.Uri url = new System.Uri(workUrl); @@ -100,7 +106,7 @@ { WebClient client = new WebClient(); client.Encoding = Encoding.GetEncoding("iso-8859-1"); - client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)"); + client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)"); Stream data = client.OpenRead(url); StreamReader reader = new StreamReader(data,client.Encoding); result = reader.ReadToEnd(); @@ -118,39 +124,85 @@ } } - public void DownloadWorker(object sender, DoWorkEventArgs e) + public void TienDownloadWorker(object sender, DoWorkEventArgs e) { - if (Cookies==false) + // Make the request + HttpWebRequest firstRequest = (HttpWebRequest)WebRequest.Create(workUrl); + firstRequest.UserAgent = agent; + firstRequest.ContentType = postType; + firstRequest.CookieContainer = new CookieContainer(); + + string[] account = getTienAccount(); + + Cookie c = new Cookie(); + c.Domain = "www.tien.tv"; + c.Name = "u"; + c.Value = account[0]; + firstRequest.CookieContainer.Add(c); + + Cookie c2 = new Cookie(); + c2.Domain = "www.tien.tv"; + c2.Name = "p"; + c2.Value = account[1]; + firstRequest.CookieContainer.Add(c2); + + Cookie c3 = new Cookie(); + c3.Domain = "www.tien.tv"; + c3.Name = "loggedinsession"; + c3.Value = "true"; + firstRequest.CookieContainer.Add(c3); + + // Add login cookies, if any + if (TienLogin.loginCookies != null) { - firstRequest = (HttpWebRequest)WebRequest.Create(workUrl); - firstRequest.UserAgent = agent; - firstRequest.ContentType = postType; - firstRequest.CookieContainer = new CookieContainer(); - firstResponse = (HttpWebResponse) - firstRequest.GetResponse(); - recstream = firstResponse.GetResponseStream(); + string[] cookie = TienLogin.loginCookies.Split(new char[] { '=', ';' }); + Cookie c4 = new Cookie(); + c4.Domain = "www.tien.tv"; + c4.Name = cookie[0]; + c4.Value = cookie[1]; + c4.Path = cookie[cookie.Length - 1]; + firstRequest.CookieContainer.Add(c4); } - if (Cookies == true) - { - HttpWebRequest secondRequest = (HttpWebRequest)WebRequest.Create(secondUrl); - secondRequest.UserAgent = agent; - secondRequest.ContentType = postType; - secondRequest.CookieContainer = new CookieContainer(); - //Cookie c = new Cookie(); - //c.Domain = "player.omroep.nl"; - //c.Name = "player_instellingen"; - //c.Value = "formaat:wmv&kwaliteit:bb"; + HttpWebResponse firstResponse = (HttpWebResponse)firstRequest.GetResponse(); + recstream = firstResponse.GetResponseStream(); + + readResult(); + firstResponse.Close(); + _workerCompleted = true; + } - //secondRequest.CookieContainer.Add(c); + public void DownloadWorker(object sender, DoWorkEventArgs e) + { - CookieCollection cookies = firstResponse.Cookies; - secondRequest.CookieContainer.Add(cookies); + firstRequest = (HttpWebRequest)WebRequest.Create(workUrl); + firstRequest.UserAgent = agent; + firstRequest.ContentType = postType; + firstRequest.CookieContainer = new CookieContainer(); - HttpWebResponse secondResponse = (HttpWebResponse)secondRequest.GetResponse(); - recstream = secondResponse.GetResponseStream(); - //secondResponse.Close(); - } + Cookie c = new Cookie(); + c.Domain = "www.uitzendinggemist.nl"; + c.Name = "CheckUGCookie"; + c.Path = "/index.php/"; + c.Value = "true"; + firstRequest.CookieContainer.Add(c); + + Cookie c2 = new Cookie(); + c2.Domain = "www.uitzendinggemist.nl"; + c2.Name = "UGSES"; + c2.Value = "i6e59muv44i4h6m9lfa1h1lip6"; + firstRequest.CookieContainer.Add(c2); + + firstResponse = (HttpWebResponse) + firstRequest.GetResponse(); + recstream = firstResponse.GetResponseStream(); + + readResult(); + _workerCompleted = true; + } + + public void readResult() + { StringBuilder sb = new StringBuilder(); byte[] buf = new byte[8192]; @@ -169,11 +221,9 @@ } while (count > 0); + recstream.Close(); + result = sb.ToString(); - Cookies = false; - //recstream.Close(); - - _workerCompleted = true; } public string DownloadImage(string url) @@ -182,13 +232,15 @@ { WebClient wc = new WebClient(); string filename = url.Substring(url.LastIndexOf("/") + 1); + wc.DownloadFile(url, @"thumbs\MPTemp-" + filename); while (System.IO.File.Exists(@"thumbs\MPTemp-" + filename) != true) GUIWindowManager.Process(); return @"thumbs\MPTemp-" + filename; } - catch (Exception) + catch (Exception e) { + Log.Info(e.Message); return string.Empty; } } @@ -201,6 +253,18 @@ return reader.GetValueAsBool("settings", "broadband", true); } } + + public static string[] getTienAccount() + { + string dir = Directory.GetCurrentDirectory(); + using (MediaPortal.Profile.Settings reader = new MediaPortal.Profile.Settings(dir + @"\UitGemist.xml", false)) + { + string[] s = new string[2]; + s[0] = reader.GetValueAsString("settings", "tienUser", ""); + s[1] = reader.GetValueAsString("settings", "tienPassword", ""); + return s; + } + } } } Modified: trunk/plugins/UitzendingGemist/UitGemist/TienGemist.cs =================================================================== --- trunk/plugins/UitzendingGemist/UitGemist/TienGemist.cs 2007-07-24 23:02:23 UTC (rev 760) +++ trunk/plugins/UitzendingGemist/UitGemist/TienGemist.cs 2007-07-25 13:37:32 UTC (rev 761) @@ -16,10 +16,11 @@ { struct Program { - public string name; - public string ep; - public string date; - public string link; + public string name; + public string ep; + public string date; + public string link; + public string desc; } public class TienGemist : GUIWindow @@ -107,7 +108,9 @@ } if (control == facadeview) { - TienSecondScreen.Url = ((Program) favs[facadeview.SelectedListItemIndex]).link; + Program pSelected = (Program) progs[facadeview.SelectedListItemIndex]; + TienSecondScreen.ProgTitle = pSelected.name; + TienSecondScreen.Url = pSelected.link; GUIWindowManager.ActivateWindow(6804); } base.OnClicked(controlId, control, actionType); @@ -176,22 +179,30 @@ private void GetUitzendingen() { progs.Clear(); + ViewFavorieten = false; + ViewTopFifty = false; - string result = wc.GetXML(rootPage); + string result = TienGemist.wc.GetTienUrl(rootPage); + + Match m = Regex.Match(result, @"<select\sclass=.gx_overrules_selectionWidth.\sname=.selector_2.*?>(?<data>.*?)</select>", RegexOptions.Singleline); + result = "<root>" + m.Groups["data"].Value + "</root>"; + result = Regex.Replace(result, "<!--.*?-->", "", RegexOptions.Singleline); + result = result.Replace("SELECTED", ""); + result = result.Replace("&", "&"); + try { XPathDocument document = new XPathDocument(new System.IO.StringReader(result)); XPathNavigator navigator = document.CreateNavigator(); - XPathExpression programs = XPathExpression.Compile("//select[name='selector_2']//option"); //returns nodeset with rows per program + XPathExpression programs = XPathExpression.Compile("//option[position() != 1]"); //returns nodeset with rows per program - XPathNodeIterator nodes = navigator.Select(programs); while (nodes.MoveNext()) { XPathNavigator node = nodes.Current; Program p = new Program(); - p.name = node.SelectSingleNode(".").Value; + p.name = node.SelectSingleNode(".").Value.Trim(); p.link = node.SelectSingleNode("./@value").Value; progs.Add(p); } @@ -211,25 +222,44 @@ progs.Clear(); ViewFavorieten = false; - string result = wc.GetXML(url); + string result = wc.GetTienUrl(url); + Match m = Regex.Match(result,@"<div\sclass=.Element_4xflow.>(?<data>.*?)</div>",RegexOptions.Singleline); + result = "<root>" + m.Groups["data"].Value + "</root>"; + result = result.Replace("&", "&"); + + //FileStream fs = new FileStream("d:\\huh.txt", FileMode.Create, FileAccess.Write); + //StreamWriter sw = new StreamWriter(fs); + //try + //{ + // sw.Write(result); + //} + //finally + //{ + // if (sw != null) { sw.Close(); } + //} + try { XPathDocument document = new XPathDocument(new System.IO.StringReader(result)); XPathNavigator navigator = document.CreateNavigator(); - XPathExpression programs = XPathExpression.Compile("//table[class='Program']//tr"); //returns nodeset with rows per program - - + XPathExpression programs = XPathExpression.Compile("//table//tr"); //returns nodeset with rows per program + XPathNodeIterator nodes = navigator.Select(programs); while (nodes.MoveNext()) { - XPathNavigator node = nodes.Current; - Program p = new Program(); - p.name = node.SelectSingleNode("./td[1]/h1").Value; - p.ep = node.SelectSingleNode("./td[1]/h2").Value; - p.date = node.SelectSingleNode("./td[2]/h2").Value; - p.link = node.SelectSingleNode("./td[2]/a/@href").Value; - progs.Add(p); + try + { + XPathNavigator node = nodes.Current; + Program p = new Program(); + p.name = node.SelectSingleNode("./td[1]/h1").Value; + p.ep = node.SelectSingleNode("./td[1]/h2").Value; + p.date = node.SelectSingleNode("./td[2]/h2").Value; + p.link = node.SelectSingleNode("./td[2]/a/@href").Value; + progs.Add(p); + } + catch (NullReferenceException) { /* Last line only contains 1 td, so just ignore */ } } + Log.Info("UitGemist: Finished loading programs"); } catch (XmlException e) { @@ -243,14 +273,63 @@ public static string GetPlayUrl(string url) { - string page = wc.GetUrl(url); - Regex r = new Regex(@"var url =.(?<url>.*?);", RegexOptions.Multiline); + string[] login = ShowWaitCursor.getTienAccount(); + if (login[0].Trim().Equals("") || login[1].Trim().Equals("")) + { + GUIDialogOK pDlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); + if (pDlgOK != null) + { + pDlgOK.SetHeading("Geen login gevonden"); + pDlgOK.SetLine(1, "U dient eerst uw inloggegevens in te"); + pDlgOK.SetLine(2, "voeren het het configuratiescherm"); + pDlgOK.DoModal(GUIWindowManager.ActiveWindowEx); + } + return null; + } + Log.Info("Trying to play: " + url); + + string page = wc.GetTienUrl(rootUrl + url); + Regex r = new Regex(@"var\surl\s=\s.(?<url>.*?).;", RegexOptions.Singleline); + Match m = r.Match(page); - Log.Debug("" + m.Success); - url = m.Groups[1].Value; - Log.Debug("url length:" + url.Length); - Log.Debug(url); + + int i = 0; + while (i<2 && !m.Success) + { + //Try to login + TienLogin.login(); + page = wc.GetTienUrl(rootUrl + url); + + //FileStream fs = new FileStream("d:\\huh.txt", FileMode.Create, FileAccess.Write); + //StreamWriter sw = new StreamWriter(fs); + //try + //{ + // sw.Write(page); + //} + //finally + //{ + // if (sw != null) { sw.Close(); } + //} + + m = r.Match(page); + i++; + } + + if (!m.Success) + { + GUIDialogOK pDlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); + if (pDlgOK != null) + { + pDlgOK.SetHeading("Inloggen mislukt"); + pDlgOK.SetLine(1, "Controleer uw inloggegevens"); + pDlgOK.DoModal(GUIWindowManager.ActiveWindowEx); + } + return null; + } + + url = m.Groups["url"].Value; + //Log.Info("Found URL: " + url); url = ConvertString(url); return url; @@ -259,18 +338,20 @@ /// Fills the facadeview with item /// </summary> /// <param name="names">labels for the items</param> - private void ShowList(ArrayList progs) + private void ShowList(ArrayList progz) { - ViewTopFifty = false; facadeview.View = GUIFacadeControl.ViewMode.List; facadeview.Clear(); - foreach (Object o in progs) + + foreach (Object o in progz) { Program p = (Program)o; GUIListItem item = new GUIListItem(); item.Label = p.name; - if(p.ep != null) item.Label2 = p.ep; - if(p.date != null) item.Label3 = p.date; + + String date = p.date; + if (date != null) item.Label2 = date.Substring(0,date.LastIndexOf(" ")); + //if(p.ep != null) item.Label3 = p.ep; item.IsFolder = true; Util.Utils.SetDefaultIcons(item); facadeview.Add(item); @@ -369,6 +450,7 @@ /// </summary> private void ShowTopFifty() { + ViewTopFifty = true; GetUitzending(rootPage); } @@ -389,7 +471,5 @@ } - - - + } \ No newline at end of file Added: trunk/plugins/UitzendingGemist/UitGemist/TienLogin.cs =================================================================== --- trunk/plugins/UitzendingGemist/UitGemist/TienLogin.cs (rev 0) +++ trunk/plugins/UitzendingGemist/UitGemist/TienLogin.cs 2007-07-25 13:37:32 UTC (rev 761) @@ -0,0 +1,90 @@ +using System.Net; +using System.Text; +using System.IO; +using System; +using MediaPortal.Dialogs; +using MediaPortal.GUI.Library; + +namespace MediaPortal.GUI.UitGemist +{ + public class TienLogin + { + public static string loginCookies; + + public static bool login() + { + /** + * <form name="f177717f" + * action="http://www.tien.tv/web/form" + * method="post" encType="multipart/form-data"> + * + * <input type="hidden" name="ff" value="432453" /> + *<input type="hidden" name="abort" value="" /> + *<input type="hidden" name="formpartcode" value="abort"/> + *<input type="hidden" name="formelement" value="432453" /> + *<input type="hidden" name="element" value="177717" /> + *<input type="hidden" name="form" value="432414" /> + *<input type="hidden" name="pageid" value="54581" /> + *<input type="hidden" name="originalurl" value="http://www.tien.tv/web/show?id=54585&langid=43&aflid=8747&cfe=432453&ff=432453&progid=1923&show=true" /> + *<input type="hidden" name="errorurl" value="http://www.tien.tv/web/show?id=54585&langid=43&aflid=8747&cfe=432453&ff=432453&formerror=432453&progid=1923&show=true" /> + *<INPUT type="hidden" value="f432473" name="formpartcode"/> + *<INPUT type="hidden" value="$USERNAME$" name="f432473" /> + *<INPUT type="hidden" value="f432474" name="formpartcode"/> + *<INPUT type="hidden" value="$PASSWORD$" name="f432474" /> + *<INPUT type="hidden" value="f432479" name="formpartcode"/> + */ + string[] login = ShowWaitCursor.getTienAccount(); + + MultipartForm mp = new MultipartForm("http://www.tien.tv/web/form"); + mp.setField("ff", "432453"); + mp.setField("abort", ""); + mp.setField("formpartcode", "abort"); + mp.setField("formelement", "432453"); + mp.setField("element", "177717"); + mp.setField("form", "432414"); + mp.setField("pageid", "54581"); + mp.setField("originalurl", "http://www.tien.tv/web/show?id=54585&langid=43&aflid=8747&cfe=432453&ff=432453&progid=1923&show=true"); + mp.setField("errorurl", "http://www.google.nl"); + mp.setField("formpartcode", "f432473"); + mp.setField("f432473", login[0]); + mp.setField("formpartcode", "f432474"); + mp.setField("f432474", login[1]); + mp.setField("formpartcode", "f432479"); + mp.sendForm(); + loginCookies = mp.ResponseCookies; + + return true; + } + + public static bool logout() + { + //Not implemented yet; + return true; + } + + public static byte[] getFile(string filePath) + { + FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read); + BinaryReader br = new BinaryReader(fs); + + byte[] fileRD = br.ReadBytes((int)fs.Length); + + br.Close(); + fs.Close(); + + return fileRD; + } + + public static byte[] StrToByteArray(string str) + { + System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); + return encoding.GetBytes(str); + } + + public static string ByteArrayToStr(byte[] dBytes) + { + System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); + return enc.GetString(dBytes); + } + } +} Modified: trunk/plugins/UitzendingGemist/UitGemist/TienSecondScreen.cs =================================================================== --- trunk/plugins/UitzendingGemist/UitGemist/TienSecondScreen.cs 2007-07-24 23:02:23 UTC (rev 760) +++ trunk/plugins/UitzendingGemist/UitGemist/TienSecondScreen.cs 2007-07-25 13:37:32 UTC (rev 761) @@ -1,5 +1,5 @@ using System; -using System.Collections.Generic; +using System.Collections; using System.Collections.Specialized; using System.Text; using System.Text.RegularExpressions; @@ -7,6 +7,9 @@ using MediaPortal.Player; using MediaPortal.Dialogs; using MediaPortal.Playlists; +using System.Xml; +using System.Xml.XPath; +using System.IO; namespace MediaPortal.GUI.UitGemist { @@ -17,25 +20,14 @@ protected GUIListControl listview = null; [SkinControlAttribute(3)] protected GUIImage image = null; - //[SkinControlAttribute(3)] - //protected GUIImage imgPrgramma = null; - //[SkinControlAttribute(4)] - //protected GUILabelControl lblGenre = null; - //[SkinControlAttribute(5)] - //protected GUILabelControl lblOmroep = null; - //[SkinControlAttribute(6)] - //protected GUISelectButtonControl btnRubriek = null; - //#endregion public static string Url = string.Empty; - public static bool ViewVideo = false; - private string imageurl = string.Empty; - private StringCollection Datum = new StringCollection(); - private StringCollection Omschrijving = new StringCollection(); - private StringCollection Views = new StringCollection(); - private StringCollection Waardering = new StringCollection(); - private StringCollection StreamUrl = new StringCollection(); + public static string ProgTitle = string.Empty; + private string imageurl = string.Empty; + private int lastSelectedIndex = -1; + private ArrayList eps = new ArrayList(); + public override int GetID { get @@ -55,20 +47,24 @@ protected override void OnPageLoad() { - if (ViewVideo) - { - NLGemist.wc.GetUrl("http://www.uitzendinggemist.nl"); - GetInfo(Url); - ViewVideo = false; - } - else - { - GetInfo(Url); - } + lastSelectedIndex = -1; + GUIPropertyManager.SetProperty("#title", ProgTitle); + GUIPropertyManager.SetProperty("#plot", ""); + GetInfo(Url); Showlist(); base.OnPageLoad(); } + public override void OnAction(Action action) + { + if (action.wID == Action.ActionType.ACTION_STOP) + { + g_Player.Stop(); + } + + else base.OnAction(action); + } + protected override void OnPageDestroy(int new_windowId) { image.FileName = GUIGraphicsContext.Skin + @"\media\background.png"; @@ -80,11 +76,11 @@ if (control == listview) { string mmsurl = string.Empty; - mmsurl = NLGemist.GetPlayUrl(StreamUrl[listview.SelectedListItemIndex]); + mmsurl = TienGemist.GetPlayUrl(((Program)eps[listview.SelectedListItemIndex]).link); + if (mmsurl == null) return; GUIGraphicsContext.IsFullScreenVideo = true; GUIWindowManager.ActivateWindow((int)GUIWindow.Window.WINDOW_FULLSCREEN_VIDEO); g_Player.FullScreen = true; - ViewVideo = true; g_Player.Play(mmsurl); } base.OnClicked(controlId, control, actionType); @@ -94,10 +90,23 @@ { if (message.Message == GUIMessage.MessageType.GUI_MSG_ITEM_FOCUS || message.Message == GUIMessage.MessageType.GUI_MSG_ITEM_FOCUS_CHANGED) { - if (listview.SelectedListItemIndex != -1) + int itemIndex = listview.SelectedListItemIndex; + if (itemIndex != lastSelectedIndex && itemIndex < listview.Count && itemIndex > -1) { - GUIPropertyManager.SetProperty("#rating", Waardering[listview.SelectedListItemIndex]); - GUIPropertyManager.SetProperty("#plotoutline", Omschrijving[listview.SelectedListItemIndex]); + // Get episode plot + + Program pSelected = (Program)eps[itemIndex]; + if (pSelected.desc == null) + { + string ep = TienGemist.wc.GetTienUrl(TienGemist.rootUrl + pSelected.link, false); + Match m = Regex.Match(ep, @"<p\sclass=.progomschrijving.>(?<plot>.*?)</p>", RegexOptions.Singleline); + + string desc = m.Groups["plot"].Value.Replace("<br>", "\n"); + if (desc != null) pSelected.desc = desc; + else pSelected.desc = ""; + } + GUIPropertyManager.SetProperty("#plot", pSelected.desc); + lastSelectedIndex = itemIndex; } } return base.OnMessage(message); @@ -105,107 +114,60 @@ private void GetInfo(string url) { - Datum.Clear(); - Views.Clear(); - Omschrijving.Clear(); - Waardering.Clear(); - StreamUrl.Clear(); + eps.Clear(); - string result = NLGemist.wc.GetUrl(url, true); - result = NLGemist.ConvertString(result); + string result = TienGemist.wc.GetTienUrl(TienGemist.rootUrl + url); - //get image - Match m = Regex.Match(result, @"<img\ssrc=.(http://gids.omroep.nl.*?.png)"); - imageurl = m.Groups[1].Value; - image.FileName = NLGemist.wc.DownloadImage(imageurl); + // Get the plot first + Match m = Regex.Match(result, @"<p\sclass=.progomschrijving.>(?<plot>.*?)</p>", RegexOptions.Singleline); + GUIPropertyManager.SetProperty("#plot", m.Groups["plot"].Value.Replace("<br>","\n")); - //get Programma-Naam - m = Regex.Match(result, @"<title>(.*?)</title>"); - GUIPropertyManager.SetProperty("#title", m.Groups[1].Value); + m = Regex.Match(result, @"<select\sclass=.gx_overrules_selectionWidth.\sname=.selector_3.*?>(?<data>.*?)</select>", RegexOptions.Singleline); + result = "<root>" + m.Groups["data"].Value + "</root>"; + result = Regex.Replace(result, "<!--.*?-->", "", RegexOptions.Singleline); + result = result.Replace("SELECTED", ""); + result = result.Replace("&", "&"); - //get Programma-omschrijving - m = Regex.Match(result, @"<p\sstyle=.margin-top.5px..>(.*?)<", RegexOptions.Singleline); - GUIPropertyManager.SetProperty("#plot", m.Groups[1].Value); - - //get Genre - m = Regex.Match(result, @"genre</b>.*?title=.(.*?).>", RegexOptions.Singleline); - GUIPropertyManager.SetProperty("#genre", m.Groups[1].Value); - - // get Omproep - m = Regex.Match(result, @"omroep</b>.*?title=.(.*?).>", RegexOptions.Singleline); - GUIPropertyManager.SetProperty("#credits", m.Groups[1].Value); - - // get Afleveringen - m = Regex.Match(result, @"tbody\sid=.afleveringen.>(.*?)</tbody>", RegexOptions.Singleline); - if (m.Success) + try { - string afleveringen = m.Groups[1].Value; + XPathDocument document = new XPathDocument(new System.IO.StringReader(result)); + XPathNavigator navigator = document.CreateNavigator(); + XPathExpression programs = XPathExpression.Compile("//option[position() != 1]"); //returns nodeset with rows per program - //get datum - MatchCollection mc = Regex.Matches(afleveringen, @"(\d{2}-\d{2}-\d{4})</td>"); - foreach (Match m1 in mc) + XPathNodeIterator nodes = navigator.Select(programs); + while (nodes.MoveNext()) { - Datum.Add(m1.Groups[1].Value); + XPathNavigator node = nodes.Current; + Program p = new Program(); + p.date = node.SelectSingleNode(".").Value.Trim(); + p.link = node.SelectSingleNode("./@value").Value; + eps.Add(p); } - - //get omschrijving - mc = Regex.Matches(afleveringen, @"(.*?).<a\shref=./index"); - foreach (Match m1 in mc) - { - Omschrijving.Add(m1.Groups[1].Value); - } - - //get views - mc = Regex.Matches(afleveringen, @"right.>(\d.*)... [truncated message content] |
From: <gre...@us...> - 2007-07-24 23:02:24
|
Revision: 760 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=760&view=rev Author: gregmac45 Date: 2007-07-24 16:02:23 -0700 (Tue, 24 Jul 2007) Log Message: ----------- Set the prohibitdtd to false in the the xmlreadersettings Modified Paths: -------------- trunk/plugins/OnlineVideos/Source/OnlineVideos/SiteUtilBase.cs Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/SiteUtilBase.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/SiteUtilBase.cs 2007-07-24 23:00:42 UTC (rev 759) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/SiteUtilBase.cs 2007-07-24 23:02:23 UTC (rev 760) @@ -8,7 +8,6 @@ using System.Net; using System.Xml; using System.Xml.XPath; -using System.ComponentModel; using System.Threading; namespace OnlineVideos @@ -89,7 +88,9 @@ public List<RssItem> getRssDataItems(String fsUrl){ XmlDocument doc = new XmlDocument(); - doc.Load(XmlReader.Create(fsUrl)); + XmlReaderSettings settings = new XmlReaderSettings(); + settings.ProhibitDtd = false; + doc.Load(XmlReader.Create(fsUrl,settings)); XmlNamespaceManager expr = new XmlNamespaceManager(doc.NameTable); expr.AddNamespace("media", "http://search.yahoo.com/mrss"); expr.AddNamespace("exInfo","http://www.gametrailers.com/rssexplained.php"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gre...@us...> - 2007-07-24 23:00:45
|
Revision: 759 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=759&view=rev Author: gregmac45 Date: 2007-07-24 16:00:42 -0700 (Tue, 24 Jul 2007) Log Message: ----------- replaced log.write with log.info Modified Paths: -------------- trunk/plugins/OnlineVideos/Source/OnlineVideos/GrouperUtil.cs Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/GrouperUtil.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/GrouperUtil.cs 2007-07-24 20:20:46 UTC (rev 758) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/GrouperUtil.cs 2007-07-24 23:00:42 UTC (rev 759) @@ -22,12 +22,12 @@ public override String getUrl(String fsId) { - Log.Write("doc id={0}", fsId); + Log.Info("doc id={0}", fsId); String lsHtml = getHTMLData("http://grouper.com/rss/flv.ashx?id=" + fsId); String lsUrl = String.Empty; Regex loRegex = new Regex("<media flvUrl=\"([^\"]*)"); lsUrl = loRegex.Match(lsHtml).Groups[1].Value; - Log.Write("URL:{0}",lsUrl); + Log.Info("URL:{0}",lsUrl); return lsUrl; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-07-24 20:20:49
|
Revision: 758 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=758&view=rev Author: northern_sky Date: 2007-07-24 13:20:46 -0700 (Tue, 24 Jul 2007) Log Message: ----------- misc wip Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemMame.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs Removed Paths: ------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemList.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-07-24 14:24:00 UTC (rev 757) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs 2007-07-24 20:20:46 UTC (rev 758) @@ -44,7 +44,7 @@ public class DatabaseHandler { public static SQLiteClient sqlDB = null; - static ApplicationItemList dbHandlerApplicationItemList = null; + static List<ApplicationItem> globalApplicationItemList = new List<ApplicationItem>(); private const string DATABASEFILE = "myProgramsAltDatabaseV1.db3"; public static bool useMPsThumbDirectory = false; @@ -76,22 +76,25 @@ sqlDB = new SQLiteClient(Config.GetFile(Config.Dir.Database, DATABASEFILE)); } + //globalApplicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); + LoadAllApplicationItems(); } catch (SQLiteException ex) { Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); } - dbHandlerApplicationItemList = new ApplicationItemList(sqlDB, new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink)); + + } - static void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) + /*static void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) { - ApplicationItem targetApp = dbHandlerApplicationItemList.GetAppByID(curLink.TargetAppID); + ApplicationItem targetApp = globalApplicationItemList.GetAppByID(curLink.TargetAppID); if (targetApp != null) { targetApp.LaunchFile(curLink, MPGUIMode); } - } + }*/ /// <summary> /// Create db tables etc,if not already exist @@ -401,12 +404,35 @@ - static public ApplicationItemList ApplicationItemList + static public List<ApplicationItem> ApplicationItemList { get { - return dbHandlerApplicationItemList; + return globalApplicationItemList; } } + + public static void LoadAllApplicationItems() + { + try + { + globalApplicationItemList.Clear(); + SQLiteResultSet results = sqlDB.Execute("select * from tblApplicationItem order by iposition"); + + if (results.Rows.Count == 0) + return; + + for (int row = 0; row < results.Rows.Count; row++) + { + ApplicationItem applicationItem = (ApplicationItem)ApplicationItemFactory.AppFactory.GetApplicationItem( ProgramUtils.GetSourceType(results, row, "applicationItemType"), results, row); + // applicationItem.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); + globalApplicationItemList.Add(applicationItem); + } + } + catch (SQLiteException ex) + { + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs 2007-07-24 14:24:00 UTC (rev 757) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.Designer.cs 2007-07-24 20:20:46 UTC (rev 758) @@ -1,6 +1,6 @@ namespace GUIPrograms.Design { - partial class AppFilesImportProgress + partial class AppSettingsFilesImportProgress { /// <summary> /// Required designer variable. @@ -98,13 +98,13 @@ this.progressTextBox.Size = new System.Drawing.Size(477, 47); this.progressTextBox.TabIndex = 34; // - // AppFilesImportProgress + // AppSettingsFilesImportProgress // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.progressTextBox); this.Controls.Add(this.progressBar); - this.Name = "AppFilesImportProgress"; + this.Name = "AppSettingsFilesImportProgress"; this.Load += new System.EventHandler(this.AppFilesImportProgress_Load); this.Controls.SetChildIndex(this.prePostButton, 0); this.Controls.SetChildIndex(this.winTypeLabel, 0); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs 2007-07-24 14:24:00 UTC (rev 757) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs 2007-07-24 20:20:46 UTC (rev 758) @@ -36,14 +36,14 @@ namespace GUIPrograms.Design { - public partial class AppFilesImportProgress : AppSettingsBase + public partial class AppSettingsFilesImportProgress : AppSettingsBase { private bool isImportRunning; private ApplicationItem curApp; const string importStartedText = "=== import started..."; const string importFinishedText = "=== import finished."; - public AppFilesImportProgress() + public AppSettingsFilesImportProgress() { InitializeComponent(); } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs 2007-07-24 14:24:00 UTC (rev 757) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.Designer.cs 2007-07-24 20:20:46 UTC (rev 758) @@ -1,6 +1,6 @@ namespace GUIPrograms.Design { - partial class AppFilesView + partial class AppSettingsFilesView { /// <summary> /// Required designer variable. @@ -29,7 +29,7 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AppFilesView)); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AppSettingsFilesView)); this.fileListView = new System.Windows.Forms.ListView(); this.fileTitle = new System.Windows.Forms.ColumnHeader(); this.smallImageList = new System.Windows.Forms.ImageList(this.components); @@ -391,13 +391,13 @@ // this.openFileDialog.FileName = "openFileDialog1"; // - // AppFilesView + // AppSettingsFilesView // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.FileSettingsGroupBox); this.Controls.Add(this.filesGroupBox); - this.Name = "AppFilesView"; + this.Name = "AppSettingsFilesView"; this.Size = new System.Drawing.Size(521, 574); this.Load += new System.EventHandler(this.AppFilesView_Load); this.contextFavouritesMenuStrip.ResumeLayout(false); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-07-24 14:24:00 UTC (rev 757) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs 2007-07-24 20:20:46 UTC (rev 758) @@ -38,14 +38,14 @@ namespace GUIPrograms.Design { - public partial class AppFilesView : UserControl + public partial class AppSettingsFilesView : UserControl { - private ApplicationItemList apps = DatabaseHandler.ApplicationItemList; + private List<ApplicationItem> apps = DatabaseHandler.ApplicationItemList; public event EventHandler OnRefreshClick; private ApplicationItem currentApplication = null; public event EventHandler OnImageFolderSearch; - public AppFilesView() + public AppSettingsFilesView() { InitializeComponent(); } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-07-24 14:24:00 UTC (rev 757) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs 2007-07-24 20:20:46 UTC (rev 758) @@ -63,12 +63,6 @@ return true; } - public virtual bool Applist2Form(ApplicationItemList apps) - { - // virtual! - return true; - } - public virtual void FormToAppItem(ApplicationItem curApp) { if (curApp != null) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-07-24 14:24:00 UTC (rev 757) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs 2007-07-24 20:20:46 UTC (rev 758) @@ -1,3 +1,5 @@ +#region Imports + using System; using System.Collections.Generic; using System.ComponentModel; @@ -16,43 +18,122 @@ using GUIPrograms; using GUIPrograms.Items; +#endregion +//#region Enums +//#endregion +//#region Delegates +//#endregion + +//#region Events +//#endregion + + + + + +#region Properties +// Public Properties +#endregion + +#region Public Methods +#endregion + +#region Private Methods +#endregion + +#region <Base class> Overloads +#endregion + +#region <Interface> Implementations +// region for each interface +#endregion + namespace GUIPrograms.Design { public partial class SetupForm : Form { - private ApplicationItemList globalApplicationList = DatabaseHandler.ApplicationItemList; - private AppSettingsDirCache sectionDirCache = new AppSettingsDirCache(); - private AppSettingsMame sectionMameDirect = new AppSettingsMame(); - private AppSettingsGamebase appSettingsGameBase = new AppSettingsGamebase(); - private AppSettingsGrouper sectionGrouper = new AppSettingsGrouper(); - private ProgramViews programView = new ProgramViews(); - private AppSettingsRoot sectionRoot = new AppSettingsRoot(); - private AppFilesView filesView = new AppFilesView(); + #region Variables - private AppFilesImportProgress filesProgress = new AppFilesImportProgress(); + private List<ApplicationItem> globalApplicationList = DatabaseHandler.ApplicationItemList; + private AppSettingsDirCache appSettingsDirCache = new AppSettingsDirCache(); + private AppSettingsMame appSettingsMame = new AppSettingsMame(); + private AppSettingsGamebase appSettingsGameBase = new AppSettingsGamebase(); + private AppSettingsGrouper appSettingsGrouper = new AppSettingsGrouper(); + private ProgramViews appSettingsProgramView = new ProgramViews(); + private AppSettingsRoot appSettingsRoot = new AppSettingsRoot(); + private AppSettingsFilesView appSettingsFileEditView = new AppSettingsFilesView(); + private AppSettingsFilesImportProgress filesProgress = new AppSettingsFilesImportProgress(); private AppSettingsBase pageCurrentSettings = null; - private bool profilesLoaded = false; + private bool profilesIsLoaded = false; private const string ROOTNODENAME = "Applications"; private const int POSITIONHOLDER = 10; + #endregion + #region Constructors/Destructors + public SetupForm() { - - - InitializeComponent(); - filesView.OnRefreshClick += new EventHandler(this.RefreshClick); + + appSettingsFileEditView.OnRefreshClick += new EventHandler(this.RefreshClick); //when imagefolder was clicked on filesview... - filesView.OnImageFolderSearch += new EventHandler(this.ImageSearchClick); + appSettingsFileEditView.OnImageFolderSearch += new EventHandler(this.ImageSearchClick); } + #endregion + #region Private Methods + #region Treeview helper Methods + private void RemoveNodeAndUpdateTree(TreeNode treeNode) + { + //update sibling level + ApplicationItem application = GetTreeNodeApplicationItem(treeNode); + //get last node at same level as treenode + TreeNode tmpNode = treeNode.Parent.LastNode; + ApplicationItem tmpApplication = GetTreeNodeApplicationItem(tmpNode); + + + if (tmpNode != treeNode) + { + //remember where to stop updating.. + int stopPosition = application.Position; + + //remove node from tree + treeNode.Remove(); + + //start rearrangeposition + while ((tmpNode.PrevNode != null) && (tmpApplication.Position > stopPosition)) + { + application = GetTreeNodeApplicationItem(tmpNode); + application.Position = application.Position - POSITIONHOLDER; + application.InsertOrUpdateSettings(); + + tmpNode = tmpNode.PrevNode; + tmpApplication = GetTreeNodeApplicationItem(tmpNode); + + } + + //node under root + if (tmpNode.PrevNode == null) + { + application = GetTreeNodeApplicationItem(tmpNode); + application.Position = POSITIONHOLDER; + application.InsertOrUpdateSettings(); + } + } + else//is lastnode.just remove,, + { + treeNode.Remove(); + } + + } + /// <summary> /// Gets the path to selected treenode in format0;2;0 etc /// </summary> @@ -119,7 +200,7 @@ /// <param name="FatherID"></param> private void AttachChildNodes(TreeNode Parent, int FatherID) { - foreach (ApplicationItem applicationItem in globalApplicationList.AppsOfFatherID(FatherID)) + foreach (ApplicationItem applicationItem in AppsOfFatherID(FatherID)) { TreeNode currentNode = new TreeNode(applicationItem.Title); @@ -130,7 +211,20 @@ } + public List<ApplicationItem> AppsOfFatherID(int FatherID) + { + List<ApplicationItem> applicationItemList = new List<ApplicationItem>(); + foreach (ApplicationItem curApp in globalApplicationList) + { + if (curApp.FatherID == FatherID) + { + applicationItemList.Add(curApp); + } + } + return applicationItemList; + } + /// <summary> /// Updates the whole treeview /// </summary> @@ -247,19 +341,17 @@ #endregion Treeview helper Methods - - + private void AttachFilesView() { this.tabControl.TabPages["directoryTabPage"].Controls.Clear(); - this.tabControl.TabPages["directoryTabPage"].Controls.Add(filesView); - + this.tabControl.TabPages["directoryTabPage"].Controls.Add(appSettingsFileEditView); } private void AttachProgramsView() { this.tabControl.TabPages["viewTabPage"].Controls.Clear(); - this.tabControl.TabPages["viewTabPage"].Controls.Add(programView); + this.tabControl.TabPages["viewTabPage"].Controls.Add(appSettingsProgramView); } private void AttachImportRunningView() @@ -268,8 +360,8 @@ this.tabControl.TabPages["directoryTabPage"].Controls.Add(filesProgress); } + - private AppSettingsBase GetCurrentSettingsPage() { AppSettingsBase appSettings = null; @@ -280,13 +372,13 @@ switch (currentApplication.SourceType) { case ItemType.DIRCACHE: - appSettings = sectionDirCache; + appSettings = appSettingsDirCache; break; case ItemType.MAMEDIRECT: - appSettings = sectionMameDirect; + appSettings = appSettingsMame; break; case ItemType.GROUPER: - appSettings = sectionGrouper; + appSettings = appSettingsGrouper; break; case ItemType.GAMEBASE: appSettings = this.appSettingsGameBase; @@ -295,7 +387,7 @@ } else { - appSettings = sectionRoot; + appSettings = appSettingsRoot; } return appSettings; } @@ -319,7 +411,7 @@ { tabControl.Controls.Add(this.directoryTabPage); } - filesView.Refresh(curApp); + appSettingsFileEditView.Refresh(curApp); } private void AddViewsPage() @@ -399,8 +491,6 @@ } } - - private bool SaveAppItem() { bool success = true; @@ -413,11 +503,11 @@ { if (pageCurrentSettings.EntriesOK(currentApplication)) { - if (filesView.EntriesOK()) + if (appSettingsFileEditView.EntriesOK()) { pageCurrentSettings.FormToAppItem(currentApplication); - filesView.FillApplicationItem(currentApplication); + appSettingsFileEditView.FillApplicationItem(currentApplication); if (currentApplication != null) @@ -466,7 +556,7 @@ ApplicationItem currentApplication = GetTreeNodeApplicationItem(treeView.SelectedNode); if (currentApplication != null) { - deleteApplicationToolStripMenuItem.Enabled = (globalApplicationList.AppsOfFatherID(currentApplication.AppID).Count == 0); // groupitems are only deletable if no children exist + deleteApplicationToolStripMenuItem.Enabled = (AppsOfFatherID(currentApplication.AppID).Count == 0); // groupitems are only deletable if no children exist } } @@ -493,7 +583,7 @@ int id = 0; string titleNode = string.Empty; - if (!profilesLoaded) + if (!profilesIsLoaded) { this.emulatorSetupToolStripMenuItem.DropDownItems.Clear(); @@ -529,7 +619,7 @@ } } - profilesLoaded = true; + profilesIsLoaded = true; } } @@ -553,7 +643,7 @@ ApplicationItem tempApp = new ApplicationItem(curApp.db); tempApp.LoadFromXmlProfile(node); pageCurrentSettings.LoadFromAppItem(tempApp); - filesView.FileExtensionsText = tempApp.ValidExtensions; + appSettingsFileEditView.FileExtensionsText = tempApp.ValidExtensions; } } @@ -574,21 +664,33 @@ //ADD POSITION CHECK? - globalApplicationList.LoadAll(); + DatabaseHandler.LoadAllApplicationItems(); UpdateTree(); } } } + public int GetMaxPosition(int fatherID) + { + int res = 0; + foreach (ApplicationItem curApp in globalApplicationList) + { + if ((curApp.FatherID == fatherID) && (curApp.Position > res)) + { + res = curApp.Position; + } + } + return res; + } private void AddApplication(ItemType newSourceType) { if (SaveAppItem()) { - ApplicationItem newApplication = (ApplicationItem) ApplicationItemFactory.AppFactory.GetApplicationItem(DatabaseHandler.sqlDB, newSourceType,null,0); + ApplicationItem newApplication = (ApplicationItem)ApplicationItemFactory.AppFactory.GetApplicationItem(newSourceType, null, 0); globalApplicationList.Add(newApplication); newApplication.FatherID = GetTreeNodeApplicationItemId(); - newApplication.Position = globalApplicationList.GetMaxPosition(newApplication.FatherID) + 10; + newApplication.Position = GetMaxPosition(newApplication.FatherID) + 10; if (newApplication.Title == string.Empty) { @@ -596,7 +698,7 @@ } newApplication.SourceType = newSourceType; newApplication.InsertOrUpdateSettings(); - globalApplicationList.LoadAll(); + DatabaseHandler.LoadAllApplicationItems(); UpdateTree(); @@ -609,12 +711,26 @@ } } + private void BlockControls() + { + treeView.Enabled = false; + this.toolsStripMenuItem.Enabled = false; + } + + private void UnblockControls() + { + treeView.Enabled = true; + this.toolsStripMenuItem.Enabled = true; + } + + + #endregion Private Methods + #region Events private void SetupForm_Load(object sender, EventArgs e) { AttachFilesView(); - globalApplicationList.LoadAll(); // we need all globalApplicationList, whether enabled or not => reload with LoadALL AttachProgramsView(); UpdateTree(); FillProfileMenu(); @@ -671,8 +787,6 @@ DeleteApplication(); } - - private void treeView_DragEnter(object sender, DragEventArgs e) { e.Effect = e.AllowedEffect; @@ -687,50 +801,8 @@ } } - private void RemoveNodeAndUpdateTree(TreeNode treeNode) - { - //update sibling level - ApplicationItem application = GetTreeNodeApplicationItem(treeNode); - //get last node at same level as treenode - TreeNode tmpNode = treeNode.Parent.LastNode; - ApplicationItem tmpApplication = GetTreeNodeApplicationItem(tmpNode); + - - if (tmpNode != treeNode) - { - //remember where to stop updating.. - int stopPosition = application.Position; - - //remove node from tree - treeNode.Remove(); - - //start rearrangeposition - while ((tmpNode.PrevNode != null) && (tmpApplication.Position > stopPosition)) - { - application = GetTreeNodeApplicationItem(tmpNode); - application.Position = application.Position - POSITIONHOLDER; - application.InsertOrUpdateSettings(); - - tmpNode = tmpNode.PrevNode; - tmpApplication = GetTreeNodeApplicationItem(tmpNode); - - } - - //node under root - if (tmpNode.PrevNode == null) - { - application = GetTreeNodeApplicationItem(tmpNode); - application.Position = POSITIONHOLDER; - application.InsertOrUpdateSettings(); - } - } - else//is lastnode.just remove,, - { - treeNode.Remove(); - } - - } - private void treeView_DragDrop(object sender, DragEventArgs e) { // Retrieve the client coordinates of the drop location. @@ -833,7 +905,7 @@ } } - globalApplicationList.LoadAll(); + DatabaseHandler.LoadAllApplicationItems(); UpdateTree(); } } @@ -857,7 +929,7 @@ // save current applicationItem if switching to file-tab if (tabControl.SelectedIndex == 1) { - filesView.SetupFileView(); + appSettingsFileEditView.SetupFileView(); if (!SaveAppItem()) { tabControl.SelectedIndex = 0; @@ -868,7 +940,6 @@ if (tabControl.SelectedIndex == 0) { SaveAppItem(); - } } @@ -880,7 +951,6 @@ { if (pageCurrentSettings.EntriesOK(currentApplication)) { - pageCurrentSettings.FormToAppItem(currentApplication); if (currentApplication != null) { @@ -890,20 +960,9 @@ } } - #endregion Events + - private void BlockControls() - { - treeView.Enabled = false; - this.toolsStripMenuItem.Enabled = false; - } - - private void UnblockControls() - { - treeView.Enabled = true; - this.toolsStripMenuItem.Enabled = true; - } - + private void DoRefresh() { bool DoIt = false; @@ -926,7 +985,7 @@ { AttachImportRunningView(); BlockControls(); - filesView.FillApplicationItem(currentApplication); + appSettingsFileEditView.FillApplicationItem(currentApplication); filesProgress.CurApp = currentApplication; filesProgress.RunImport(); } @@ -957,6 +1016,9 @@ toolsStripMenuItem.Enabled = true; } } + + #endregion Events + private void UpdateComboBoxes() { FillComboBox("tblPlatform", "platform", removePlatformComboBox); @@ -964,33 +1026,6 @@ FillComboBox("tblGenre", "genre", removeGenreComboBox); } - - public class ListItem - { - private string text; - - public string Text - { - get { return text; } - set { text = value; } - } - private int value; - - public int Value - { - get { return this.value; } - set { this.value = value; } - } - - public ListItem(string label, int data) - { - text = label; - value = data; - } - - - } - private void FillComboBox(string tableName, string orderBy, ComboBox comboBox) { @@ -1131,18 +1166,12 @@ try { - // - DatabaseHandler.sqlDB.Execute(sqlStmt); - - } catch (Exception exception) { throw exception; } - - } @@ -1158,9 +1187,6 @@ AND " + column + @" <> 1 "; - - - try { DatabaseHandler.sqlDB.Execute(sqlStmt); @@ -1176,8 +1202,28 @@ UpdateComboBoxes(); } + public class ListItem + { + private string text; + public string Text + { + get { return text; } + set { text = value; } + } + private int value; + public int Value + { + get { return this.value; } + set { this.value = value; } + } + public ListItem(string label, int data) + { + text = label; + value = data; + } + } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-07-24 14:24:00 UTC (rev 757) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs 2007-07-24 20:20:46 UTC (rev 758) @@ -407,7 +407,6 @@ public GUIPrograms() { GetID = (int)Window.WINDOW_FILES; - applicationList = DatabaseHandler.ApplicationItemList; LoadSettings(); skipInit = true; } @@ -433,6 +432,7 @@ void InitMyPrograms() { LoadFolderSettings(""); + if (skipInit) { mapSettings.LastAppID = -1; @@ -441,7 +441,7 @@ { LoadLastAppIDFromSettings(); // hacky load back the last applicationItem id, otherwise this can get lost from dx resets.... } - lastApp = applicationList.GetAppByID(mapSettings.LastAppID); + lastApp = GetAppByID(mapSettings.LastAppID); if (lastApp != null) { lastFilepath = lastApp.DefaultFilepath(); @@ -469,7 +469,7 @@ bool currentSortAsc = true; ProgramViewHandler viewHandler = ProgramViewHandler.Instance; - static ApplicationItemList applicationList = DatabaseHandler.ApplicationItemList; + List<ApplicationItem> allApplicationsList = DatabaseHandler.ApplicationItemList; public MapSettings mapSettings = new MapSettings(); DirectoryHistory itemHistory = new DirectoryHistory(); public ApplicationItem lastApp = null; @@ -494,7 +494,6 @@ get { return viewHandler; } set { viewHandler = value; } } - public static string ThumbnailPath { @@ -597,11 +596,9 @@ protected override void OnPageLoad() { - //string view = CurrentView; - base.OnPageLoad(); - if (btnSortBy != null) + if (btnSortBy != null) btnSortBy.SortChanged += new SortEventHandler(SortChanged); InitMyPrograms(); @@ -667,6 +664,7 @@ protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { base.OnClicked(controlId, control, actionType); + if (control == btnViewAs) { mapSettings.SwitchToNextViewLayout(); @@ -709,7 +707,6 @@ { OnShowSort(); } - else if (control == facadeView) { // application or file-item was clicked.... @@ -765,7 +762,7 @@ RenderThumbnail(timePassed); } - + #endregion #region Display @@ -785,7 +782,6 @@ btnRefresh.IsVisible = lastApp.RefreshGUIAllowed; } - facadeView.IsVisible = true; GUIControl.FocusControl(GetID, facadeView.GetID); @@ -870,7 +866,6 @@ screenShotImage.Visible = false; break; } - facadeView.SelectedListItemIndex = itemIndex; UpdateButtonStates(); } @@ -910,7 +905,6 @@ // only show big thumb if there is really one.... ThumbnailPath = appWithImg.GetCurThumb(item); // some modes look for thumbs differently } - appWithImg.NextThumb(); // try to find a next thumbnail slideTime = (DateTime.Now.Ticks / 10000); // reset timer! } @@ -946,19 +940,18 @@ // Refresh FileList if view has changed, while this appItem was not active if (lastApp.CurrentView != this.CurrentView) { - lastApp.LoadFiles(); lastApp.CurrentView = this.CurrentView; } - int totalFiles = lastApp.DisplayFiles(this.lastFilepath, facadeView); + int totalFiles = lastApp.DisplayFiles(lastApp.FileDirectory, facadeView); return (totalFiles); } int DisplayApps() { int totalApps = 0; - foreach (ApplicationItem applicationItem in applicationList.AppsOfFatherID(GetCurrentFatherID())) + foreach (ApplicationItem applicationItem in AppsOfFatherID(GetCurrentFatherID())) { if (applicationItem.Enabled) { @@ -999,7 +992,7 @@ return String.Format("applicationItem{0}#level{1}#sub_{2}", appID, viewLevel, pathSub); } - public void SaveItemIndex(string value, ApplicationItem app, string pathSub) + public void SaveItemIndex(string value, ApplicationItem app, string pathSub) { string key = BuildHistoryKey(app, ViewHandler.CurrentLevel, pathSub); itemHistory.Set(value, key); @@ -1035,7 +1028,7 @@ } else { - if (ViewHandler.RemoveFilterItem()) + if (ViewHandler.RemoveFilterItem()) { FilterItem curFilter; // force reload, this will load the next filter-level..... @@ -1064,7 +1057,7 @@ { // back item in application list clicked // go to father item - lastApp = applicationList.GetAppByID(lastApp.FatherID); + lastApp = GetAppByID(lastApp.FatherID); if (lastApp != null) { mapSettings.LastAppID = lastApp.AppID; @@ -1091,8 +1084,67 @@ } + public List<ApplicationItem> AppsOfFatherID(int FatherID) + { + List<ApplicationItem> applicationItemList = new List<ApplicationItem>(); + foreach (ApplicationItem curApp in allApplicationsList) + { + if (curApp.FatherID == FatherID) + { + applicationItemList.Add(curApp); + } + } + return applicationItemList; + } + public List<ApplicationItem> AppsOfFather(ApplicationItem father) + { + if (father == null) + { + return AppsOfFatherID(-1); // return children of root node! + } + else + { + return AppsOfFatherID(father.AppID); + } + } + + public int GetMaxPosition(int fatherID) + { + int res = 0; + foreach (ApplicationItem curApp in allApplicationsList) + { + if ((curApp.FatherID == fatherID) && (curApp.Position > res)) + { + res = curApp.Position; + } + } + return res; + } + + public ApplicationItem GetAppByID(int targetAppID) + { + foreach (ApplicationItem curApp in allApplicationsList) + { + if (curApp.AppID == targetAppID) + { + return curApp; + } + } + return null; + } + + /* public ApplicationItem CloneAppItem(ApplicationItem sourceApp) + { + ApplicationItem newApp = (ApplicationItem)ApplicationItemFactory.AppFactory.GetApplicationItem(sqlDB, sourceApp.SourceType, null, 0); + newApp.Assign(sourceApp); + newApp.AppID = -1; // to force a sql INSERT when written + Add(newApp); + return newApp; + }*/ + + void ScrapeFileInfo(FileItem curFile) { int minRelevance = 30; @@ -1199,16 +1251,15 @@ if (item.MusicTag != null) { - ((BaseItem)item.MusicTag).OnClick((BaseItem) item.MusicTag,this); - UpdateButtonStates(); - UpdateListControl(); + ((BaseItem)item.MusicTag).OnClick((BaseItem)item.MusicTag, this); + UpdateButtonStates(); + UpdateListControl(); } else if (item.Label.Equals(ProgramUtils.cBackLabel)) { // folder-item clicked.... selectedItemIndex = -1; BackItemClicked(); UpdateButtonStates(); - } } @@ -1269,9 +1320,6 @@ UpdateButtonStates(); } - - - protected void OnInfo() { @@ -1300,11 +1348,9 @@ { try { - for (int i = 0; i < facadeView.Count; ++i) { GUIListItem item = facadeView[i]; - ViewHandler.SetLabel(item.MusicTag as FileItem, ref item); } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-07-24 14:24:00 UTC (rev 757) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj 2007-07-24 20:20:46 UTC (rev 758) @@ -143,7 +143,6 @@ <Compile Include="Items\ApplicationItemFactory.cs" /> <Compile Include="Items\ApplicationItemGameBase.cs" /> <Compile Include="Items\ApplicationItemGrouper.cs" /> - <Compile Include="Items\ApplicationItemList.cs" /> <Compile Include="Items\ApplicationItemMame.cs" /> <Compile Include="Items\BaseItem.cs" /> <Compile Include="Items\FileItem.cs" /> Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-07-24 14:24:00 UTC (rev 757) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-07-24 20:20:46 UTC (rev 758) @@ -336,6 +336,16 @@ + protected void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) + { + /*ApplicationItem targetApp = GetAppByID(curLink.TargetAppID); + if (targetApp != null) + { + targetApp.LaunchFile(curLink, MPGUIMode); + }*/ + } + + protected void SendRefreshInfo(string informationMessage, int progressBarCtr) { if (OnRefreshInfo != null) @@ -496,10 +506,6 @@ } } - protected virtual void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) - { - this.OnLaunchFilelink(curLink, MPGUIMode); - } void proc_Exited(object sender, EventArgs e) { Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs 2007-07-24 14:24:00 UTC (rev 757) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs 2007-07-24 20:20:46 UTC (rev 758) @@ -26,6 +26,7 @@ using SQLite.NET; using System; using GUIPrograms; +using GUIPrograms.Database; namespace GUIPrograms.Items { @@ -46,54 +47,54 @@ // nothing to create...... } - public BaseItem GetApplicationItem(SQLiteClient sqlDB, ItemType sourceType,SQLiteResultSet results, int iRecord) + public BaseItem GetApplicationItem(ItemType sourceType,SQLiteResultSet results, int iRecord) { BaseItem item = null; switch (sourceType) { case ItemType.DIRCACHE: - item = AppItemFactory(sqlDB, results, iRecord,ItemType.DIRCACHE); + item = AppItemFactory(results, iRecord,ItemType.DIRCACHE); break; case ItemType.MAMEDIRECT: - item = AppItemFactory(sqlDB, results, iRecord,ItemType.MAMEDIRECT); + item = AppItemFactory(results, iRecord,ItemType.MAMEDIRECT); break; case ItemType.GROUPER: - item = AppItemFactory(sqlDB, results, iRecord,ItemType.GROUPER); + item = AppItemFactory(results, iRecord,ItemType.GROUPER); break; case ItemType.GAMEBASE: - item = AppItemFactory(sqlDB, results, iRecord,ItemType.GAMEBASE); + item = AppItemFactory(results, iRecord,ItemType.GAMEBASE); break; case ItemType.FILEITEM: - item = FileItemFactory(sqlDB,results, iRecord); + item = FileItemFactory(results, iRecord); break; case ItemType.FILELINKITEM: - item = FilelinkItemFactory(sqlDB, results, iRecord); + item = FilelinkItemFactory(results, iRecord); break; case ItemType.FILTERITEM: - item = FilterItemFactory(sqlDB, results, iRecord); + item = FilterItemFactory(results, iRecord); break; } return item; } - private ApplicationItem AppItemFactory(SQLiteClient sqldb, SQLiteResultSet results, int recordIndex, ItemType sourceType) + private ApplicationItem AppItemFactory(SQLiteResultSet results, int recordIndex, ItemType sourceType) { ApplicationItem item = null;//= (ApplicationItem)appFactory.GetApplicationItem(sqlDB, ProgramUtils.GetSourceType(results, recordIndex, "applicationItemType"), null, 0); switch (sourceType) { case ItemType.DIRCACHE: - item = new ApplicationItemDirectoryCache(sqldb); + item = new ApplicationItemDirectoryCache(DatabaseHandler.sqlDB); break; case ItemType.MAMEDIRECT: - item = new ApplicationItemMame(sqldb); + item = new ApplicationItemMame(DatabaseHandler.sqlDB); break; case ItemType.GROUPER: - item = new ApplicationItemGrouper(sqldb); + item = new ApplicationItemGrouper(DatabaseHandler.sqlDB); break; case ItemType.GAMEBASE: - item = new ApplicationItemGameBase(sqldb); + item = new ApplicationItemGameBase(DatabaseHandler.sqlDB); break; } @@ -127,9 +128,9 @@ return item; } - private FileItem FileItemFactory(SQLiteClient sqlDB,SQLiteResultSet results, int iRecord) + private FileItem FileItemFactory(SQLiteResultSet results, int iRecord) { - FileItem newFile = new FileItem(sqlDB); + FileItem newFile = new FileItem(DatabaseHandler.sqlDB); newFile.FileID = ProgramUtils.GetIntDef(results, iRecord, "fileid", -1); newFile.AppID = ProgramUtils.GetIntDef(results, iRecord, "applicationId", -1); newFile.Title = ProgramUtils.Get(results, iRecord, "title"); @@ -154,9 +155,9 @@ return newFile; } - private FilterItem FilterItemFactory(SQLiteClient sqlDB,SQLiteResultSet results, int iRecord) + private FilterItem FilterItemFactory(SQLiteResultSet results, int iRecord) { - FilterItem filterItem = new FilterItem(sqlDB); + FilterItem filterItem = new FilterItem(DatabaseHandler.sqlDB); filterItem.Title = ProgramUtils.Get(results, iRecord, "title"); // newFile.LastTimeLaunched = ProgramUtils.GetDateDef(results, iRecord, "lastTimeLaunched", DateTime.MinValue); //newFile.LaunchCount = ProgramUtils.GetIntDef(results, iRecord, "launchcount", 0); ; @@ -164,9 +165,9 @@ } - private FilelinkItem FilelinkItemFactory(SQLiteClient sqlDB, SQLiteResultSet results, int iRecord) + private FilelinkItem FilelinkItemFactory( SQLiteResultSet results, int iRecord) { - FilelinkItem newLink = new FilelinkItem(sqlDB); + FilelinkItem newLink = new FilelinkItem(DatabaseHandler.sqlDB); newLink.FileID = ProgramUtils.GetIntDef(results, iRecord, "fileId", -1); newLink.AppID = ProgramUtils.GetIntDef(results, iRecord, "grouperAppId", -1); newLink.TargetAppID = ProgramUtils.GetIntDef(results, iRecord, "targetAppId", -1); Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGrouper.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGrouper.cs 2007-07-24 14:24:00 UTC (rev 757) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGrouper.cs 2007-07-24 20:20:46 UTC (rev 758) @@ -143,13 +143,13 @@ { if (ViewHandler.IsFilterQuery) { - FilterItem curFile = (FilterItem)ApplicationItemFactory.AppFactory.GetApplicationItem(sqlDB, ItemType.FILTERITEM, results, curRow); + FilterItem curFile = (FilterItem)ApplicationItemFactory.AppFactory.GetApplicationItem( ItemType.FILTERITEM, results, curRow); ItemList.Add(curFile); } else { - FilelinkItem curFile = (FilelinkItem)ApplicationItemFactory.AppFactory.GetApplicationItem(sqlDB, ItemType.FILELINKITEM, results, curRow); + FilelinkItem curFile = (FilelinkItem)ApplicationItemFactory.AppFactory.GetApplicationItem( ItemType.FILELINKITEM, results, curRow); ItemList.Add(curFile); } } Deleted: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemList.cs 2007-07-24 14:24:00 UTC (rev 757) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemList.cs 2007-07-24 20:20:46 UTC (rev 758) @@ -1,149 +0,0 @@ -#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.Collections.Generic; -using SQLite.NET; - -using GUIPrograms; -using GUIPrograms.Database; -using GUIPrograms.Items; - -using MediaPortal.GUI.Library; - -namespace GUIPrograms.Items -{ - /// <summary> - /// Summary description for ApplicationItemList. - /// </summary> - public class ApplicationItemList : List<ApplicationItem> - { - public static SQLiteClient sqlDB = null; - - static ApplicationItemFactory appFactory = ApplicationItemFactory.AppFactory; - - static public event ApplicationItem.FilelinkLaunchEventHandler OnLaunchFilelink = null; - - public ApplicationItemList(SQLiteClient initSqlDB, ApplicationItem.FilelinkLaunchEventHandler curHandler) - { - // constructor: save SQLiteDB object and load list from DB - sqlDB = initSqlDB; - OnLaunchFilelink += curHandler; - LoadAll(); - } - - public List<ApplicationItem> AppsOfFatherID(int FatherID) - { - List<ApplicationItem> applicationItemList = new List<ApplicationItem>(); - foreach (ApplicationItem curApp in this) - { - if (curApp.FatherID == FatherID) - { - applicationItemList.Add(curApp); - } - } - return applicationItemList; - } - - public List<ApplicationItem> AppsOfFather(ApplicationItem father) - { - if (father == null) - { - return AppsOfFatherID(-1); // return children of root node! - } - else - { - return AppsOfFatherID(father.AppID); - } - } - - - public ApplicationItem GetAppByID(int targetAppID) - { - foreach (ApplicationItem curApp in this) - { - if (curApp.AppID == targetAppID) - { - return curApp; - } - } - return null; - } - - public ApplicationItem CloneAppItem(ApplicationItem sourceApp) - { - ApplicationItem newApp = (ApplicationItem)appFactory.GetApplicationItem(sqlDB, sourceApp.SourceType,null,0); - newApp.Assign(sourceApp); - newApp.AppID = -1; // to force a sql INSERT when written - Add(newApp); - return newApp; - } - - - static void LaunchFilelink(FilelinkItem curLink, bool mpGuiMode) - { - OnLaunchFilelink(curLink, mpGuiMode); - } - - - public int GetMaxPosition(int fatherID) - { - int res = 0; - foreach (ApplicationItem curApp in this) - { - if ((curApp.FatherID == fatherID) && (curApp.Position > res)) - { - res = curApp.Position; - } - } - return res; - } - - public void LoadAll() - { - if (sqlDB == null) - return; - try - { - Clear(); - if (null == sqlDB) - return; - SQLiteResultSet results; - results = sqlDB.Execute("select * from tblApplicationItem order by iposition"); - if (results.Rows.Count == 0) - return; - for (int row = 0; row < results.Rows.Count; row++) - { - ApplicationItem currentApplicationItem = (ApplicationItem) ApplicationItemFactory.AppFactory.GetApplicationItem(sqlDB,ProgramUtils.GetSourceType(results, row, "applicationItemType"),results, row ); - currentApplicationItem.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); - Add(currentApplicationItem); - } - } - catch (SQLiteException ex) - { - Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); - } - } - } -} Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemMame.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemMame.cs 2007-07-24 14:24:00 UTC (rev 757) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemMame.cs 2007-07-24 20:20:46 UTC (rev 758) @@ -64,7 +64,12 @@ set { importOriginalsOnly = value; } } + public override string CurrentFilePath() + { + return this.FileDirectory; + } + override public bool ProfileLoadingAllowed() { return true; Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs 2007-07-24 14:24:00 UTC (rev 757) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs 2007-07-24 20:20:46 UTC (rev 758) @@ -138,12 +138,12 @@ { if (ViewHandler.IsFilterQuery) { - FilterItem curFile = (FilterItem)ApplicationItemFactory.AppFactory.GetApplicationItem(sqlDB, ItemType.FILTERITEM, results, curRow); + FilterItem curFile = (FilterItem)ApplicationItemFactory.AppFactory.GetApplicationItem(ItemType.FILTERITEM, results, curRow); ItemList.Add(curFile); } else { - FileItem curFile =(FileItem) ApplicationItemFactory.AppFactory.GetApplicationItem(sqlDB,ItemType.FILEITEM,results, curRow); + FileItem curFile =(FileItem) ApplicationItemFactory.AppFactory.GetApplicationItem(ItemType.FILEITEM,results, curRow); ItemList.Add(curFile); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rs...@us...> - 2007-07-24 14:24:10
|
Revision: 757 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=757&view=rev Author: rsparey Date: 2007-07-24 07:24:00 -0700 (Tue, 24 Jul 2007) Log Message: ----------- Added Paths: ----------- trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/ trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/ArrowLeft.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/ArrowRight.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/ListBackGround.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/SplittLine.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/Thumbs.db trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/ViewBackground.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/VizzulationCoverBackground.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/arrow_round_down_focus.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/arrow_round_down_nofocus.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/arrow_round_up_focus.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/arrow_round_up_nofocus.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/description_background.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/information.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/roof.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/selectbar.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/selectbar2.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/selectbarNo.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/selectbarNo2.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/tv_green_border.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/tv_green_border2.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/ trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/Thumbs.db trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.1.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.10.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.11.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.2.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.3.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.4.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.5.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.6.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.7.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.8.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.9.png Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/ArrowLeft.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/ArrowLeft.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/ArrowRight.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/ArrowRight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/ListBackGround.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/ListBackGround.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/SplittLine.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/SplittLine.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/Thumbs.db =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/Thumbs.db ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/ViewBackground.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/ViewBackground.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/VizzulationCoverBackground.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/VizzulationCoverBackground.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/arrow_round_down_focus.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/arrow_round_down_focus.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/arrow_round_down_nofocus.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/arrow_round_down_nofocus.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/arrow_round_up_focus.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/arrow_round_up_focus.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/arrow_round_up_nofocus.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/arrow_round_up_nofocus.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/description_background.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/description_background.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/information.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/information.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/roof.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/roof.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/selectbar.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/selectbar.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/selectbar2.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/selectbar2.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/selectbarNo.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/selectbarNo.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/selectbarNo2.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/selectbarNo2.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/tv_green_border.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/tv_green_border.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/tv_green_border2.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/TVSeries/tv_green_border2.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/Thumbs.db =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/Thumbs.db ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.1.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.1.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.10.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.10.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.11.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.11.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.2.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.2.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.3.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.3.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.4.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.4.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.5.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.5.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.6.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.6.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.7.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.7.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.8.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.8.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.9.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/tvseries_progress/tvseries.waiting.9.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rs...@us...> - 2007-07-24 14:22:25
|
Revision: 756 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=756&view=rev Author: rsparey Date: 2007-07-24 07:22:17 -0700 (Tue, 24 Jul 2007) Log Message: ----------- Added dvd_case.png added spinsafe tvseries plugin Modified Paths: -------------- trunk/skins/Foofaraw/Development Skin/Foofaraw/Foofaraw Backgrounds/Thumbs.db trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/defaultVideoBig.png trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/defaultVideoSeenBig.png trunk/skins/Foofaraw/Development Skin/Foofaraw/TVSeries.xml trunk/skins/Foofaraw/Development Skin/Foofaraw/myvideo.xml Added Paths: ----------- trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/dvd_case.png Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Foofaraw Backgrounds/Thumbs.db =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/defaultVideoBig.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/defaultVideoSeenBig.png =================================================================== (Binary files differ) Added: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/dvd_case.png =================================================================== (Binary files differ) Property changes on: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/dvd_case.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/TVSeries.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/TVSeries.xml 2007-07-24 00:06:29 UTC (rev 755) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/TVSeries.xml 2007-07-24 14:22:17 UTC (rev 756) @@ -1,231 +1,929 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<window> - <id>9811</id> - <defaultcontrol>50</defaultcontrol> - <allowoverlay>yes</allowoverlay> - - <controls> - - - <control> - <description>BG</description> - <type>image</type> - <id>1</id> - <posX>0</posX> - <posY>0</posY> - <width>1366</width> - <height>768</height> - <texture>background.png</texture> - </control> - <import>common.time.xml</import> - <control> - <description>icon background</description> - <type>image</type> - <id>1</id> - <posX>0</posX> - <posY>0</posY> - <width>377</width> - <height>133</height> - <texture>Logo_background.png</texture> - <animation effect="fade" time="500" delay="1000">WindowOpen</animation> - <animation effect="fade" time="500">WindowClose</animation> - </control> - <control> - <type>image</type> - <id>1</id> - <posX>15</posX> - <posY>0</posY> - <width>61</width> - <height>122</height> - <texture>hover_my tv.png</texture> - <animation effect="fade" time="1000" delay="2000">WindowOpen</animation> - <animation effect="fade" time="500">WindowClose</animation> - </control> - <control> - <type>image</type> - <description>Television top left text logo</description> - <id>1</id> - <posX>90</posX> - <posY>23</posY> - <texture>tvseries_logo.png</texture> - <animation effect="fade" time="500" delay="1300">WindowOpen</animation> - <animation effect="fade" time="500">WindowClose</animation> - </control> - <control> - <type>label</type> - <description>Recorded TV Label</description> - <id>1</id> - <posX>251</posX> - <posY>68</posY> - <label>3019</label> - <font>wipeouts</font> - <align>center</align> - <textcolor>ffffffff</textcolor> - <animation effect="fade" time="1000" end="60" delay="2000">WindowOpen</animation> - <animation effect="slide" time="1000" delay="2000" start="-600,0" end="0,0" acceleration="-1">WindowOpen</animation> - <animation effect="fade" time="500" start="50">WindowClose</animation> - </control> - <control> - <description>Import Animation</description> - <type>animation</type> - <id>51</id> - <posX>60</posX> - <posY>700</posY> - <width>48</width> - <height>48</height> - <textures>common.waiting.1.png;common.waiting.2.png;common.waiting.3.png;common.waiting.4.png;common.waiting.5.png;common.waiting.6.png;common.waiting.7.png;common.waiting.8.png</textures> - <Duration>0:0:01</Duration> - <keepaspectratio>yes</keepaspectratio> - </control> - - <control> - <type>image</type> - <description>Series Logo</description> - <id>30</id> - <posX>540</posX> - <posY>25</posY> - <width>810</width> - <height>150</height> - <centered>yes</centered> - <keepaspectratio>yes</keepaspectratio> - </control> - - <control> - <type>image</type> - <id>1</id> - <posX>70</posX> - <posY>20</posY> - <height>250</height> - <keepaspectratio>yes</keepaspectratio> - <texture>#header.hover</texture> - </control> - - - - <!-- season image background --> - <control> - <type>image</type> - <description>Season image</description> - <id>46</id> - <posX>200</posX> - <posY>280</posY> - <width>250</width> - <height>460</height> - <centered>yes</centered> - <keepaspectratio>yes</keepaspectratio> - <colordiffuse>30FFFFFF</colordiffuse> - <texture></texture> - </control> - - <control> - <type>textboxscrollup</type> - <description>Title</description> - <id>40</id> - <posX>60</posX> - <posY>210</posY> - <width>400</width> - <textcolor>FFFFFFFF</textcolor> - <font>font16</font> - </control> - - <control> - <type>textboxscrollup</type> - <description>Subtitle</description> - <id>33</id> - <posX>60</posX> - <posY>245</posY> - <width>400</width> - <align>right</align> - <textcolor>FFA9D0F7</textcolor> - <font>font13</font> - </control> - - <control> - <type>textboxscrollup</type> - <description>Description</description> - <id>31</id> - <posX>60</posX> - <posY>280</posY> - <width>620</width> - <height>414</height> - <seperator>-----------------------------------------------------------------------------------------------------------------------</seperator> - <colordiffuse>ffffffff</colordiffuse> - <textcolor>FFFFFFFF</textcolor> - <font>font13</font> - </control> - <control> - <type>group</type> - <layout>StackLayout</layout> - <description>group element</description> - <animation>FlyInFromLeft</animation> - <posX>113</posX> - <posY>416</posY> - <control> - <description>Back</description> - <type>button</type> - <id>2</id> - <onright>50</onright> - <onup>5</onup> - <ondown>3</ondown> - <label>Back</label> - </control> - <control> - <description>View-As button</description> - <type>button</type> - <id>3</id> - <onright>50</onright> - <onup>2</onup> - <ondown>4</ondown> - <label>100</label> - </control> - </control> - - <control> - <type>group</type> - <description>group element</description> - <id>28</id> - <animation>FlyInFromTop</animation> - <control> - <description>composite control consisting of a list control and a thumbnail panel</description> - <type>facadeview</type> - <id>50</id> - - <control> - <description>graphical list (series and seasons if set)</description> - <type>listcontrol</type> - <subtype>album</subtype> - <id>50</id> - <posX>750</posX> - <posY>150</posY> - <width>600</width> - <height>573</height> - <IconXOff>15</IconXOff> - <IconYOff>5</IconYOff> - <spaceBetweenItems>2</spaceBetweenItems> - <remoteColor>FFa6c3e1</remoteColor> <!-- watched color --> - <downloadColor>FFFFFFFF</downloadColor> <!-- not watched color (normal) --> - <textcolor>FF78ace0</textcolor> <!-- local file not present color --> - <textcolor2>FF78ace0</textcolor2> <!-- local file not present color column 2--> - <textcolor3>FF78ace0</textcolor3> <!-- local file not present color column 3--> - </control> - <control> - <description>text list</description> - <type>listcontrol</type> - <id>50</id> - <posX>750</posX> - <posY>185</posY> - <width>600</width> - <height>573</height> - <textXOff2>590</textXOff2> - <spaceBetweenItems>2</spaceBetweenItems> - <remoteColor>FFa6c3e1</remoteColor> <!-- watched color --> - <downloadColor>FFFFFFFF</downloadColor> <!-- not watched color (normal) --> - <textcolor>FF78ace0</textcolor> <!-- local file not present color --> - <textcolor2>FF78ace0</textcolor2> <!-- local file not present color column 2--> - <textcolor3>FF78ace0</textcolor3> <!-- local file not present color column 3--> - </control> - </control> - </control> - <import>common.facade.xml</import> - </controls> -</window> \ No newline at end of file +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<window> + <id>9811</id> + <defaultcontrol>50</defaultcontrol> + <allowoverlay>no</allowoverlay> + <!-- <define>#header.hover:hover_my tv series.png</define> --> + <define>#header.location:134</define> + + <controls> + +<!-- ***********************************DUMMY LABELS********************************************* --> + + + <control> + <type>label</type> + <description>Dummy Label for Fanart triggers</description> + <id>1232</id> + <posX>-50</posX> + <posY>-50</posY> + <width>620</width> + <textcolor>d4d2d2</textcolor> + <font>font14</font> + <label></label> + <visible>false</visible> + <!-- to make a control visible only when a light fanart is loaded do this: <visible>Control.IsVisible(1234)</visible> --> + <!-- to make a control invisible when a light fanart is loaded do this: <visible>!Control.IsVisible(1234)</visible> --> + </control> + + <control> + <type>label</type> + <description>Dummy Label for dark Fanart triggers</description> + <id>1233</id> + <posX>-50</posX> + <posY>-50</posY> + <width>620</width> + <textcolor>d4d2d2</textcolor> + <font>font14</font> + <label></label> + <visible>false</visible> + <!-- to make a control visible only when a light fanart is loaded do this: <visible>Control.IsVisible(1234)</visible> --> + <!-- to make a control invisible when a light fanart is loaded do this: <visible>!Control.IsVisible(1234)</visible> --> + </control> + + <control> + <type>label</type> + <description>Dummy Label for light Fanart triggers</description> + <id>1234</id> + <posX>-50</posX> + <posY>-50</posY> + <width>620</width> + <textcolor>d4d2d2</textcolor> + <font>font14</font> + <label></label> + <visible>false</visible> + <!-- to make a control visible only when a light fanart is loaded do this: <visible>Control.IsVisible(1234)</visible> --> + <!-- to make a control invisible when a light fanart is loaded do this: <visible>!Control.IsVisible(1234)</visible> --> + </control> + <control> + <type>label</type> + <description>Dummy Label for List triggers</description> + <id>1235</id> + <posX>-50</posX> + <posY>-50</posY> + <width>0</width> + <textcolor>d4d2d2</textcolor> + <font>font14</font> + <label></label> + <visible>false</visible> + <!-- to make a control visible only when the facade is in list mode do this: <visible>Control.IsVisible(1235)</visible> --> + <!-- to make a control invisible when the facade is in list mode do this: <visible>!Control.IsVisible(1235)</visible> --> + </control> + + + +<!-- ********************** BACKGROUNDS************************************** --> + + + + + <control> + <description>BG</description> + <type>image</type> + <id>1</id> + <posX>0</posX> + <posY>0</posY> + <width>1280</width> + <height>720</height> + <texture>background.png</texture> + <colordiffuse>ccffffff</colordiffuse> + <animation effect="fade" time="1000" reversible="false">visiblechange</animation> + </control> + + <control> + <description>Fan Art Image</description> + <type>image</type> + <id>524</id> + <posX>0</posX> + <posY>0</posY> + <width>1280</width> + <height>720</height> + <texture>-</texture> + <colordiffuse>ccffffff</colordiffuse> + <animation effect="fade" time="600" delay="200" reversible="false">hidden</animation> + <animation effect="fade" time="1000" reversible="false">visible</animation> + </control> + + + + <control> + <description>ListBackground (dark background)</description> + <type>image</type> + <id>3435</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>650</posX> + <posY>240</posY> + <texture>tvseries\ListBackGround.png</texture> + <colordiffuse>ff999999</colordiffuse> + <visible>Control.IsVisible(1235)</visible> + </control> + + <control> + <description>roof (dark background)</description> + <type>image</type> + <id>3435</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>660</posX> + <posY>165</posY> + <texture>tvseries\Roof.png</texture> + <colordiffuse>ff999999</colordiffuse> + <visible>Control.IsVisible(1235)</visible> + </control> + + + + + <control> + <description>ListBackground (light background)</description> + <type>image</type> + <id>3435</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>650</posX> + <posY>240</posY> + <texture>tvseries\ListBackGround.png</texture> + <colordiffuse>ff333333</colordiffuse> + <visible>Control.IsVisible(1235)+Control.IsVisible(1234)</visible> + </control> + + <control> + <description>roof (light background)</description> + <type>image</type> + <id>3435</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>660</posX> + <posY>165</posY> + <texture>tvseries\Roof.png</texture> + <colordiffuse>ff333333</colordiffuse> + <visible>Control.IsVisible(1235)+Control.IsVisible(1234)</visible> + </control> + + + + +<!-- ********************** IMPORT PROCESS *************************************** --> + + + <control> + <description>Process label</description> + <type>fadelabel</type> + <id>2345</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>570</posX> + <posY>625</posY> + <width>150</width> + <height>20</height> + <label>8033</label> + <font>font9</font> + <align>center</align> + <textcolor>99ffffff</textcolor> + <visible>Control.IsVisible(51)</visible> + </control> + + + + <control> + <description>Import Animation</description> + <type>animation</type> + <id>51</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>570</posX> + <posY>625</posY> + <width>150</width> + <height>60</height> + <textures> + tvseries_progress\tvseries.waiting.1.png; + tvseries_progress\tvseries.waiting.2.png; + tvseries_progress\tvseries.waiting.3.png; + tvseries_progress\tvseries.waiting.4.png; + tvseries_progress\tvseries.waiting.5.png; + tvseries_progress\tvseries.waiting.6.png; + tvseries_progress\tvseries.waiting.7.png; + tvseries_progress\tvseries.waiting.8.png; + tvseries_progress\tvseries.waiting.9.png; + tvseries_progress\tvseries.waiting.10.png; + tvseries_progress\tvseries.waiting.11.png + </textures> <!-- <textures>common.waiting.1.png;common.waiting.2.png;common.waiting.3.png;common.waiting.4.png;common.waiting.5.png;common.waiting.6.png;common.waiting.7.png;common.waiting.8.png</textures> --> + <Duration>0:0:01.5</Duration> + <keepaspectratio>yes</keepaspectratio> + <colordiffuse>ccffffff</colordiffuse> + </control> + + + + + + +<!-- *****************************************INFORMATION IN LIST VIEW***************************************************************** --> + + + <control> + <type>label</type> + <description>Information Text (no fanart)</description> + <id>6353</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>30</posX> + <posY>190</posY> + <width>620</width> + <textcolor>d4d2d2</textcolor> + <font>font14</font> + <label>Information</label> + <visible>!Control.IsVisible(1232)</visible> + <animation effect="slide" end="0,300" time="600" acceleration="-0.9">hidden</animation> + </control> + + <control> + <description>Splittline ( no fanart )</description> + <type>image</type> + <id>6352</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>30</posX> + <posY>225</posY> + <texture>tvseries\SplittLine.png</texture> + <visible>!Control.IsVisible(1232)</visible> + <animation effect="slide" end="0,300" time="600" acceleration="-0.9">hidden</animation> + </control> + + <control> + <type>fadelabel</type> + <description>Title (no fanart)</description> + <id>640</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>30</posX> + <posY>230</posY> + <width>620</width> + <label>#TVSeries.Title</label> + <textcolor>d4d2d2</textcolor> + <font>font16</font> + <visible>!Control.IsVisible(1232)</visible> + <animation effect="slide" end="0,300" time="600" acceleration="-0.9">hidden</animation> + </control> + + <control> + <type>fadelabel</type> + <description>Subtitle</description> + <id>33</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>30</posX> + <posY>265</posY> + <width>620</width> + <label>#TVSeries.Subtitle</label> + <textcolor>ffb9d5ff</textcolor> + <font>font13</font> + <visible>!Control.IsVisible(1232)</visible> + </control> + + <control> + <type>textboxscrollup</type> + <description>Description (no fanart)</description> + <id>631</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>30</posX> + <posY>300</posY> + <width>570</width> + <height>400</height> + <seperator>-----------------------------------------------------------------------------------------------------------------------</seperator> + <dimColor>ff000000</dimColor> + <textcolor>d4d2d2</textcolor> + <font>font12</font> + <visible>!Control.IsVisible(1232)</visible> + <label>#TVSeries.Description</label> + <animation effect="slide" end="0,280" time="600" acceleration="-0.9">hidden</animation> + </control> + + + + + + + + + + + + + + + + <control> + <type>label</type> + <description>Information Text (light background)</description> + <id>6353</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>30</posX> + <posY>490</posY> + <width>620</width> + <textcolor>333333</textcolor> + <font>font14</font> + <label>Information</label> + <visible>Control.IsVisible(1234)</visible> + <animation effect="fade" delay="600" time="400">visible</animation> + </control> + + <control> + <description>Splittline ( light background )</description> + <type>image</type> + <id>6352</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>30</posX> + <posY>525</posY> + <texture>tvseries\SplittLine.png</texture> + <colordiffuse>aa000000</colordiffuse> + <visible>Control.IsVisible(1234)</visible> + <animation effect="fade" delay="600" time="400">visible</animation> + </control> + + <control> + <type>fadelabel</type> + <description>Title (light background)</description> + <id>640</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>30</posX> + <posY>530</posY> + <width>620</width> + <label>#TVSeries.Title</label> + <textcolor>333333</textcolor> + <font>font16</font> + <visible>Control.IsVisible(1234)</visible> + <animation effect="fade" delay="600" time="400">visible</animation> + </control> + + <control> + <type>textboxscrollup</type> + <description>Description (light background)</description> + <id>631</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>30</posX> + <posY>580</posY> + <width>570</width> + <height>130</height> + <seperator>-----------------------------------------------------------------------------------------------------------------------</seperator> + <dimColor>ff000000</dimColor> + <textcolor>333333</textcolor> + <font>font12</font> + <visible>Control.IsVisible(1234)</visible> + <label>#TVSeries.Description</label> + <animation effect="fade" delay="600" time="400">visible</animation> + </control> + + + + + + + + + + + + + <control> + <type>label</type> + <description>Information Text (dark background)</description> + <id>4353</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>30</posX> + <posY>490</posY> + <width>620</width> + <textcolor>d4d2d2</textcolor> + <font>font14</font> + <label>Information</label> + <visible>!Control.IsVisible(1234)+Control.IsVisible(1232)</visible> + <animation effect="fade" delay="600" time="400">visible</animation> + </control> + + <control> + <description>Splittline ( dark background )</description> + <type>image</type> + <id>4352</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>30</posX> + <posY>525</posY> + <texture>tvseries\SplittLine.png</texture> + <visible>!Control.IsVisible(1234)+Control.IsVisible(1232)</visible> + <animation effect="fade" delay="600" time="400">visible</animation> + </control> + + <control> + <type>fadelabel</type> + <description>Title (dark background)</description> + <id>40</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>30</posX> + <posY>530</posY> + <width>620</width> + <label>#TVSeries.Title</label> + <textcolor>d4d2d2</textcolor> + <font>font16</font> + <colordiffuse>ffffffff</colordiffuse> + <visible>!Control.IsVisible(1234)+Control.IsVisible(1232)</visible> + <animation effect="fade" delay="600" time="400">visible</animation> + </control> + + <control> + <type>textboxscrollup</type> + <description>Description (dark background)</description> + <id>31</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>30</posX> + <posY>580</posY> + <width>570</width> + <height>130</height> + <label>#TVSeries.Description</label> + <seperator>-----------------------------------------------------------------------------------------------------------------------</seperator> + <dimColor>ffffffff</dimColor> + <textcolor>d4d2d2</textcolor> + <font>font12</font> + <visible>!Control.IsVisible(1234)+Control.IsVisible(1232)</visible> + <animation effect="fade" delay="600" time="400">visible</animation> + </control> + + + + + + + + +<!-- ***************************** LOGOS / BANNERS ******************************** --> + + <control> + <type>image</type> + <description>Series Logo (Logo when series are selected)</description> + <id>30</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>30</posX> + <posY>20</posY> + <width>620</width> + <height>150</height> + <centered>yes</centered> + <keepaspectratio>yes</keepaspectratio> + <texture flipY="true" diffuse="Thumb_Mask_non2.png">#TVSeries.SeriesBanner</texture> + <visible>!Control.IsVisible(1232)+Control.IsVisible(1235)</visible> + <!-- <animation effect="fade" delay="300" time="600">visible</animation> + <animation effect="fade" delay="300" time="300">hidden</animation> --> + </control> + + <control> + <type>image</type> + <description>Season image ( season image background )</description> + <id>46</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>1000</posX> + <posY>25</posY> + <width>270</width> + <height>150</height> + <centered>yes</centered> + <keepaspectratio>yes</keepaspectratio> + <colordiffuse>ffFFFFFF</colordiffuse> + <texture flipY="true" diffuse="Thumb_Mask.png">#TVSeries.SeasonBanner</texture> + <animation effect="fade" time="600">visible</animation> + </control> + + <control> + <type>image</type> + <description>Episode logo big</description> + <id>67</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>780</posX> + <posY>40</posY> + <width>240</width> + <height>140</height> + <keepaspectratio>yes</keepaspectratio> + <centered>yes</centered> + <texture flipY="true" diffuse="Thumb_Mask.png">#TVSeries.EpisodeImage</texture> + <animation effect="fade" time="600">visible</animation> + </control> + + <control> + <type>image</type> + <description>thumb Logos</description> + <id>66</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>820</posX> + <posY>155</posY> + <width>730</width> + <height>50</height> + <texture flipY="true" diffuse="Thumb_Mask.png">#TVSeries.Logos</texture> + <centered>no</centered> + <keepaspectratio>yes</keepaspectratio> + <colordiffuse>ffFFFFFF</colordiffuse> + <animation effect="fade" time="600">visible</animation> + </control> + + + + +<!-- ************************** VIEW SELECTION ***********************************--> + + <control> + <type>label</type> + <description>Last View (light background)</description> + <id>78</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>700</posX> + <posY>671</posY> + <width>200</width> + <label>#TVSeries.LastView</label> + <align>right</align> + <textcolor>333333</textcolor> + <font>font11</font> + <visible>Control.IsVisible(1234)</visible> + </control> + + <control> + <type>label</type> + <description>cur_view (light background</description> + <id>77</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>720</posX> + <posY>685</posY> + <width>200</width> + <label>#TVSeries.CurrentView</label> + <align>center</align> + <textcolor>333333</textcolor> + <font>font18</font> + <shadow>10</shadow> + <visible>Control.IsVisible(1234)</visible> + </control> + + <control> + <type>label</type> + <description>next view (light background</description> + <id>79</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>930</posX> + <posY>671</posY> + <width>200</width> + <label>#TVSeries.NextView</label> + <align>left</align> + <textcolor>333333</textcolor> + <font>font11</font> + <visible>Control.IsVisible(1234)</visible> + </control> + + <control> + <description>left arrow (light background)</description> + <type>image</type> + <id>4352</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>720</posX> + <posY>668</posY> + <texture>tvseries\ArrowLeft.png</texture> + <colordiffuse>ff000000</colordiffuse> + <visible>Control.IsVisible(1234)</visible> + </control> + + <control> + <description>right arrow (light background)</description> + <type>image</type> + <id>4353</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>900</posX> + <posY>668</posY> + <colordiffuse>ff000000</colordiffuse> + <texture>tvseries\ArrowRight.png</texture> + <visible>Control.IsVisible(1234)</visible> + </control> + + + + + + + + + <control> + <type>label</type> + <description>Last View (dark background)</description> + <id>78</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>700</posX> + <posY>671</posY> + <width>200</width> + <label>#TVSeries.LastView</label> + <align>right</align> + <textcolor>d4d2d2</textcolor> + <font>font11</font> + <visible>!Control.IsVisible(1234)</visible> + </control> + + <control> + <type>label</type> + <description>cur_view (dark background</description> + <id>77</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>720</posX> + <posY>685</posY> + <width>200</width> + <label>#TVSeries.CurrentView</label> + <align>center</align> + <textcolor>d4d2d2</textcolor> + <font>font18</font> + <shadow>10</shadow> + <visible>!Control.IsVisible(1234)</visible> + </control> + + <control> + <type>label</type> + <description>next view (dark background</description> + <id>79</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>930</posX> + <posY>671</posY> + <width>200</width> + <label>#TVSeries.NextView</label> + <align>left</align> + <textcolor>d4d2d2</textcolor> + <font>font11</font> + <visible>!Control.IsVisible(1234)</visible> + </control> + + <control> + <description>left arrow (dark background)</description> + <type>image</type> + <id>4352</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>720</posX> + <posY>668</posY> + <texture>tvseries\ArrowLeft.png</texture> + <visible>!Control.IsVisible(1234)</visible> + </control> + + <control> + <description>right arrow (dark background)</description> + <type>image</type> + <id>4353</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <posX>900</posX> + <posY>668</posY> + <texture>tvseries\ArrowRight.png</texture> + <visible>!Control.IsVisible(1234)</visible> + </control> + + + + + <control> + <description>ViewBackGround</description> + <type>image</type> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <id>515</id> + <posX>565</posX> + <posY>662</posY> + <width>500</width> + <texture>Tvseries\ViewBackground.png</texture> + </control> + + + +<!-- *********************** LIST /GRAPHICAL VIEW*********************************** --> + + + + + + <control> + <type>group</type> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <animation effect="zoom" start="70,70" end="100,100" center="640,360" time="400" >WindowOpen</animation> + <animation effect="zoom" start="100,100" end="130,130" center="640,360" time="400" >WindowClose</animation> + <description>group element</description> + <id>28</id> + <layout>StackLayout</layout> + <posX>60</posX> + <posY>97</posY> + <control> + <description>composite control consisting of a list control and a thumbnail panel</description> + <type>facadeview</type> + <id>50</id> + + <control> + <description>graphical list (series and seasons if set)</description> + <type>listcontrol</type> + <subtype>album</subtype> + <id>50</id> + <posX>680</posX><!-- 750 --> + <posY>10</posY><!-- 185 --> + <width>600</width> + <height>700</height> + <IconXOff>15</IconXOff> + <IconYOff>3</IconYOff> + <spaceBetweenItems>2</spaceBetweenItems> + <remoteColor>FFa6c3e1</remoteColor> <!-- Watched color --> + <downloadColor>d4d2d2</downloadColor> <!-- not watched color (normal) --> + <textcolor>FF78ace0</textcolor> <!-- local file not present color --> + <textcolor2>FF78ace0</textcolor2> <!-- local file not present color column 2--> + <textcolor3>FF78ace0</textcolor3> <!-- local file not present color column 3--> + <spinPosX>1180</spinPosX> + <spinPosY>620</spinPosY> + <textureFocus>Tvseries\tv_green_border2.png</textureFocus> + <textureUp>Tvseries\arrow_round_up_nofocus.png</textureUp> + <textureDown>Tvseries\arrow_round_down_nofocus.png</textureDown> + <textureUpFocus>Tvseries\arrow_round_up_focus.png</textureUpFocus> + <textureDownFocus>Tvseries\arrow_round_down_focus.png</textureDownFocus> + </control> + + + <!-- 9 line version (outdated)--> + <!-- <control> + <description>text list</description> + <type>listcontrol</type> + <id>50</id> + <textureHeight>45</textureHeight> + <itemWidth>40</itemWidth> + <itemHeight>25</itemHeight> + <IconXOff>15</IconXOff> + <IconYOff>10</IconYOff> + <posX>650</posX> + <posY>230</posY> + <width>500</width> + <height>420</height> + <textXOff2>610</textXOff2> + <textYOff2>7</textYOff2> + <textYOff>7</textYOff> + <textXOff>25</textXOff> + <spaceBetweenItems>-5</spaceBetweenItems> + <remoteColor>FFa6c3e1</remoteColor> --> <!-- watched color --> + <!-- <downloadColor>FF00BBCC</downloadColor> --> <!-- not watched color (normal) --> + <!-- <textcolor>FFE31919</textcolor> --> <!-- local file not present color --> + <!-- <textcolor2>FFE31919</textcolor2> --> <!-- local file not present color column 2--> + <!-- <textcolor3>FFE31919</textcolor3> --> <!-- local file not present color column 3--> + <!-- <spinPosX>800</spinPosX> + <spinPosY>620</spinPosY> + <keepaspectratio>true</keepaspectratio> + </control> --> + + + + <!-- 5 lined version --> + <control> + <description>text list</description> + <type>listcontrol</type> + <id>50</id> + <textureHeight>80</textureHeight> + <itemWidth>80</itemWidth> + <itemHeight>50</itemHeight> + <IconXOff>18</IconXOff> + <IconYOff>12</IconYOff> + <posX>665</posX> + <posY>240</posY> + <width>500</width> + <height>400</height> + <textXOff2>610</textXOff2> <!-- 635 --> + <textYOff2>27</textYOff2> + <textYOff>23</textYOff> + <textXOff>25</textXOff> + <spaceBetweenItems>-13</spaceBetweenItems> + <remoteColor>FFa6c3e1</remoteColor> <!-- watched color --> + <downloadColor>FF00BBCC</downloadColor> <!-- not watched color (normal) --> + <textcolor>FFE31919</textcolor> <!-- local file not present color --> + <textcolor2>FFE31919</textcolor2> <!-- local file not present color column 2--> + <textcolor3>FFE31919</textcolor3> <!-- local file not present color column 3--> + <spinPosX>1180</spinPosX> + <spinPosY>620</spinPosY> + <textureFocus>TVseries\selectbar2.png</textureFocus> + <textureNoFocus>TVseries\selectbarNo2.png</textureNoFocus> + <keepaspectratio>true</keepaspectratio> + <textureUp>Tvseries\arrow_round_up_nofocus.png</textureUp> + <textureDown>Tvseries\arrow_round_down_nofocus.png</textureDown> + <textureUpFocus>Tvseries\arrow_round_up_focus.png</textureUpFocus> + <textureDownFocus>Tvseries\arrow_round_down_focus.png</textureDownFocus> + </control> + </control> + </control> + + + <control> + <description>video rectangle</description> + <type>image</type> + <id>0</id> + <posX>1075</posX> + <posY>595</posY> + <width>207</width> + <height>126</height> + <texture>Tvseries\VizzulationCoverBackground.png</texture> + <colorkey>0</colorkey> + <colordiffuse>eeffffff</colordiffuse> + <animation effect="fade" time="600">WindowClose</animation> + <animation effect="fade" time="1000">WindowOpen</animation> + <visible>Player.HasVideo</visible> + </control> + <control> + <description>video preview window</description> + <type>videowindow</type> + <id>1</id> + <posX>1100</posX> + <posY>614</posY> + <width>162</width> + <height>92</height> + <action>18</action> + <textureFocus>Tvseries\tv_green_border.png</textureFocus> + <animation effect="fade" time="600">WindowClose</animation> + <animation effect="fade" time="1000">WindowOpen</animation> + <visible>Player.HasVideo</visible> + </control> + </controls> +</window> Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/myvideo.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/myvideo.xml 2007-07-24 00:06:29 UTC (rev 755) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/myvideo.xml 2007-07-24 14:22:17 UTC (rev 756) @@ -343,18 +343,12 @@ <onright>2</onright> <onup>2</onup> <ondown>2</ondown> + <itemWidth>150</itemWidth> + <itemHeight>220</itemHeight> + <thumbWidth>80</thumbWidth> + <thumbHeight>115</thumbHeight> - <background>dvd_case.png</background> - <backgroundx>900</backgroundx> - <backgroundy>120</backgroundy> - <backgroundwidth>360</backgroundwidth> - <backgroundheight>475</backgroundheight> - <backgrounddiffuse>ffffffff</backgrounddiffuse> - <InfoImage>-</InfoImage> - <InfoImagex>920</InfoImagex> - <InfoImagey>135</InfoImagey> - <InfoImagewidth>310</InfoImagewidth> - <InfoImageheight>450</InfoImageheight> + </control> <control> <description>playlist listcontrol</description> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gre...@us...> - 2007-07-24 00:06:33
|
Revision: 755 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=755&view=rev Author: gregmac45 Date: 2007-07-23 17:06:29 -0700 (Mon, 23 Jul 2007) Log Message: ----------- create the thumbnail directory specified in the config xml if it doesn't exist using MediaPortal/Thumbs/OnlineVideos if no thumbnail directory is specified in the config xml Modified Paths: -------------- trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs Modified: trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs =================================================================== --- trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs 2007-07-23 13:27:22 UTC (rev 754) +++ trunk/plugins/OnlineVideos/Source/OnlineVideos/GUIOnlineVideos.cs 2007-07-24 00:06:29 UTC (rev 755) @@ -356,6 +356,13 @@ } XmlNode thumbNode = doc.SelectSingleNode("//settings/thumbLocation"); msThumbLocation = thumbNode.InnerText; + if(String.IsNullOrEmpty(msThumbLocation)){ + msThumbLocation = + System.IO.Directory.GetCurrentDirectory()+"/Thumbs/OnlineVideos/"; + } + if(System.IO.Directory.Exists(msThumbLocation)==false){ + System.IO.Directory.CreateDirectory(msThumbLocation); + } //lsFilterArray //Log.Write("filter value {0}",filter.InnerText); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rs...@us...> - 2007-07-23 13:27:25
|
Revision: 754 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=754&view=rev Author: rsparey Date: 2007-07-23 06:27:22 -0700 (Mon, 23 Jul 2007) Log Message: ----------- Working on new film strip view.. Modified Paths: -------------- trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml trunk/skins/Foofaraw/Development Skin/Foofaraw/mymusicsongs.xml trunk/skins/Foofaraw/Development Skin/Foofaraw/myradio.xml trunk/skins/Foofaraw/Development Skin/Foofaraw/myvideo.xml Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml 2007-07-23 12:03:12 UTC (rev 753) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/BasicHome.xml 2007-07-23 13:27:22 UTC (rev 754) @@ -236,5 +236,6 @@ <animation effect="slide" time="1000" delay="2000" start="-600,0" end="0,0" acceleration="-1">WindowOpen</animation> <animation effect="fade" time="500" start="50">WindowClose</animation> </control> + <showNumberofFilesLabel>no</showNumberofFilesLabel> </controls> </window> \ No newline at end of file Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/mymusicsongs.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/mymusicsongs.xml 2007-07-23 12:03:12 UTC (rev 753) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/mymusicsongs.xml 2007-07-23 13:27:22 UTC (rev 754) @@ -63,7 +63,7 @@ <posX>12</posX> <posY>195</posY> <width>1342</width> - <height>317</height> + <height>350</height> <texture>mid_strip.png</texture> <animation effect="fade" time="1000">WindowOpen</animation> <animation effect="fade" time="500">WindowClose</animation> @@ -73,7 +73,7 @@ <decription>bottom_strip</decription> <id>1</id> <posX>12</posX> - <posY>514</posY> + <posY>547</posY> <width>1342</width> <height>18</height> <texture>bottom_strip.png</texture> @@ -91,7 +91,7 @@ <posY>600</posY> <width>1000</width> <label>#selecteditem</label> - <font>wipeout</font> + <font>wipeouts</font> <align>center</align> <textcolor>ffffffff</textcolor> </control> @@ -107,7 +107,8 @@ <posY>155</posY> <posX>12</posX> <label>100</label> - <onleft>2</onleft> + <font>font10</font> + <onleft>2</onleft> <onright>3</onright> <onup>2</onup> <ondown>50</ondown> @@ -115,8 +116,8 @@ <height>36</height> <textureFocus>tab_left_corner_down.png</textureFocus> <textureNoFocus>tab_left_corner_up.png</textureNoFocus> - <textcolor>black</textcolor> + </control> @@ -128,6 +129,7 @@ <posY>155</posY> <posX>221</posX> <label>103</label> + <font>font10</font> <width>209</width> <height>36</height> <onleft>2</onleft> @@ -154,6 +156,7 @@ <posY>155</posY> <posX>430</posX> <label>457</label> + <font>font10</font> <width>209</width> <height>36</height> <onleft>3</onleft> @@ -173,6 +176,7 @@ <posY>155</posY> <posX>639</posX> <label>137</label> + <font>font10</font> <width>209</width> <height>36</height> <onleft>6</onleft> @@ -193,6 +197,7 @@ <posY>155</posY> <posX>848</posX> <label>890</label> + <font>font10</font> <width>209</width> <height>36</height> <onleft>7</onleft> @@ -213,6 +218,7 @@ <posY>155</posY> <posX>1057</posX> <label>983</label> + <font>font10</font> <ondown>99</ondown> <width>209</width> <height>36</height> Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/myradio.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/myradio.xml 2007-07-23 12:03:12 UTC (rev 753) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/myradio.xml 2007-07-23 13:27:22 UTC (rev 754) @@ -56,99 +56,235 @@ <animation effect="fade" time="500" start="50">WindowClose</animation> </control> <control> - <type>group</type> - <description>group element</description> - <animation effect="fade" time="250">WindowOpen</animation> + <type>image</type> + <decription>mid_strip</decription> + <id>1</id> + <posX>12</posX> + <posY>195</posY> + <width>1342</width> + <height>350</height> + <texture>mid_strip.png</texture> + <animation effect="fade" time="1000">WindowOpen</animation> <animation effect="fade" time="500">WindowClose</animation> - <posX>113</posX> - <posY>129</posY> - <layout>StackLayout</layout> - <control> - <description>View-As button</description> - <type>button</type> - <id>2</id> - <label>100</label> - <onleft>2</onleft> - <onright>50</onright> - <onup>17</onup> - <ondown>3</ondown> - <subitems> + </control> + <control> + <type>image</type> + <decription>bottom_strip</decription> + <id>1</id> + <posX>12</posX> + <posY>547</posY> + <width>1342</width> + <height>18</height> + <texture>bottom_strip.png</texture> + <animation effect="fade" time="1000">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + </control> + + <control> + <description>View-As button</description> + <type>button</type> + <id>2</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>12</posX> + <label>100</label> + <font>font10</font> + <onleft>2</onleft> + <onright>3</onright> + <onup>2</onup> + <ondown>50</ondown> + <subitems> <subitem>101</subitem> <subitem>100</subitem> <subitem>417</subitem> </subitems> - </control> - <control> - <type>sortbutton</type> - <onleft>3</onleft> - <onright>50</onright> - <onup>2</onup> - <ondown>6</ondown> - <subitems> - <subitem>103</subitem> - <subitem>668</subitem> - <subitem>669</subitem> - <subitem>670</subitem> - <subitem>620</subitem> - </subitems> - </control> - <control> - <description>Previous button</description> - <type>button</type> - <id>6</id> - <label>210</label> - <onleft>6</onleft> - <onright>50</onright> - <onup>3</onup> - <ondown>7</ondown> - <action>15</action> - </control> - <control> - <description>Next</description> - <type>button</type> - <id>7</id> - <label>209</label> - <onleft>7</onleft> - <onright>50</onright> - <onup>6</onup> - <ondown>8</ondown> - <action>14</action> - </control> - <control> - <description>Radio Guide</description> - <type>button</type> - <id>8</id> - <label>533</label> - <onleft>8</onleft> - <onright>50</onright> - <onup>7</onup> - <ondown>99</ondown> - <hyperlink>762</hyperlink> - </control> + <width>209</width> + <height>36</height> + <textureFocus>tab_left_corner_down.png</textureFocus> + <textureNoFocus>tab_left_corner_up.png</textureNoFocus> + + + + + </control> + <control> + <type>sortbutton</type> + <id>3</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>221</posX> + <label>103</label> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>2</onleft> + <onright>6</onright> + <onup>3</onup> + <subitems> + <subitem>103</subitem> + <subitem>668</subitem> + <subitem>669</subitem> + <subitem>670</subitem> + <subitem>620</subitem> + </subitems> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + <textureAscending>arrow_round_up_nofocus.png</textureAscending> + <textureAscendingFocused>arrow_round_up_focus.png</textureAscendingFocused> + <textureDescending>arrow_round_down_nofocus.png</textureDescending> + <textureDescendingFocused>arrow_round_down_focus.png</textureDescendingFocused> + <offsetSortButtonX>180</offsetSortButtonX> + <offsetSortButtonY>8</offsetSortButtonY> + </control> + <control> + <description>Previous button</description> + <type>button</type> + <id>6</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>430</posX> + <font>font10</font> + <label>210</label> + <width>209</width> + <height>36</height> + <onleft>3</onleft> + <onright>7</onright> + <onup>6</onup> + <action>15</action> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + </control> + <control> + <description>Next Button</description> + <type>button</type> + <id>7</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>639</posX> + <label>209</label> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>6</onleft> + <onright>8</onright> + <onup>7</onup> + <ondown>50</ondown> + <action>14</action> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + </control> + <control> + <description>Radio Guide</description> + <type>button</type> + <id>8</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + + <posY>155</posY> + <posX>848</posX> + <label>533</label> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>7</onleft> + <onright>9</onright> + <onup>8</onup> + <ondown>50</ondown> + <hyperlink>762</hyperlink> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + </control> + <control> + <description>My Playlists</description> + <type>button</type> + <id>9</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>1057</posX> + <label>983</label> + <font>font10</font> + <ondown>99</ondown> + <width>209</width> + <height>36</height> + <onleft>8</onleft> + <onright>9</onright> + <onup>17</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + <textcolor>black</textcolor> + </control> + + + + <control> + <description>Tab filler left</description> + <type>image</type> + <id>1</id> + <posX>1266</posX> + <posY>155</posY> + <width>14</width> + <height>36</height> + <texture>tab_filler left.png</texture> + <animation effect="fade" time="500" >WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> </control> - <control> - <type>group</type> - <description>group element</description> - <animation effect="fade" time="250">WindowOpen</animation> + <control> + <description>Tab filler center</description> + <type>image</type> + <id>1</id> + <posX>1280</posX> + <posY>155</posY> + <width>61</width> + <height>36</height> + <texture>tab_filler center.png</texture> + <animation effect="fade" time="500" >WindowOpen</animation> <animation effect="fade" time="500">WindowClose</animation> - <control> - <description>listcontrol</description> - <type>listcontrol</type> - <id>50</id> - <onleft>51</onleft> - <onright>51</onright> - <onup>2</onup> - <ondown>2</ondown> - </control> - <control> - <description>Thumbnail Panel</description> - <type>thumbnailpanel</type> - <id>51</id> - <onleft>2</onleft> - <onright>2</onright> - <onup>2</onup> - <ondown>2</ondown> - </control> </control> - </controls> + <control> + <description>Tab filler right</description> + <type>image</type> + <id>1</id> + <posX>1341</posX> + <posY>155</posY> + <width>13</width> + <height>36</height> + <texture>tab_filler right.png</texture> + <animation effect="fade" time="500" >WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + </control> + + + <control> + <type>group</type> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <description>group element</description> + <control> + <description>listcontrol</description> + <type>listcontrol</type>v + <id>50</id> + <onleft>51</onleft> + <onright>51</onright> + <onup>2</onup> + <ondown>50</ondown> + </control> + <control> + <description>Thumbnail Panel</description> + <type>thumbnailpanel</type> + <id>51</id> + <onleft>2</onleft> + <onright>2</onright> + <onup>2</onup> + <ondown>50</ondown> + </control> + </control> + </controls> </window> \ No newline at end of file Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/myvideo.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/myvideo.xml 2007-07-23 12:03:12 UTC (rev 753) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/myvideo.xml 2007-07-23 13:27:22 UTC (rev 754) @@ -61,71 +61,308 @@ <animation effect="fade" time="500" start="50">WindowClose</animation> </control> + <control> + <type>image</type> + <decription>mid_strip</decription> + <id>1</id> + <posX>12</posX> + <posY>195</posY> + <width>1342</width> + <height>350</height> + <texture>mid_strip.png</texture> + <animation effect="fade" time="1000">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + </control> + <control> + <type>image</type> + <decription>bottom_strip</decription> + <id>1</id> + <posX>12</posX> + <posY>547</posY> + <width>1342</width> + <height>18</height> + <texture>bottom_strip.png</texture> + <animation effect="fade" time="1000">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + </control> - <control> - <type>group</type> - <animation effect="slide" time="400" start="-300,0">WindowOpen</animation> - <animation effect="slide" time="400" end="0,-300">WindowClose</animation> + <control> + <description>Selected item Label</description> + <type>fadelabel</type> + <id>1</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posX>250</posX> + <posY>600</posY> + <width>1000</width> + <label>#selecteditem</label> + <font>wipeouts</font> + <align>center</align> + <textcolor>ffffffff</textcolor> + </control> + + + + <control> + <description>View-As button</description> + <type>button</type> + <id>2</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>12</posX> + <label>100</label> + <font>font10</font> + <onleft>2</onleft> + <onright>3</onright> + <onup>2</onup> + <ondown>50</ondown> + <width>209</width> + <height>36</height> + <textureFocus>tab_left_corner_down.png</textureFocus> + <textureNoFocus>tab_left_corner_up.png</textureNoFocus> + + + + + </control> + <control> + <type>sortbutton</type> + <id>3</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>221</posX> + <label>103</label> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>2</onleft> + <onright>6</onright> + <onup>3</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + <textureAscending>arrow_round_up_nofocus.png</textureAscending> + <textureAscendingFocused>arrow_round_up_focus.png</textureAscendingFocused> + <textureDescending>arrow_round_down_nofocus.png</textureDescending> + <textureDescendingFocused>arrow_round_down_focus.png</textureDescendingFocused> + <offsetSortButtonX>180</offsetSortButtonX> + <offsetSortButtonY>8</offsetSortButtonY> + <textcolor>black</textcolor> + </control> + + <control> + <description>Switch View button</description> + <type>button</type> + <id>5</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>430</posX> + <label>457</label> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>3</onleft> + <onright>7</onright> + <onup>6</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + + </control> + <control> + <description>TV Series</description> + <type>button</type> + <id>1</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>639</posX> + <label>TV Series</label> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>6</onleft> + <onright>8</onright> + <onup>7</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + + </control> + <control> + <description>Play DVD</description> + <type>button</type> + <id>6</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + + <posY>155</posY> + <posX>848</posX> + <label>341</label> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>7</onleft> + <onright>9</onright> + <onup>8</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + + + </control> + + <control> + <description>Tv Series</description> + + <type>button</type> + <id>584</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>147</posY> + <posX>1057</posX> + <label>TV Series</label> + <font>font10</font> + <width>209</width> + <height>36</height> + <onleft>6</onleft> + <onright>8</onright> + <onup>7</onup> + <ondown>9</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + <visible>Control.HasFocus(9)|Control.HasFocus(584)</visible> + <animation effect="fade" time="250">visiblechange</animation> + <animation effect="slide" end="0,-30" time="250">visiblechange</animation> + </control> + <control> + <description>Trailers</description> + <type>button</type> + <id>9</id> + <hyperlink>5900</hyperlink> + <label>5906</label> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>1057</posX> + + <font>font10</font> + <ondown>99</ondown> + <width>209</width> + <height>36</height> + <onleft>8</onleft> + <onright>9</onright> + <onup>584</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + + </control> + + + + + <control> + <description>Tab filler left</description> + <type>image</type> + <id>1</id> + <posX>1266</posX> + <posY>155</posY> + <width>14</width> + <height>36</height> + <texture>tab_filler left.png</texture> + <animation effect="fade" time="500" >WindowOpen</animation> <animation effect="fade" time="500">WindowClose</animation> - <animation effect="fade" time="250">WindowOpen</animation> - <description>group element</description> - <layout>StackLayout</layout> - <posX>113</posX> - <posY>129</posY> - <control> - <description>View-As button</description> - <type>button</type> - <id>2</id> - <label>100</label> - <onup>17</onup> - <onright>50</onright> - </control> - <control> - <type>sortbutton</type> - <id>3</id> - <label>103</label> - </control> - <control> - <description>Switch view</description> - <type>button</type> - <id>5</id> - <label>457</label> - </control> - <control> - <description>Playlist button</description> - <type>button</type> - <id>20</id> - <label>136</label> - <action>33</action> - </control> - <control> - <description>Play DVD</description> - <type>button</type> - <id>6</id> - <label>341</label> - </control> - <control> - <description>Eject Disc</description> - <type>button</type> - <id>7</id> - <label>654</label> - <action>100</action> - </control> - <control> - <description>Trailers</description> - <type>button</type> - <id>8</id> - <hyperlink>5900</hyperlink> - <label>5906</label> - </control> - <control> - <description>My Playlists</description> - <type>button</type> - <id>9</id> - <label>983</label> - <ondown>99</ondown> - </control> </control> - <import>common.facade.video.xml</import> - </controls> + <control> + <description>Tab filler center</description> + <type>image</type> + <id>1</id> + <posX>1280</posX> + <posY>155</posY> + <width>61</width> + <height>36</height> + <texture>tab_filler center.png</texture> + <animation effect="fade" time="500" >WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + </control> + <control> + <description>Tab filler right</description> + <type>image</type> + <id>1</id> + <posX>1341</posX> + <posY>155</posY> + <width>13</width> + <height>36</height> + <texture>tab_filler right.png</texture> + <animation effect="fade" time="500" >WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + </control> + + + <control> + <type>group</type> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <description>group element</description> + <layout>StackLayout</layout> + <posX>60</posX> + <posY>97</posY> + <control> + <description>composite control consisting of a list control and a thumbnail panel</description> + <type>facadeview</type> + <id>50</id> + <control> + <description>listcontrol</description> + <type>listcontrol</type> + <id>50</id> + <onleft>2</onleft> + <onright>2</onright> + <onup>2</onup> + <ondown>2</ondown> + </control> + + <control> + <description>Thumbnail Panel</description> + <type>thumbnailpanel</type> + <id>50</id> + <onleft>2</onleft> + <onright>2</onright> + <onup>2</onup> + <ondown>2</ondown> + </control> + + <control> + <description>Filmstrip view</description> + <type>filmstrip</type> + <id>50</id> + <onleft>2</onleft> + <onright>2</onright> + <onup>2</onup> + <ondown>2</ondown> + + <background>dvd_case.png</background> + <backgroundx>900</backgroundx> + <backgroundy>120</backgroundy> + <backgroundwidth>360</backgroundwidth> + <backgroundheight>475</backgroundheight> + <backgrounddiffuse>ffffffff</backgrounddiffuse> + <InfoImage>-</InfoImage> + <InfoImagex>920</InfoImagex> + <InfoImagey>135</InfoImagey> + <InfoImagewidth>310</InfoImagewidth> + <InfoImageheight>450</InfoImageheight> + </control> + <control> + <description>playlist listcontrol</description> + <type>playlistcontrol</type> + <id>50</id> + <scrollOffset>1</scrollOffset> + </control> + </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: <rs...@us...> - 2007-07-23 12:03:19
|
Revision: 753 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=753&view=rev Author: rsparey Date: 2007-07-23 05:03:12 -0700 (Mon, 23 Jul 2007) Log Message: ----------- Modified Paths: -------------- trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/background.png trunk/skins/Foofaraw/Development Skin/Foofaraw/common.window.xml trunk/skins/Foofaraw/Development Skin/Foofaraw/mymusicsongs.xml trunk/skins/Foofaraw/Development Skin/Foofaraw/references.xml Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/Media/background.png =================================================================== (Binary files differ) Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/common.window.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/common.window.xml 2007-07-22 19:06:56 UTC (rev 752) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/common.window.xml 2007-07-23 12:03:12 UTC (rev 753) @@ -18,22 +18,11 @@ <label>#itemcount</label> <align>right</align> <textcolor>White</textcolor> + <font>font1</font> <animation effect="fade" time="200">WindowOpen</animation> <animation effect="fade" time="200">WindowClose</animation> </control> - <control> - <animation effect="fade" time="250">WindowOpen</animation> - <animation effect="fade" time="500">WindowClose</animation> - <type>image</type> - <id>1</id> - <posX>15</posX> - <posY>15</posY> - <width>80</width> - <height>160</height> - <texture>#header.hover</texture> - <animation effect="fade" time="200">WindowOpen</animation> - <animation effect="fade" time="200">WindowClose</animation> - </control> + </controls> </window> \ No newline at end of file Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/mymusicsongs.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/mymusicsongs.xml 2007-07-22 19:06:56 UTC (rev 752) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/mymusicsongs.xml 2007-07-23 12:03:12 UTC (rev 753) @@ -56,119 +56,268 @@ <animation effect="slide" time="1000" delay="2000" start="-600,0" end="0,0" acceleration="-1">WindowOpen</animation> <animation effect="fade" time="500" start="50">WindowClose</animation> </control> + <control> + <type>image</type> + <decription>mid_strip</decription> + <id>1</id> + <posX>12</posX> + <posY>195</posY> + <width>1342</width> + <height>317</height> + <texture>mid_strip.png</texture> + <animation effect="fade" time="1000">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + </control> + <control> + <type>image</type> + <decription>bottom_strip</decription> + <id>1</id> + <posX>12</posX> + <posY>514</posY> + <width>1342</width> + <height>18</height> + <texture>bottom_strip.png</texture> + <animation effect="fade" time="1000">WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + </control> + <control> + <description>Selected item Label</description> + <type>fadelabel</type> + <id>1</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posX>250</posX> + <posY>600</posY> + <width>1000</width> + <label>#selecteditem</label> + <font>wipeout</font> + <align>center</align> + <textcolor>ffffffff</textcolor> + </control> - + + + <control> + <description>View-As button</description> + <type>button</type> + <id>2</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>12</posX> + <label>100</label> + <onleft>2</onleft> + <onright>3</onright> + <onup>2</onup> + <ondown>50</ondown> + <width>209</width> + <height>36</height> + <textureFocus>tab_left_corner_down.png</textureFocus> + <textureNoFocus>tab_left_corner_up.png</textureNoFocus> + <textcolor>black</textcolor> + + + + </control> + <control> + <type>sortbutton</type> + <id>3</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>221</posX> + <label>103</label> + <width>209</width> + <height>36</height> + <onleft>2</onleft> + <onright>6</onright> + <onup>3</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + <textureAscending>arrow_round_up_nofocus.png</textureAscending> + <textureAscendingFocused>arrow_round_up_focus.png</textureAscendingFocused> + <textureDescending>arrow_round_down_nofocus.png</textureDescending> + <textureDescendingFocused>arrow_round_down_focus.png</textureDescendingFocused> + <offsetSortButtonX>180</offsetSortButtonX> + <offsetSortButtonY>8</offsetSortButtonY> + <textcolor>black</textcolor> + </control> + + <control> + <description>Switch View button</description> + <type>button</type> + <id>6</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>430</posX> + <label>457</label> + <width>209</width> + <height>36</height> + <onleft>3</onleft> + <onright>7</onright> + <onup>6</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + <textcolor>black</textcolor> + </control> + <control> + <description>Search Button</description> + <type>button</type> + <id>7</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>639</posX> + <label>137</label> + <width>209</width> + <height>36</height> + <onleft>6</onleft> + <onright>8</onright> + <onup>7</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + <textcolor>black</textcolor> + </control> + <control> + <description>Play CD</description> + <type>button</type> + <id>8</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + + <posY>155</posY> + <posX>848</posX> + <label>890</label> + <width>209</width> + <height>36</height> + <onleft>7</onleft> + <onright>9</onright> + <onup>8</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + <textcolor>black</textcolor> + <selectedColor>black</selectedColor> + </control> + <control> + <description>My Playlists</description> + <type>button</type> + <id>9</id> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <posY>155</posY> + <posX>1057</posX> + <label>983</label> + <ondown>99</ondown> + <width>209</width> + <height>36</height> + <onleft>8</onleft> + <onright>9</onright> + <onup>17</onup> + <ondown>50</ondown> + <textureFocus>tab_down.png</textureFocus> + <textureNoFocus>tab_up.png</textureNoFocus> + <textcolor>black</textcolor> + </control> + + + + <control> + <description>Tab filler left</description> + <type>image</type> + <id>1</id> + <posX>1266</posX> + <posY>155</posY> + <width>14</width> + <height>36</height> + <texture>tab_filler left.png</texture> + <animation effect="fade" time="500" >WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + </control> <control> - <type>group</type> - <animation effect="fade" time="250">WindowOpen</animation> + <description>Tab filler center</description> + <type>image</type> + <id>1</id> + <posX>1280</posX> + <posY>155</posY> + <width>61</width> + <height>36</height> + <texture>tab_filler center.png</texture> + <animation effect="fade" time="500" >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> - <description>group element</description> - <posX>113</posX> - <posY>129</posY> - <layout>StackLayout</layout> - <control> - <description>View-As button</description> - <type>button</type> - <id>2</id> - <label>100</label> - <onleft>2</onleft> - <onright>50</onright> - <onup>17</onup> - <ondown>3</ondown> - </control> - <control> - <type>sortbutton</type> - <id>3</id> - <label>103</label> - <onleft>3</onleft> - <onright>50</onright> - <onup>2</onup> - <ondown>6</ondown> - </control> - <control> - <description>Switch View</description> - <type>button</type> - <id>6</id> - <label>457</label> - <onleft>6</onleft> - <onright>50</onright> - <onup>3</onup> - <ondown>12</ondown> - </control> - <control> - <description>Search</description> - <type>button</type> - <id>12</id> - <label>137</label> - <onleft>12</onleft> - <onright>50</onright> - <onup>6</onup> - <ondown>9</ondown> - </control> - <control> - <description>Play CD</description> - <type>button</type> - <id>9</id> - <label>890</label> - <onleft>9</onleft> - <onright>50</onright> - <onup>12</onup> - <ondown>13</ondown> - </control> - <control> - <description>Eject Disc</description> - <type>button</type> - <id>13</id> - <label>654</label> - <onleft>13</onleft> - <onright>50</onright> - <onup>9</onup> - <ondown>11</ondown> - <action>100</action> - </control> - <control> - <type>image</type> - <description>Divider image</description> - <id>999</id> - <texture>hbar1.png</texture> - <keepaspectratio>yes</keepaspectratio> - </control> - <control> - <description>Now playing button</description> - <type>button</type> - <id>11</id> - <label>4540</label> - <onleft>11</onleft> - <onright>50</onright> - <onup>13</onup> - <ondown>8</ondown> - <hyperlink>510</hyperlink> - </control> - <control> - <description>Playlists button</description> - <type>button</type> - <id>8</id> - <label>4555</label> - <onleft>8</onleft> - <onright>50</onright> - <onup>11</onup> - <ondown>10</ondown> - <action>33</action> - </control> - <control> - <description>My Playlists</description> - <type>button</type> - <id>10</id> - <label>983</label> - <onleft>10</onleft> - <onright>50</onright> - <onup>8</onup> - <ondown>99</ondown> - </control> </control> - <import>common.facade.xml</import> - </controls> -</window> \ No newline at end of file + <control> + <description>Tab filler right</description> + <type>image</type> + <id>1</id> + <posX>1341</posX> + <posY>155</posY> + <width>13</width> + <height>36</height> + <texture>tab_filler right.png</texture> + <animation effect="fade" time="500" >WindowOpen</animation> + <animation effect="fade" time="500">WindowClose</animation> + </control> + + + <control> + <type>group</type> + <animation effect="fade" time="400">WindowClose</animation> + <animation effect="fade" time="400">WindowOpen</animation> + <description>group element</description> + <layout>StackLayout</layout> + <posX>60</posX> + <posY>97</posY> + <control> + <description>composite control consisting of a list control and a thumbnail panel</description> + <type>facadeview</type> + <id>50</id> + <control> + <description>listcontrol</description> + <type>listcontrol</type> + <id>50</id> + <onleft>2</onleft> + <onright>2</onright> + <onup>2</onup> + <ondown>50</ondown> + </control> + <control> + <description>Thumbnail Panel</description> + <type>thumbnailpanel</type> + <id>50</id> + <onleft>2</onleft> + <onright>2</onright> + <onup>2</onup> + <ondown>50</ondown> + </control> + <control> + <description>Filmstrip view</description> + <type>filmstrip</type> + <id>50</id> + <onleft>2</onleft> + <onright>2</onright> + <onup>2</onup> + <ondown>50</ondown> + <!--<posX>60</posX> + <itemWidth>200</itemWidth> + <itemHeight>200</itemHeight> + <textureWidth>160</textureWidth> + <textureHeight>160</textureHeight> + <thumbWidth>150</thumbWidth> + <thumbHeight>100</thumbHeight>--> + <InfoImage flipY="true" diffuse="Thumb_Mask.png"/> + <animation effect="fade" time="500">delay="1300">WindowOpen</animation> + </control> + </control> + </control> + </controls> +</window> + + + + \ No newline at end of file Modified: trunk/skins/Foofaraw/Development Skin/Foofaraw/references.xml =================================================================== --- trunk/skins/Foofaraw/Development Skin/Foofaraw/references.xml 2007-07-22 19:06:56 UTC (rev 752) +++ trunk/skins/Foofaraw/Development Skin/Foofaraw/references.xml 2007-07-23 12:03:12 UTC (rev 753) @@ -200,7 +200,7 @@ <posX>30</posX> <posY>160</posY> <width>1310</width> - <height>475</height> + <height>330</height> <spinWidth>27</spinWidth> <spinHeight>27</spinHeight> <spinPosX>1270</spinPosX> @@ -280,9 +280,9 @@ <type>playlistcontrol</type> <id>10</id> <posX>0</posX> - <posY>145</posY> + <posY>200</posY> <width>1200</width> - <height>475</height> + <height>330</height> <spinWidth>27</spinWidth> <spinHeight>27</spinHeight> <spinPosX>1270</spinPosX> @@ -336,9 +336,9 @@ <type>thumbnailpanel</type> <id>11</id> <posX>30</posX> - <posY>200</posY> + <posY>198</posY> <width>1316</width> - <height>330</height> + <height>350</height> <spinWidth>27</spinWidth> <spinHeight>27</spinHeight> <spinPosX>1270</spinPosX> @@ -348,16 +348,16 @@ <textureDown>arrow_round_down_nofocus.png</textureDown> <textureUpFocus>arrow_round_up_focus.png</textureUpFocus> <textureDownFocus>arrow_round_down_focus.png</textureDownFocus> - <itemWidth>124</itemWidth> - <itemHeight>140</itemHeight> - <textureWidth>120</textureWidth> - <textureHeight>120</textureHeight> - <thumbWidth>90</thumbWidth> - <thumbHeight>90</thumbHeight> + <itemWidth>80</itemWidth> + <itemHeight>60</itemHeight> + <textureWidth>80</textureWidth> + <textureHeight>60</textureHeight> + <thumbWidth>80</thumbWidth> + <thumbHeight>60</thumbHeight> <thumbPosX>15</thumbPosX> <thumbPosY>15</thumbPosY> - <imageFolder>photo_background.png</imageFolder> - <imageFolderFocus>icon_empty_focus.png</imageFolderFocus> + <imageFolder>-</imageFolder> + <imageFolderFocus>-</imageFolderFocus> <font>-</font> <selectedColor>ffffffff</selectedColor> @@ -366,18 +366,23 @@ <remoteColor>ffFFA075</remoteColor> <downloadColor>ff80ff80</downloadColor> <suffix>|</suffix> - <textureWidthBig>190</textureWidthBig><!-- 150 --> - <textureHeightBig>190</textureHeightBig> <!-- 150 --> - <itemWidthBig>222</itemWidthBig><!-- 180 --> - <itemHeightBig>200</itemHeightBig><!-- 180 --> - <thumbWidthBig>180</thumbWidthBig> - <thumbHeightBig>180</thumbHeightBig> - <thumbPosXBig>20</thumbPosXBig><!-- 19 --> - <thumbPosYBig>20</thumbPosYBig> <!-- 19 --> + <textureWidthBig>105</textureWidthBig><!-- 150 --> + <textureHeightBig>105</textureHeightBig> <!-- 150 --> + <itemWidthBig>105</itemWidthBig><!-- 180 --> + <itemHeightBig>105</itemHeightBig><!-- 180 --> + <thumbWidthBig>105</thumbWidthBig> + <thumbHeightBig>105</thumbHeightBig> + <thumbPosXBig>0</thumbPosXBig><!-- 19 --> + <thumbPosYBig>0</thumbPosYBig> <!-- 19 --> <unfocusedAlpha>180</unfocusedAlpha> <textXOff>-5000</textXOff> - <animation effect="zoom" end="140,140" time="200">Focus</animation> - <animation effect="zoom" start="140,140" end="100,100" time="200">UnFocus</animation> + <showFrame>yes</showFrame> + <showFolder>no</showFolder> + <showBackGround>yes</showBackGround> + <showInfoImage>no</showInfoImage> + <enableFocusZoom>no</enableFocusZoom> + <thumbAnimation effect="zoom" start="100,100" end="150,150" time="200">focus</thumbAnimation> + <thumbAnimation effect="zoom" start="150,150" end="100,100" time="200">unfocus</thumbAnimation> </control> <control> <description>default filmstrip</description> @@ -385,27 +390,27 @@ <id>11</id> <posX>0</posX> <posY>260</posY> - <width>1350</width> + <width>1360</width> <height>400</height> <spinWidth>27</spinWidth> - <spinHeight>27</spinHeight> - <spinPosX>1270</spinPosX> + <spinHeight>27</spinHeight> + <spinPosX>1270</spinPosX> <spinPosY>480</spinPosY> <spinColor>ffffffff</spinColor> <textureUp>arrow_round_up_nofocus.png</textureUp> <textureDown>arrow_round_down_nofocus.png</textureDown> <textureUpFocus>arrow_round_up_focus.png</textureUpFocus> <textureDownFocus>arrow_round_down_focus.png</textureDownFocus> - <itemWidth>120</itemWidth> + <itemWidth>110</itemWidth> <itemHeight>220</itemHeight> <textureWidth>180</textureWidth> <textureHeight>1600</textureHeight> - <thumbWidth>100</thumbWidth> - <thumbHeight>100</thumbHeight> + <thumbWidth>101</thumbWidth> + <thumbHeight>101</thumbHeight> <thumbPosX>35</thumbPosX><!-- 10 --> <thumbPosY>15</thumbPosY><!-- 10 --> <imageFolder>icon_empty_nofocus_music.png</imageFolder> - <imageFolderFocus>icon_empty_focus_music.png</imageFolderFocus> + <imageFolderFocus>icon_empty_focus_music.png</imageFolderFocus> <font>-</font> <selectedColor>ffffffff</selectedColor> <textcolor>white</textcolor> @@ -433,19 +438,18 @@ <InfoImagewidth>310</InfoImagewidth> <InfoImageheight>450</InfoImageheight> <InfoImagediffuse>ffffffff</InfoImagediffuse> - <thumbs flipY="true" diffuse="Thumb_Mask.png"/> <InfoImage flipY="true" diffuse="Thumb_Mask.png"/> - <showFrame>no</showFrame> + <showFrame>yes</showFrame> <showFolder>no</showFolder> <showBackGround>yes</showBackGround> <showInfoImage>no</showInfoImage> <enableFocusZoom>no</enableFocusZoom> - <thumbAnimation effect="zoom" start="100,100" end="130,130" time="200">focus</thumbAnimation> - <thumbAnimation effect="zoom" start="130,130" end="100,100" time="200">unfocus</thumbAnimation> + <thumbAnimation effect="zoom" start="100,100" end="150,150" time="200">focus</thumbAnimation> + <thumbAnimation effect="zoom" start="150,150" end="100,100" time="200">unfocus</thumbAnimation> </control> <control> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-07-22 19:06:57
|
Revision: 752 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=752&view=rev Author: northern_sky Date: 2007-07-22 12:06:56 -0700 (Sun, 22 Jul 2007) Log Message: ----------- Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemDirectoryCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGameBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemMame.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/BaseItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FileItemInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FilelinkItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/FilterItem.cs Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItem.cs 2007-07-22 19:06:56 UTC (rev 752) @@ -0,0 +1,1149 @@ +#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.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Xml; +using SQLite.NET; + +using MediaPortal.Configuration; +using MediaPortal.GUI.Library; +using MediaPortal.Player; +using MediaPortal.Ripper; +using MediaPortal.Util; + +using GUIPrograms; +using GUIPrograms.Database; +using GUIPrograms.Items; + + +namespace GUIPrograms.Items +{ + public class ApplicationItem : BaseItem + { + #region Variables + + + + int appID; + int fatherID; + string title; + string filename; + + string arguments; + ProcessWindowStyle windowStyle; + string startupDir; + bool useQuotes; + bool useShellExecute; + bool waitForExit; + string preLaunch; + string postLaunch; + + bool enabled; + int appPosition; + + string currentView = ""; + + public bool filesAreLoaded = false; // load on demand.... + // protected FileItemList fileList = null; + + public bool linksAreLoaded = false; // load on demand.... + + + + bool importMamePlaychoice10 = false; + bool importMameMahjong = false; + bool refreshGUIAllowed = false; + + + + + + // more variables, maybe need some renaming or anything else + Process proc; + ItemType sourceType; + string sourceFile; + string imageFile; + string imageDirectories; // in one string for sqlite db field + public string[] imageDirs; // imageDirectories splitted + string fileDirectory; + string validExtensions; + bool importValidImagesOnly; + + string systemDefault; + + string launchErrorMsg; + // two magic image-slideshow counters + int thumbIndex = 0; + int thumbFolderIndex = -1; + + protected string lastFilepath = ""; // cached path + + //private DatabaseSorter dbPc = new DatabaseSorter(); + //private ProgramSort dbPc = new ProgramSort(ProgramSort.SortMethod.Name, true); + + #endregion + + #region Properties + // Helper Routines + + public SQLiteClient db + { + get { return sqlDB; } + } + + public int AppID + { + get { return appID; } + set { appID = value; } + } + public int FatherID + { + get { return fatherID; } + set { fatherID = value; } + } + public string Title + { + get { return title; } + set { title = value; } + } + + public string Filename + { + get { return filename; } + set { filename = value; } + } + public string Imagefile + { + get + { + if (File.Exists(imageFile)) + return imageFile; + else + return MediaPortal.Util.Utils.GetCoverArtName( + Config.GetSubFolder(Config.Dir.Thumbs, @"MyProgramsAlt"), + this.Title + ); + } + set { imageFile = value; } + } + + public string Arguments + { + get { return arguments; } + set { arguments = value; } + } + public ProcessWindowStyle WindowStyle + { + get { return windowStyle; } + set { windowStyle = value; } + } + public string StartupDir + { + get { return startupDir; } + set { startupDir = value; } + } + public bool UseQuotes + { + get { return useQuotes; } + set { useQuotes = value; } + } + public bool UseShellExecute + { + get { return useShellExecute; } + set { useShellExecute = value; } + } + public bool WaitForExit + { + get { return waitForExit; } + set { waitForExit = value; } + } + public string PreLaunch + { + get { return preLaunch; } + set { preLaunch = value; } + } + public string PostLaunch + { + get { return postLaunch; } + set { postLaunch = value; } + } + + public bool Enabled + { + get { return enabled; } + set { enabled = value; } + } + + public virtual bool RefreshGUIAllowed + { + get { return refreshGUIAllowed; } + set { refreshGUIAllowed = value; } + } + + public int Position + { + get { return appPosition; } + set { appPosition = value; } + } + + + public string CurrentView + { + get { return currentView; } + set { currentView = value; } + } + + public bool ImportMamePlaychoice10 + { + get { return importMamePlaychoice10; } + set { importMamePlaychoice10 = value; } + } + public bool ImportMameMahjong + { + get { return importMameMahjong; } + set { importMameMahjong = value; } + } + + + // more Properties, maybe need some renaming or anything else + public string FileDirectory + { + get { return fileDirectory; } + set { fileDirectory = value; } + } + public string ImageDirectory + { + get { return imageDirectories; } + set { SetImageDirectory(value); } + } + private void SetImageDirectory(string value) + { + imageDirectories = value; + imageDirs = imageDirectories.Split(';'); + for (int i = 0; i < imageDirs.Length; i++) + { + imageDirs[i] = imageDirs[i].Trim(); + // hack the \n away.... + // imageDirs[i] = imageDirs[i].TrimStart('\n'); + // hack trailing backslashes away + imageDirs[i] = imageDirs[i].TrimEnd('\\'); + } + } + public string Source + { + get { return sourceFile; } + set { sourceFile = value; } + } + public ItemType SourceType + { + get { return sourceType; } + set { sourceType = value; } + } + public string ValidExtensions + { + get { return validExtensions; } + set { validExtensions = value; } + } + public bool ImportValidImagesOnly + { + get { return importValidImagesOnly; } + set { importValidImagesOnly = value; } + } + + public string SystemDefault + { + get { return systemDefault; } + set { systemDefault = value; } + } + public string LaunchErrorMsg + { + get { return launchErrorMsg; } + set { launchErrorMsg = value; } + } + + #endregion + + #region Events + + public delegate void FilelinkLaunchEventHandler(FilelinkItem curLink, bool mpGuiMode); + public event FilelinkLaunchEventHandler OnLaunchFilelink = null; + + // event: read new file + public delegate void RefreshInfoEventHandler(string informationMessage, int progressBarProgess); + public event RefreshInfoEventHandler OnRefreshInfo = null; + + #endregion + + #region Constructor + + public ApplicationItem(SQLiteClient initSqlDb) : base(initSqlDb) + { + + // .. init member variables ... + appID = -1; + fatherID = -1; + title = ""; + filename = ""; + arguments = ""; + windowStyle = ProcessWindowStyle.Normal; + startupDir = "%FILEDIR%"; + useShellExecute = false; + useQuotes = true; + enabled = true; + sourceType = ItemType.UNKNOWN; + sourceFile = ""; + imageFile = ""; + fileDirectory = ""; + imageDirectories = ""; + validExtensions = ""; + appPosition = 0; + importValidImagesOnly = false; + systemDefault = ""; + waitForExit = true; + filesAreLoaded = false; + preLaunch = ""; + postLaunch = ""; + + } + + #endregion + + + + + protected void SendRefreshInfo(string informationMessage, int progressBarCtr) + { + if (OnRefreshInfo != null) + { + OnRefreshInfo(informationMessage, progressBarCtr); + } + } + + protected int GetID = ProgramUtils.GetID; + + + + + public FileItem PrevFile(FileItem curFile) + { + if (ItemList == null) return null; + if (ItemList.Count == 0) return null; + + int index = this.ItemList.IndexOf(curFile); + index = index - 1; + if (index < 0) + index = ItemList.Count - 1; + return (FileItem)ItemList[index]; + } + + public FileItem NextFile(FileItem curFile) + { + if (ItemList == null) return null; + if (ItemList.Count == 0) return null; + + int index = this.ItemList.IndexOf(curFile); + index = index + 1; + if (index > ItemList.Count - 1) + index = 0; + return (FileItem)ItemList[index]; + } + + /// <summary> + /// look for FileItem and launch it using the found object + /// </summary> + /// <param name="guiListItem"></param> + public virtual void LaunchFile(BaseItem launchItem) + { + FileItem curFileItem = (FileItem)launchItem; + if (curFileItem == null) return; + + this.LaunchFile(curFileItem, true); + } + + public virtual void LaunchFile(FileItem curFileItem, bool mpGuiMode) + { + string curFilename = curFileItem.Filename; + if (curFilename == "") return; + + // Launch File by item + if (mpGuiMode) + curFileItem.UpdateLaunchInfo(); + + ProcessStartInfo procStart = new ProcessStartInfo(); + + if (this.Filename != "") + { // use the APPLICATION launcher and add current file information + + // filename of the application + procStart.FileName = this.Filename; + + // double quotes around the filename-argument..... + if (UseQuotes) + curFilename = "\"" + curFileItem.Filename + "\""; + + // set the arguments: one of the arguments is the fileitem-filename + if (this.Arguments.Contains("%FILEnoPATHnoEXT%")) + // ex. kawaks: + // winkawaks.exe alpham2 + // => filename without path and extension is necessary! + procStart.Arguments = " " + this.Arguments.Replace("%FILEnoPATHnoEXT%", Path.GetFileNameWithoutExtension(curFileItem.Filename)); + else if (this.Arguments.Contains("%FILE%")) + // placeholder found => replace the placeholder by the correct filename + procStart.Arguments = " " + this.Arguments.Replace("%FILE%", curFilename); + else + // no placeholder found => default handling: add the fileitem as the last argument + procStart.Arguments = " " + this.Arguments + " " + curFilename; + + // set WorkingDirectory + if (this.StartupDir.Contains("%FILEDIR%")) + procStart.WorkingDirectory = this.StartupDir.Replace("%FILEDIR%", Path.GetDirectoryName(curFileItem.Filename)); + else + procStart.WorkingDirectory = this.StartupDir; + } + else + { + // application has no launch-file + // => try to make a correct launch using the current FILE object + if (UseQuotes) + { + procStart.FileName = "\"" + curFileItem.Filename + "\""; + } + else + { + procStart.FileName = curFileItem.Filename; + } + + // set WorkingDirectory + if (this.StartupDir == "") + procStart.WorkingDirectory = Path.GetDirectoryName(curFileItem.Filename); + else if (this.StartupDir.Contains("%FILEDIR%")) + procStart.WorkingDirectory = this.StartupDir.Replace("%FILEDIR%", Path.GetDirectoryName(curFileItem.Filename)); + else + procStart.WorkingDirectory = this.StartupDir; + } + + // set UseShellExecute + procStart.UseShellExecute = this.UseShellExecute; + // set WindowStyle + procStart.WindowStyle = this.WindowStyle; + + this.LaunchErrorMsg = ""; + try + { + DoPreLaunch(); + + if (mpGuiMode) + { + AutoPlay.StopListening(); + if (g_Player.Playing) + g_Player.Stop(); + } + + //proc = new Process(); + /*proc.EnableRaisingEvents = true; + proc.Exited += new EventHandler(proc_Exited); + + proc.StartInfo = procStart; + ProgramUtils.StartProcess(proc, this.WaitForExit); + */Utils.StartProcess(procStart, this.WaitForExit); + + if (mpGuiMode) + { + GUIGraphicsContext.DX9Device.Reset(GUIGraphicsContext.DX9Device.PresentationParameters); + AutoPlay.StartListening(); + } + } + catch (Exception ex) + { + string ErrorString = String.Format("myPrograms: error launching program\n filename: {0}\n arguments: {1}\n WorkingDirectory: {2}\n stack: {3} {4} {5}", + procStart.FileName, + procStart.Arguments, + procStart.WorkingDirectory, + ex.Message, + ex.Source, + ex.StackTrace); + Log.Info(ErrorString); + this.LaunchErrorMsg = ErrorString; + } + finally + { + DoPostLaunch(); + } + } + + protected virtual void LaunchFilelink(FilelinkItem curLink, bool MPGUIMode) + { + this.OnLaunchFilelink(curLink, MPGUIMode); + } + + void proc_Exited(object sender, EventArgs e) + { + + if (proc != null) + { + proc.Dispose(); + proc = null; + } + } + + protected void DoPreLaunch() + { + if (waitForExit && (preLaunch != "")) + { + LaunchCmd(preLaunch); + } + } + + protected void DoPostLaunch() + { + if (waitForExit && (preLaunch != "")) + { + LaunchCmd(postLaunch); + } + } + + protected void LaunchCmd(string commands) + { + string results = ""; + string errors = ""; + string[] script; + string curLine; + Process p = new Process(); + StreamWriter sw; + StreamReader sr; + StreamReader err; + + script = commands.Split(';'); + if (script.Length > 0) + { + ProcessStartInfo psI = new ProcessStartInfo("cmd"); + psI.UseShellExecute = false; + psI.RedirectStandardInput = true; + psI.RedirectStandardOutput = true; + psI.RedirectStandardError = true; + psI.CreateNoWindow = true; + p.StartInfo = psI; + + p.Start(); + sw = p.StandardInput; + sr = p.StandardOutput; + err = p.StandardError; + + sw.AutoFlush = true; + + for (int i = 0; i < script.Length; i++) + { + curLine = script[i].Trim(); + curLine = curLine.TrimStart('\n'); + if (curLine != "") + sw.WriteLine(curLine); + } + sw.Close(); + + results += sr.ReadToEnd(); + errors += err.ReadToEnd(); + + if (errors.Trim() != "") + { + Log.Info("Application PrePost errors: {0}", errors); + } + } + } + + public virtual string DefaultFilepath() + { + return ""; // override this if the appitem can have subfolders + } + + public virtual int DisplayFiles(string filePath, GUIFacadeControl facadeView) + { + int totalItems = 0; + if (filePath != lastFilepath) + { + ItemLoad(AppID, filePath); + //Filelinks.Load(AppID, filePath); + } + totalItems = totalItems + DisplayItemList(filePath, this.ItemList, facadeView); + // totalItems = totalItems + DisplayArrayList(filePath, this.Filelinks, facadeView); + lastFilepath = filePath; + return totalItems; + } + + public override void OnClick(BaseItem baseItem,GUIPrograms guiPrograms) + { + ApplicationItem candidate = (ApplicationItem)baseItem; + guiPrograms.SaveItemIndex(guiPrograms.GetSelectedItemNo().ToString(), guiPrograms.lastApp, lastFilepath); + guiPrograms.lastApp = candidate; + guiPrograms.mapSettings.LastAppID = guiPrograms.lastApp.AppID; + guiPrograms.lastFilepath = guiPrograms.lastApp.DefaultFilepath(); + guiPrograms.ViewHandler.CurrentLevel = 0; + guiPrograms.lastApp.ViewHandler = guiPrograms.ViewHandler; + } + + protected int DisplayArrayList(string filePath, List<object> dbItems, GUIFacadeControl facadeView) + { + int totalItems = 0; + //foreach (FileItem currentFileItem in dbItems) + foreach (object obj in dbItems) + { + totalItems = totalItems + 1; + if (obj is FileItem) + { + FileItem curFile = obj as FileItem; + GUIListItem gli = new GUIListItem(curFile.Title); + + gli.MusicTag = curFile; + gli.IsFolder = curFile.IsFolder; + gli.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(OnRetrieveCoverArt); + gli.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(OnItemSelected); + facadeView.Add(gli); + } + } + return totalItems; + } + + + + + public virtual bool FileEditorAllowed() + { + return true; // otherwise, override this in child class + } + + public virtual bool FileAddAllowed() + { + return true; // otherwise, override this in child class + } + + public virtual bool FilesCanBeFavourites() + { + return true; // otherwise, override this in child class + } + + public virtual bool FileBrowseAllowed() + { + // set this to true, if SUBDIRECTORIES are allowed + // (example: possible for DIRECTORY-CACHE) + return false; // otherwise, override this in child class + } + + public virtual bool SubItemsAllowed() + { + return false; + } + + public virtual bool ProfileLoadingAllowed() + { + return false; + } + + public virtual void Refresh(bool mpGuiMode) + { + // descendant classes do that! + } + + #region Database stuff + + /// <summary> + /// get an unused SQL application KEY-number + /// </summary> + private int GetNewAppID() + { + if (sqlDB == null) return -1; + + // won't work in multiuser environment :) + SQLiteResultSet results; + int res = 0; + results = sqlDB.Execute("SELECT MAX(applicationId) FROM tblApplicationItem"); + SQLiteResultSet.Row arr = results.Rows[0]; + if (arr.fields[0] != null) + { + if (arr.fields[0] != "") + { + res = Int32.Parse(arr.fields[0]); + } + } + return res + 1; + } + + private void Insert() + { + if (sqlDB == null) return; + + string sql = ""; + + try + { + AppID = GetNewAppID(); // important to avoid subsequent inserts! + sql = String.Format(@" + INSERT INTO + tblApplicationItem + ( + applicationId, + fatherNodeId, + title, + filename, + arguments, + windowstyle, + startupdir, + useShellExecute, + useQuotes, + applicationItemType, + source, + imagefile, + filedirectory, + imagedirectory, + validExtensions, + importValidImagesOnly, + iposition, + enabled, + refreshGUIAllowed, + systemDefault, + waitForExit, + preLaunch, + postLaunch + ) + VALUES + ( + '"+ AppID + @"', + '"+ FatherID + @"', + '"+ ProgramUtils.Encode(Title) +@"', + '"+ ProgramUtils.Encode(Filename) +@"', + '"+ ProgramUtils.Encode(Arguments) + @"', + '"+ ProgramUtils.WindowStyleToStr(WindowStyle) +@"', + '"+ ProgramUtils.Encode(StartupDir) +@"', + '"+ ProgramUtils.BooleanToStr(UseShellExecute) +@"', + '"+ ProgramUtils.BooleanToStr(UseQuotes) +@"', + '"+ ProgramUtils.ApplicationTypeToString(SourceType) +@"', + '"+ ProgramUtils.Encode(Source) +@"', + '"+ ProgramUtils.Encode(Imagefile) +@"', + '"+ ProgramUtils.Encode(FileDirectory) +@"', + '"+ ProgramUtils.Encode(ImageDirectory)+@"', + '"+ ProgramUtils.Encode(ValidExtensions)+@"', + '"+ ProgramUtils.BooleanToStr(importValidImagesOnly)+@"', + '"+ Position+@"', + '"+ ProgramUtils.BooleanToStr(Enabled)+@"', + '" + ProgramUtils.BooleanToStr(RefreshGUIAllowed)+@"', + '"+ ProgramUtils.Encode(SystemDefault)+@"', + '"+ ProgramUtils.BooleanToStr(WaitForExit) +@"', + '"+ ProgramUtils.Encode(PreLaunch)+@"', + '"+ ProgramUtils.Encode(PostLaunch)+@"' + )" + + ); + sqlDB.Execute(sql); + } + catch (SQLiteException ex) + { + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + private void Update() + { + if (sqlDB == null) return; + if (AppID == -1) return; + + string sql = ""; + + try + { + sql = String.Format( + @"UPDATE + tblApplicationItem SET + + title = '" + ProgramUtils.Encode(Title) + @"', + filename = '" + ProgramUtils.Encode(Filename) + @"', + arguments = '" + ProgramUtils.Encode(Arguments) + @"', + windowstyle = '" + ProgramUtils.WindowStyleToStr(WindowStyle) + @"', + startupdir = '" + ProgramUtils.Encode(StartupDir) + @"', + useShellExecute = '" + ProgramUtils.BooleanToStr(UseShellExecute) + @"', + useQuotes = '" + ProgramUtils.BooleanToStr(UseQuotes) + @"', + applicationItemType = '" + ProgramUtils.ApplicationTypeToString(SourceType) + @"', + source = '" + ProgramUtils.Encode(Source) + @"', + imagefile = '" + ProgramUtils.Encode(Imagefile) + @"', + filedirectory = '" + ProgramUtils.Encode(FileDirectory) + @"', + imagedirectory = '" + ProgramUtils.Encode(ImageDirectory) + @"', + validExtensions = '" + ProgramUtils.Encode(ValidExtensions) + @"', + importValidImagesOnly = '" + ProgramUtils.BooleanToStr(importValidImagesOnly) + @"', + iposition = " + Position + @", + enabled = '" + ProgramUtils.BooleanToStr(Enabled) + @"', + fatherNodeId = '" + FatherID + @"', + refreshGUIAllowed = '" + ProgramUtils.BooleanToStr(RefreshGUIAllowed) +@"', + systemDefault = '" + ProgramUtils.Encode(SystemDefault) + @"', + waitForExit = '" + ProgramUtils.BooleanToStr(WaitForExit) + @"', + preLaunch = '" + ProgramUtils.Encode(PreLaunch) + @"', + postLaunch = '" + ProgramUtils.Encode(PostLaunch) + @"' + + WHERE applicationId = " + AppID); + sqlDB.Execute(sql); + } + catch (SQLiteException ex) + { + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + Log.Info("sql \n{0}", sql); + } + } + + public void Delete() + { + if (sqlDB == null) return; + if (AppID == -1) return; + + try + { + DeleteFiles(); + DeleteFileLinks(); + sqlDB.Execute(String.Format("delete from tblApplicationItem where applicationId = {0}", AppID)); + } + catch (SQLiteException ex) + { + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + + protected void DeleteFiles() + { + if (sqlDB == null) return; + if (AppID == -1) return; + + try + { + sqlDB.Execute(String.Format("delete from tblFileItem where applicationId = {0}", AppID)); + } + catch (SQLiteException ex) + { + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + protected void DeleteFileLinks() + { + if (sqlDB == null) return; + if (AppID == -1) return; + + try + { + sqlDB.Execute(String.Format("delete from tblFilterItem where applicationId = {0} or grouperappid = {0}", AppID)); + } + catch (SQLiteException ex) + { + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + public virtual void LoadFiles() + { + //linksAreLoaded = true; + if (sqlDB == null) return; + + lastFilepath = ""; + ItemLoad(AppID, ""); + filesAreLoaded = true; + } + + + + + + public void InsertOrUpdateSettings() + { + if (appID == -1) + Insert(); + else + Update(); + } + + #endregion + + protected virtual void FixFileLinks() + { + // after a import the appitem has completely new + // fileitems (new ids) and LINKS stored in filteritems + // are out of sync... fix this here! + + // query with data to fix + string sqlSelectDataToFix = String.Format("select fi.applicationId, fi.fileid as oldfileid, f.fileid as newfileid, fi.filename as filename from tblFilterItem fi, tblFileItem f where fi.applicationId = f.applicationId and fi.filename = f.filename and fi.applicationId = {0}", AppID); + + // update command to fix one single link + string sqlFixOneLink = "update tblFilterItem set fileID = {0}, tag = 0 where applicationId = {1} and filename = '{2}'"; + + SQLiteResultSet rows2fix; + + + try + { + // 1) initialize TAG + sqlDB.Execute(String.Format("update tblFilterItem set tag = 1234 where applicationId = {0}", AppID)); + + // 2) fix all fileids of the newly imported files + rows2fix = sqlDB.Execute(sqlSelectDataToFix); + int newFileID; + string filenameToFix; + if (rows2fix.Rows.Count == 0) return; + for (int row = 0; row < rows2fix.Rows.Count; row++) + { + newFileID = ProgramUtils.GetIntDef(rows2fix, row, "newfileid", -1); + filenameToFix = ProgramUtils.Get(rows2fix, row, "filename"); + sqlDB.Execute(String.Format(sqlFixOneLink, newFileID, AppID, ProgramUtils.Encode(filenameToFix))); + } + + // 3) delete untouched links ( they were not imported anymore ) + sqlDB.Execute(String.Format("delete from tblFilterItem where applicationId = {0} and tag = 1234", AppID)); + + } + catch (SQLiteException ex) + { + Log.Info("programdatabase exception (Application.FixFileLinks) err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + + } + + public virtual string CurrentFilePath() + { + return this.FileDirectory; + } + + public void Assign(ApplicationItem sourceApp) + { + this.Enabled = sourceApp.Enabled; + this.AppID = sourceApp.AppID; + this.FatherID = sourceApp.FatherID; + this.Title = sourceApp.Title; + this.Filename = sourceApp.Filename; + this.Arguments = sourceApp.Arguments; + this.WindowStyle = sourceApp.WindowStyle; + this.StartupDir = sourceApp.StartupDir; + this.UseShellExecute = sourceApp.UseShellExecute; + this.UseQuotes = sourceApp.UseQuotes; + this.SourceType = sourceApp.SourceType; + this.Source = sourceApp.Source; + this.Imagefile = sourceApp.Imagefile; + this.FileDirectory = sourceApp.FileDirectory; + this.ImageDirectory = sourceApp.ImageDirectory; + this.ValidExtensions = sourceApp.ValidExtensions; + this.ImportValidImagesOnly = sourceApp.ImportValidImagesOnly; + this.Position = sourceApp.Position; + this.WaitForExit = sourceApp.WaitForExit; + this.PreLaunch = sourceApp.PreLaunch; + this.PostLaunch = sourceApp.PostLaunch; + this.SystemDefault = sourceApp.SystemDefault; + + } + + #region imagedirectory stuff + + // get next imagedirectory that holds at least one image for a fileitem + // * m_pFile: the file we're looking images for + private void GetNextThumbFolderIndex(FileItem fileItem) + { + if (fileItem == null) return; + bool foundThumb = false; + while (!foundThumb) + { + thumbFolderIndex++; + if (thumbFolderIndex >= imageDirs.Length) + { + thumbFolderIndex = -1; + foundThumb = true; + } + else + { + string candFolder = imageDirs[thumbFolderIndex]; + string candThumb = candFolder + "\\" + fileItem.ExtractImageFileNoPath(); + if (candThumb.ToLower() != fileItem.Imagefile.ToLower()) + { + foundThumb = (System.IO.File.Exists(candThumb)); + } + else + { + // skip the initial directory, in case it's reentered as a search directory! + foundThumb = false; + } + } + } + } + + public virtual string GetCurThumb(GUIListItem item) + { + if (item.MusicTag == null) return ""; + + if (item.MusicTag is FileItem) + { + FileItem curFile = item.MusicTag as FileItem; + + if (DatabaseHandler.useMPsThumbDirectory) + return GetCurThumbFromThumbsDir(curFile); + else + return GetCurThumb(curFile); + } + else if (item.MusicTag is ApplicationItem) + { + ApplicationItem curApp = item.MusicTag as ApplicationItem; + + return curApp.Imagefile; + } + else return ""; + } + + public string GetCurThumb(FileItem fileItem) + { + string curThumb = ""; + + if (thumbFolderIndex == -1) + { + curThumb = fileItem.Imagefile; + } + else + { + string curFolder = imageDirs[thumbFolderIndex]; + curThumb = curFolder + "\\" + fileItem.ExtractImageFileNoPath(); + } + + if (thumbIndex > 0) + { + // try to find another thumb.... + // use the myGames convention: + // every thumb has the postfix "_1", "_2", etc with the same file extension + string curExtension = fileItem.ExtractImageExtension(); + if (curThumb != "") + { + string cand = curThumb.Replace(curExtension, "_" + thumbIndex.ToString() + curExtension); + if (System.IO.File.Exists(cand)) + { + // found another thumb => override the filename! + curThumb = cand; + } + else + { + thumbIndex = 0; // restart at the first thumb! + GetNextThumbFolderIndex(fileItem); + } + } + } + + return curThumb; + } + + public string GetCurThumbFromThumbsDir(FileItem fileItem) + { + string curThumb = MediaPortal.Util.Utils.GetCoverArtName( + Config.GetSubFolder(Config.Dir.Thumbs, @"MyProgramsAlt\" + this.Title), + Path.GetFileNameWithoutExtension(fileItem.Filename) + ); + + if (File.Exists(curThumb)) + if (thumbIndex > 0) + { + // try to find another thumb.... + // use the myGames convention: + // every thumb has the postfix "_1", "_2", etc with the same file extension + string cand = MediaPortal.Util.Utils.GetCoverArtName( + Config.GetSubFolder(Config.Dir.Thumbs, @"MyProgramsAlt\" + this.Title), + Path.GetFileNameWithoutExtension(fileItem.Filename) + "_" + thumbIndex.ToString() + ); + + if (File.Exists(cand)) + curThumb = cand; + else + { + // restart at the first thumb! + thumbIndex = 0; + } + } + + return curThumb; + } + + public void ResetThumbs() + { + thumbIndex = 0; + thumbFolderIndex = -1; + } + + public void NextThumb() + { + thumbIndex++; + } + + #endregion + + public void LoadFromXmlProfile(XmlNode node) + { + + XmlNode titleNode = node.SelectSingleNode("title"); + if (titleNode != null) + { + this.Title = titleNode.InnerText; + } + + XmlNode launchingAppNode = node.SelectSingleNode("launchingApplication"); + if (launchingAppNode != null) + { + this.Filename = launchingAppNode.InnerText; + } + + XmlNode useShellExecuteNode = node.SelectSingleNode("useShellExecute"); + if (useShellExecuteNode != null) + { + this.UseShellExecute = ProgramUtils.StrToBoolean(useShellExecuteNode.InnerText); + } + + XmlNode argumentsNode = node.SelectSingleNode("arguments"); + if (argumentsNode != null) + { + this.Arguments = argumentsNode.InnerText; + } + + XmlNode windowStyleNode = node.SelectSingleNode("windowStyle"); + if (windowStyleNode != null) + { + this.WindowStyle = ProgramUtils.StringToWindowStyle(windowStyleNode.InnerText); + } + + XmlNode startupDirNode = node.SelectSingleNode("startupDir"); + if (startupDirNode != null) + { + this.StartupDir = startupDirNode.InnerText; + } + + XmlNode useQuotesNode = node.SelectSingleNode("useQuotes"); + if (useQuotesNode != null) + { + this.UseQuotes = ProgramUtils.StrToBoolean(useQuotesNode.InnerText); + } + + XmlNode fileExtensioneNode = node.SelectSingleNode("fileextensions"); + if (fileExtensioneNode != null) + { + this.ValidExtensions = fileExtensioneNode.InnerText; + } + } + } +} \ No newline at end of file Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemDirectoryCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemDirectoryCache.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemDirectoryCache.cs 2007-07-22 19:06:56 UTC (rev 752) @@ -0,0 +1,315 @@ +#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.Collections; +using System.Collections.Generic; +using System.IO; +using System.Windows.Forms; +using SQLite.NET; + +using MediaPortal.Dialogs; +using MediaPortal.GUI.Library; +using MediaPortal.Util; + +using GUIPrograms; +using GUIPrograms.Database; +using GUIPrograms.Items; + +namespace GUIPrograms.Items +{ + /// <summary> + /// Summary description for ApplicationItemDirectoryCache. + /// </summary> + public class ApplicationItemDirectoryCache : ApplicationItem + { + GUIDialogProgress progressDialog = null; + + public ApplicationItemDirectoryCache(SQLiteClient initSqlDB) : base(initSqlDB) { } + + private void ShowProgressDialog() + { + progressDialog = (GUIDialogProgress)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_PROGRESS); + progressDialog.ShowWaitCursor = true; + progressDialog.SetHeading(GUILocalizeStrings.Get(13014)); + progressDialog.SetLine(0, GUILocalizeStrings.Get(13014)); + progressDialog.SetLine(1, ""); + progressDialog.SetLine(2, ""); + progressDialog.StartModal(GetID); + progressDialog.Progress(); + } + + private void CloseProgressDialog() + { + progressDialog.Close(); + } + + private string GetThumbsFile(FileInfo file, string fileTitle) + { + string thumbFolder = ""; + + if (imageDirs.Length > 0) + { + string mainImgFolder = ""; + + foreach (string imgFolder in imageDirs) + { + if (System.IO.Directory.Exists(imgFolder)) + { + mainImgFolder = imgFolder; + } + } + + if ("" != mainImgFolder) + { + string curDir = mainImgFolder + "\\"; + string filenameNoExtension = mainImgFolder + "\\" + file.Name; + filenameNoExtension = Path.ChangeExtension(filenameNoExtension, null); + filenameNoExtension = Path.GetFileNameWithoutExtension(filenameNoExtension); + + string[] exactMatchesJPG = Directory.GetFiles(curDir, filenameNoExtension + ".jpg"); + string[] exactMatchesGIF = Directory.GetFiles(curDir, filenameNoExtension + ".gif"); + string[] exactMatchesPNG = Directory.GetFiles(curDir, filenameNoExtension + ".png"); + if (exactMatchesJPG.Length > 0) + { + thumbFolder = exactMatchesJPG[0]; + } + else if (exactMatchesGIF.Length > 0) + { + thumbFolder = exactMatchesGIF[0]; + } + else if (exactMatchesPNG.Length > 0) + { + thumbFolder = exactMatchesPNG[0]; + } + else + { + string[] almostexactMatchesJPG = Directory.GetFiles(curDir, filenameNoExtension + "*.jpg"); + string[] almostexactMatchesGIF = Directory.GetFiles(curDir, filenameNoExtension + "*.gif"); + string[] almostexactMatchesPNG = Directory.GetFiles(curDir, filenameNoExtension + "*.png"); + if (almostexactMatchesJPG.Length > 0) + { + thumbFolder = almostexactMatchesJPG[0]; + } + else if (almostexactMatchesGIF.Length > 0) + { + thumbFolder = almostexactMatchesGIF[0]; + } + else if (almostexactMatchesPNG.Length > 0) + { + thumbFolder = almostexactMatchesPNG[0]; + } + else + { + // no exact match found! Redo with near matches! + string[] nearMatchesJPG = Directory.GetFiles(curDir, fileTitle + "*.jpg"); + string[] nearMatchesGIF = Directory.GetFiles(curDir, fileTitle + "*.gif"); + string[] nearMatchesPNG = Directory.GetFiles(curDir, fileTitle + "*.png"); + if (nearMatchesJPG.Length > 0) + { + thumbFolder = nearMatchesJPG[0]; + } + else if (nearMatchesGIF.Length > 0) + { + thumbFolder = nearMatchesGIF[0]; + } + else if (nearMatchesPNG.Length > 0) + { + thumbFolder = nearMatchesPNG[0]; + } + } + } + } + } + return thumbFolder; + } + + + + private void ImportFileItem(FileInfo fileInfo) + { + FileItem curFile = new FileItem(sqlDB); + curFile.FileID = -1; // to force an INSERT statement when writing the item + curFile.AppID = this.AppID; + curFile.Title = Path.GetFileNameWithoutExtension(fileInfo.Name); + curFile.Filename = fileInfo.FullName; + + curFile.Imagefile = GetThumbsFile(fileInfo, curFile.Title); + + // not imported properties => set default values + curFile.LastTimeLaunched = DateTime.MinValue; + curFile.LaunchCount = 0; + curFile.Write(); + } + + private void UpdateProgressDialog(FileInfo fileInfo ,bool mpGuiMode) + { + if (mpGuiMode) + { + progressDialog.SetLine(2, String.Format("{0} {1}", GUILocalizeStrings.Get(13005), fileInfo.Name)); // "last imported file {0}" + progressDialog.Progress(); + } + SendRefreshInfo(String.Format("{0} {1}", GUILocalizeStrings.Get(13005), fileInfo.Name), 0); + } + + private void DeleteOrphaned() + { + string TheFileName; + ItemLoad(AppID, ""); + foreach (FileItem DBfile in ItemList) + { + + TheFileName = DBfile.Filename; + + if (!DBfile.IsFolder) + { + if (!File.Exists(TheFileName)) { DBfile.Delete(); } + } + else + { + if (!Directory.Exists(TheFileName)) { DBfile.Delete(); } + + } + + } + } + + private void ImportFile(string dirPath,bool mpGuiMode) + { + + FileInfo fileInDir = null; + if (Directory.Exists(dirPath)) + { + DirectoryInfo directoryInfo = new DirectoryInfo(dirPath); + FileSystemInfo[] allUnderLyingFiles = directoryInfo.GetFileSystemInfos(); + + for (int i = 0; i < allUnderLyingFiles.Length; i++) + { + if (allUnderLyingFiles[i] is FileInfo) + { + Boolean FileExists = false; + + fileInDir = (FileInfo)allUnderLyingFiles[i]; + + foreach (FileItem DBfile in ItemList) + { + if (DBfile.Filename == fileInDir.FullName) + { + FileExists = true; + break;//ugly + } + } + if (!FileExists) + { + ImportFileItem(fileInDir); + UpdateProgressDialog(fileInDir, mpGuiMode); + } + }//if dir found,, recurse + else if (allUnderLyingFiles[i] is DirectoryInfo) + { + DirectoryInfo directory = (DirectoryInfo)allUnderLyingFiles[i]; + ImportFile(directory.FullName, mpGuiMode); + } + } + } + } + private void ImportDirectory(string[] fileDirPaths, bool mpGuiMode) + { + //get all maindirs + foreach (string dirPath in fileDirPaths) + { + ImportFile(dirPath,mpGuiMode); + } + } + + private void DoDirCacheImport(bool mpGuiMode) + { + if (sqlDB == null) + return; + if (this.AppID < 0) + return; + if (this.SourceType != ItemType.DIRCACHE) + return; + if (mpGuiMode) + { + ShowProgressDialog(); + } + try + { + ValidExtensions = ValidExtensions.Replace(" ", ""); + ItemLoad(AppID, ""); + + string[] fileDirPaths = this.FileDirectory.Split(';'); + ImportDirectory(fileDirPaths, mpGuiMode); + } + finally + { + if (mpGuiMode) + { + CloseProgressDialog(); + } + } + + } + + + override public string CurrentFilePath() + { + if (filePath != "") + { + return filePath; + } + else + { + return base.CurrentFilePath(); + } + } + + + override public string DefaultFilepath() + { + return this.FileDirectory; + } + + override public bool FileBrowseAllowed() + { + return true; + } + + override public bool ProfileLoadingAllowed() + { + return true; + } + + override public void Refresh(bool mpGuiMode) + { + base.Refresh(mpGuiMode); + DeleteOrphaned(); + DoDirCacheImport(mpGuiMode); + FixFileLinks(); + LoadFiles(); + } + } +} \ No newline at end of file Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemFactory.cs 2007-07-22 19:06:56 UTC (rev 752) @@ -0,0 +1,192 @@ +#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 SQLite.NET; +using System; +using GUIPrograms; + +namespace GUIPrograms.Items +{ + /// <summary> + /// Factory object that creates the matchin Application descendant class + /// depending on the sourceType parameter + /// Descendant classes differ in LOADING and REFRESHING filelists + /// </summary> + public class ApplicationItemFactory + { + static public ApplicationItemFactory AppFactory = new ApplicationItemFactory(); + + // singleton. Dont allow any instance of this class + private ApplicationItemFactory() { } + + static ApplicationItemFactory() + { + // nothing to create...... + } + + public BaseItem GetApplicationItem(SQLiteClient sqlDB, ItemType sourceType,SQLiteResultSet results, int iRecord) + { + BaseItem item = null; + switch (sourceType) + { + + case ItemType.DIRCACHE: + item = AppItemFactory(sqlDB, results, iRecord,ItemType.DIRCACHE); + break; + case ItemType.MAMEDIRECT: + item = AppItemFactory(sqlDB, results, iRecord,ItemType.MAMEDIRECT); + break; + case ItemType.GROUPER: + item = AppItemFactory(sqlDB, results, iRecord,ItemType.GROUPER); + break; + case ItemType.GAMEBASE: + item = AppItemFactory(sqlDB, results, iRecord,ItemType.GAMEBASE); + break; + case ItemType.FILEITEM: + item = FileItemFactory(sqlDB,results, iRecord); + break; + case ItemType.FILELINKITEM: + item = FilelinkItemFactory(sqlDB, results, iRecord); + break; + case ItemType.FILTERITEM: + item = FilterItemFactory(sqlDB, results, iRecord); + break; + } + return item; + } + + private ApplicationItem AppItemFactory(SQLiteClient sqldb, SQLiteResultSet results, int recordIndex, ItemType sourceType) + { + ApplicationItem item = null;//= (ApplicationItem)appFactory.GetApplicationItem(sqlDB, ProgramUtils.GetSourceType(results, recordIndex, "applicationItemType"), null, 0); + + switch (sourceType) + { + case ItemType.DIRCACHE: + item = new ApplicationItemDirectoryCache(sqldb); + break; + case ItemType.MAMEDIRECT: + item = new ApplicationItemMame(sqldb); + break; + case ItemType.GROUPER: + item = new ApplicationItemGrouper(sqldb); + break; + case ItemType.GAMEBASE: + item = new ApplicationItemGameBase(sqldb); + break; + } + + //fetches from db,, + if (results != null) + { + item.Enabled = ProgramUtils.GetBool(results, recordIndex, "enabled"); + item.AppID = ProgramUtils.GetIntDef(results, recordIndex, "applicationId", -1); + item.FatherID = ProgramUtils.GetIntDef(results, recordIndex, "fatherNodeId", -1); + item.Title = ProgramUtils.Get(results, recordIndex, "title"); + item.Filename = ProgramUtils.Get(results, recordIndex, "filename"); + item.Arguments = ProgramUtils.Get(results, recordIndex, "arguments"); + item.WindowStyle = ProgramUtils.GetProcessWindowStyle(results, recordIndex, "windowstyle"); + item.StartupDir = ProgramUtils.Get(results, recordIndex, "startupdir"); + item.UseShellExecute = ProgramUtils.GetBool(results, recordIndex, "useShellExecute"); + item.UseQuotes = ProgramUtils.GetBool(results, recordIndex, "useQuotes"); + item.SourceType = ProgramUtils.GetSourceType(results, recordIndex, "applicationItemType"); + item.Source = ProgramUtils.Get(results, recordIndex, "source"); + item.Imagefile = ProgramUtils.Get(results, recordIndex, "imagefile"); + item.FileDirectory = ProgramUtils.Get(results, recordIndex, "filedirectory"); + item.ImageDirectory = ProgramUtils.Get(results, recordIndex, "imagedirectory"); + item.ValidExtensions = ProgramUtils.Get(results, recordIndex, "validextensions"); + item.ImportValidImagesOnly = ProgramUtils.GetBool(results, recordIndex, "importvalidimagesonly"); + item.Position = ProgramUtils.GetIntDef(results, recordIndex, "iposition", 0); + item.RefreshGUIAllowed = ProgramUtils.GetBool(results, recordIndex, "refreshGUIAllowed"); + item.SystemDefault = ProgramUtils.Get(results, recordIndex, "systemdefault"); + item.WaitForExit = ProgramUtils.GetBool(results, recordIndex, "waitforexit"); + item.PreLaunch = ProgramUtils.Get(results, recordIndex, "preLaunch"); + item.PostLaunch = ProgramUtils.Get(results, recordIndex, "postLaunch"); + } + return item; + } + + private FileItem FileItemFactory(SQLiteClient sqlDB,SQLiteResultSet results, int iRecord) + { + FileItem newFile = new FileItem(sqlDB); + newFile.FileID = ProgramUtils.GetIntDef(results, iRecord, "fileid", -1); + newFile.AppID = ProgramUtils.GetIntDef(results, iRecord, "applicationId", -1); + newFile.Title = ProgramUtils.Get(results, iRecord, "title"); + newFile.Filename = ProgramUtils.Get(results, iRecord, "filename"); + newFile.Imagefile = ProgramUtils.Get(results, iRecord, "imagefile"); + newFile.MainGenre = ProgramUtils.Get(results, iRecord, "mainGenre"); + newFile.MainGenreId = ProgramUtils.GetIntDef(results, iRecord, "mainGenreId", 1); + newFile.SubGenre = ProgramUtils.Get(results, iRecord, "subGenre"); + newFile.SubGenreId = ProgramUtils.GetIntDef(results, iRecord, "subGenreId", 1); + newFile.Country = ProgramUtils.Get(results, iRecord, "country"); + newFile.ManufacturerId = ProgramUtils.GetIntDef(results, iRecord, "manufacturerId", 1); + newFile.Manufacturer = ProgramUtils.Get(results, iRecord, "manufacturer"); + newFile.Year = ProgramUtils.GetIntDef(results, iRecord, "year", -1); + newFile.Rating = ProgramUtils.GetIntDef(results, iRecord, "rating", 5); + newFile.Overview = ProgramUtils.Get(results, iRecord, "overview"); + newFile.Platform = ProgramUtils.Get(results, iRecord, "platform"); + newFile.PlatformId = ProgramUtils.GetIntDef(results, iRecord, "platformId", 1); + + newFile.IsFolder = ProgramUtils.GetBool(results, iRecord, "isfolder"); + newFile.CategoryData = ProgramUtils.Get(results, iRecord, "categorydata"); + newFile.GameInfoURL = ProgramUtils.Get(results, iRecord, "gameInfoUrl"); + return newFile; + } + + private FilterItem FilterItemFactory(SQLiteClient sqlDB,SQLiteResultSet results, int iRecord) + { + FilterItem filterItem = new FilterItem(sqlDB); + filterItem.Title = ProgramUtils.Get(results, iRecord, "title"); + // newFile.LastTimeLaunched = ProgramUtils.GetDateDef(results, iRecord, "lastTimeLaunched", DateTime.MinValue); + //newFile.LaunchCount = ProgramUtils.GetIntDef(results, iRecord, "launchcount", 0); ; + return filterItem; + } + + + private FilelinkItem FilelinkItemFactory(SQLiteClient sqlDB, SQLiteResultSet results, int iRecord) + { + FilelinkItem newLink = new FilelinkItem(sqlDB); + newLink.FileID = ProgramUtils.GetIntDef(results, iRecord, "fileId", -1); + newLink.AppID = ProgramUtils.GetIntDef(results, iRecord, "grouperAppId", -1); + newLink.TargetAppID = ProgramUtils.GetIntDef(results, iRecord, "targetAppId", -1); + newLink.Title = ProgramUtils.Get(results, iRecord, "title"); + newLink.Filename = ProgramUtils.Get(results, iRecord, "filename"); + newLink.Imagefile = ProgramUtils.Get(results, iRecord, "imagefile"); + newLink.MainGenre = ProgramUtils.Get(results, iRecord, "mainGenre"); + newLink.SubGenre = ProgramUtils.Get(results, iRecord, "subGenre"); + newLink.Country = ProgramUtils.Get(results, iRecord, "country"); + newLink.ManufacturerId = ProgramUtils.GetIntDef(results, iRecord, "manufacturerId", 1); + newLink.Manufacturer = ProgramUtils.Get(results, iRecord, "manufacturer"); + newLink.Year = ProgramUtils.GetIntDef(results, iRecord, "year", -1); + newLink.Rating = ProgramUtils.GetIntDef(results, iRecord, "rating", 5); + newLink.Overview = ProgramUtils.Get(results, iRecord, "overview"); + newLink.Platform = ProgramUtils.Get(results, iRecord, "platform"); + newLink.PlatformId = ProgramUtils.GetIntDef(results, iRecord, "platformId", 1); + newLink.LastTimeLaunched = ProgramUtils.GetDateDef(results, iRecord, "lastTimeLaunched", DateTime.MinValue); + newLink.LaunchCount = ProgramUtils.GetIntDef(results, iRecord, "launchcount", 0); + newLink.IsFolder = ProgramUtils.GetBool(results, iRecord, "isfolder"); + return newLink; + } + } +} \ No newline at end of file Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGameBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGameBase.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGameBase.cs 2007-07-22 19:06:56 UTC (rev 752) @@ -0,0 +1,134 @@ +#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.IO; +using SQLite.NET; + +using MediaPortal.Dialogs; +using MediaPortal.GUI.Library; + +using GUIPrograms; +using GUIPrograms.Database; +using GUIPrograms.Imports; + +namespace GUIPrograms.Items +{ + /// <summary> + /// Summary description for ApplicationItemGameBase. + /// </summary> + public class ApplicationItemGameBase : ApplicationItem + { + GUIDialogProgress guiDialogProgress = null; + + public ApplicationItemGameBase(SQLiteClient initSqlDB) + : base(initSqlDB) + { + // nothing to create here... + } + + private void ShowProgressDialog() + { + guiDialogProgress = (GUIDialogProgress)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_PROGRESS); + guiDialogProgress.ShowWaitCursor = true; + guiDialogProgress.SetHeading(GUILocalizeStrings.Get(13015)); + guiDialogProgress.SetLine(0, GUILocalizeStrings.Get(13015)); + guiDialogProgress.SetLine(1, ""); + guiDialogProgress.SetLine(2, ""); + guiDialogProgress.StartModal(GetID); + guiDialogProgress.ShowProgressBar(true); + guiDialogProgress.Progress(); + } + + private void DoGamebaseImport(bool bGUIMode) + { + if (sqlDB == null) + return; + if (this.AppID < 0) + return; + if ((this.SourceType != ItemType.GAMEBASE) || (Source == "") || (!File.Exists(Source))) + return; + // show progress dialog and run the import... + if (bGUIMode) + { + ShowProgressDialog(); + } + try + { + GamebaseImport objImporter = new GamebaseImport(this, sqlDB); + objImporter.OnReadNewFile += new GamebaseImport.MyEventHandler(ReadNewFile); + try + { + objImporter.Start(); + } + finally + { + objImporter.OnReadNewFile -= new GamebaseImport.MyEventHandler(ReadNewFile); + } + } + finally + { + if (bGUIMode) + { + guiDialogProgress.Close(); + } + } + } + void ReadNewFile(string informationMessage, int progressBarCtr) + { + if (guiDialogProgress != null) + { + guiDialogProgress.SetLine(2, String.Format("{0} {1}", GUILocalizeStrings.Get(13005), informationMessage)); // "last imported file {0}" + /* if ((curPos > 0) && (maxPos > 0)) + { + int perc = 100 * curPos / maxPos; + guiDialogProgress.SetPercentage(perc); + }*/ + guiDialogProgress.Progress(); + } + SendRefreshInfo(String.Format("{0} {1}", GUILocalizeStrings.Get(13005), informationMessage), progressBarCtr); + } + + void DisplayText(string informationMessage, int progressBarCtr) + { + SendRefreshInfo(informationMessage, progressBarCtr); + } + + + override public bool ProfileLoadingAllowed() + { + return true; + } + + override public void Refresh(bool bGUIMode) + { + base.Refresh(bGUIMode); + DeleteFiles(); + DoGamebaseImport(bGUIMode); + FixFileLinks(); + LoadFiles(); + } + } +} \ No newline at end of file Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGrouper.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGrouper.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Items/ApplicationItemGrouper.cs 2007-07-22 19:06:56 UTC (rev 752) @@ -0,0 +1,178 @@ +#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 S... [truncated message content] |
From: <nor...@us...> - 2007-07-22 18:48:07
|
Revision: 751 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=751&view=rev Author: northern_sky Date: 2007-07-22 11:47:56 -0700 (Sun, 22 Jul 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/README.txt Modified: trunk/plugins/myGUIProgramsAlt/README.txt =================================================================== --- trunk/plugins/myGUIProgramsAlt/README.txt 2007-07-22 18:44:53 UTC (rev 750) +++ trunk/plugins/myGUIProgramsAlt/README.txt 2007-07-22 18:47:56 UTC (rev 751) @@ -1,12 +1,12 @@ WIP on an alternative/update to myprograms. Still features and bugs to fix. Do NOT USE on your real MP-installation, only for tests.. -Bug-reports ,not yet, there are a few=) known to fix first. +Bug-reports..no, not yet. It's quite buggy, as things changes still. -chefkoch is also doing updates on this version now. Great,it will for sure speed-up development! +chefkoch is doing some stuff on this to,Great,it will for sure speed-up development! :--INSTALLATION -Copy contents of metadata-folder to MP root folder , and the GUIPrograms.dll to MP/windowsplugins to run. +Copy contents of metadata-folder to MP root folder ,skin to relevant folder, and the GUIPrograms.dll to MP/windowsplugins to run. Copy skin to relevant folder. There will possibly be db-changes and xml-changes between versions, so always make sure that you have a clean install between updates. @@ -21,7 +21,7 @@ Allgamesupport updated. Fileinfoscraper reworked -Mame, Gamebase support partially rewritten.much faster... now slow again as we import stuff to lexicon tables.. +Mame, Gamebase support partially rewritten.much faster...( now slow again as we import stuff to lexicon tables.). Some new options: Skip mahjong games,etc ---------------- @@ -54,6 +54,7 @@ ThumbnailSupport: - [low] rating: thumbs for 0-10 maybe as stylish numbers or maybe as smileys :( -> :| -> :), so that the user could choose it for himself + using stars as also used in videoinfo details etc. - [low] genre: thumbs for genre, for example it could be created on AllGame lookup, for first file with this genre - ....... This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-07-22 18:44:57
|
Revision: 750 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=750&view=rev Author: northern_sky Date: 2007-07-22 11:44:53 -0700 (Sun, 22 Jul 2007) Log Message: ----------- rem some old items Removed Paths: ------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/FileItems/ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramFilterItem.cs Deleted: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramFilterItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramFilterItem.cs 2007-07-22 16:03:05 UTC (rev 749) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramFilterItem.cs 2007-07-22 18:44:53 UTC (rev 750) @@ -1,134 +0,0 @@ -#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; - -namespace GUIPrograms -{ - /// <summary> - /// Summary description for ProgramFilterItem. - /// </summary> - public class ProgramFilterItem - { - string title = ""; - string title2 = ""; - string genre = ""; - string country = ""; - string manufacturer = ""; - int year = -1; - int rating = 5; - - public ProgramFilterItem() - { - // - // TODO: Add constructor logic here - // - } - - public string Title - { - get - { - return title; - } - set - { - title = value; - } - } - - public string Title2 - { - get - { - return title2; - } - set - { - title2 = value; - } - } - - public string Genre - { - get - { - return genre; - } - set - { - genre = value; - } - } - - public string Country - { - get - { - return country; - } - set - { - country = value; - } - } - - public string Manufacturer - { - get - { - return manufacturer; - } - set - { - manufacturer = value; - } - } - - public int Year - { - get - { - return year; - } - set - { - year = value; - } - } - - public int Rating - { - get - { - return rating; - } - set - { - rating = value; - } - } - } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <nor...@us...> - 2007-07-22 16:03:09
|
Revision: 749 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=749&view=rev Author: northern_sky Date: 2007-07-22 09:03:05 -0700 (Sun, 22 Jul 2007) Log Message: ----------- restructure of items etc.. probably some bugs introduced too=) Modified Paths: -------------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemFactory.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGameBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemMame.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Database/DatabaseHandler.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesImportProgress.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppFilesView.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsBase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsDirCache.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGamebase.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsGrouper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsMame.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/AppSettingsRoot.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileDetailsForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/FileInfoScraperForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Design/SetupForm.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIPrograms.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAlt.csproj trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/GUIProgramsAltFileInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/AllGameScraper.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/GamebaseImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/Imports/MameImport.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramSort.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramUtils.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ProgramViewHandler.cs Added Paths: ----------- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/BaseItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/FileItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/FileItemInfo.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/FilelinkItem.cs trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/FilterItem.cs Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-07-20 14:43:12 UTC (rev 748) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItem.cs 2007-07-22 16:03:05 UTC (rev 749) @@ -38,16 +38,16 @@ using GUIPrograms; using GUIPrograms.Database; -using GUIPrograms.FileItems; +using GUIPrograms.Items; -namespace GUIPrograms.ApplicationItems +namespace GUIPrograms.Items { - public class ApplicationItem + public class ApplicationItem : BaseItem { #region Variables - protected static SQLiteClient sqlDB = null; + int appID; int fatherID; @@ -69,20 +69,23 @@ string currentView = ""; public bool filesAreLoaded = false; // load on demand.... - protected FileItemList fileList = null; + // protected FileItemList fileList = null; + public bool linksAreLoaded = false; // load on demand.... - protected FilelinkItemList fileLinks = null; + + bool importMamePlaychoice10 = false; bool importMameMahjong = false; bool refreshGUIAllowed = false; + // more variables, maybe need some renaming or anything else Process proc; - ApplicationType sourceType; + ItemType sourceType; string sourceFile; string imageFile; string imageDirectories; // in one string for sqlite db field @@ -98,7 +101,7 @@ int thumbIndex = 0; int thumbFolderIndex = -1; - string lastFilepath = ""; // cached path + protected string lastFilepath = ""; // cached path //private DatabaseSorter dbPc = new DatabaseSorter(); //private ProgramSort dbPc = new ProgramSort(ProgramSort.SortMethod.Name, true); @@ -215,32 +218,6 @@ set { currentView = value; } } - - public FileItemList Files - { - // load on demand.... - get - { - if (!filesAreLoaded) - { - LoadFiles(); - } - return fileList; - } - } - public FilelinkItemList Filelinks - { - // load on demand.... - get - { - if (!linksAreLoaded) - { - LoadFileLinks(); - } - return fileLinks; - } - } - public bool ImportMamePlaychoice10 { get { return importMamePlaychoice10; } @@ -282,7 +259,7 @@ get { return sourceFile; } set { sourceFile = value; } } - public ApplicationType SourceType + public ItemType SourceType { get { return sourceType; } set { sourceType = value; } @@ -309,20 +286,6 @@ set { launchErrorMsg = value; } } - - /* public int CurrentSortIndex - { - get { return GetCurrentSortIndex(); } - set { SetCurrentSortIndex(value); } - - }*/ - /* public bool CurrentSortIsAscending - { - get { return GetCurrentSortIsAscending(); } - set { SetCurrentSortIsAscending(value); } - - } */ - #endregion #region Events @@ -338,12 +301,10 @@ #region Constructor - public ApplicationItem(SQLiteClient initSqlDB) + public ApplicationItem(SQLiteClient initSqlDb) : base(initSqlDb) { - - // constructor: save SQLiteDB object - sqlDB = initSqlDB; - // .. init member variables ... + + // .. init member variables ... appID = -1; fatherID = -1; title = ""; @@ -354,7 +315,7 @@ useShellExecute = false; useQuotes = true; enabled = true; - sourceType = ApplicationType.UNKNOWN; + sourceType = ItemType.UNKNOWN; sourceFile = ""; imageFile = ""; fileDirectory = ""; @@ -386,38 +347,39 @@ protected int GetID = ProgramUtils.GetID; + + public FileItem PrevFile(FileItem curFile) { - if (Files == null) return null; - if (Files.Count == 0) return null; + if (ItemList == null) return null; + if (ItemList.Count == 0) return null; - int index = this.Files.IndexOf(curFile); + int index = this.ItemList.IndexOf(curFile); index = index - 1; if (index < 0) - index = Files.Count - 1; - return (FileItem)Files[index]; + index = ItemList.Count - 1; + return (FileItem)ItemList[index]; } public FileItem NextFile(FileItem curFile) { - if (Files == null) return null; - if (Files.Count == 0) return null; + if (ItemList == null) return null; + if (ItemList.Count == 0) return null; - int index = this.Files.IndexOf(curFile); + int index = this.ItemList.IndexOf(curFile); index = index + 1; - if (index > Files.Count - 1) + if (index > ItemList.Count - 1) index = 0; - return (FileItem)Files[index]; + return (FileItem)ItemList[index]; } /// <summary> /// look for FileItem and launch it using the found object /// </summary> /// <param name="guiListItem"></param> - public virtual void LaunchFile(GUIListItem guiListItem) + public virtual void LaunchFile(BaseItem launchItem) { - if (guiListItem.MusicTag == null) return; - FileItem curFileItem = (FileItem)guiListItem.MusicTag; + FileItem curFileItem = (FileItem)launchItem; if (curFileItem == null) return; this.LaunchFile(curFileItem, true); @@ -623,15 +585,26 @@ int totalItems = 0; if (filePath != lastFilepath) { - Files.Load(AppID, filePath); - Filelinks.Load(AppID, filePath); + ItemLoad(AppID, filePath); + //Filelinks.Load(AppID, filePath); } - totalItems = totalItems + DisplayArrayList(filePath, this.Files, facadeView); - totalItems = totalItems + DisplayArrayList(filePath, this.Filelinks, facadeView); + totalItems = totalItems + DisplayItemList(filePath, this.ItemList, facadeView); + // totalItems = totalItems + DisplayArrayList(filePath, this.Filelinks, facadeView); lastFilepath = filePath; return totalItems; } + public override void OnClick(BaseItem baseItem,GUIPrograms guiPrograms) + { + ApplicationItem candidate = (ApplicationItem)baseItem; + guiPrograms.SaveItemIndex(guiPrograms.GetSelectedItemNo().ToString(), guiPrograms.lastApp, lastFilepath); + guiPrograms.lastApp = candidate; + guiPrograms.mapSettings.LastAppID = guiPrograms.lastApp.AppID; + guiPrograms.lastFilepath = guiPrograms.lastApp.DefaultFilepath(); + guiPrograms.ViewHandler.CurrentLevel = 0; + guiPrograms.lastApp.ViewHandler = guiPrograms.ViewHandler; + } + protected int DisplayArrayList(string filePath, List<object> dbItems, GUIFacadeControl facadeView) { int totalItems = 0; @@ -643,89 +616,20 @@ { FileItem curFile = obj as FileItem; GUIListItem gli = new GUIListItem(curFile.Title); - gli.Label2 = curFile.Title2; + gli.MusicTag = curFile; gli.IsFolder = curFile.IsFolder; gli.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(OnRetrieveCoverArt); gli.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(OnItemSelected); facadeView.Add(gli); } - else if (obj is ProgramFilterItem) - { - ProgramFilterItem curFilter = obj as ProgramFilterItem; - GUIListItem gli = new GUIListItem(curFilter.Title); - gli.Label2 = curFilter.Title2; // some filters may have more than one text - gli.MusicTag = curFilter; - gli.IsFolder = true; - //ck - gli.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(OnItemSelected); - - - facadeView.Add(gli); - - } } return totalItems; } - void OnRetrieveCoverArt(GUIListItem guiListItem) - { - if (guiListItem.MusicTag == null) return; - FileItem curFileItem = (FileItem)guiListItem.MusicTag; - if (curFileItem == null) return; - - string imgFile = String.Empty; - - if (DatabaseHandler.useMPsThumbDirectory) - imgFile = curFileItem.Imagefile; - else - imgFile = MediaPortal.Util.Utils.GetCoverArtName( - Config.GetSubFolder(Config.Dir.Thumbs, @"MyProgramsAlt\" + this.Title), - Path.GetFileNameWithoutExtension(curFileItem.Filename) - ); - if (imgFile != "") - { - guiListItem.ThumbnailImage = curFileItem.Imagefile; - guiListItem.IconImageBig = curFileItem.Imagefile; - guiListItem.IconImage = curFileItem.Imagefile; - } - else - { - guiListItem.ThumbnailImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; - guiListItem.IconImageBig = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; - guiListItem.IconImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderNF.png"; - } - } - /* private void OnItemSelected(GUIListItem item, GUIControl parent) - { - GUIFilmstripControl filmstrip = parent as GUIFilmstripControl; - if (filmstrip == null) return; - if (item == null) return; - if ((item.MusicTag != null) && (item.MusicTag is FileItem) && (!item.IsFolder)) - { - filmstrip.InfoImageFileName = item.ThumbnailImage; - } - else - { - filmstrip.InfoImageFileName = ""; - } - }*/ - private void OnItemSelected(GUIListItem item, GUIControl parent) - { - GUIPrograms.ThumbnailPath = ""; - if (item.ThumbnailImage != "" - && item.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png" - && item.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultAlbum.png" - ) - { - // only show big thumb if there is really one.... - GUIPrograms.ThumbnailPath = item.ThumbnailImage; - } - } - public virtual bool FileEditorAllowed() { return true; // otherwise, override this in child class @@ -956,33 +860,18 @@ public virtual void LoadFiles() { + //linksAreLoaded = true; if (sqlDB == null) return; - - // load Files and fill Files-List<string> here! - if (fileList == null) - fileList = new FileItemList(sqlDB); - else - fileList.Clear(); - + lastFilepath = ""; - fileList.Load(AppID, ""); + ItemLoad(AppID, ""); filesAreLoaded = true; } - public virtual void LoadFileLinks() - { - if (sqlDB == null) return; - if (fileLinks == null) - fileLinks = new FilelinkItemList(sqlDB); - else - fileLinks.Clear(); - lastFilepath = ""; - fileLinks.Load(AppID, ""); - linksAreLoaded = true; - } + public void InsertOrUpdateSettings() { if (appID == -1) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs 2007-07-20 14:43:12 UTC (rev 748) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemDirectoryCache.cs 2007-07-22 16:03:05 UTC (rev 749) @@ -36,9 +36,9 @@ using GUIPrograms; using GUIPrograms.Database; -using GUIPrograms.FileItems; +using GUIPrograms.Items; -namespace GUIPrograms.ApplicationItems +namespace GUIPrograms.Items { /// <summary> /// Summary description for ApplicationItemDirectoryCache. @@ -153,11 +153,10 @@ FileItem curFile = new FileItem(sqlDB); curFile.FileID = -1; // to force an INSERT statement when writing the item curFile.AppID = this.AppID; - curFile.Title = fileInfo.Name; - curFile.Title = curFile.TitleNormalized; + curFile.Title = Path.GetFileNameWithoutExtension(fileInfo.Name); curFile.Filename = fileInfo.FullName; - curFile.Imagefile = GetThumbsFile(fileInfo, curFile.TitleNormalized); + curFile.Imagefile = GetThumbsFile(fileInfo, curFile.Title); // not imported properties => set default values curFile.LastTimeLaunched = DateTime.MinValue; @@ -178,8 +177,8 @@ private void DeleteOrphaned() { string TheFileName; - this.Files.Load(AppID, ""); - foreach (FileItem DBfile in this.Files) + ItemLoad(AppID, ""); + foreach (FileItem DBfile in ItemList) { TheFileName = DBfile.Filename; @@ -214,7 +213,7 @@ fileInDir = (FileInfo)allUnderLyingFiles[i]; - foreach (FileItem DBfile in this.Files) + foreach (FileItem DBfile in ItemList) { if (DBfile.Filename == fileInDir.FullName) { @@ -251,7 +250,7 @@ return; if (this.AppID < 0) return; - if (this.SourceType != ApplicationType.DIRCACHE) + if (this.SourceType != ItemType.DIRCACHE) return; if (mpGuiMode) { @@ -260,7 +259,7 @@ try { ValidExtensions = ValidExtensions.Replace(" ", ""); - this.Files.Load(AppID, ""); + ItemLoad(AppID, ""); string[] fileDirPaths = this.FileDirectory.Split(';'); ImportDirectory(fileDirPaths, mpGuiMode); @@ -278,9 +277,9 @@ override public string CurrentFilePath() { - if (Files.Filepath != "") + if (filePath != "") { - return Files.Filepath; + return filePath; } else { Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemFactory.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemFactory.cs 2007-07-20 14:43:12 UTC (rev 748) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemFactory.cs 2007-07-22 16:03:05 UTC (rev 749) @@ -24,10 +24,10 @@ #endregion using SQLite.NET; - +using System; using GUIPrograms; -namespace GUIPrograms.ApplicationItems +namespace GUIPrograms.Items { /// <summary> /// Factory object that creates the matchin Application descendant class @@ -46,26 +46,147 @@ // nothing to create...... } - public ApplicationItem GetApplicationItem(SQLiteClient sqlDB, ApplicationType sourceType) + public BaseItem GetApplicationItem(SQLiteClient sqlDB, ItemType sourceType,SQLiteResultSet results, int iRecord) { - ApplicationItem applicationItem = null; + BaseItem item = null; switch (sourceType) { - case ApplicationType.DIRCACHE: - applicationItem = new ApplicationItemDirectoryCache(sqlDB); + case ItemType.DIRCACHE: + item = AppItemFactory(sqlDB, results, iRecord,ItemType.DIRCACHE); break; - case ApplicationType.MAMEDIRECT: - applicationItem = new ApplicationItemMame(sqlDB); + case ItemType.MAMEDIRECT: + item = AppItemFactory(sqlDB, results, iRecord,ItemType.MAMEDIRECT); break; - case ApplicationType.GROUPER: - applicationItem = new ApplicationItemGrouper(sqlDB); + case ItemType.GROUPER: + item = AppItemFactory(sqlDB, results, iRecord,ItemType.GROUPER); break; - case ApplicationType.GAMEBASE: - applicationItem = new ApplicationItemGameBase(sqlDB); + case ItemType.GAMEBASE: + item = AppItemFactory(sqlDB, results, iRecord,ItemType.GAMEBASE); break; + case ItemType.FILEITEM: + item = FileItemFactory(sqlDB,results, iRecord); + break; + case ItemType.FILELINKITEM: + item = FilelinkItemFactory(sqlDB, results, iRecord); + break; + case ItemType.FILTERITEM: + item = FilterItemFactory(sqlDB, results, iRecord); + break; } - return applicationItem; + return item; } + + private ApplicationItem AppItemFactory(SQLiteClient sqldb, SQLiteResultSet results, int recordIndex, ItemType sourceType) + { + ApplicationItem item = null;//= (ApplicationItem)appFactory.GetApplicationItem(sqlDB, ProgramUtils.GetSourceType(results, recordIndex, "applicationItemType"), null, 0); + + switch (sourceType) + { + case ItemType.DIRCACHE: + item = new ApplicationItemDirectoryCache(sqldb); + break; + case ItemType.MAMEDIRECT: + item = new ApplicationItemMame(sqldb); + break; + case ItemType.GROUPER: + item = new ApplicationItemGrouper(sqldb); + break; + case ItemType.GAMEBASE: + item = new ApplicationItemGameBase(sqldb); + break; + } + + //fetches from db,, + if (results != null) + { + item.Enabled = ProgramUtils.GetBool(results, recordIndex, "enabled"); + item.AppID = ProgramUtils.GetIntDef(results, recordIndex, "applicationId", -1); + item.FatherID = ProgramUtils.GetIntDef(results, recordIndex, "fatherNodeId", -1); + item.Title = ProgramUtils.Get(results, recordIndex, "title"); + item.Filename = ProgramUtils.Get(results, recordIndex, "filename"); + item.Arguments = ProgramUtils.Get(results, recordIndex, "arguments"); + item.WindowStyle = ProgramUtils.GetProcessWindowStyle(results, recordIndex, "windowstyle"); + item.StartupDir = ProgramUtils.Get(results, recordIndex, "startupdir"); + item.UseShellExecute = ProgramUtils.GetBool(results, recordIndex, "useShellExecute"); + item.UseQuotes = ProgramUtils.GetBool(results, recordIndex, "useQuotes"); + item.SourceType = ProgramUtils.GetSourceType(results, recordIndex, "applicationItemType"); + item.Source = ProgramUtils.Get(results, recordIndex, "source"); + item.Imagefile = ProgramUtils.Get(results, recordIndex, "imagefile"); + item.FileDirectory = ProgramUtils.Get(results, recordIndex, "filedirectory"); + item.ImageDirectory = ProgramUtils.Get(results, recordIndex, "imagedirectory"); + item.ValidExtensions = ProgramUtils.Get(results, recordIndex, "validextensions"); + item.ImportValidImagesOnly = ProgramUtils.GetBool(results, recordIndex, "importvalidimagesonly"); + item.Position = ProgramUtils.GetIntDef(results, recordIndex, "iposition", 0); + item.RefreshGUIAllowed = ProgramUtils.GetBool(results, recordIndex, "refreshGUIAllowed"); + item.SystemDefault = ProgramUtils.Get(results, recordIndex, "systemdefault"); + item.WaitForExit = ProgramUtils.GetBool(results, recordIndex, "waitforexit"); + item.PreLaunch = ProgramUtils.Get(results, recordIndex, "preLaunch"); + item.PostLaunch = ProgramUtils.Get(results, recordIndex, "postLaunch"); + } + return item; + } + + private FileItem FileItemFactory(SQLiteClient sqlDB,SQLiteResultSet results, int iRecord) + { + FileItem newFile = new FileItem(sqlDB); + newFile.FileID = ProgramUtils.GetIntDef(results, iRecord, "fileid", -1); + newFile.AppID = ProgramUtils.GetIntDef(results, iRecord, "applicationId", -1); + newFile.Title = ProgramUtils.Get(results, iRecord, "title"); + newFile.Filename = ProgramUtils.Get(results, iRecord, "filename"); + newFile.Imagefile = ProgramUtils.Get(results, iRecord, "imagefile"); + newFile.MainGenre = ProgramUtils.Get(results, iRecord, "mainGenre"); + newFile.MainGenreId = ProgramUtils.GetIntDef(results, iRecord, "mainGenreId", 1); + newFile.SubGenre = ProgramUtils.Get(results, iRecord, "subGenre"); + newFile.SubGenreId = ProgramUtils.GetIntDef(results, iRecord, "subGenreId", 1); + newFile.Country = ProgramUtils.Get(results, iRecord, "country"); + newFile.ManufacturerId = ProgramUtils.GetIntDef(results, iRecord, "manufacturerId", 1); + newFile.Manufacturer = ProgramUtils.Get(results, iRecord, "manufacturer"); + newFile.Year = ProgramUtils.GetIntDef(results, iRecord, "year", -1); + newFile.Rating = ProgramUtils.GetIntDef(results, iRecord, "rating", 5); + newFile.Overview = ProgramUtils.Get(results, iRecord, "overview"); + newFile.Platform = ProgramUtils.Get(results, iRecord, "platform"); + newFile.PlatformId = ProgramUtils.GetIntDef(results, iRecord, "platformId", 1); + + newFile.IsFolder = ProgramUtils.GetBool(results, iRecord, "isfolder"); + newFile.CategoryData = ProgramUtils.Get(results, iRecord, "categorydata"); + newFile.GameInfoURL = ProgramUtils.Get(results, iRecord, "gameInfoUrl"); + return newFile; + } + + private FilterItem FilterItemFactory(SQLiteClient sqlDB,SQLiteResultSet results, int iRecord) + { + FilterItem filterItem = new FilterItem(sqlDB); + filterItem.Title = ProgramUtils.Get(results, iRecord, "title"); + // newFile.LastTimeLaunched = ProgramUtils.GetDateDef(results, iRecord, "lastTimeLaunched", DateTime.MinValue); + //newFile.LaunchCount = ProgramUtils.GetIntDef(results, iRecord, "launchcount", 0); ; + return filterItem; + } + + + private FilelinkItem FilelinkItemFactory(SQLiteClient sqlDB, SQLiteResultSet results, int iRecord) + { + FilelinkItem newLink = new FilelinkItem(sqlDB); + newLink.FileID = ProgramUtils.GetIntDef(results, iRecord, "fileId", -1); + newLink.AppID = ProgramUtils.GetIntDef(results, iRecord, "grouperAppId", -1); + newLink.TargetAppID = ProgramUtils.GetIntDef(results, iRecord, "targetAppId", -1); + newLink.Title = ProgramUtils.Get(results, iRecord, "title"); + newLink.Filename = ProgramUtils.Get(results, iRecord, "filename"); + newLink.Imagefile = ProgramUtils.Get(results, iRecord, "imagefile"); + newLink.MainGenre = ProgramUtils.Get(results, iRecord, "mainGenre"); + newLink.SubGenre = ProgramUtils.Get(results, iRecord, "subGenre"); + newLink.Country = ProgramUtils.Get(results, iRecord, "country"); + newLink.ManufacturerId = ProgramUtils.GetIntDef(results, iRecord, "manufacturerId", 1); + newLink.Manufacturer = ProgramUtils.Get(results, iRecord, "manufacturer"); + newLink.Year = ProgramUtils.GetIntDef(results, iRecord, "year", -1); + newLink.Rating = ProgramUtils.GetIntDef(results, iRecord, "rating", 5); + newLink.Overview = ProgramUtils.Get(results, iRecord, "overview"); + newLink.Platform = ProgramUtils.Get(results, iRecord, "platform"); + newLink.PlatformId = ProgramUtils.GetIntDef(results, iRecord, "platformId", 1); + newLink.LastTimeLaunched = ProgramUtils.GetDateDef(results, iRecord, "lastTimeLaunched", DateTime.MinValue); + newLink.LaunchCount = ProgramUtils.GetIntDef(results, iRecord, "launchcount", 0); + newLink.IsFolder = ProgramUtils.GetBool(results, iRecord, "isfolder"); + return newLink; + } } } \ No newline at end of file Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGameBase.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGameBase.cs 2007-07-20 14:43:12 UTC (rev 748) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGameBase.cs 2007-07-22 16:03:05 UTC (rev 749) @@ -34,7 +34,7 @@ using GUIPrograms.Database; using GUIPrograms.Imports; -namespace GUIPrograms.ApplicationItems +namespace GUIPrograms.Items { /// <summary> /// Summary description for ApplicationItemGameBase. @@ -68,7 +68,7 @@ return; if (this.AppID < 0) return; - if ((this.SourceType != ApplicationType.GAMEBASE) || (Source == "") || (!File.Exists(Source))) + if ((this.SourceType != ItemType.GAMEBASE) || (Source == "") || (!File.Exists(Source))) return; // show progress dialog and run the import... if (bGUIMode) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGrouper.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGrouper.cs 2007-07-20 14:43:12 UTC (rev 748) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemGrouper.cs 2007-07-22 16:03:05 UTC (rev 749) @@ -27,9 +27,9 @@ using SQLite.NET; using GUIPrograms.Database; -using GUIPrograms.FileItems; +using GUIPrograms.Items; -namespace GUIPrograms.ApplicationItems +namespace GUIPrograms.Items { /// <summary> /// Summary description for appFilesEdit. @@ -58,7 +58,111 @@ { return false; // links cannot be links again..... :) } + public override void LoadFiles() + { + if (sqlDB == null) return; + lastFilepath = ""; + ItemLoad(AppID, ""); + linksAreLoaded = true; + } + + + public override void ItemLoad(int appID, string pathSubfolders) +{ + string strSQL = ""; + // filePath = strPath; + // applicationItem. + // SPECIAL: the current application IS NOT the application with the launchinfo! + strSQL = @" + + SELECT + fi.applicationId AS targetAppId, + fi.grouperAppId AS grouperAppId, + f.fileId AS fileId, + title, + upperTitle, + f.filename AS filename, + imagefile, + tblMaingenre.genre as mainGenre, + mainGenreId, + tblSubgenre.genre as subGenre, + country, + f.manufacturerId, + manufacturer, + year, + rating, + overview, + platform, + f.platformId, + import_flag, + lastTimeLaunched, + launchCount, + isFolder + + FROM + tblFileItem f, + tblFilterItem fi, + tblGenre tblMainGenre, + tblGenre tblSubGenre, + tblManufacturer, + tblPlatform + + WHERE + f.fileId = fi.fileId + AND + tblMainGenre.genreId = f.mainGenreId + AND + tblSubGenre.genreId = f.subGenreId + AND + tblManufacturer.manufacturerId = f.manufacturerId + AND + tblPlatform.platformId = f.platformId + AND + grouperAppId = " + appID + @" + + ORDER BY f.fileName, uppertitle + + "; + + //Debugger.Launch(); + if (sqlDB == null) + return; + + try + { + ItemList.Clear(); + SQLiteResultSet results; + filePath = pathSubfolders; + results = sqlDB.Execute(strSQL); + if (results.Rows.Count == 0) + return; + + + for (int curRow = 0; curRow < results.Rows.Count; curRow++) + { + if (ViewHandler.IsFilterQuery) + { + FilterItem curFile = (FilterItem)ApplicationItemFactory.AppFactory.GetApplicationItem(sqlDB, ItemType.FILTERITEM, results, curRow); + + ItemList.Add(curFile); + } + else + { + FilelinkItem curFile = (FilelinkItem)ApplicationItemFactory.AppFactory.GetApplicationItem(sqlDB, ItemType.FILELINKITEM, results, curRow); + ItemList.Add(curFile); + } + } + + } + catch (SQLiteException ex) + { + Log.Info("Filedatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } +} + + + public override void LaunchFile(FileItem curFile, bool MPGUIMode) { if (curFile is FilelinkItem) Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-07-20 14:43:12 UTC (rev 748) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemList.cs 2007-07-22 16:03:05 UTC (rev 749) @@ -28,11 +28,11 @@ using GUIPrograms; using GUIPrograms.Database; -using GUIPrograms.FileItems; +using GUIPrograms.Items; using MediaPortal.GUI.Library; -namespace GUIPrograms.ApplicationItems +namespace GUIPrograms.Items { /// <summary> /// Summary description for ApplicationItemList. @@ -53,36 +53,6 @@ LoadAll(); } - static private ApplicationItem DBGetApp(SQLiteResultSet results, int recordIndex) - { - ApplicationItem newApp = appFactory.GetApplicationItem(sqlDB, ProgramUtils.GetSourceType(results, recordIndex, "applicationItemType")); - newApp.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); - newApp.Enabled = ProgramUtils.GetBool(results, recordIndex, "enabled"); - newApp.AppID = ProgramUtils.GetIntDef(results, recordIndex, "applicationId", -1); - newApp.FatherID = ProgramUtils.GetIntDef(results, recordIndex, "fatherNodeId", -1); - newApp.Title = ProgramUtils.Get(results, recordIndex, "title"); - newApp.Filename = ProgramUtils.Get(results, recordIndex, "filename"); - newApp.Arguments = ProgramUtils.Get(results, recordIndex, "arguments"); - newApp.WindowStyle = ProgramUtils.GetProcessWindowStyle(results, recordIndex, "windowstyle"); - newApp.StartupDir = ProgramUtils.Get(results, recordIndex, "startupdir"); - newApp.UseShellExecute = ProgramUtils.GetBool(results, recordIndex, "useShellExecute"); - newApp.UseQuotes = ProgramUtils.GetBool(results, recordIndex, "useQuotes"); - newApp.SourceType = ProgramUtils.GetSourceType(results, recordIndex, "applicationItemType"); - newApp.Source = ProgramUtils.Get(results, recordIndex, "source"); - newApp.Imagefile = ProgramUtils.Get(results, recordIndex, "imagefile"); - newApp.FileDirectory = ProgramUtils.Get(results, recordIndex, "filedirectory"); - newApp.ImageDirectory = ProgramUtils.Get(results, recordIndex, "imagedirectory"); - newApp.ValidExtensions = ProgramUtils.Get(results, recordIndex, "validextensions"); - newApp.ImportValidImagesOnly = ProgramUtils.GetBool(results, recordIndex, "importvalidimagesonly"); - newApp.Position = ProgramUtils.GetIntDef(results, recordIndex, "iposition", 0); - newApp.RefreshGUIAllowed = ProgramUtils.GetBool(results, recordIndex, "refreshGUIAllowed"); - newApp.SystemDefault = ProgramUtils.Get(results, recordIndex, "systemdefault"); - newApp.WaitForExit = ProgramUtils.GetBool(results, recordIndex, "waitforexit"); - newApp.PreLaunch = ProgramUtils.Get(results, recordIndex, "preLaunch"); - newApp.PostLaunch = ProgramUtils.Get(results, recordIndex, "postLaunch"); - return newApp; - } - public List<ApplicationItem> AppsOfFatherID(int FatherID) { List<ApplicationItem> applicationItemList = new List<ApplicationItem>(); @@ -123,7 +93,7 @@ public ApplicationItem CloneAppItem(ApplicationItem sourceApp) { - ApplicationItem newApp = appFactory.GetApplicationItem(sqlDB, sourceApp.SourceType); + ApplicationItem newApp = (ApplicationItem)appFactory.GetApplicationItem(sqlDB, sourceApp.SourceType,null,0); newApp.Assign(sourceApp); newApp.AppID = -1; // to force a sql INSERT when written Add(newApp); @@ -165,7 +135,8 @@ return; for (int row = 0; row < results.Rows.Count; row++) { - ApplicationItem currentApplicationItem = DBGetApp(results, row); + ApplicationItem currentApplicationItem = (ApplicationItem) ApplicationItemFactory.AppFactory.GetApplicationItem(sqlDB,ProgramUtils.GetSourceType(results, row, "applicationItemType"),results, row ); + currentApplicationItem.OnLaunchFilelink += new ApplicationItem.FilelinkLaunchEventHandler(LaunchFilelink); Add(currentApplicationItem); } } Modified: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemMame.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemMame.cs 2007-07-20 14:43:12 UTC (rev 748) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/ApplicationItemMame.cs 2007-07-22 16:03:05 UTC (rev 749) @@ -34,7 +34,7 @@ using GUIPrograms; using GUIPrograms.Imports; -namespace GUIPrograms.ApplicationItems +namespace GUIPrograms.Items { /// <summary> /// Summary description for ApplicationItemMame. @@ -85,7 +85,7 @@ return; if (this.AppID < 0) return; - if (this.SourceType != ApplicationType.MAMEDIRECT) + if (this.SourceType != ItemType.MAMEDIRECT) return; if (!File.Exists(this.Filename)) // no "mame.exe" return; Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/BaseItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/BaseItem.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/BaseItem.cs 2007-07-22 16:03:05 UTC (rev 749) @@ -0,0 +1,165 @@ + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Xml; +using SQLite.NET; + +using MediaPortal.Configuration; +using MediaPortal.GUI.Library; +using MediaPortal.Player; +using MediaPortal.Ripper; +using MediaPortal.Util; + +using GUIPrograms; +using GUIPrograms.Database; +using GUIPrograms.Items; + +namespace GUIPrograms.Items +{ + public abstract class BaseItem + { + + public List<BaseItem> ItemList = new List<BaseItem>(); + protected static SQLiteClient sqlDB = null; + public ProgramViewHandler ViewHandler = ProgramViewHandler.Instance; + public string filePath = ""; + //s protected FilelinkItemList fileLinks = null; + + public BaseItem(SQLiteClient initSqlDB) + { + // constructor: save SQLiteDB object + sqlDB = initSqlDB; + //hackisch until?? + + + + } + + public virtual void OnClick(BaseItem baseItem, GUIPrograms guiPrograms) + { + //override + } + public int DisplayItemList(string filePath, List<BaseItem> dbItems, GUIFacadeControl facadeView) + { + int totalItems = 0; + + foreach (BaseItem baseItem in dbItems) + { + totalItems = totalItems + 1; + + if (baseItem is FileItem) + { + FileItem curFile = baseItem as FileItem; + GUIListItem gli = new GUIListItem(curFile.Title); + + gli.MusicTag = curFile; + gli.IsFolder = curFile.IsFolder; + gli.OnRetrieveArt += new MediaPortal.GUI.Library.GUIListItem.RetrieveCoverArtHandler(OnRetrieveCoverArt); + gli.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(OnItemSelected); + facadeView.Add(gli); + } + if (baseItem is FilterItem) + { + FilterItem curFile = baseItem as FilterItem; + GUIListItem gli = new GUIListItem(curFile.Title); + gli.MusicTag = curFile; + gli.IsFolder = false; + gli.OnItemSelected += new MediaPortal.GUI.Library.GUIListItem.ItemSelectedHandler(OnItemSelected); + facadeView.Add(gli); + } + } + return totalItems; + } + + protected void OnRetrieveCoverArt(GUIListItem guiListItem) + { + if (guiListItem.MusicTag == null) return; + FileItem curFileItem = (FileItem)guiListItem.MusicTag; + if (curFileItem == null) return; + + string imgFile = String.Empty; + + if (DatabaseHandler.useMPsThumbDirectory) + imgFile = curFileItem.Imagefile; + else + imgFile = MediaPortal.Util.Utils.GetCoverArtName( + Config.GetSubFolder(Config.Dir.Thumbs, @"MyProgramsAlt\" + curFileItem.Title), + Path.GetFileNameWithoutExtension(curFileItem.Filename) + ); + + if (imgFile != "") + { + guiListItem.ThumbnailImage = curFileItem.Imagefile; + guiListItem.IconImageBig = curFileItem.Imagefile; + guiListItem.IconImage = curFileItem.Imagefile; + } + else + { + guiListItem.ThumbnailImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; + guiListItem.IconImageBig = GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png"; + guiListItem.IconImage = GUIGraphicsContext.Skin + @"\media\DefaultFolderNF.png"; + } + } + + protected void OnItemSelected(GUIListItem item, GUIControl parent) + { + GUIPrograms.ThumbnailPath = ""; + if (item.ThumbnailImage != "" + && item.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultFolderBig.png" + && item.ThumbnailImage != GUIGraphicsContext.Skin + @"\media\DefaultAlbum.png" + ) + { + // only show big thumb if there is really one.... + GUIPrograms.ThumbnailPath = item.ThumbnailImage; + } + } + + public virtual void ItemLoad(int appID, string pathSubfolders) + { + //Debugger.Launch(); + if (sqlDB == null) + return; + + try + { + ItemList.Clear(); + SQLiteResultSet results; + filePath = pathSubfolders; + string sqlQuery = ViewHandler.BuildQuery(appID, pathSubfolders); + // Log.Info("dw \n{0}", sqlQuery); + results = sqlDB.Execute(sqlQuery); + if (results.Rows.Count == 0) + return; + + + for (int curRow = 0; curRow < results.Rows.Count; curRow++) + { + if (ViewHandler.IsFilterQuery) + { + FilterItem curFile = (FilterItem)ApplicationItemFactory.AppFactory.GetApplicationItem(sqlDB, ItemType.FILTERITEM, results, curRow); + ItemList.Add(curFile); + } + else + { + FileItem curFile =(FileItem) ApplicationItemFactory.AppFactory.GetApplicationItem(sqlDB,ItemType.FILEITEM,results, curRow); + ItemList.Add(curFile); + } + } + + } + catch (SQLiteException ex) + { + Log.Info("Filedatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + + + } +} + + + + Added: trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/FileItem.cs =================================================================== --- trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/FileItem.cs (rev 0) +++ trunk/plugins/myGUIProgramsAlt/GUIProgramsAlt/ApplicationItems/FileItem.cs 2007-07-22 16:03:05 UTC (rev 749) @@ -0,0 +1,856 @@ +#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.Collections; +using System.Collections.Generic; +using System.IO; +using SQLite.NET; + +using MediaPortal.Configuration; +using MediaPortal.GUI.Library; + +using GUIPrograms; +using GUIPrograms.Database; +using GUIPrograms.Items; +using GUIPrograms.Imports; + +namespace GUIPrograms.Items +{ + public class FileItem : BaseItem + { + #region Variables + + int fileID; + int appID; + string title; + string filename; + string imagefile; + string mainGenre; + int mainGenreId; + int subGenreId; + string subGenre; + string country; + string manufacturer; + int manufacturerId; + int year; + int rating; + string overview; + string platform; + int platformId; + DateTime lastTimeLaunched; + int launchCount; + string categoryData; + bool isFolder; + string gameInfoURL; + + List<FileItemInfo> fileItemInfoList = null; + FileItemInfo fileItemInfoFavourite = null; + + #endregion + + #region Constructor + + public FileItem(SQLiteClient initSqlDB) : base(initSqlDB) + { + // constructor: save SQLiteDB object + + Clear(); + } + + #endregion + + public virtual void Clear() + { + fileID = -1; + appID = -1; + title = ""; + filename = ""; + imagefile = ""; + mainGenreId = 1; + subGenreId = 1; + country = ""; + manufacturer = ""; + manufacturerId = 1; + year = -1; + rating = -1; + overview = ""; + platform = ""; + platformId = 1; + isFolder = false; + lastTimeLaunched = DateTime.MinValue; + launchCount = 0; + categoryData = ""; + gameInfoURL = string.Empty; + } + + public override void OnClick(BaseItem baseItem, GUIPrograms guiPrograms) + { + guiPrograms.selectedItemIndex = guiPrograms.GetSelectedItemNo(); + + if (guiPrograms.lastApp != null) + { + guiPrograms.mapSettings.LastAppID = guiPrograms.lastApp.AppID; + guiPrograms.lastFilepath = guiPrograms.lastApp.DefaultFilepath(); + guiPrograms.lastApp.LaunchFile(baseItem); + } + } + + #region Properties + + public int FileID + { + get + { + return fileID; + } + set + { + fileID = value; + } + } + public int AppID + { + get + { + return appID; + } + set + { + appID = value; + } + } + + public string Title + { + get + { + return title; + } + set + { + title = value; + } + } + + public string Filename + { + get + { + return filename; + } + set + { + filename = value; + } + } + + public string Imagefile + { + get + { + return imagefile; + } + set + { + imagefile = value; + } + } + + public string MainGenre + { + get + { + return mainGenre; + } + set + { + mainGenre = value; + } + } + + public int MainGenreId + { + get + { + return mainGenreId; + } + set + { + mainGenreId = value; + } + } + public int SubGenreId + { + get + { + return subGenreId; + } + set + { + subGenreId = value; + } + } + public string SubGenre + { + get + { + return subGenre; + } + set + { + subGenre = value; + } + } + public string Country + { + get + { + return country; + } + set + { + country = value; + } + } + public string Manufacturer + { + get + { + return manufacturer; + } + set + { + manufacturer = value; + } + } + public int ManufacturerId + { + get + { + return manufacturerId; + } + set + { + manufacturerId = value; + } + } + + public int Year + { + get + { + return year; + } + set + { + year = value; + } + } + public int Rating + { + get + { + return rating; + } + set + { + rating = value; + } + } + public string Overview + { + get + { + return overview; + } + set + { + overview = value; + } + } + public string Platform + { + get + { + return platform; + } + set + { + platform = value; + } + } + public int PlatformId + { + get + { + return platformId; + } + set + { + platformId = value; + } + } + public DateTime LastTimeLaunched + { + get + { + return lastTimeLaunched; + } + set + { + lastTimeLaunched = value; + } + } + public int LaunchCount + { + get + { + return launchCount; + } + set + { + launchCount = value; + } + } + + public string CategoryData + { + get + { + return categoryData; + } + set + { + categoryData = value; + } + } + public bool IsFolder + { + get + { + return isFolder; + } + set + { + isFolder = value; + } + } + public string GameInfoURL + { + get { return gameInfoURL; } + set { gameInfoURL = value; } + } + + + public List<FileItemInfo> FileInfoList + { + get + { + return fileItemInfoList; + } + } + public FileItemInfo FileInfoFavourite + { + get + { + return fileItemInfoFavourite; + } + set + { + fileItemInfoFavourite = value; + } + } + + #endregion + + private int CountQuotes(string strVal) + { + int at = 0; + int start = 0; + int nRes = 0; + while ((start < strVal.Length) && (at > -1)) + { + at = strVal.IndexOf("\"", start); + if (at == -1) + break; + nRes = nRes + 1; + start = at + 1; + } + return nRes; + } + + public string ExtractImageExtension() + { + string strRes = ""; + string[] parts = this.Imagefile.Split('.'); + if (parts.Length >= 2) + { + // there was an extension + strRes = '.' + parts[parts.Length - 1]; + } + return strRes; + } + + public string ExtractImageFileNoPath() + { + string strRes = ""; + string[] parts = this.Imagefile.Split('\\'); + if (parts.Length >= 1) + { + strRes = parts[parts.Length - 1]; + } + return strRes; + } + public void SetProperties() + { + /* string strThumb = MediaPortal.Util.Utils.GetLargeCoverArtName(Thumbs.MovieTitle, Title);*/ + //((GUIPropertyManager.SetProperty("#director", Director); + GUIPropertyManager.SetProperty("#maingenre", MainGenre); + GUIPropertyManager.SetProperty("#subgenre", SubGenre); + GUIPropertyManager.SetProperty("#manufacturer", Manufacturer); + GUIPropertyManager.SetProperty("#fname", Filename); + // GUIPropertyManager.SetProperty("#imdbnumber", IMDBNumber); + // GUIPropertyManager.SetProperty("#file", File); + GUIPropertyManager.SetProperty("#plot", Overview); + // GUIPropertyManager.SetProperty("#plotoutline", PlotOutline); + GUIPropertyManager.SetProperty("#rating", Rating.ToString()); + //GUIPropertyManager.SetProperty("#tagline", TagLine); + // GUIPropertyManager.SetProperty("#votes", Votes); + // GUIPropertyManager.SetProperty("#credits", WritingCredits); + GUIPropertyManager.SetProperty("#thumb", Imagefile); + GUIPropertyManager.SetProperty("#title", Title); + GUIPropertyManager.SetProperty("#year", Year.ToString()); + GUIPropertyManager.SetProperty("#platform", Platform); + /*GUIPropertyManager.SetProperty("#runtime", RunTime.ToString()); + GUIPropertyManager.SetProperty("#mpaarating", MPARating.ToString());*/ + /* string strValue = "no"; + if (Watched > 0) strValue = "yes"; + GUIPropertyManager.SetProperty("#iswatched", strValue);*/ + } + + private void Insert() + { + try + { + string strSQL = String.Format( + @" + INSERT INTO + tblFileItem + ( + fileid, + applicationId, + title, + filename, + imagefile, + mainGenreId, + subGenreId, + country, + manufacturerId, + year, + rating, + overview, + platformId, + lastTimeLaunched, + launchcount, + isfolder, + uppertitle, + categorydata, + gameInfoUrl + ) + + VALUES + ( + null, + '" + AppID + @"', + '" + ProgramUtils.Encode(Title) + @"', + '" + ProgramUtils.Encode(Filename) + @"', + '" + ProgramUtils.Encode(Imagefile) + @"', + " + MainGenreId + @", + '" + SubGenreId + @"', + '" + Country + @"', + '" + ManufacturerId + @"', + '" + Year.ToString() + @"', + '" + Rating + @"', + '" + ProgramUtils.Encode(Overview) + @"', + '" + PlatformId + @"', + '" + LastTimeLaunched.ToString() + @"', + '" + LaunchCount.ToString() + @"', + '" + ProgramUtils.BooleanToStr(IsFolder) + @"', + '" + ProgramUtils.Encode(Title.ToUpper()) + @"', + '" + ProgramUtils.Encode(CategoryData)) + @"', + '" + ProgramUtils.Encode(GameInfoURL) + @"' + )"; + // Log.Info("dw sql\n{0}", strSQL); + + sqlDB.Execute(strSQL); + } + catch (SQLiteException ex) + { + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + + + private void Update() + { + string strYear = ""; + if (Year > 0) + { + strYear = String.Format("{0}", Year); + } + else + { + strYear = "-1"; + } + + + + try + { + string strSQL = String.Format( + "UPDATE tblFileItem SET title = '{1}', filename = '{2}', imagefile = '{3}', mainGenreId = '{4}', subGenreId = '{5}', country = '{6}', manufacturerId = '{7}', year = '{8}', rating = '{9}', overview = '{10}', platformId = '{11}', uppertitle = '{12}', categorydata = '{13}', gameInfoURL = '" + ProgramUtils.Encode(GameInfoURL) + "' where fileid = {0}", FileID, ProgramUtils.Encode(Title), ProgramUtils.Encode(Filename), ProgramUtils.Encode(Imagefile), MainGenreId, SubGenreId, ProgramUtils.Encode(Country), ManufacturerId, strYear, Rating, ProgramUtils.Encode(Overview), PlatformId, ProgramUtils.Encode(Title.ToUpper()), ProgramUtils.Encode(CategoryData)); + sqlDB.Execute(strSQL); + } + catch (SQLiteException ex) + { + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + public void UpdateLaunchInfo() + { + try + { + LastTimeLaunched = DateTime.Now; + LaunchCount = LaunchCount + 1; + string strSQL = String.Format("UPDATE tblFileItem SET lastTimeLaunched = '{0}', launchcount = {1} WHERE fileid = {2}", LastTimeLaunched, LaunchCount, FileID); + sqlDB.Execute(strSQL); + } + catch (SQLiteException ex) + { + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + + public virtual void Write() + { + if (fileID == -1) + { + Insert(); + } + else + { + Update(); + } + } + + public virtual void Delete() + { + if (this.FileID >= 0) + { + try + { + string strSQL1 = String.Format("DELETE FROM tblFilterItem WHERE fileid = {0}", this.FileID); + string strSQL2 = String.Format("DELETE FROM tblFileItem WHERE fileid = {0}", this.FileID); + sqlDB.Execute(strSQL1); + sqlDB.Execute(strSQL2); + } + catch (SQLiteException ex) + { + Log.Info("programdatabase exception err:{0} stack:{1}", ex.Message, ex.StackTrace); + } + } + } + + + + public bool FindFileInfo(ScraperType ScraperType) + { + int iRetries = 0; + bool bSuccess = false; + switch (ScraperType) + { + case ScraperType.ALLGAME: + { + AllGameScraper scraper = new AllGameScraper(); + // string strTitle = TitleNormalized; + while ((!bSuccess) && (iRetries < 5)) + { + // brute force! Try five times.... sometimes I get + // a ScrapeWebPage false result... don't know why! + bSuccess = scraper.FindGameinfo(Title); + if (!bSuccess) + { + iRetries++; + } + } + fileItemInfoList = scraper.GameList; + fileItemInfoFavourite = null; + } + break; + } + return bSuccess; + } + + public bool FindFileInfoDetail(ApplicationItem curApp, FileItemInfo curInfo, ScraperType scraperType, ScraperSaveType saveType) + { + int iRetries = 0; + bool bSuccess = false; + switch (scraperType) + { + case ScraperType.ALLGAME: + { + AllGameScraper scraper = new AllGameScraper(); + while ((!bSuccess) && (iRetries < 5)) + { + // brute force! Try five times.... sometimes I get + // a ScrapeWebPage false result... don't know why! + bSuccess = scraper.FindGameinfoDetail(curApp, this, curInfo, saveType); + if (!bSuccess) + { + iRetries++; + } + } + } + break; + } + return bSuccess; + } + + public void ToFileInfoFavourite() + { + FileInfoFavourite = new FileItemInfo(); + + FileInfoFavourite.Title = this.Title; + //FileInfoFavourite.GameURL = this.mGameURL; + FileInfoFavourite.MainGenreId = this.MainGenreId; + FileInfoFavourite.SubGenreId = this.SubGenreId; + FileInfoFavourite.ManufacturerId = this.ManufacturerId; + FileInfoFavourite.Year = this.Year.ToString(); + FileInfoFavourite.Overview = this.Overview; + FileInfoFavourite.Rating = this.Rating; + FileInfoFavourite.Platform = this.Platform; + FileInfoFavourite.PlatformId = this.PlatformId; + } + + public void SaveFromFileInfoFavourite() + { + if (this.FileInfoFavourite != null) + { + + + int LexiconId = DatabaseHandler.LexiconDataExists("tblGenre", "genre", FileInfoFavourite.MainGenre); + this.MainGenreId = LexiconId; + + LexiconId = DatabaseHandler.LexiconDataExists("tblGenre", "genre", FileInfoFavourite.SubGenre); + this.SubGenreId = LexiconId; + + LexiconId = DatabaseHandler.LexiconDataExists("tblManufacturer", "manufacturer", FileInfoFavourite.Manufacturer); + this.ManufacturerId = LexiconId; + + LexiconId = DatabaseHandler.LexiconDataExists("tblPlatform", "platform", FileInfoFavourite.Platform); + this.PlatformId = LexiconId; + + // DON'T overwrite title! this.Title = FileInfoFavourite.Title; + + this.MainGenre = FileInfoFavourite.MainGenre; + this.SubGenre = FileInfoFavourite.SubGenre; + this.Platform = FileInfoFavourite.Platform; + + this.Manufacturer = FileInfoFavourite.Manufacturer; + this.Year = ProgramUtils.StringToInteger(FileInfoFavourite.Year, -1); + this.Overview = FileInfoFavourite.Overview; + this.Rating = FileInfoFavourite.Rating; + + this.GameInfoURL = FileInfoFavourite.GameURL; + this.Write(); + } + } + + public string GetNewValidImageFile(ApplicationItem curApp, string strExtension) + { + if (curApp == null) + return ""; + if (curApp.imageDirs == null) + return ""; + if (curApp.imageDirs.Length == 0) + return ""; + if ((this.Imagefile == "") && (this.Filename == "")) + return ""; + + string strFolder = ""; + string strFileName = ""; + string strCand = ""; + int iImgIndex = -1; + bool bFound = false; + bool isWriteable = false; + + + //check that we have read access to any of the imagefolders + int i = 0; + while (!isWriteable && i < curApp.imageDirs.Length) + { + FileStream fs = null; + + try + { + fs = File.Create(curApp.imageDirs[i] + "... [truncated message content] |