From: <nic...@us...> - 2014-05-23 13:47:16
|
Revision: 4814 http://sourceforge.net/p/mp-plugins/code/4814 Author: nicsergio Date: 2014-05-23 13:47:11 +0000 (Fri, 23 May 2014) Log Message: ----------- Removed Paths: ------------- trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/KeyboardHook.cs trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/RawInputHook.cs trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuter.cs trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuterConfig.Designer.cs trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuterConfig.cs trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuterConfig.resx trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuterKeyConfig.Designer.cs trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuterKeyConfig.cs trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuterKeyConfig.resx trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/SkinNavigatorConfig.Designer.cs trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/SkinNavigatorConfig.cs trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/SkinNavigatorConfig.resx trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/SkinWithSounds.cs Deleted: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/KeyboardHook.cs =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/KeyboardHook.cs 2014-05-23 13:36:12 UTC (rev 4813) +++ trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/KeyboardHook.cs 2014-05-23 13:47:11 UTC (rev 4814) @@ -1,123 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Windows.Forms; - -namespace ProcessPlugins.ShortCuter -{ - internal class KeyboardHook //Classe per gestione hook di sistema - { - #region Delegati/Strutture - /// Delegato da richiamare all'intercettazione del messaggio - /// Parametri: - /// code : codice hook - /// wParam: ID evento intercettato - /// lParam: informazioni sull'evento intercettato - public delegate int HookProc(int code, int wParam, ref HookStruct lParam); - - public struct HookStruct //Struttura hook - { - public int vkCode; - public int scanCode; - public int flags; - public int time; - public int dwExtraInfo; - } - #endregion - - #region Dati - #region Costanti - private const int WH_KEYBOARD_LL = 13; //Id evento per hook di tastiera di basso livello - private const int WM_KEYDOWN = 0x100; //Id messaggio KeyDown - private const int WM_KEYUP = 0x101; //Id messaggio KeyUp - private const int WM_SYSKEYDOWN = 0x104; //Id messaggio KeyDown (tasto di sistema) - private const int WM_SYSKEYUP = 0x105; //Id messaggio KeyUp (tasto di sistema) - #endregion - - public List<Keys> HookedKeys = new List<Keys>(); //Eventuale lista dei tasti da monitorare/intercettare - private IntPtr hHook = IntPtr.Zero; //Handle dell'hook - private IntPtr hInstance = IntPtr.Zero; //Handle dell'istanza della libreria esterna - private bool _hooked = false; //Hook attivato - #endregion - - #region Costruttore/Distruttore - public KeyboardHook() - { - hInstance = LoadLibrary("User32"); //--> caricamento libreria esterna e memorizzazione handle - } - ~KeyboardHook() - { - unhook(); //--> eventuale disinstallazione dell'hook di sistema - } - #endregion - - #region Metodi Privati - private int hookProc(int code, int wParam, ref HookStruct lParam) //Metodo richiamato per l'hook di tastiera - { - if (code >= 0) //Se codice hook valorizzato - { - Keys key = (Keys)lParam.vkCode; - if (HookedKeys == null || HookedKeys.Count == 0 || HookedKeys.Contains(key)) //Se il tasto appartiene alla lista dei tasti da intercettare (o lista non utilizzata) - { - KeyEventArgs kea = new KeyEventArgs(key); - if ((wParam == WM_KEYDOWN || wParam == WM_SYSKEYDOWN) && (KeyDown != null)) - { - KeyDown(this, kea); //--> richiamo dell'evento KeyDown - } - else if ((wParam == WM_KEYUP || wParam == WM_SYSKEYUP) && (KeyUp != null)) - { - KeyUp(this, kea); //--> richiamo dell'evento KeyUp - } - if (kea.Handled) //Se l'evento \xE8 stato gestito - return 1; //--> il tasto non viene passato al sistema - } - } - return CallNextHookEx(hHook, code, wParam, ref lParam); - } - #endregion - - #region Metodi Pubblici - public void hook() //Installazione dell'hook di sistema - { - unhook(); //--> eventuale disinstallazione hook - hHook = SetWindowsHookEx(WH_KEYBOARD_LL, hookProc, hInstance, 0); //--> installazione hook - _hooked = true; //--> memorizzazione hook attivo - } - public void unhook() //Disinstallazione dell'hook di sistema - { - if (_hooked) //Se hook attivo - { - UnhookWindowsHookEx(hHook); //--> disinstallazione hook - _hooked = false; //--> memorizzazione hook disattivo - } - } - #endregion - - #region Eventi - public event KeyEventHandler KeyDown; //Evento di pressione di uno dei tasti da monitorare - public event KeyEventHandler KeyUp; //Evento di rilascio di uno dei tasti da monitorare - #endregion - - #region Propriet\xE0 - public bool Hooked { get { return this._hooked; } } - #endregion - - #region Importazione DLL - //Installazione dell'hook, esecuzione dell'evento desiderato [uno dei parametri hInstance o threadId deve essere valorizzato] - [DllImport("user32.dll")] - static extern IntPtr SetWindowsHookEx(int idHook, HookProc callback, IntPtr hInstance, uint threadId); - - //Disinstallazione dell'hook (ritorna true se esecuzione con successo) - [DllImport("user32.dll")] - static extern bool UnhookWindowsHookEx(IntPtr hInstance); - - //Chiamata a hook successivo - [DllImport("user32.dll")] - static extern int CallNextHookEx(IntPtr idHook, int nCode, int wParam, ref HookStruct lParam); - - //Caricamento di una libreria (ritorna l'handle associato) - [DllImport("kernel32.dll")] - static extern IntPtr LoadLibrary(string lpFileName); - #endregion - } -} Deleted: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/RawInputHook.cs =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/RawInputHook.cs 2014-05-23 13:36:12 UTC (rev 4813) +++ trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/RawInputHook.cs 2014-05-23 13:47:11 UTC (rev 4814) @@ -1,178 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Windows.Forms; - -namespace ProcessPlugins.ShortCuter -{ - public class RawInputHook : IMessageFilter //Classe per gestione hook mediante raw input - { - #region Dati - private const int WM_INPUT = 0x00ff; //Id messaggio per RawInput - private List<RAWINPUTDEVICE> devices = new List<RAWINPUTDEVICE>(); //Lista dispositivi di input controllati - private bool _backgroundInput; //Consenti ricezione eventi anche con finestra in background - #endregion - - #region Costruttore - public RawInputHook(IntPtr windowHandle) - { - _backgroundInput = false; //--> default: monitoraggio solo con finestra in primo piano - AddKeyboardDevice(windowHandle); //--> monitoraggio input da tastiera - RegisterDevices(); //--> registrazione dispositivi - Application.AddMessageFilter(this); //--> aggiunta del filtro messaggi - } - #endregion - - #region Implementazione IMessageFilter - public bool PreFilterMessage(ref Message m) //Ricezione del messaggio di Windows - { - if (m.Msg == WM_INPUT) //Se messaggio per eventi RawInput - { - if (m.WParam == (IntPtr)0 || _backgroundInput) //Verifica se applicazione in primo piano o abilitazione anche in background - { - if (KeyDown != null) //Se evento sottoscritto - { - ProcessRawInput(m.LParam); //--> processazione evento - return true; //--> stop del messaggio - } - } - } - return false; //--> altrimenti messaggio gestito dal sistema - } - #endregion - - #region Metodi Privati - private void AddKeyboardDevice(IntPtr windowHandle) //Aggiunta della tastiera come dispositivo da monitorare - { - const ushort UsagePage = 1; //Device per il controllo generico del desktop - const ushort Usage = 6; //Tipologia di device (tastiera) - const Int32 Flags = 0x100; //[RIDEV_INPUTSINK] Abilita a ricevere gli eventi anche se l'applicazione non è in primo piano (windowHandle deve essere specificato) - - devices.Add(new RAWINPUTDEVICE(UsagePage, Usage, Flags, windowHandle)); //--> agiunta nella lista dei dispositivi da monitorare - } - private bool RegisterDevices() //Registrazione dei dispositivi specificati - { - if (devices.Count == 0) return false; - - RAWINPUTDEVICE[] d = devices.ToArray(); - return RegisterRawInputDevices(d, devices.Count, Marshal.SizeOf(typeof(RAWINPUTDEVICE))); - } - private void ProcessRawInput(IntPtr hRawInput) //Processazione RawInput - { - RAWINPUT pData = new RAWINPUT(); - int pcbSize = Marshal.SizeOf(typeof(RAWINPUT)); - - int result = GetRawInputData(hRawInput, RawInputCommand.Input, out pData, ref pcbSize, Marshal.SizeOf(typeof(RAWINPUTHEADER))); - - if (result != -1) - { - if (pData.Header.Type == RawInputType.Keyboard) //Se input da tastiera - { - if ((pData.Keyboard.Flags & 0x0001) == 0) //Primo bit di Flags = 0 --> evento KeyDown (a 1 --> KeyUp) - { - try - { - Keys key = (Keys)pData.Keyboard.VirtualKey; //KeyCode del tasto premuto - - //GetAsyncKeyState sembra più sicuro di Control.ModifierKeys - if ((GetAsyncKeyState(Keys.ControlKey) & 0x8000) != 0) - key = key | Keys.Control; //--> aggiunta eventuale modificatore CTRL - if ((GetAsyncKeyState(Keys.Menu) & 0x8000) != 0) - key = key | Keys.Alt; //--> aggiunta eventuale modificatore ALT - if ((GetAsyncKeyState(Keys.ShiftKey) & 0x8000) != 0) - key = key | Keys.Shift; //--> aggiunta eventuale modificatore SHIFT - KeyEventArgs kea = new KeyEventArgs(key); //--> generazione argomenti per evento KeyEvent - - KeyDown(this, kea); //--> richiamo dell'evento KeyDown - } - catch { } - } - } - } - } - #endregion - - #region Eventi - public event KeyEventHandler KeyDown; //Evento di pressione tasto - #endregion - - #region Proprietà - public bool BackgroundInput { get { return this._backgroundInput; } set { this._backgroundInput = value; } } - #endregion - - #region Importazione DLL - //Registrazione dispositivi da monitorare - [DllImport("user32.dll")] - static extern bool RegisterRawInputDevices([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] RAWINPUTDEVICE[] pRawInputDevices, int uiNumDevices, int cbSize); - - //Ottenimento dati relativi all'evento di RawInput - [DllImport("user32.dll")] - static extern int GetRawInputData(IntPtr hRawInput, RawInputCommand uiCommand, out RAWINPUT pData, ref int pcbSize, int cbSizeHeader); - - //Controllo dello stato di un tasto - [DllImport("user32.dll", CharSet = CharSet.Auto)] - private static extern short GetAsyncKeyState(Keys key); - #endregion - } - - #region Strutture/Enumerativi - [StructLayout(LayoutKind.Sequential)] - struct RAWINPUTDEVICE //Struttura dispositivo per RawInput - { - public ushort UsagePage; //Tipologia di device - public ushort Usage; //Sotto-tipologia di device (tastiera/mouse/..) - public Int32 Flags; //Modalità di monitoraggio - public IntPtr WindowHandle; //Handle della finestra (necessario con Flags = RIDEV_INPUTSINK) - - public RAWINPUTDEVICE(ushort usagePage, ushort usage, Int32 flags, IntPtr windowHandle) - { - UsagePage = usagePage; - Usage = usage; - Flags = flags; - WindowHandle = windowHandle; - } - } - - [StructLayout(LayoutKind.Explicit)] - public struct RAWINPUT //Struttura dati per RawInput - { - [FieldOffset(0)] - public RAWINPUTHEADER Header; - [FieldOffset(16)] - public RAWKEYBOARD Keyboard; - } - - [StructLayout(LayoutKind.Sequential)] - public struct RAWINPUTHEADER //Struttura dati Header per evento RawInput - { - public RawInputType Type; - public int Size; - public IntPtr Device; - public IntPtr wParam; - } - - [StructLayout(LayoutKind.Sequential)] - public struct RAWKEYBOARD //Struttura dati Keyboard per evento RawInput - { - public ushort MakeCode; //Codice "grezzo" del tasto, prima della traduzione in funzione della tastiera (corrisponde a DirectInput) - public ushort Flags; //Flags per la tipologa di scansione (0=KeyDown, 1=KeyUp, 2=Versione sx del tasto, 4=Versione dx del tasto) - public ushort Reserved; //--- - public ushort VirtualKey; //KeyCode compatibile con il messaggio - public int Message; //Tipo di messaggio - public int ExtraInformation; //Informazioni addizionali del dispositivo che ha generato l'evento - } - - public enum RawInputType //Tipologie di dispositivo per RawInput - { - Mouse = 0, - Keyboard = 1, - HID = 2 - } - - enum RawInputCommand //Tipologie di comando per ottenimento dati su evento RawInput - { - Input = 0x10000003, - Header = 0x10000005 - } - #endregion -} Deleted: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuter.cs =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuter.cs 2014-05-23 13:36:12 UTC (rev 4813) +++ trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuter.cs 2014-05-23 13:47:11 UTC (rev 4814) @@ -1,106 +0,0 @@ -using System; -using System.Windows.Forms; -using MediaPortal.Configuration; -using MediaPortal.GUI.Library; -//using Action = MediaPortal.GUI.Library.Action; -using My.Common; - -namespace ProcessPlugins.ShortCuter -{ - public class ShortCuter : IPlugin //Classe gestore shortcuts - { - #region Dati - private ShortCuts myShortCuts; //Istanza classe ShortCuts (dati relativi ai shortcuts configurati) - private static readonly string LogPrefix; //Prefisso per log eventi - #endregion - - #region Costruttore - static ShortCuter() //Costruttore classe ShortCuter - { - LogPrefix = Tools.MyAssembly.Title + ": "; //Header per log su file (titolo assembly) - } - #endregion - - #region Implementazione IPlugin - public void Start() //Avvio del plugin - { - MpLog(new LogEventArgs(LogEventArgs.LogLevels.Info, "Plugin started")); - - string settingsFile = Config.GetFile(Config.Dir.Config, Tools.MyAssembly.Name + ".xml"); - myShortCuts = new ShortCuts(settingsFile); //Creazione classe per gestione shorcuts - myShortCuts.Log += new LogEventHandler(myShortCuts_Log); //--> sottoscrizione evento di log shortuts - - if (LockKeys.ChangeCapsLock(myShortCuts.General.ForcingCapsLock)) - MpLog(new LogEventArgs(LogEventArgs.LogLevels.Info, "CapsLock " + ((myShortCuts.General.ForcingCapsLock == LockKeys.LockKeyActions.Off) ? "deactivated" : "activated"))); - if (LockKeys.ChangeNumLock(myShortCuts.General.ForcingNumLock)) - MpLog(new LogEventArgs(LogEventArgs.LogLevels.Info, "NumLock " + ((myShortCuts.General.ForcingNumLock == LockKeys.LockKeyActions.Off) ? "deactivated" : "activated"))); - - if (myShortCuts.Initialize()) //Inizializzazione & lettura impostazioni shorcuts - { - try - { - RawInputHook rawInput = new RawInputHook(GUIGraphicsContext.form.Handle); //--> creazione hook mediante RawInput - rawInput.KeyDown += new KeyEventHandler(rawInput_KeyDown); //--> sottoscrizione evento KeyDown - } - catch (Exception e) - { - MpLog(new LogEventArgs(LogEventArgs.LogLevels.Error, "Error creating raw input hook", e)); - } - - try - { - //Sottoscrizione evento di attivazione finestra di MediaPortal - GUIWindowManager.OnActivateWindow += new GUIWindowManager.WindowActivationHandler(GUIWindowManager_OnActivateWindow); - } - catch (Exception e) - { - MpLog(new LogEventArgs(LogEventArgs.LogLevels.Error, "Error subscription ActivateWindow event", e)); - } - } - else - MpLog(new LogEventArgs(LogEventArgs.LogLevels.Error, "Error loading configuration")); - } - public void Stop() //Terminazione del plugin - { - MpLog(new LogEventArgs(LogEventArgs.LogLevels.Info, "Plugin stopped")); - } - #endregion - - #region Metodi Privati - private void MpLog(LogEventArgs e) //Registrazione evento su log di MediaPortal - { - string message = LogPrefix + e.LogMessage; - - switch (e.LogLevel) - { - case LogEventArgs.LogLevels.Error: - if (e.LogException != null) - message += " [" + e.LogException.Message + " (" + e.LogException.StackTrace + ")]"; - Log.Error(message); //--> log errore - break; - case LogEventArgs.LogLevels.Info: - Log.Info(message); //--> log messaggio informativo - break; - case LogEventArgs.LogLevels.Debug: - Log.Debug(message); //--> log informazione per debug - break; - } - } - #endregion - - #region Consumazione Eventi - private void rawInput_KeyDown(object sender, KeyEventArgs e) //Evento di pressione tasto - { - myShortCuts.KeysReceiving(e); //--> pubblicazione a gestore shortcuts - } - private void GUIWindowManager_OnActivateWindow(int windowID) //Evento di attivazione finestra di MediaPortal - { - myShortCuts.WindowChanged(windowID); //--> pubblicazione a gestore shortcuts - } - private void myShortCuts_Log(object sender, LogEventArgs e) //Evento di log gestore shortcuts - { - MpLog(e); //--> log - } - #endregion - } -} Deleted: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuterConfig.Designer.cs =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuterConfig.Designer.cs 2014-05-23 13:36:12 UTC (rev 4813) +++ trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuterConfig.Designer.cs 2014-05-23 13:47:11 UTC (rev 4814) @@ -1,468 +0,0 @@ -namespace ProcessPlugins.ShortCuter -{ - partial class ShortCuterConfig - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShortCuterConfig)); - this.shortCutsDataGridView = new System.Windows.Forms.DataGridView(); - this.linkPropertiesGroupBox = new System.Windows.Forms.GroupBox(); - this.loadParameterGroupBox = new System.Windows.Forms.GroupBox(); - this.loadParameterTextBox = new System.Windows.Forms.TextBox(); - this.windowIdGroupBox = new System.Windows.Forms.GroupBox(); - this.windowIdLabel = new System.Windows.Forms.Label(); - this.skinFileGroupBox = new System.Windows.Forms.GroupBox(); - this.skinFileLabel = new System.Windows.Forms.Label(); - this.toolTip = new System.Windows.Forms.ToolTip(this.components); - this.updateButton = new System.Windows.Forms.Button(); - this.resetButton = new System.Windows.Forms.Button(); - this.rowDownButton = new System.Windows.Forms.Button(); - this.rowUpButton = new System.Windows.Forms.Button(); - this.infoPictureBox = new System.Windows.Forms.PictureBox(); - this.rowRemoveButton = new System.Windows.Forms.Button(); - this.rowAddButton = new System.Windows.Forms.Button(); - this.propLeftPictureBox = new System.Windows.Forms.PictureBox(); - this.saveButton = new System.Windows.Forms.Button(); - this.overridesGroupBox = new System.Windows.Forms.GroupBox(); - this.numLockGroupBox = new System.Windows.Forms.GroupBox(); - this.numLockComboBox = new System.Windows.Forms.ComboBox(); - this.capsLockGroupBox = new System.Windows.Forms.GroupBox(); - this.capsLockComboBox = new System.Windows.Forms.ComboBox(); - this.rowCopyButton = new System.Windows.Forms.Button(); - this.skinNavAddButton = new System.Windows.Forms.Button(); - this.skinNavConfigButton = new System.Windows.Forms.Button(); - this.skinItems = new My.Common.SkinItems(); - ((System.ComponentModel.ISupportInitialize)(this.shortCutsDataGridView)).BeginInit(); - this.linkPropertiesGroupBox.SuspendLayout(); - this.loadParameterGroupBox.SuspendLayout(); - this.windowIdGroupBox.SuspendLayout(); - this.skinFileGroupBox.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.infoPictureBox)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.propLeftPictureBox)).BeginInit(); - this.overridesGroupBox.SuspendLayout(); - this.numLockGroupBox.SuspendLayout(); - this.capsLockGroupBox.SuspendLayout(); - this.SuspendLayout(); - // - // shortCutsDataGridView - // - this.shortCutsDataGridView.AllowUserToAddRows = false; - this.shortCutsDataGridView.AllowUserToDeleteRows = false; - this.shortCutsDataGridView.AllowUserToResizeRows = false; - this.shortCutsDataGridView.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(213)))), ((int)(((byte)(220)))), ((int)(((byte)(227))))); - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.shortCutsDataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; - this.shortCutsDataGridView.ColumnHeadersHeight = 30; - this.shortCutsDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; - this.shortCutsDataGridView.Location = new System.Drawing.Point(6, 304); - this.shortCutsDataGridView.MultiSelect = false; - this.shortCutsDataGridView.Name = "shortCutsDataGridView"; - this.shortCutsDataGridView.RowHeadersWidth = 20; - this.shortCutsDataGridView.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; - this.shortCutsDataGridView.Size = new System.Drawing.Size(1006, 429); - this.shortCutsDataGridView.TabIndex = 0; - this.shortCutsDataGridView.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.shortCutsDataGridView_CellDoubleClick); - this.shortCutsDataGridView.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.shortCutsDataGridView_CellEndEdit); - this.shortCutsDataGridView.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.shortCutsDataGridView_CellFormatting); - this.shortCutsDataGridView.CurrentCellChanged += new System.EventHandler(this.shortCutsDataGridView_CurrentCellChanged); - this.shortCutsDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.shortCutsDataGridView_DataError); - this.shortCutsDataGridView.EditingControlShowing += new System.Windows.Forms.DataGridViewEditingControlShowingEventHandler(this.shortCutsDataGridView_EditingControlShowing); - this.shortCutsDataGridView.Enter += new System.EventHandler(this.shortCutsDataGridView_Enter); - // - // linkPropertiesGroupBox - // - this.linkPropertiesGroupBox.Controls.Add(this.loadParameterGroupBox); - this.linkPropertiesGroupBox.Controls.Add(this.windowIdGroupBox); - this.linkPropertiesGroupBox.Controls.Add(this.skinFileGroupBox); - this.linkPropertiesGroupBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.linkPropertiesGroupBox.Location = new System.Drawing.Point(602, 30); - this.linkPropertiesGroupBox.Name = "linkPropertiesGroupBox"; - this.linkPropertiesGroupBox.Size = new System.Drawing.Size(320, 175); - this.linkPropertiesGroupBox.TabIndex = 31; - this.linkPropertiesGroupBox.TabStop = false; - this.linkPropertiesGroupBox.Text = "Link Properties"; - // - // loadParameterGroupBox - // - this.loadParameterGroupBox.Controls.Add(this.loadParameterTextBox); - this.loadParameterGroupBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.loadParameterGroupBox.Location = new System.Drawing.Point(4, 103); - this.loadParameterGroupBox.Name = "loadParameterGroupBox"; - this.loadParameterGroupBox.Size = new System.Drawing.Size(312, 68); - this.loadParameterGroupBox.TabIndex = 37; - this.loadParameterGroupBox.TabStop = false; - this.loadParameterGroupBox.Text = "Load Parameter:"; - // - // loadParameterTextBox - // - this.loadParameterTextBox.BackColor = System.Drawing.SystemColors.Control; - this.loadParameterTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.loadParameterTextBox.ForeColor = System.Drawing.Color.Blue; - this.loadParameterTextBox.Location = new System.Drawing.Point(6, 19); - this.loadParameterTextBox.Multiline = true; - this.loadParameterTextBox.Name = "loadParameterTextBox"; - this.loadParameterTextBox.ReadOnly = true; - this.loadParameterTextBox.Size = new System.Drawing.Size(300, 43); - this.loadParameterTextBox.TabIndex = 39; - this.loadParameterTextBox.Text = "-"; - this.loadParameterTextBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - // - // windowIdGroupBox - // - this.windowIdGroupBox.Controls.Add(this.windowIdLabel); - this.windowIdGroupBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.windowIdGroupBox.Location = new System.Drawing.Point(4, 63); - this.windowIdGroupBox.Name = "windowIdGroupBox"; - this.windowIdGroupBox.Size = new System.Drawing.Size(312, 34); - this.windowIdGroupBox.TabIndex = 36; - this.windowIdGroupBox.TabStop = false; - this.windowIdGroupBox.Text = "Window ID:"; - // - // windowIdLabel - // - this.windowIdLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.windowIdLabel.ForeColor = System.Drawing.Color.Blue; - this.windowIdLabel.Location = new System.Drawing.Point(6, 16); - this.windowIdLabel.Name = "windowIdLabel"; - this.windowIdLabel.Size = new System.Drawing.Size(300, 13); - this.windowIdLabel.TabIndex = 6; - this.windowIdLabel.Text = "-"; - this.windowIdLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // skinFileGroupBox - // - this.skinFileGroupBox.Controls.Add(this.skinFileLabel); - this.skinFileGroupBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.skinFileGroupBox.Location = new System.Drawing.Point(4, 23); - this.skinFileGroupBox.Name = "skinFileGroupBox"; - this.skinFileGroupBox.Size = new System.Drawing.Size(312, 34); - this.skinFileGroupBox.TabIndex = 6; - this.skinFileGroupBox.TabStop = false; - this.skinFileGroupBox.Text = "Skin File:"; - // - // skinFileLabel - // - this.skinFileLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.skinFileLabel.ForeColor = System.Drawing.Color.Blue; - this.skinFileLabel.Location = new System.Drawing.Point(6, 16); - this.skinFileLabel.Name = "skinFileLabel"; - this.skinFileLabel.Size = new System.Drawing.Size(300, 13); - this.skinFileLabel.TabIndex = 2; - this.skinFileLabel.Text = "-"; - this.skinFileLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // toolTip - // - this.toolTip.ShowAlways = true; - // - // updateButton - // - this.updateButton.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); - this.updateButton.Location = new System.Drawing.Point(67, 84); - this.updateButton.Name = "updateButton"; - this.updateButton.Size = new System.Drawing.Size(135, 38); - this.updateButton.TabIndex = 32; - this.updateButton.Text = "Save and Close"; - this.updateButton.UseVisualStyleBackColor = false; - this.updateButton.Click += new System.EventHandler(this.updateButton_Click); - // - // resetButton - // - this.resetButton.Location = new System.Drawing.Point(67, 8); - this.resetButton.Name = "resetButton"; - this.resetButton.Size = new System.Drawing.Size(133, 23); - this.resetButton.TabIndex = 33; - this.resetButton.Text = "Reset Configuration"; - this.resetButton.UseVisualStyleBackColor = true; - this.resetButton.Click += new System.EventHandler(this.resetButton_Click); - // - // rowDownButton - // - this.rowDownButton.AutoSize = true; - this.rowDownButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.rowDownButton.Image = global::ProcessPlugins.ShortCuter.Properties.Resources.RowDown; - this.rowDownButton.Location = new System.Drawing.Point(226, 264); - this.rowDownButton.Name = "rowDownButton"; - this.rowDownButton.Size = new System.Drawing.Size(38, 38); - this.rowDownButton.TabIndex = 35; - this.rowDownButton.UseVisualStyleBackColor = true; - this.rowDownButton.Click += new System.EventHandler(this.rowDownButton_Click); - // - // rowUpButton - // - this.rowUpButton.AutoSize = true; - this.rowUpButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.rowUpButton.Image = global::ProcessPlugins.ShortCuter.Properties.Resources.RowUp; - this.rowUpButton.Location = new System.Drawing.Point(186, 264); - this.rowUpButton.Name = "rowUpButton"; - this.rowUpButton.Size = new System.Drawing.Size(38, 38); - this.rowUpButton.TabIndex = 34; - this.rowUpButton.UseVisualStyleBackColor = true; - this.rowUpButton.Click += new System.EventHandler(this.rowUpButton_Click); - // - // infoPictureBox - // - this.infoPictureBox.Image = global::ProcessPlugins.ShortCuter.Properties.Resources.Info; - this.infoPictureBox.Location = new System.Drawing.Point(990, 5); - this.infoPictureBox.Name = "infoPictureBox"; - this.infoPictureBox.Size = new System.Drawing.Size(24, 24); - this.infoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.infoPictureBox.TabIndex = 30; - this.infoPictureBox.TabStop = false; - this.infoPictureBox.Click += new System.EventHandler(this.infoPictureBox_Click); - // - // rowRemoveButton - // - this.rowRemoveButton.AutoSize = true; - this.rowRemoveButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.rowRemoveButton.Image = global::ProcessPlugins.ShortCuter.Properties.Resources.RowRemove; - this.rowRemoveButton.Location = new System.Drawing.Point(46, 264); - this.rowRemoveButton.Name = "rowRemoveButton"; - this.rowRemoveButton.Size = new System.Drawing.Size(38, 38); - this.rowRemoveButton.TabIndex = 26; - this.rowRemoveButton.UseVisualStyleBackColor = true; - this.rowRemoveButton.Click += new System.EventHandler(this.rowRemoveButton_Click); - // - // rowAddButton - // - this.rowAddButton.AutoSize = true; - this.rowAddButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.rowAddButton.Image = global::ProcessPlugins.ShortCuter.Properties.Resources.RowAdd; - this.rowAddButton.Location = new System.Drawing.Point(6, 264); - this.rowAddButton.Name = "rowAddButton"; - this.rowAddButton.Size = new System.Drawing.Size(38, 38); - this.rowAddButton.TabIndex = 25; - this.rowAddButton.UseVisualStyleBackColor = true; - this.rowAddButton.Click += new System.EventHandler(this.rowAddButton_Click); - // - // propLeftPictureBox - // - this.propLeftPictureBox.Enabled = false; - this.propLeftPictureBox.Image = global::ProcessPlugins.ShortCuter.Properties.Resources.ArrowDown; - this.propLeftPictureBox.Location = new System.Drawing.Point(360, 257); - this.propLeftPictureBox.Name = "propLeftPictureBox"; - this.propLeftPictureBox.Size = new System.Drawing.Size(131, 56); - this.propLeftPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.propLeftPictureBox.TabIndex = 23; - this.propLeftPictureBox.TabStop = false; - this.propLeftPictureBox.Visible = false; - // - // saveButton - // - this.saveButton.Location = new System.Drawing.Point(67, 35); - this.saveButton.Name = "saveButton"; - this.saveButton.Size = new System.Drawing.Size(133, 23); - this.saveButton.TabIndex = 36; - this.saveButton.Text = "Save Configuration"; - this.saveButton.UseVisualStyleBackColor = true; - this.saveButton.Click += new System.EventHandler(this.saveButton_Click); - // - // overridesGroupBox - // - this.overridesGroupBox.Controls.Add(this.numLockGroupBox); - this.overridesGroupBox.Controls.Add(this.capsLockGroupBox); - this.overridesGroupBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.overridesGroupBox.Location = new System.Drawing.Point(50, 133); - this.overridesGroupBox.Name = "overridesGroupBox"; - this.overridesGroupBox.Size = new System.Drawing.Size(165, 111); - this.overridesGroupBox.TabIndex = 37; - this.overridesGroupBox.TabStop = false; - this.overridesGroupBox.Text = "Overrides at Start-Up"; - // - // numLockGroupBox - // - this.numLockGroupBox.Controls.Add(this.numLockComboBox); - this.numLockGroupBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.numLockGroupBox.Location = new System.Drawing.Point(6, 63); - this.numLockGroupBox.Name = "numLockGroupBox"; - this.numLockGroupBox.Size = new System.Drawing.Size(152, 42); - this.numLockGroupBox.TabIndex = 38; - this.numLockGroupBox.TabStop = false; - this.numLockGroupBox.Text = "Num-Lock Forcing:"; - // - // numLockComboBox - // - this.numLockComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.numLockComboBox.FormattingEnabled = true; - this.numLockComboBox.Location = new System.Drawing.Point(9, 15); - this.numLockComboBox.Name = "numLockComboBox"; - this.numLockComboBox.Size = new System.Drawing.Size(133, 21); - this.numLockComboBox.TabIndex = 1; - // - // capsLockGroupBox - // - this.capsLockGroupBox.Controls.Add(this.capsLockComboBox); - this.capsLockGroupBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.capsLockGroupBox.Location = new System.Drawing.Point(6, 15); - this.capsLockGroupBox.Name = "capsLockGroupBox"; - this.capsLockGroupBox.Size = new System.Drawing.Size(152, 42); - this.capsLockGroupBox.TabIndex = 37; - this.capsLockGroupBox.TabStop = false; - this.capsLockGroupBox.Text = "Caps-Lock Forcing:"; - // - // capsLockComboBox - // - this.capsLockComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.capsLockComboBox.FormattingEnabled = true; - this.capsLockComboBox.Location = new System.Drawing.Point(9, 15); - this.capsLockComboBox.Name = "capsLockComboBox"; - this.capsLockComboBox.Size = new System.Drawing.Size(133, 21); - this.capsLockComboBox.TabIndex = 0; - // - // rowCopyButton - // - this.rowCopyButton.AutoSize = true; - this.rowCopyButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.rowCopyButton.Image = global::ProcessPlugins.ShortCuter.Properties.Resources.RowCopy; - this.rowCopyButton.Location = new System.Drawing.Point(96, 264); - this.rowCopyButton.Name = "rowCopyButton"; - this.rowCopyButton.Size = new System.Drawing.Size(38, 38); - this.rowCopyButton.TabIndex = 38; - this.rowCopyButton.UseVisualStyleBackColor = true; - this.rowCopyButton.Click += new System.EventHandler(this.rowCopyButton_Click); - // - // skinNavAddButton - // - this.skinNavAddButton.AutoSize = true; - this.skinNavAddButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.skinNavAddButton.Image = global::ProcessPlugins.ShortCuter.Properties.Resources.SkinNavAdd; - this.skinNavAddButton.Location = new System.Drawing.Point(136, 264); - this.skinNavAddButton.Name = "skinNavAddButton"; - this.skinNavAddButton.Size = new System.Drawing.Size(38, 38); - this.skinNavAddButton.TabIndex = 40; - this.skinNavAddButton.UseVisualStyleBackColor = true; - this.skinNavAddButton.Click += new System.EventHandler(this.skinNavAddButton_Click); - // - // skinNavConfigButton - // - this.skinNavConfigButton.BackgroundImage = global::ProcessPlugins.ShortCuter.Properties.Resources.SkinNav; - this.skinNavConfigButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.skinNavConfigButton.Location = new System.Drawing.Point(726, 220); - this.skinNavConfigButton.Name = "skinNavConfigButton"; - this.skinNavConfigButton.Size = new System.Drawing.Size(70, 70); - this.skinNavConfigButton.TabIndex = 41; - this.skinNavConfigButton.UseVisualStyleBackColor = true; - this.skinNavConfigButton.Click += new System.EventHandler(this.skinNavConfigButton_Click); - // - // skinItems - // - this.skinItems.Location = new System.Drawing.Point(266, 8); - this.skinItems.Name = "skinItems"; - this.skinItems.SelectedIndex = -1; - this.skinItems.SelectedTab = My.Common.SkinItems.SkinItemsType.Links; - this.skinItems.Size = new System.Drawing.Size(330, 260); - this.skinItems.TabIndex = 39; - this.skinItems.Enter += new System.EventHandler(this.skinItems_Enter); - this.skinItems.DoubleClick += new System.EventHandler(this.skinItems_DoubleClick); - this.skinItems.SelectedIndexChanged += new System.EventHandler(this.skinItems_SelectedIndexChanged); - // - // ShortCuterConfig - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1018, 740); - this.Controls.Add(this.skinNavConfigButton); - this.Controls.Add(this.skinNavAddButton); - this.Controls.Add(this.skinItems); - this.Controls.Add(this.rowCopyButton); - this.Controls.Add(this.overridesGroupBox); - this.Controls.Add(this.saveButton); - this.Controls.Add(this.rowDownButton); - this.Controls.Add(this.linkPropertiesGroupBox); - this.Controls.Add(this.rowUpButton); - this.Controls.Add(this.resetButton); - this.Controls.Add(this.updateButton); - this.Controls.Add(this.infoPictureBox); - this.Controls.Add(this.rowRemoveButton); - this.Controls.Add(this.rowAddButton); - this.Controls.Add(this.shortCutsDataGridView); - this.Controls.Add(this.propLeftPictureBox); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MaximizeBox = false; - this.Name = "ShortCuterConfig"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "ShortCut\'er Plugin Configuration"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ShortCuterConfig_FormClosing); - this.Load += new System.EventHandler(this.ShortCuterConfig_Load); - this.Shown += new System.EventHandler(this.ShortCuterConfig_Shown); - ((System.ComponentModel.ISupportInitialize)(this.shortCutsDataGridView)).EndInit(); - this.linkPropertiesGroupBox.ResumeLayout(false); - this.loadParameterGroupBox.ResumeLayout(false); - this.loadParameterGroupBox.PerformLayout(); - this.windowIdGroupBox.ResumeLayout(false); - this.skinFileGroupBox.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.infoPictureBox)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.propLeftPictureBox)).EndInit(); - this.overridesGroupBox.ResumeLayout(false); - this.numLockGroupBox.ResumeLayout(false); - this.capsLockGroupBox.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.DataGridView shortCutsDataGridView; - private System.Windows.Forms.PictureBox propLeftPictureBox; - private System.Windows.Forms.Button rowAddButton; - private System.Windows.Forms.Button rowRemoveButton; - private System.Windows.Forms.PictureBox infoPictureBox; - private System.Windows.Forms.GroupBox linkPropertiesGroupBox; - private System.Windows.Forms.ToolTip toolTip; - private System.Windows.Forms.Button updateButton; - private System.Windows.Forms.Button resetButton; - private System.Windows.Forms.Button rowDownButton; - private System.Windows.Forms.Button rowUpButton; - private System.Windows.Forms.GroupBox windowIdGroupBox; - private System.Windows.Forms.Label windowIdLabel; - private System.Windows.Forms.GroupBox skinFileGroupBox; - private System.Windows.Forms.Label skinFileLabel; - private System.Windows.Forms.GroupBox loadParameterGroupBox; - private System.Windows.Forms.Button saveButton; - private System.Windows.Forms.TextBox loadParameterTextBox; - private System.Windows.Forms.GroupBox overridesGroupBox; - private System.Windows.Forms.GroupBox capsLockGroupBox; - private System.Windows.Forms.GroupBox numLockGroupBox; - private System.Windows.Forms.ComboBox capsLockComboBox; - private System.Windows.Forms.ComboBox numLockComboBox; - private System.Windows.Forms.Button rowCopyButton; - private My.Common.SkinItems skinItems; - private System.Windows.Forms.Button skinNavAddButton; - private System.Windows.Forms.Button skinNavConfigButton; - - } -} \ No newline at end of file Deleted: trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuterConfig.cs =================================================================== --- trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuterConfig.cs 2014-05-23 13:36:12 UTC (rev 4813) +++ trunk/plugins/ShortCuter&SkinEditor/Source/ShortCuter/ShortCuterConfig.cs 2014-05-23 13:47:11 UTC (rev 4814) @@ -1,517 +0,0 @@ -using System; -using System.ComponentModel; -using System.Drawing; -using System.Windows.Forms; -using MediaPortal.Configuration; -using MediaPortal.GUI.Library; -using MediaPortal.Profile; -using My.Common; - -namespace ProcessPlugins.ShortCuter -{ - [PluginIcons("ProcessPlugins.ShortCuter.Resources.Images.ShortCuterEnable.png", "ProcessPlugins.ShortCuter.Resources.Images.ShortCuterDisable.png")] - public partial class ShortCuterConfig : Form, ISetupForm //Form per la configurazione del plugin, con implementazione interfaccia ISetupForm (per lancio da configurazione MediaPortal) - { - #region Dati - private Skin mySkin; //Istanza classe Skin (dati relativi alla skin di MediaPortal) - private ShortCuts myShortCuts; //Istanza classe ShortCuts (dati relativi ai shortcuts configurati) - private bool unsavedChanges; //Presenza modifiche da salvare - private bool forceCell; //Azione di forzatura valore cella WindowID dello shortcut - #endregion - - #region Costruttore - public ShortCuterConfig() - { - InitializeComponent(); - } - #endregion - - #region Metodi Privati - private void InitializeGUI() //Inizializzazione interfaccia - { - skinItems.Populate(mySkin.SkinFiles, mySkin.SkinLinks, false, true); - FormatShortCutsGrid(); - - capsLockComboBox.DataSource = Enum.GetNames(typeof(LockKeys.LockKeyActions)); - capsLockComboBox.SelectedItem = Enum.GetName(typeof(LockKeys.LockKeyActions), myShortCuts.General.ForcingCapsLock); - numLockComboBox.DataSource = Enum.GetNames(typeof(LockKeys.LockKeyActions)); - numLockComboBox.SelectedItem = Enum.GetName(typeof(LockKeys.LockKeyActions), myShortCuts.General.ForcingNumLock); - - toolTip.SetToolTip(skinItems, "Double click to set the link's parameter to shortcut"); - toolTip.SetToolTip(rowAddButton, "Add shortcut to list"); - toolTip.SetToolTip(rowRemoveButton, "Remove selected shortcut from list"); - toolTip.SetToolTip(rowCopyButton, "Copy selected shortcut to list"); - toolTip.SetToolTip(skinNavAddButton, "Add a shortcut to Skin Navigator in list"); - toolTip.SetToolTip(rowUpButton, "Move up selected shortcut in list"); - toolTip.SetToolTip(rowDownButton, "Move down selected shortcut in list"); - toolTip.SetToolTip(resetButton, "Reset actual settings and load the default configuration"); - toolTip.SetToolTip(saveButton, "Save actual settings"); - toolTip.SetToolTip(updateButton, "Save actual setting and close the application"); - toolTip.SetToolTip(capsLockComboBox, "Set forcing for Caps-Lock when MediaPortal starts (OFF is recommended)"); - toolTip.SetToolTip(numLockComboBox, "Set forcing for Num-Lock when MediaPortal starts"); - toolTip.SetToolTip(skinNavConfigButton, "Configure Skin Navigator"); - toolTip.SetToolTip(infoPictureBox, "Version information"); - - unsavedChanges = false; //--> necessario a fine aggiornamento controlli grafici - } - private void FormatShortCutsGrid() //Formattazione (e popolazione) tabella shortcuts - { - shortCutsDataGridView.AutoGenerateColumns = false; - - DataGridViewTextBoxColumn captionColumn = new DataGridViewTextBoxColumn(); - captionColumn.DataPropertyName = "Caption"; - captionColumn.HeaderText = "Caption"; - captionColumn.Width = 155; - captionColumn.MaxInputLength = 32; - captionColumn.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - captionColumn.DefaultCellStyle.Font = new Font("Microsoft Sans Serif", 8, FontStyle.Bold); - captionColumn.ToolTipText = "Shortcut's title"; - - DataGridViewTextBoxColumn keyColumn = new DataGridViewTextBoxColumn(); - keyColumn.DataPropertyName = "Key"; - keyColumn.HeaderText = "Key [KeyCode]"; - keyColumn.Width = 120; - keyColumn.MaxInputLength = 24; - keyColumn.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - keyColumn.DefaultCellStyle.Font = new Font("Microsoft Sans Serif", 8, FontStyle.Bold); - keyColumn.DefaultCellStyle.BackColor = Color.Yellow; - keyColumn.ReadOnly = true; - keyColumn.ToolTipText = "Key assigned to the shortcut (double click on the cell)"; - - DataGridViewCheckBoxColumn ctrlColumn = new DataGridViewCheckBoxColumn(); - ctrlColumn.DataPropertyName = "Ctrl"; - ctrlColumn.HeaderText = "Ctrl"; - ctrlColumn.Width = 30; - ctrlColumn.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; - ctrlColumn.DefaultCellStyle.BackColor = Color.LightCyan; - ctrlColumn.ToolTipText = "Use CTRL modifier + Key assigned"; - - DataGridViewCheckBoxColumn altColumn = new DataGridViewCheckBoxColumn(); - altColumn.DataPropertyName = "Alt"; - altColumn.HeaderText = "Alt"; - altColumn.Width = 30; - ... [truncated message content] |