|
From: <nic...@us...> - 2014-05-07 19:58:56
|
Revision: 4798
http://sourceforge.net/p/mp-plugins/code/4798
Author: nicsergio
Date: 2014-05-07 19:58:53 +0000 (Wed, 07 May 2014)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ShortCuter&SkinEditor/Source/Common/VersionInfo.cs
trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuts.cs
Modified: trunk/plugins/ShortCuter&SkinEditor/Source/Common/VersionInfo.cs
===================================================================
--- trunk/plugins/ShortCuter&SkinEditor/Source/Common/VersionInfo.cs 2014-05-06 21:54:35 UTC (rev 4797)
+++ trunk/plugins/ShortCuter&SkinEditor/Source/Common/VersionInfo.cs 2014-05-07 19:58:53 UTC (rev 4798)
@@ -4,7 +4,6 @@
using System.Drawing.Drawing2D;
using System.Windows.Forms;
-
namespace My.Common
{
internal partial class VersionInfo : Form //Form di visualizzazione informazioni sulla versione
Modified: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuts.cs
===================================================================
--- trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuts.cs 2014-05-06 21:54:35 UTC (rev 4797)
+++ trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuts.cs 2014-05-07 19:58:53 UTC (rev 4798)
@@ -498,19 +498,65 @@
else
return false; //--> finestra attuale non corrispondente a destinazione shortcut
}
- private void UpdateLastDestination(ShortCut sc)
+ private bool Navigation()
{
- lastDestination.WindowID = sc.WindowID; //--> memorizzazione id finestra
- lastDestination.LoadParameter = sc.LoadParameter; //--> memorizzazione parametri di caricamento utilizzati
- }
+ if (Log != null)
+ Log(this, new LogEventArgs(LogEventArgs.LogLevels.Info, "Request Skin Navigator dialog menu"));
+ try
+ {
+ int actWindowID = (int)GUIWindowManager.ActiveWindow;
+ GUIDialogMenu dlgMenu = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU);
+ dlgMenu.Reset();
+ dlgMenu.SetHeading("Skin Navigator");
+ dlgMenu.ShowQuickNumbers = false;
- private void UpdateLastDestination(WindowLink lnk)
- {
- lastDestination.WindowID = lnk.WindowID; //--> memorizzazione id finestra
- lastDestination.LoadParameter = lnk.LoadParameter; //--> memorizzazione parametri di caricamento utilizzati
+ List<WindowLink> dlgLinks = new List<WindowLink>();
+ foreach (NavItem item in _navItems) //Iterazione per memorizzazione impostazioni shortcuts
+ {
+ if ((item.Windows.First(x => x.WindowID == actWindowID)) != null || item.Windows.Count == 0)
+ {
+ bool first = true;
+ foreach (WindowLink link in item.Destinations) //Iterazione per memorizzazione impostazioni shortcuts
+ {
+ if (first && dlgLinks.Count > 0)
+ {
+ dlgMenu.Add("---- ----");
+ dlgLinks.Add(null);
+ first = false;
+ }
+ dlgMenu.Add(link.Caption);
+ dlgLinks.Add(link);
+ }
+ }
+ }
+
+ if (dlgLinks.Count > 0)
+ {
+ dlgMenu.DoModal(actWindowID);
+ if (dlgMenu.SelectedLabel >= 0 && dlgMenu.SelectedLabel < dlgLinks.Count)
+ return dlgLinks[dlgMenu.SelectedLabel].Go(Log);
+ else
+ {
+ if (Log != null)
+ Log(this, new LogEventArgs(LogEventArgs.LogLevels.Info, "No links selected from Skin Navigator dialog menu, ID = " + actWindowID));
+ return false;
+ }
+ }
+ else
+ {
+ if (Log != null)
+ Log(this, new LogEventArgs(LogEventArgs.LogLevels.Info, "No links found for Skin Navigator, window ID = " + actWindowID));
+ return false;
+ }
+ }
+ catch (Exception e)
+ {
+ if (Log != null)
+ Log(this, new LogEventArgs(LogEventArgs.LogLevels.Error, "Error opening Skin Navigator dialog menu", e));
+ return false;
+ }
}
-
#endregion
#region Metodi Pubblici
@@ -766,7 +812,10 @@
scList[0].GoPrevious(Log); //--> visualizzazione finestra precedente
else
if (scList[0].Go(Log)) //--> visualizzazione finestra di destinazione shortcut
- lastDestination.Get(scList[0].); //--> memorizzazione destinazione
+ {
+ lastDestination.WindowID = scList[0].WindowID; //--> memorizzazione id finestra
+ lastDestination.LoadParameter = scList[0].LoadParameter; //--> memorizzazione parametri di caricamento utilizzati
+ }
}
else //Shortcut a destinazione multipla (ciclico)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|