|
From: <nic...@us...> - 2014-03-27 16:17:29
|
Revision: 4776
http://sourceforge.net/p/mp-plugins/code/4776
Author: nicsergio
Date: 2014-03-27 16:17:25 +0000 (Thu, 27 Mar 2014)
Log Message:
-----------
Modified Paths:
--------------
trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuts.cs
Modified: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuts.cs
===================================================================
--- trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuts.cs 2014-03-23 17:55:25 UTC (rev 4775)
+++ trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuts.cs 2014-03-27 16:17:25 UTC (rev 4776)
@@ -11,8 +11,47 @@
namespace ProcessPlugins.ShortCuter
{
- public class ShortCut : INotifyPropertyChanged //Classe shortcut (scorciatoia da tastiera) con notifica variazione proprietà
+ private struct Destination
{
+ public int _windowID; //Id finestra per visualizzazione in MediaPortal
+ public string _loadParameter; //Eventuali parametri di caricamento per visualizzazione (sotto-categorie, ecc.)
+ public override string ToString()
+ {
+ return "WindowID=" + _windowID.ToString() + ((_loadParameter.Length > 0) ? " LoadParameter=[" + _loadParameter + "]" : "");
+ }
+ }
+
+ private struct KeyCombination
+ {
+ public string _key; //Tasto (stringa corrispondente a KeyCode)
+ public bool _ctrl; //Utilizzo del modificatore "Ctrl" - combinazione di tasti
+ public bool _alt; //Utilizzo del modificatore "Alt" - combinazione di tasti
+ public bool _shift; //Utilizzo del modificatore "Shift" - combinazione di tasti
+ public override string ToString()
+ {
+ return "Key=" + ((_ctrl) ? "<CTRL>" : "")
+ + ((_alt) ? "<ALT>" : "")
+ + ((_shift) ? "<SHIFT>" : "")
+ + "<" + _key + ">";
+ }
+ }
+
+ internal class SimpleShortCut
+ {
+ protected string _caption; //Titolo
+ protected Destination _destination;
+
+ public override string ToString()
+ {
+ return "ShortCut " + _caption + " --> " + _destination.ToString();
+ }
+
+ }
+
+
+
+ public class ShortCut : INotifyPropertyChanged //Classe shortcut (scorciatoia da tastiera) con notifica variazione proprietà
+ {
#region Dati
private string _caption; //Titolo
private string _key; //Tasto (stringa corrispondente a KeyCode)
@@ -23,7 +62,7 @@
private string _loadParameter; //Eventuali parametri di caricamento per visualizzazione (sotto-categorie, ecc.)
private bool _return; //Ritorno a finestra precedente se si è già a destinazione
private string _soundEffect; //File relativo all'eventuale effetto sonoro
-
+ private Destination _destination;
public static readonly List<Keys> ModifierKeys = new List<Keys>(); //Lista dei tasti modificatori
#endregion
@@ -117,12 +156,15 @@
public bool Ctrl { get { return this._ctrl; } set { this._ctrl = value; this.NotifyPropertyChanged("Ctrl"); } }
public bool Alt { get { return this._alt; } set { this._alt = value; this.NotifyPropertyChanged("Alt"); } }
public bool Shift { get { return this._shift; } set { this._shift = value; this.NotifyPropertyChanged("Shift"); } }
- public int WindowID { get { return this._windowID; } set { this._windowID = value; this.NotifyPropertyChanged("WindowID"); } }
+ public int WindowID { get { return this._destination._windowID; } set { this._destination._windowID = value; this.NotifyPropertyChanged("WindowID"); } }
public string LoadParameter { get { return this._loadParameter; } set { this._loadParameter = value; this.NotifyPropertyChanged("LoadParameter"); } }
public bool Return { get { return this._return; } set { this._return = value; this.NotifyPropertyChanged("Return"); } }
public string SoundEffect { get { return this._soundEffect; } set { this._soundEffect = value; this.NotifyPropertyChanged("SoundEffect"); } }
#endregion
}
+
+
+
internal class ShortCuts //Classe di gestione degli shortcuts configurati
{
#region Dati
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|