From: <nic...@us...> - 2014-06-09 06:53:36
|
Revision: 4831 http://sourceforge.net/p/mp-plugins/code/4831 Author: nicsergio Date: 2014-06-09 06:53:28 +0000 (Mon, 09 Jun 2014) Log Message: ----------- Modified Paths: -------------- trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Plugin/NavigatorDialog.cs trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Resources/Images/SkinNavigator.png trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuter.csproj Removed Paths: ------------- trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Resources/Images/SkinNavAnimLogo/ Modified: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Plugin/NavigatorDialog.cs =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Plugin/NavigatorDialog.cs 2014-06-08 19:28:49 UTC (rev 4830) +++ trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Plugin/NavigatorDialog.cs 2014-06-09 06:53:28 UTC (rev 4831) @@ -13,32 +13,18 @@ #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 animationTimer; //Timer per animazione logo Skin Navigator - private int animationCycle; //Id ciclo per animazione logo Skin Navigator - bool dir; - Image[] animationImages = new Image[9]; - #endregion #region Controlli Grafici - [SkinControl(20)] - protected GUIImage animationLogo; //Immagine logo animato Skin Navigator + [SkinControl(10)] + protected GUIImage logo; //Immagine logo Skin Navigator #endregion #region Metodi Pubblici public override bool Init() //Override metodo Init { - for (int i = 0; i < animationImages.Length; i++) //Iterazione di ricerca impostazioni di tipo stringa - { - animationImages[i]=Image.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream("ShortCuter.Resources.Images.SkinNavAnimLogo.Frame" + i.ToString() + ".png")); - } return Load(GUIGraphicsContext.GetThemedSkinFile(@"\" + DialogSkinFile)); //--> inizializzazione solo se presente il file della skin per personalizzare la finestra di dialogo } - public override void DeInit() - { - animationImages.DisposeAndClear(); - base.DeInit(); - } public override string GetModuleName() //Override metodo GetModuleName { return Tools.MyAssembly.Title; //--> ritorno del titolo dell'assembly @@ -50,63 +36,19 @@ try { - animationLogo.MemoryImage = Image.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream("ShortCuter.Resources.Images.SkinNavAnimLogo.AnimLogo.gif")); - animationLogo.SetFileName("[ShortCuter:NavigatorLogo]"); //--> impostazione immagine logo Skin Navigator - - /*animationTimer = new Timer(500); //--> creazione timer animazione logo - animationTimer.Elapsed += new ElapsedEventHandler(animationTimer_Elapsed); //--> sottoscrizione evento Elapsed - animationTimer.Enabled = true; //--> abilitazione timer*/ + logo.MemoryImage = Image.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream("ShortCuter.Resources.Images.SkinNavigator.png")); + logo.SetFileName("[ShortCuter:NavigatorLogo]"); //--> impostazione immagine logo Skin Navigator } catch { } } - protected override void OnPageDestroy(int new_windowId) //Override metodo OnPageDestroy - { - if (animationTimer != 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(); + logo.SafeDispose(); base.Dispose(); } #endregion #region Consumazione Eventi - private void animationTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) - { - animationTimer.Stop(); - - int imageID = animationCycle % 2; - - - //animationTimer.Interval = 500; // 50 + (dir ? animationCycle : 36 - animationCycle) * 5; - - //animationLogo.MemoryImage = animationImages[imageID]; //.FromStream(Assembly.GetExecutingAssembly().GetManifestResourceStream("ShortCuter.Resources.Images.SkinNavAnimLogo.Frame" + imageID + ".png")); - //animationLogo.SetFileName("[ShortCuter:NavigatorLogo" + imageID + "]"); - //animationLogo.DoUpdate(); - //animationLogo.UpdateLayout(); - - /*if (animationCycle >= 36) - dir = false; - if (animationCycle <= 0) - dir = true; - - - if (dir) - animationCycle++; - else - animationCycle--; - */ - - animationCycle++; - animationTimer.Start(); - } #endregion #region Proprietà Modified: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/Resources/Images/SkinNavigator.png =================================================================== (Binary files differ) Modified: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuter.csproj =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuter.csproj 2014-06-08 19:28:49 UTC (rev 4830) +++ trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuter.csproj 2014-06-09 06:53:28 UTC (rev 4831) @@ -180,6 +180,7 @@ <Generator>SettingsSingleFileGenerator</Generator> <LastGenOutput>Settings.Designer.cs</LastGenOutput> </None> + <None Include="Resources\Images\SkinNavAnim.pspimage" /> </ItemGroup> <ItemGroup> <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> @@ -200,16 +201,6 @@ </ItemGroup> <ItemGroup> <Content Include="ExternalResources\Dialogs.dll" /> - <EmbeddedResource Include="Resources\Images\SkinNavAnimLogo\AnimLogo.gif" /> - <EmbeddedResource Include="Resources\Images\SkinNavAnimLogo\Frame0.png" /> - <EmbeddedResource Include="Resources\Images\SkinNavAnimLogo\Frame1.png" /> - <EmbeddedResource Include="Resources\Images\SkinNavAnimLogo\Frame2.png" /> - <EmbeddedResource Include="Resources\Images\SkinNavAnimLogo\Frame3.png" /> - <EmbeddedResource Include="Resources\Images\SkinNavAnimLogo\Frame4.png" /> - <EmbeddedResource Include="Resources\Images\SkinNavAnimLogo\Frame5.png" /> - <EmbeddedResource Include="Resources\Images\SkinNavAnimLogo\Frame6.png" /> - <EmbeddedResource Include="Resources\Images\SkinNavAnimLogo\Frame7.png" /> - <EmbeddedResource Include="Resources\Images\SkinNavAnimLogo\Frame8.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. |