|
From: <nic...@us...> - 2014-06-06 07:29:05
|
Revision: 4824
http://sourceforge.net/p/mp-plugins/code/4824
Author: nicsergio
Date: 2014-06-06 07:28:53 +0000 (Fri, 06 Jun 2014)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Plugin/NavigatorDialog.cs
trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuter.csproj
Removed Paths:
-------------
trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Resources/Images/SkinNavigator0.png
trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Resources/Images/SkinNavigator1.png
trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Resources/Images/SkinNavigator2.png
Modified: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Plugin/NavigatorDialog.cs
===================================================================
--- trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Plugin/NavigatorDialog.cs 2014-06-06 06:48:22 UTC (rev 4823)
+++ trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Plugin/NavigatorDialog.cs 2014-06-06 07:28:53 UTC (rev 4824)
@@ -5,7 +5,6 @@
using MediaPortal.ExtensionMethods;
using MediaPortal.GUI.Library;
using My.Common;
-using System;
namespace ShortCuter.Plugin
{
@@ -14,62 +13,70 @@
#region Dati
public const int DialogWindowID = 2821976; //Id finestra di dialogo personalizzata
public const string DialogSkinFile = "ShortCuter.Navigator.DialogMenu.xml"; //File della skin per personalizzazione finestra di dialogo
- private Timer animationLogo;
- private bool anCyc;
+ private Timer animationTimer; //Timer per animazione logo Skin Navigator
+ private int animationCycle; //Id ciclo per animazione logo Skin Navigator
#endregion
- [SkinControl(20)]
- protected GUIImage tega;
+ #region Controlli Grafici
+ [SkinControl(10)]
+ protected GUIImage animationLogo; //Immagine logo animato Skin Navigator
+ #endregion
#region Metodi Pubblici
public override bool Init() //Override metodo Init
{
- return Load(GUIGraphicsContext.Theme + @"\" + DialogSkinFile); //--> inizializzazione solo se presente il file della skin per personalizzare la finestra di dialogo
+ return Load(GUIGraphicsContext.GetThemedSkinFile(@"\" + DialogSkinFile)); //--> inizializzazione solo se presente il file della skin per personalizzare la finestra di dialogo
}
public override string GetModuleName() //Override metodo GetModuleName
{
return Tools.MyAssembly.Title; //--> ritorno del titolo dell'assembly
}
- public override void Dispose()
+ protected override void OnPageLoad() //Override metodo OnPageLoad
{
- animationLogo.SafeDispose();
- tega.SafeDispose();
- base.Dispose();
- }
- protected override void OnPageLoad()
- {
base.OnPageLoad();
- tega.MemoryImage = Image.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream("ShortCuter.Resources.Images.SkinNavigator.png"));
- tega.SetFileName("[ShortCuter:NavigatorLogo]");
- base.lblHeading2.Label = Tools.MyAssembly.Title;
+ base.lblHeading2.Label = Tools.MyAssembly.Title; //--> forzatura label "Menu"
- animationLogo = new Timer(2000);
- animationLogo.Elapsed += new ElapsedEventHandler(animationLogoElapsed);
- animationLogo.Enabled = true;
-
+ try
+ {
+ animationLogo.MemoryImage = Image.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream("ShortCuter.Resources.Images.SkinNavigator.png"));
+ animationLogo.SetFileName("[ShortCuter:NavigatorLogo]"); //--> impostaziopne immagine logo Skin Navigator
+
+ animationTimer = new Timer(2000); //--> creazione timer animazione logo
+ animationTimer.Elapsed += new ElapsedEventHandler(animationTimer_Elapsed); //--> sottoscrizione evento Elapsed
+ animationTimer.Enabled = true; //--> abilitazione timer
+ }
+ catch { }
}
- protected override void OnPageDestroy(int new_windowId)
+ protected override void OnPageDestroy(int new_windowId) //Override metodo OnPageDestroy
{
- if (animationLogo != null)
+ if (animationTimer != null)
{
- animationLogo.Enabled = false;
- animationLogo.Elapsed -= animationLogoElapsed;
- animationLogo = null;
+ animationTimer.Enabled = false; //--> diabilitazione timer
+ animationTimer.Elapsed -= animationTimer_Elapsed; //--> annullamento sottoscrizione evento Elapsed
+ animationTimer = null; //--> annullamento istanza timer
}
base.OnPageDestroy(new_windowId);
}
+ public override void Dispose() //Override metodo Dispose
+ {
+ animationTimer.SafeDispose();
+ animationLogo.SafeDispose();
+ base.Dispose();
+ }
#endregion
- void animationLogoElapsed(object sender, System.Timers.ElapsedEventArgs e)
+ #region Consumazione Eventi
+ private void animationTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
- animationLogo.Stop();
- animationLogo.Interval = 300;
- tega.MemoryImage = Image.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream("ShortCuter.Resources.Images.SkinNavigator" + Convert.ToInt16(anCyc).ToString() + ".png"));
- tega.SetFileName("[ShortCuter:NavigatorLogo" + Convert.ToInt16(anCyc).ToString() + "]");
- anCyc = !anCyc;
- animationLogo.Start();
+ animationTimer.Stop();
+ animationTimer.Interval = 300;
+ animationLogo.MemoryImage = Image.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream("ShortCuter.Resources.Images.SkinNavAnimLogo.Frame" + animationCycle.ToString() + ".png"));
+ animationLogo.SetFileName("[ShortCuter:NavigatorLogo" + animationCycle.ToString() + "]");
+ animationCycle++;
+ animationTimer.Start();
}
-
+ #endregion
+
#region Proprietà
public override int GetID { get { return DialogWindowID; } }
#endregion
Deleted: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Resources/Images/SkinNavigator0.png
===================================================================
(Binary files differ)
Deleted: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Resources/Images/SkinNavigator1.png
===================================================================
(Binary files differ)
Deleted: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Resources/Images/SkinNavigator2.png
===================================================================
(Binary files differ)
Modified: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuter.csproj
===================================================================
--- trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuter.csproj 2014-06-06 06:48:22 UTC (rev 4823)
+++ trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuter.csproj 2014-06-06 07:28:53 UTC (rev 4824)
@@ -203,8 +203,6 @@
<Content Include="Resources\Images\SkinNavAnimLogo\Frame0.png" />
<Content Include="Resources\Images\SkinNavAnimLogo\Frame1.png" />
<Content Include="Resources\Images\SkinNavAnimLogo\Frame2.png" />
- <EmbeddedResource Include="Resources\Images\SkinNavigator0.png" />
- <EmbeddedResource Include="Resources\Images\SkinNavigator1.png" />
<EmbeddedResource Include="Resources\Images\SkinNavigator.png" />
<Content Include="Resources\Images\SkinNavAdd.png" />
<Content Include="..\Common\Resources\Images\ArrowDown.png">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|