|
From: <nic...@us...> - 2013-11-07 16:35:17
|
Revision: 4670
http://sourceforge.net/p/mp-plugins/code/4670
Author: nicsergio
Date: 2013-11-07 16:35:13 +0000 (Thu, 07 Nov 2013)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ShortCuter&SkinEditor/Source/Common/Resources/XmlFiles/PopularSkinLinks.xml
trunk/plugins/ShortCuter&SkinEditor/Source/MediaPortalPlugins.sln
trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/BHEditorForm.cs
trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/MediaPortal.cs
trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/Properties/AssemblyInfo.cs
trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/XtremeMenuEditor.csproj
Removed Paths:
-------------
trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/Resources/XmlFiles/OverlayList.xml
Modified: trunk/plugins/ShortCuter&SkinEditor/Source/Common/Resources/XmlFiles/PopularSkinLinks.xml
===================================================================
--- trunk/plugins/ShortCuter&SkinEditor/Source/Common/Resources/XmlFiles/PopularSkinLinks.xml 2013-11-01 10:36:40 UTC (rev 4669)
+++ trunk/plugins/ShortCuter&SkinEditor/Source/Common/Resources/XmlFiles/PopularSkinLinks.xml 2013-11-07 16:35:13 UTC (rev 4670)
@@ -9,6 +9,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>BasicHome.png</IconList>
<SubItems>
@@ -22,6 +23,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Home.png</IconList>
</SubItem>
@@ -38,6 +40,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>TV</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>TV.png</IconList>
<SubItems>
@@ -51,6 +54,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>TVSeries</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>TvSeries.png</IconList>
</SubItem>
@@ -64,6 +68,7 @@
<BackgroundImage>hover_my tv.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>TvRecs.png</IconList>
</SubItem>
@@ -77,6 +82,7 @@
<BackgroundImage>hover_my tv.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>TvGuide.png</IconList>
</SubItem>
@@ -90,6 +96,7 @@
<BackgroundImage>hover_my tv.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Teletext.png</IconList>
</SubItem>
@@ -103,6 +110,7 @@
<BackgroundImage>hover_my tv.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Fullscreen.png</IconList>
</SubItem>
@@ -116,6 +124,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>settings</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Settings.png</IconList>
</SubItem>
@@ -132,6 +141,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>movies</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Movies.png</IconList>
<SubItems>
@@ -145,6 +155,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>Film</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>MovingPictures.png</IconList>
</SubItem>
@@ -158,6 +169,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>movies</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>MyFilms.png</IconList>
</SubItem>
@@ -171,6 +183,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>Trailers</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Trailers.png</IconList>
</SubItem>
@@ -184,6 +197,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>Trailers</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Trailers.png</IconList>
</SubItem>
@@ -197,6 +211,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler>#fanarthandler.movie.scraper</FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Movies.png</IconList>
</SubItem>
@@ -210,6 +225,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler>#fanarthandler.movie.userdef</FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>DVD.png</IconList>
</SubItem>
@@ -223,6 +239,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler>#fanarthandler.movie.userdef</FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>BD.png</IconList>
</SubItem>
@@ -236,6 +253,7 @@
<BackgroundImage>Film</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>ShowTimes.png</IconList>
</SubItem>
@@ -249,6 +267,7 @@
<BackgroundImage>hover_trakt.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Trakt.png</IconList>
</SubItem>
@@ -262,6 +281,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>movies</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Fullscreen.png</IconList>
</SubItem>
@@ -275,6 +295,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>settings</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Settings.png</IconList>
</SubItem>
@@ -291,6 +312,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>music</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Music.png</IconList>
<SubItems>
@@ -304,6 +326,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler>#fanarthandler.music.userdef</FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>MusicPlaylists.png</IconList>
</SubItem>
@@ -317,6 +340,7 @@
<BackgroundImage>hover_my music.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>MusicPlaying.png</IconList>
</SubItem>
@@ -330,6 +354,7 @@
<BackgroundImage>hover_my lyrics.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>MyLyrics.png</IconList>
</SubItem>
@@ -343,6 +368,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler>#fanarthandler.music.scraper</FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Music.png</IconList>
</SubItem>
@@ -356,6 +382,7 @@
<BackgroundImage>hover_my radio.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Radio.png</IconList>
</SubItem>
@@ -369,6 +396,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler>#fanarthandler.music.userdef</FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>LastFM.png</IconList>
</SubItem>
@@ -382,6 +410,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>music</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>mvCentral.png</IconList>
</SubItem>
@@ -395,6 +424,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>settings</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Settings.png</IconList>
</SubItem>
@@ -411,6 +441,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>pictures</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Pictures.png</IconList>
<SubItems>
@@ -424,6 +455,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>settings</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Settings.png</IconList>
</SubItem>
@@ -440,7 +472,8 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>weatherbg</BackgroundFolder>
<FanartHandler></FanartHandler>
- <Overlay>weather</Overlay>
+ <Icon></Icon>
+ <Overlay>WeatherPanelBig</Overlay>
<IconList>Weather.png</IconList>
<SubItems>
@@ -453,7 +486,8 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>weatherbg</BackgroundFolder>
<FanartHandler></FanartHandler>
- <Overlay>weather</Overlay>
+ <Icon></Icon>
+ <Overlay>WeatherPanelBig</Overlay>
<IconList>Weather.png</IconList>
</SubItem>
@@ -469,6 +503,7 @@
<BackgroundImage>hover_webbrowser.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Internet.png</IconList>
<SubItems>
@@ -482,6 +517,7 @@
<BackgroundImage>hover_OnlineVideos.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>OnlineVideos.png</IconList>
</SubItem>
@@ -495,6 +531,7 @@
<BackgroundImage>hover_OnlineVideos.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>YouTube.png</IconList>
</SubItem>
@@ -508,6 +545,7 @@
<BackgroundImage>hover_wikipedia.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Wikipedia.png</IconList>
</SubItem>
@@ -521,6 +559,7 @@
<BackgroundImage>hover_InfoService.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>News.png</IconList>
</SubItem>
@@ -534,6 +573,7 @@
<BackgroundImage>hover_InfoService.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Twitter.png</IconList>
</SubItem>
@@ -550,6 +590,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>plugins</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Plugins.png</IconList>
<SubItems>
@@ -563,6 +604,7 @@
<BackgroundImage>hover_htpcinfo.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>HtpcInfo.png</IconList>
</SubItem>
@@ -576,6 +618,7 @@
<BackgroundImage>hover_tetris.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Games.png</IconList>
</SubItem>
@@ -589,6 +632,7 @@
<BackgroundImage>hover_File Explorer.png</BackgroundImage>
<BackgroundFolder></BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>FileExplorer.png</IconList>
</SubItem>
@@ -602,6 +646,7 @@
<BackgroundImage></BackgroundImage>
<BackgroundFolder>settings</BackgroundFolder>
<FanartHandler></FanartHandler>
+ <Icon></Icon>
<Overlay></Overlay>
<IconList>Settings.png</IconList>
</SubItem>
Modified: trunk/plugins/ShortCuter&SkinEditor/Source/MediaPortalPlugins.sln
===================================================================
--- trunk/plugins/ShortCuter&SkinEditor/Source/MediaPortalPlugins.sln 2013-11-01 10:36:40 UTC (rev 4669)
+++ trunk/plugins/ShortCuter&SkinEditor/Source/MediaPortalPlugins.sln 2013-11-07 16:35:13 UTC (rev 4670)
@@ -28,7 +28,8 @@
{350D17A6-0F6B-43C4-898F-33CC68EBCD75}.Debug|x86.ActiveCfg = Debug|x86
{350D17A6-0F6B-43C4-898F-33CC68EBCD75}.Debug|x86.Build.0 = Debug|x86
{350D17A6-0F6B-43C4-898F-33CC68EBCD75}.Release|Any CPU.ActiveCfg = Release|x86
- {350D17A6-0F6B-43C4-898F-33CC68EBCD75}.Release|Mixed Platforms.ActiveCfg = Debug|x86
+ {350D17A6-0F6B-43C4-898F-33CC68EBCD75}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {350D17A6-0F6B-43C4-898F-33CC68EBCD75}.Release|Mixed Platforms.Build.0 = Release|x86
{350D17A6-0F6B-43C4-898F-33CC68EBCD75}.Release|x86.ActiveCfg = Release|x86
{350D17A6-0F6B-43C4-898F-33CC68EBCD75}.Release|x86.Build.0 = Release|x86
{4D76B200-01C9-48C6-BA04-DAF0845D56B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@@ -47,7 +48,6 @@
{20CEBE32-A39E-4A61-B2BD-90BF16E2AEE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20CEBE32-A39E-4A61-B2BD-90BF16E2AEE8}.Release|Any CPU.Build.0 = Release|Any CPU
{20CEBE32-A39E-4A61-B2BD-90BF16E2AEE8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {20CEBE32-A39E-4A61-B2BD-90BF16E2AEE8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{20CEBE32-A39E-4A61-B2BD-90BF16E2AEE8}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
Modified: trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/BHEditorForm.cs
===================================================================
--- trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/BHEditorForm.cs 2013-11-01 10:36:40 UTC (rev 4669)
+++ trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/BHEditorForm.cs 2013-11-07 16:35:13 UTC (rev 4670)
@@ -43,7 +43,7 @@
singleImageComboBox.DataSource = myMediaPortal.SelectedSkin.SkinBgImages;
multiImageComboBox.DataSource = myMediaPortal.SelectedSkin.SkinBgFolders;
fanartComboBox.DataSource = myMediaPortal.FanartTypes;
- overlayComboBox.DataSource = myMediaPortal.OverlayTypes;
+ overlayComboBox.DataSource = myMediaPortal.SelectedSkin.SkinOverlays;
menuListBox.DataSource = myMenu.Items;
menuListBox.SelectedIndex = 0;
ModifyMenuListButtonsEnable();
@@ -138,7 +138,7 @@
}
}
overlayGroupBox.Enabled = true;
- overlayComboBox.SelectedIndex = overlayComboBox.FindStringExact(myMediaPortal.GetOverlayDescription(myMediaPortal.SelectedSkin.SkinLinks[selectedIndex].Overlay));
+ overlayComboBox.SelectedIndex = overlayComboBox.FindStringExact(myMediaPortal.SelectedSkin.GetOverlayDescription(myMediaPortal.SelectedSkin.SkinLinks[selectedIndex].Overlay));
propLeftPictureBox.Visible = true;
propRightPictureBox.Visible = false;
menuRowAddButton.Visible = true;
@@ -178,7 +178,7 @@
}
}
overlayGroupBox.Enabled = true;
- overlayComboBox.SelectedIndex = overlayComboBox.FindStringExact(myMediaPortal.GetOverlayDescription(myMenu.Items[selectedIndex].Overlay));
+ overlayComboBox.SelectedIndex = overlayComboBox.FindStringExact(myMediaPortal.SelectedSkin.GetOverlayDescription(myMenu.Items[selectedIndex].Overlay));
propLeftPictureBox.Visible = false;
propRightPictureBox.Visible = true;
menuRowAddButton.Visible = false;
@@ -377,7 +377,7 @@
else
if (fanartRadioButton.Checked)
mItem.FanartHandler = myMediaPortal.GetFanartValue(fanartComboBox.Text);
- mItem.Overlay = myMediaPortal.GetOverlayValue(overlayComboBox.Text);
+ mItem.Overlay = myMediaPortal.SelectedSkin.GetOverlayValue(overlayComboBox.Text);
if (edit) //Caso di editazione: rimozione ed re-inserimento elemento
{
int index = menuListBox.SelectedIndex;
Modified: trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/MediaPortal.cs
===================================================================
--- trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/MediaPortal.cs 2013-11-01 10:36:40 UTC (rev 4669)
+++ trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/MediaPortal.cs 2013-11-07 16:35:13 UTC (rev 4670)
@@ -21,12 +21,6 @@
public string Thumbs; //Percorso generico thumbnails
public string Caches; //Percorso cache delle skin
}
- public struct OptEnum //Struttura dati enumerativi per opzioni
- {
- public string Value; //Valore enumerativo
- public string Description; //Descrizione enumerativo
- public override string ToString() { return Description; } //Override metodo ToString per riempire classi ListControl
- }
public struct FanartType //Struttura dato tipologia di Fanart
{
public string SettingValue; //Valore per impostazioni
@@ -37,15 +31,23 @@
public class Skin : MediaPortalSkin //Sotto-classe Skin (classe derivata da MediaPortalSkin)
{
#region Dati
- private List<string> _skinBgImages = new List<string>(); //Lista immagini di background della skin (sotto \media)
- private List<string> _skinBgFolders = new List<string>(); //Lista cartelle per animazioni della skin (sotto \media\animations)
+ public struct Overlay //Struttura elementi di overlay per BasicHome
+ {
+ public string Value; //Valore proprietà
+ public string Description; //Descrizione overlay
+ public override string ToString() { return Description; } //Override metodo ToString per riempire classi ListControl
+ }
+ private List<string> _skinBgImages = new List<string>(); //Lista immagini di background della skin (sotto \media)
+ private List<string> _skinBgFolders = new List<string>(); //Lista cartelle per animazioni della skin (sotto \media\animations)
+ private List<Overlay> _skinOverlays = new List<Overlay>(); //Lista overlay disponibili per BasicHome della skin
#endregion
#region Costruttore
public Skin(string skinName, string skinsPath, string cachesPath) : base(skinName, skinsPath, cachesPath, true, true)
{ //Costruttore sotto-classe Skin
_initialized = _initialized && GetSkinBackgroundImages(false)
- && GetSkinMultiImageFolders(); //--> raccolta immagini di background ed animazioni della skin
+ && GetSkinMultiImageFolders()
+ && GetSkinOverlays(); //--> raccolta immagini di background, animazioni ed overlays della skin
}
#endregion
@@ -114,19 +116,75 @@
return false;
}
}
+ private bool GetSkinOverlays() //Raccolta degli overlay per BasicHome della skin
+ {
+ const string OverlayPrefix = "BasicHome.Overlay."; //Prefisso nomi file identificativi degli overlays per BasicHome
+
+ string[] files = Directory.GetFiles(_paths.Skin); //--> lettura file da disco
+ foreach (string file in files) //Iterazione per applicazione filtro e memorizzazione dati
+ {
+ try
+ {
+ if (file.StartsWith(_paths.Skin + OverlayPrefix) && file.ToLower().EndsWith(".xml"))
+ {
+ XmlDocument xmlFile = new XmlDocument();
+ xmlFile.Load(file);
+ XmlNode node = xmlFile.DocumentElement.SelectSingleNode("/window/comment()");
+ if (node.InnerText.Length > 0)
+ {
+ if (node.InnerText.Contains("OverlayLabel"))
+ {
+ Overlay ovl = new Overlay();
+ ovl.Description = node.InnerText.Remove(0, node.InnerText.IndexOf("\"") + 1).Replace("\"","").Trim();
+ ovl.Value = file.Remove(0, file.IndexOf(OverlayPrefix) + OverlayPrefix.Length).Replace(".xml", "");
+ if (ovl.Description.Length > 0 && ovl.Value.Length > 0)
+ _skinOverlays.Add(ovl); //--> aggiunta overlay nella lista
+ }
+ }
+ }
+ }
+ catch { }
+ }
+ if (_skinOverlays.Count > 0)
+ {
+ Overlay ovl = new Overlay();
+ ovl.Description = "- None - ";
+ ovl.Value = "";
+ _skinOverlays.Insert(0, ovl); //--> inserimento della scelta per "nessun overlay"
+ return true; //--> raccolta overlay effettuata
+ }
+ else
+ {
+ Tools.ErrorMessage("No BasicHome overlay found.", _paths.Skin);
+ return false;
+ }
+ }
#endregion
+ #region Metodi Pubblici
+ public string GetOverlayDescription(string overlayValue) //Ottenimento descrizione corrispondente a valore overlay per BasicHome
+ {
+ Overlay ovl = _skinOverlays.Find(x => x.Value == overlayValue);
+ return ovl.Description;
+ }
+ public string GetOverlayValue(string overlayDescription) //Ottenimento valore corrispondente a descrizione overlay per BasicHome
+ {
+ Overlay ovl = _skinOverlays.Find(x => x.Description == overlayDescription);
+ return ovl.Value;
+ }
+ #endregion
+
#region Proprietà
- public List<string> SkinBgImages { get { return this._skinBgImages; } }
- public List<string> SkinBgFolders { get { return this._skinBgFolders; } }
+ public List<string> SkinBgImages { get { return this._skinBgImages; } }
+ public List<string> SkinBgFolders { get { return this._skinBgFolders; } }
+ public List<Overlay> SkinOverlays { get { return this._skinOverlays; } }
#endregion
}
#endregion
#region Dati
- private static Folders _paths = new Folders(); //Percorsi
- private List<FanartType> _fanartTypes = new List<FanartType>(); //Tipi relativi a Fanart Handler
- private List<OptEnum> _overlayTypes = new List<OptEnum>(); //Tipi di overlay per BasicHome
+ private static Folders _paths = new Folders(); //Percorsi
+ private List<FanartType> _fanartTypes = new List<FanartType>(); //Tipi relativi a Fanart Handler
public Skin SelectedSkin; //Sotto-classe skin
private bool _initialized; //Classe inizializzata
#endregion
@@ -134,7 +192,7 @@
#region Costruttore
public MediaPortal(string skinName) //Costruttore classe MediaPortal
{
- if (GetInstallPath() && GetPaths() && GetFanarts() && GetOverlays()) //--> lettura percorso di installazione, percorsi di configurazione/skin/cache/.. e raccolta enumerativi per Fanart e Overlay
+ if (GetInstallPath() && GetPaths() && GetFanarts()) //--> lettura percorso di installazione, percorsi di configurazione/skin/cache/.. e raccolta elementi di Fanart disponibili
{
SelectedSkin = new Skin(skinName, _paths.Skins, _paths.Caches); //--> istanziazione classe skin
_initialized = SelectedSkin.Initialized; //--> classe inizializzata
@@ -279,41 +337,6 @@
return false;
}
}
- private bool GetOverlays() //Raccolta dei tipi di overlay per BasicHome
- {
- XmlDocument xmlFile = new XmlDocument();
- try
- {
- using (Stream streamFile = Assembly.GetExecutingAssembly().GetManifestResourceStream("ProcessPlugins.XtremeMenuEditor.Resources.XmlFiles.OverlayList.xml"))
- {
- xmlFile.Load(streamFile); //Overlay disponibili --> lettura file xml incapsulato
- }
- }
- catch (Exception e)
- {
- Tools.ErrorMessage("Error loading OverlayList.xml.", e.Message);
- return false;
- }
- XmlNodeList nodeList = xmlFile.DocumentElement.SelectNodes("/Items/Item");
- foreach (XmlNode node in nodeList) //Iterazione per memorizzazione dati
- {
- OptEnum oType = new OptEnum();
- XmlNode innerNode = node.SelectSingleNode("Description");
- if (innerNode != null)
- oType.Description = innerNode.InnerText;
- innerNode = node.SelectSingleNode("Value");
- if (innerNode != null)
- oType.Value = innerNode.InnerText;
- _overlayTypes.Add(oType); //--> aggiunta tipo nella lista
- }
- if (_overlayTypes.Count > 0)
- return true; //--> raccolta effettuata
- else
- {
- Tools.ErrorMessage("No overlay types found loading OverlayList.xml.");
- return false;
- }
- }
private string CompletePath(string incompletePath) //Procedura di completamento percorso
{
string commonAppData = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
@@ -346,16 +369,6 @@
FanartType fType = _fanartTypes.Find(x => x.Description == fanartDescription);
return fType.ImagesPath;
}
- public string GetOverlayDescription(string overlayValue) //Ottenimento descrizione corrispondente a valore di tipo overlay per BasicHome
- {
- OptEnum oType = _overlayTypes.Find(x => x.Value == overlayValue);
- return oType.Description;
- }
- public string GetOverlayValue(string overlayDescription) //Ottenimento valore corrispondente a descrizione di tipo overlay per BasicHome
- {
- OptEnum oType = _overlayTypes.Find(x => x.Description == overlayDescription);
- return oType.Value;
- }
#endregion
#region Proprietà
@@ -365,7 +378,6 @@
public static string ThumbsPath { get { return _paths.Thumbs; } }
public static string CachesPath { get { return _paths.Caches; } }
public List<FanartType> FanartTypes { get { return this._fanartTypes; } }
- public List<OptEnum> OverlayTypes { get { return this._overlayTypes; } }
#endregion
}
}
Modified: trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/Properties/AssemblyInfo.cs
===================================================================
--- trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/Properties/AssemblyInfo.cs 2013-11-01 10:36:40 UTC (rev 4669)
+++ trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/Properties/AssemblyInfo.cs 2013-11-07 16:35:13 UTC (rev 4670)
@@ -33,8 +33,8 @@
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
// utilizzando l'asterisco (*) come descritto di seguito:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.2.0.0")]
-[assembly: AssemblyFileVersion("0.2.0.0")]
+[assembly: AssemblyVersion("0.3.0.0")]
+[assembly: AssemblyFileVersion("0.3.0.0")]
//Importante per la compatibilità con MediaPortal (se usato come PlugIn - dll)
[assembly: CompatibleVersion("1.1.6.27644")]
\ No newline at end of file
Deleted: trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/Resources/XmlFiles/OverlayList.xml
===================================================================
--- trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/Resources/XmlFiles/OverlayList.xml 2013-11-01 10:36:40 UTC (rev 4669)
+++ trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/Resources/XmlFiles/OverlayList.xml 2013-11-07 16:35:13 UTC (rev 4670)
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Items>
- <Item>
- <Description>- None -</Description>
- <Value></Value>
- </Item>
- <Item>
- <Description>Weather</Description>
- <Value>weather</Value>
- </Item>
- <Item>
- <Description>Latest Moving Pictures</Description>
- <Value>#latestMediaHandler.movingpicture.latest</Value>
- </Item>
- <Item>
- <Description>Latest TV Series</Description>
- <Value>#latestMediaHandler.tvseries.latest</Value>
- </Item>
- <Item>
- <Description>Latest MyFilms</Description>
- <Value>#latestMediaHandler.myfilms.latest</Value>
- </Item>
- <Item>
- <Description>Latest MyVideos</Description>
- <Value>#latestMediaHandler.myvideo.latest</Value>
- </Item>
- <Item>
- <Description>Latest Music</Description>
- <Value>#latestMediaHandler.music.latest</Value>
- </Item>
- <Item>
- <Description>Latest Picture</Description>
- <Value>#latestMediaHandler.picture</Value>
- </Item>
- <Item>
- <Description>Latest TV Recordings</Description>
- <Value>#latestMediaHandler.tvrecordings.latest</Value>
- </Item>
- <Item>
- <Description>Active TV Recordings</Description>
- <Value>#latestMediaHandler.tvrecordings.active</Value>
- </Item>
- <Item>
- <Description>Scheduled TV Recordings</Description>
- <Value>#latestMediaHandler.tvrecordings.scheduled1</Value>
- </Item>
- <Item>
- <Description>Latest mvCentral</Description>
- <Value>#latestMediaHandler.mvcentral.latest</Value>
- </Item>
- <Item>
- <Description>HTPC Info</Description>
- <Value>htpcinfo</Value>
- </Item>
-</Items>
\ No newline at end of file
Modified: trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/XtremeMenuEditor.csproj
===================================================================
--- trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/XtremeMenuEditor.csproj 2013-11-01 10:36:40 UTC (rev 4669)
+++ trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/XtremeMenuEditor.csproj 2013-11-07 16:35:13 UTC (rev 4670)
@@ -6,7 +6,7 @@
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{350D17A6-0F6B-43C4-898F-33CC68EBCD75}</ProjectGuid>
- <OutputType>WinExe</OutputType>
+ <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ProcessPlugins.XtremeMenuEditor</RootNamespace>
<AssemblyName>XtremeMenuEditor</AssemblyName>
@@ -293,7 +293,6 @@
<EmbeddedResource Include="Resources\XmlFiles\DefaultMenu.xml">
<SubType>Designer</SubType>
</EmbeddedResource>
- <EmbeddedResource Include="Resources\XmlFiles\OverlayList.xml" />
<EmbeddedResource Include="Resources\XmlFiles\FanartList.xml" />
<EmbeddedResource Include="Resources\Images\Editor.png" />
</ItemGroup>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|