From: <nic...@us...> - 2013-11-28 21:50:06
|
Revision: 4689 http://sourceforge.net/p/mp-plugins/code/4689 Author: nicsergio Date: 2013-11-28 21:50:03 +0000 (Thu, 28 Nov 2013) Log Message: ----------- Modified Paths: -------------- trunk/plugins/ShortCuter&SkinEditor/Source/Common/Tools.cs trunk/plugins/ShortCuter&SkinEditor/Source/Common/VersionInfo.resx trunk/plugins/ShortCuter&SkinEditor/Source/MediaPortalPlugins.sln trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/BHEditorForm.Designer.cs trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/BHEditorForm.cs trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/BHEditorForm.resx trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/MediaPortal.cs trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/Menu.cs trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/XtremeMenuEditor.csproj Modified: trunk/plugins/ShortCuter&SkinEditor/Source/Common/Tools.cs =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/Common/Tools.cs 2013-11-26 17:35:50 UTC (rev 4688) +++ trunk/plugins/ShortCuter&SkinEditor/Source/Common/Tools.cs 2013-11-28 21:50:03 UTC (rev 4689) @@ -16,6 +16,7 @@ public static readonly string Name; //Nome progetto public static readonly string Title; //Titolo public static readonly string File; //File binario + public static readonly string Path; //Percorso del file binario public static readonly string Version; //Versione public static readonly string Description; //Descrizione (breve) public static readonly string Author; //Autore @@ -29,6 +30,7 @@ Name = myAssembly.GetName().Name.ToString(); Title = ((AssemblyTitleAttribute)myAssembly.GetCustomAttributes(typeof(AssemblyTitleAttribute), false)[0]).Title; File = System.IO.Path.GetFileName(myAssembly.Location); + Path = System.IO.Path.GetDirectoryName(myAssembly.Location) + @"\"; Version = myAssembly.GetName().Version.ToString(); Description = ((AssemblyDescriptionAttribute)myAssembly.GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false)[0]).Description; Author = ((AssemblyCompanyAttribute)myAssembly.GetCustomAttributes(typeof(AssemblyCompanyAttribute), false)[0]).Company; Modified: trunk/plugins/ShortCuter&SkinEditor/Source/Common/VersionInfo.resx =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/Common/VersionInfo.resx 2013-11-26 17:35:50 UTC (rev 4688) +++ trunk/plugins/ShortCuter&SkinEditor/Source/Common/VersionInfo.resx 2013-11-28 21:50:03 UTC (rev 4689) @@ -117,6 +117,9 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <metadata name="okPictureBox.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="okPictureBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> @@ -167,6 +170,60 @@ AAAAAElFTkSuQmCC </value> </data> + <metadata name="logoPictureBox.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="headerLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="infoGroupBox.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="buildDateLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="authorLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="descriptionLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="titleLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="fileLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="versionLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="versionHeaderLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="buildDateHeaderLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="authorHeaderLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="descriptionHeaderLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="titleHeaderLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="fileHeaderLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="forumLinkLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="wikiLinkLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="internetPictureBox.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> <data name="internetPictureBox.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 @@ -222,4 +279,10 @@ CDnUhkr9VgAAAABJRU5ErkJggg== </value> </data> + <metadata name="commentLabel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> </root> \ No newline at end of file Modified: trunk/plugins/ShortCuter&SkinEditor/Source/MediaPortalPlugins.sln =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/MediaPortalPlugins.sln 2013-11-26 17:35:50 UTC (rev 4688) +++ trunk/plugins/ShortCuter&SkinEditor/Source/MediaPortalPlugins.sln 2013-11-28 21:50:03 UTC (rev 4689) @@ -29,6 +29,7 @@ {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 = 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.Designer.cs =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/BHEditorForm.Designer.cs 2013-11-26 17:35:50 UTC (rev 4688) +++ trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/BHEditorForm.Designer.cs 2013-11-28 21:50:03 UTC (rev 4689) @@ -86,12 +86,12 @@ this.subMenuRowDownButton = new System.Windows.Forms.Button(); this.subMenuRowUpButton = new System.Windows.Forms.Button(); this.subMenuListBox = new System.Windows.Forms.ListBox(); + this.subMenuArrowPictureBox = new System.Windows.Forms.PictureBox(); this.menuGroupBox = new System.Windows.Forms.GroupBox(); this.menuRowRemoveButton = new System.Windows.Forms.Button(); this.menuRowDownButton = new System.Windows.Forms.Button(); this.menuRowUpButton = new System.Windows.Forms.Button(); this.menuListBox = new System.Windows.Forms.ListBox(); - this.subMenuArrowPictureBox = new System.Windows.Forms.PictureBox(); this.backgroundImageTimer = new System.Windows.Forms.Timer(this.components); this.iconOpenFileDialog = new System.Windows.Forms.OpenFileDialog(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); @@ -106,6 +106,8 @@ this.updateNotifyMenuPictureBox = new System.Windows.Forms.PictureBox(); this.updateNotifySubMenuPictureBox = new System.Windows.Forms.PictureBox(); this.arrowsPictureBox = new System.Windows.Forms.PictureBox(); + this.defaultItemLeftPanel = new System.Windows.Forms.Panel(); + this.defaultItemRightPanel = new System.Windows.Forms.Panel(); this.itemsTabControl.SuspendLayout(); this.linksTabPage.SuspendLayout(); this.skinTabPage.SuspendLayout(); @@ -124,8 +126,8 @@ ((System.ComponentModel.ISupportInitialize)(this.multiImageTimeTrackBar)).BeginInit(); this.defaultMenuItemGroupBox.SuspendLayout(); this.subMenuGroupBox.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.subMenuArrowPictureBox)).BeginInit(); this.menuGroupBox.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.subMenuArrowPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.infoPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.propLeftPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.propRightPictureBox)).BeginInit(); @@ -783,8 +785,20 @@ this.subMenuListBox.SelectedIndexChanged += new System.EventHandler(this.subMenuListBox_SelectedIndexChanged); this.subMenuListBox.Enter += new System.EventHandler(this.subMenuListBox_Enter); // + // subMenuArrowPictureBox + // + this.subMenuArrowPictureBox.Image = global::ProcessPlugins.XtremeMenuEditor.Properties.Resources.MiniArrowRight; + this.subMenuArrowPictureBox.Location = new System.Drawing.Point(148, 22); + this.subMenuArrowPictureBox.Name = "subMenuArrowPictureBox"; + this.subMenuArrowPictureBox.Size = new System.Drawing.Size(30, 30); + this.subMenuArrowPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.subMenuArrowPictureBox.TabIndex = 26; + this.subMenuArrowPictureBox.TabStop = false; + // // menuGroupBox // + this.menuGroupBox.Controls.Add(this.defaultItemRightPanel); + this.menuGroupBox.Controls.Add(this.defaultItemLeftPanel); this.menuGroupBox.Controls.Add(this.menuRowRemoveButton); this.menuGroupBox.Controls.Add(this.menuRowDownButton); this.menuGroupBox.Controls.Add(this.menuRowUpButton); @@ -796,6 +810,7 @@ this.menuGroupBox.TabIndex = 21; this.menuGroupBox.TabStop = false; this.menuGroupBox.Text = "Menu"; + this.menuGroupBox.Enter += new System.EventHandler(this.menuGroupBox_Enter); // // menuRowRemoveButton // @@ -845,16 +860,6 @@ this.menuListBox.SelectedIndexChanged += new System.EventHandler(this.menuListBox_SelectedIndexChanged); this.menuListBox.Enter += new System.EventHandler(this.menuListBox_Enter); // - // subMenuArrowPictureBox - // - this.subMenuArrowPictureBox.Image = global::ProcessPlugins.XtremeMenuEditor.Properties.Resources.MiniArrowRight; - this.subMenuArrowPictureBox.Location = new System.Drawing.Point(148, 22); - this.subMenuArrowPictureBox.Name = "subMenuArrowPictureBox"; - this.subMenuArrowPictureBox.Size = new System.Drawing.Size(30, 30); - this.subMenuArrowPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.subMenuArrowPictureBox.TabIndex = 26; - this.subMenuArrowPictureBox.TabStop = false; - // // backgroundImageTimer // this.backgroundImageTimer.Interval = 2500; @@ -963,7 +968,7 @@ this.updateNotifyMenuPictureBox.Image = global::ProcessPlugins.XtremeMenuEditor.Properties.Resources.UpdateNotify; this.updateNotifyMenuPictureBox.Location = new System.Drawing.Point(773, 28); this.updateNotifyMenuPictureBox.Name = "updateNotifyMenuPictureBox"; - this.updateNotifyMenuPictureBox.Size = new System.Drawing.Size(40, 70); + this.updateNotifyMenuPictureBox.Size = new System.Drawing.Size(80, 70); this.updateNotifyMenuPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.updateNotifyMenuPictureBox.TabIndex = 30; this.updateNotifyMenuPictureBox.TabStop = false; @@ -974,7 +979,7 @@ this.updateNotifySubMenuPictureBox.Image = global::ProcessPlugins.XtremeMenuEditor.Properties.Resources.UpdateNotify; this.updateNotifySubMenuPictureBox.Location = new System.Drawing.Point(943, 28); this.updateNotifySubMenuPictureBox.Name = "updateNotifySubMenuPictureBox"; - this.updateNotifySubMenuPictureBox.Size = new System.Drawing.Size(40, 70); + this.updateNotifySubMenuPictureBox.Size = new System.Drawing.Size(80, 70); this.updateNotifySubMenuPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; this.updateNotifySubMenuPictureBox.TabIndex = 31; this.updateNotifySubMenuPictureBox.TabStop = false; @@ -991,6 +996,28 @@ this.arrowsPictureBox.TabIndex = 26; this.arrowsPictureBox.TabStop = false; // + // defaultItemLeftPanel + // + this.defaultItemLeftPanel.BackColor = System.Drawing.Color.DarkTurquoise; + this.defaultItemLeftPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.defaultItemLeftPanel.ForeColor = System.Drawing.Color.Black; + this.defaultItemLeftPanel.Location = new System.Drawing.Point(2, 25); + this.defaultItemLeftPanel.Name = "defaultItemLeftPanel"; + this.defaultItemLeftPanel.Size = new System.Drawing.Size(4, 17); + this.defaultItemLeftPanel.TabIndex = 22; + this.defaultItemLeftPanel.Visible = false; + // + // defaultItemRightPanel + // + this.defaultItemRightPanel.BackColor = System.Drawing.Color.DarkTurquoise; + this.defaultItemRightPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.defaultItemRightPanel.ForeColor = System.Drawing.Color.Black; + this.defaultItemRightPanel.Location = new System.Drawing.Point(144, 25); + this.defaultItemRightPanel.Name = "defaultItemRightPanel"; + this.defaultItemRightPanel.Size = new System.Drawing.Size(4, 17); + this.defaultItemRightPanel.TabIndex = 23; + this.defaultItemRightPanel.Visible = false; + // // BHEditorForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1044,9 +1071,9 @@ this.defaultMenuItemGroupBox.ResumeLayout(false); this.subMenuGroupBox.ResumeLayout(false); this.subMenuGroupBox.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.subMenuArrowPictureBox)).EndInit(); this.menuGroupBox.ResumeLayout(false); this.menuGroupBox.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.subMenuArrowPictureBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.infoPictureBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.propLeftPictureBox)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.propRightPictureBox)).EndInit(); @@ -1136,6 +1163,8 @@ private System.Windows.Forms.PictureBox updateNotifyMenuPictureBox; private System.Windows.Forms.PictureBox updateNotifySubMenuPictureBox; private System.Windows.Forms.Timer updateNotifyTimer; + private System.Windows.Forms.Panel defaultItemLeftPanel; + private System.Windows.Forms.Panel defaultItemRightPanel; } } Modified: trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/BHEditorForm.cs =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/BHEditorForm.cs 2013-11-26 17:35:50 UTC (rev 4688) +++ trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/BHEditorForm.cs 2013-11-28 21:50:03 UTC (rev 4689) @@ -7,6 +7,7 @@ using MediaPortal.Configuration; using MediaPortal.GUI.Library; using My.Common; +using System.Xml; namespace ProcessPlugins.XtremeMenuEditor @@ -755,6 +756,16 @@ #region Eventi Modifica Impostazioni Generali Menu private void defaultMenuItemComboBox_SelectedIndexChanged(object sender, EventArgs e) { + if (defaultMenuItemComboBox.SelectedIndex >= 0) + { + defaultItemLeftPanel.Top = 25 + defaultMenuItemComboBox.SelectedIndex * menuListBox.ItemHeight; + defaultItemLeftPanel.Visible = true; + } + else + defaultItemLeftPanel.Visible = false; + defaultItemRightPanel.Top = defaultItemLeftPanel.Top; + defaultItemRightPanel.Visible = defaultItemLeftPanel.Visible; + unsavedChanges = true; } private void showRssCheckBox_CheckedChanged(object sender, EventArgs e) @@ -928,5 +939,10 @@ return false; } #endregion + + private void menuGroupBox_Enter(object sender, EventArgs e) + { + + } } } Modified: trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/BHEditorForm.resx =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/BHEditorForm.resx 2013-11-26 17:35:50 UTC (rev 4688) +++ trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/BHEditorForm.resx 2013-11-28 21:50:03 UTC (rev 4689) @@ -288,6 +288,12 @@ <metadata name="menuGroupBox.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> + <metadata name="defaultItemRightPanel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="defaultItemLeftPanel.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> <metadata name="menuRowRemoveButton.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> @@ -336,6 +342,12 @@ <metadata name="subMenuRowEditButton.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> + <metadata name="updateNotifyMenuPictureBox.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="updateNotifySubMenuPictureBox.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> <metadata name="arrowsPictureBox.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <value>True</value> </metadata> Modified: trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/MediaPortal.cs =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/MediaPortal.cs 2013-11-26 17:35:50 UTC (rev 4688) +++ trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/MediaPortal.cs 2013-11-28 21:50:03 UTC (rev 4689) @@ -44,8 +44,16 @@ #endregion #region Costruttore - public Skin(string skinName, string skinsPath, string cachesPath) : base(skinName, skinsPath, cachesPath, true) + public Skin(string skinName, string skinsPath, string cachesPath) : this(skinName, skinsPath, cachesPath, null) { } + public Skin(string skinName, string skinsPath, string cachesPath, string forceMedia) : base(skinName, skinsPath, cachesPath, true) { //Costruttore sotto-classe Skin + if (forceMedia != null) //Caso di forzatura percorso file multimediali skin + { + _paths.Media = _paths.Skin + forceMedia; //--> modifica percorso file multimediali skin + _paths.Animations = _paths.Media + @"Animations\"; //--> modifica percorso per animazioni (multi-image) skin + _paths.Icons = _paths.Media + @"Icons\"; //--> modifica eventuale percorso icone di menu della skin + } + _initialized = _initialized && GetSkinBackgroundImages(false) && GetSkinMultiImageFolders() && GetSkinIcons() @@ -232,7 +240,11 @@ { 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 + string skinMod = skinName, mediaMod = null; + if (GetUserConfig(ref skinMod, ref mediaMod)) //Se presente il file di configurazione utente per l'assembly + SelectedSkin = new Skin(skinMod, _paths.Skins, _paths.Caches, mediaMod); //--> istanziazione classe skin (con eventuale personalizzazione parametri) + else + SelectedSkin = new Skin(skinName, _paths.Skins, _paths.Caches); //--> istanziazione classe skin (standard) _initialized = SelectedSkin.Initialized; //--> classe inizializzata } } @@ -389,6 +401,40 @@ incompletePath += @"\"; return incompletePath; } + private bool GetUserConfig(ref string skinName, ref string mediaFolder) //Procedura di lettura eventuale configurazione utente per l'assembly + { + string configFile = _paths.Config + Tools.MyAssembly.Name + ".Config.xml"; + + if (!File.Exists(configFile)) //Verifica presenza del file di configurazione + return false; + + FileStream fsConfigFile = null; + XmlDocument xmlConfigFile = new XmlDocument(); + try + { + fsConfigFile = new FileStream(configFile, FileMode.Open, FileAccess.Read); + xmlConfigFile.Load(fsConfigFile); //Lettura file xml di configurazione assembly + fsConfigFile.Close(); //--> chiusura file + + XmlNode configNode = xmlConfigFile.DocumentElement.SelectSingleNode("/Config"); + XmlNode innerNode = configNode.SelectSingleNode("SkinName"); + if (innerNode != null) + skinName = innerNode.InnerText; //--> personalizzazione nome skin + innerNode = configNode.SelectSingleNode("MediaFolder"); + if (innerNode != null) + mediaFolder = innerNode.InnerText; //--> personalizzazione percorso file multimediali skin + return true; //--> file di configurazione letto correttamente + } + catch + { + return false; //--> errore nella lettura del file di configurazione + } + finally + { + if (fsConfigFile != null) + fsConfigFile.Close(); //--> eventuale chiusura oggetto FileStream + } + } #endregion #region Metodi Pubblici Modified: trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/Menu.cs =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/Menu.cs 2013-11-26 17:35:50 UTC (rev 4688) +++ trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/Menu.cs 2013-11-28 21:50:03 UTC (rev 4689) @@ -318,18 +318,18 @@ mltImg.Close(); //--> chiusura file XmlNodeList controlsList = xmlMltImg.DocumentElement.SelectNodes("/window/controls/control"); - if (controlsList.Count != ItemsMaxNum) - { - Tools.ErrorMessage("Skin multi-image file not valid!", file); - return false; //--> file di definizione controlli multi-image skin non valido - } /* Problema nello skin engine: non si riesce a specificare l'elemento di default in maniera parametrica: viene quindi fissato il primo e si shiftano tutti gli elementi fino a portare al primo posto quello selezionato */ - for (int i = 0; i < controlsList.Count; i++) //Iterazione di modifica path controlli multi-image + int i = 0; + foreach (XmlNode control in controlsList) //Iterazione di modifica proprietà controlli multi-image { - controlsList[i].SelectSingleNode("imagepath").InnerText = ((i < _items.Count) ? _items[(i + _general.DefaultItemIndex) % _items.Count].BackgroundFolder : ""); - controlsList[i].SelectSingleNode("timeperimage").InnerText = _general.MultiImageTime.ToString(); + if (control.SelectSingleNode("type").InnerText.ToLower() == "multiimage" && i < ItemsMaxNum) + { + control.SelectSingleNode("imagepath").InnerText = ((i < _items.Count) ? _items[(i + _general.DefaultItemIndex) % _items.Count].BackgroundFolder : ""); + control.SelectSingleNode("timeperimage").InnerText = _general.MultiImageTime.ToString(); + i++; + } } mltImg = new FileStream(file, FileMode.Truncate, FileAccess.Write, FileShare.ReadWrite); Modified: trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/XtremeMenuEditor.csproj =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/XtremeMenuEditor.csproj 2013-11-26 17:35:50 UTC (rev 4688) +++ trunk/plugins/ShortCuter&SkinEditor/Source/XtremeMenuEditor/XtremeMenuEditor.csproj 2013-11-28 21:50:03 UTC (rev 4689) @@ -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> @@ -67,6 +67,8 @@ </Reference> <Reference Include="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <Reference Include="Microsoft.ReportViewer.WinForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> + <Reference Include="Microsoft.VisualBasic" /> + <Reference Include="Microsoft.VisualBasic.PowerPacks.Vs, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Core" /> <Reference Include="System.Web.Services" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |