From: <an...@us...> - 2007-10-27 13:40:28
|
Revision: 1008 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1008&view=rev Author: and-81 Date: 2007-10-27 06:40:24 -0700 (Sat, 27 Oct 2007) Log Message: ----------- Modified Paths: -------------- trunk/plugins/MCEReplacement/Forms/ExternalChannels.cs trunk/plugins/MCEReplacement/Forms/SetupForm.Designer.cs trunk/plugins/MCEReplacement/Forms/SetupForm.cs trunk/plugins/MCEReplacement/Forms/StbSetup.cs trunk/plugins/MCEReplacement/MCEReplacement.cs trunk/plugins/MCEReplacement/Properties/AssemblyInfo.cs Modified: trunk/plugins/MCEReplacement/Forms/ExternalChannels.cs =================================================================== --- trunk/plugins/MCEReplacement/Forms/ExternalChannels.cs 2007-10-27 13:36:02 UTC (rev 1007) +++ trunk/plugins/MCEReplacement/Forms/ExternalChannels.cs 2007-10-27 13:40:24 UTC (rev 1008) @@ -39,7 +39,8 @@ private void ExternalChannels_Load(object sender, EventArgs e) { - int cards = MCEReplacement.ExternalChannelConfigs.Length; + int cards = MCEReplacement.TvCardCount; + string cardName; string cardNumber; @@ -103,8 +104,8 @@ foreach (StbSetup setup in _tvCardStbSetups) setup.Save(); - foreach (ExternalChannelConfig config in MCEReplacement.ExternalChannelConfigs) - config.Save(); + for (int index = 0; index < MCEReplacement.TvCardCount; index++) + MCEReplacement.GetExternalChannelConfig(index).Save(); this.DialogResult = DialogResult.OK; this.Close(); Modified: trunk/plugins/MCEReplacement/Forms/SetupForm.Designer.cs =================================================================== --- trunk/plugins/MCEReplacement/Forms/SetupForm.Designer.cs 2007-10-27 13:36:02 UTC (rev 1007) +++ trunk/plugins/MCEReplacement/Forms/SetupForm.Designer.cs 2007-10-27 13:40:24 UTC (rev 1008) @@ -675,7 +675,7 @@ this.listViewIR.TabIndex = 0; this.listViewIR.UseCompatibleStateImageBehavior = false; this.listViewIR.View = System.Windows.Forms.View.List; - this.listViewIR.DoubleClick += new System.EventHandler(this.listBoxIR_DoubleClick); + this.listViewIR.DoubleClick += new System.EventHandler(this.listViewIR_DoubleClick); this.listViewIR.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewIR_AfterLabelEdit); // // tabPageMacros @@ -709,7 +709,7 @@ this.listViewMacro.TabIndex = 0; this.listViewMacro.UseCompatibleStateImageBehavior = false; this.listViewMacro.View = System.Windows.Forms.View.List; - this.listViewMacro.DoubleClick += new System.EventHandler(this.listBoxMacro_DoubleClick); + this.listViewMacro.DoubleClick += new System.EventHandler(this.listViewMacro_DoubleClick); this.listViewMacro.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewMacro_AfterLabelEdit); // // tabPageMultiMapping Modified: trunk/plugins/MCEReplacement/Forms/SetupForm.cs =================================================================== --- trunk/plugins/MCEReplacement/Forms/SetupForm.cs 2007-10-27 13:36:02 UTC (rev 1007) +++ trunk/plugins/MCEReplacement/Forms/SetupForm.cs 2007-10-27 13:40:24 UTC (rev 1008) @@ -19,6 +19,7 @@ using MicrosoftMceTransceiver; using IrssUtils; using IrssUtils.Forms; +using MPUtils.Forms; namespace MediaPortal.Plugins { @@ -485,7 +486,7 @@ } else if (selected == Common.UITextGoto) { - MPUtils.Forms.GoToScreen goToScreen = new MPUtils.Forms.GoToScreen(); + GoToScreen goToScreen = new GoToScreen(); if (goToScreen.ShowDialog(this) == DialogResult.Cancel) return; @@ -665,15 +666,104 @@ #region Other Controls - private void listBoxIR_DoubleClick(object sender, EventArgs e) + private void listViewIR_DoubleClick(object sender, EventArgs e) { EditIR(); } - private void listBoxMacro_DoubleClick(object sender, EventArgs e) + private void listViewMacro_DoubleClick(object sender, EventArgs e) { EditMacro(); } + private void listViewIR_AfterLabelEdit(object sender, LabelEditEventArgs e) + { + ListView origin = sender as ListView; + if (origin == null) + { + e.CancelEdit = true; + return; + } + + if (String.IsNullOrEmpty(e.Label)) + { + e.CancelEdit = true; + return; + } + + ListViewItem originItem = origin.Items[e.Item]; + + string oldFileName = MCEReplacement.IRFolder + originItem.Text + Common.FileExtensionIR; + if (!File.Exists(oldFileName)) + { + MessageBox.Show("File not found: " + oldFileName, "Cannot rename, Original file not found", MessageBoxButtons.OK, MessageBoxIcon.Error); + e.CancelEdit = true; + return; + } + + if (!Common.IsValidFileName(e.Label)) + { + MessageBox.Show("File name not valid: " + e.Label, "Cannot rename, New file name not valid", MessageBoxButtons.OK, MessageBoxIcon.Error); + e.CancelEdit = true; + return; + } + + try + { + string newFileName = MCEReplacement.IRFolder + e.Label + Common.FileExtensionIR; + + File.Move(oldFileName, newFileName); + } + catch (Exception ex) + { + IrssLog.Error(ex.ToString()); + MessageBox.Show(ex.ToString(), "Failed to rename file", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + private void listViewMacro_AfterLabelEdit(object sender, LabelEditEventArgs e) + { + ListView origin = sender as ListView; + if (origin == null) + { + e.CancelEdit = true; + return; + } + + if (String.IsNullOrEmpty(e.Label)) + { + e.CancelEdit = true; + return; + } + + ListViewItem originItem = origin.Items[e.Item]; + + string oldFileName = MCEReplacement.MacroFolder + originItem.Text + Common.FileExtensionMacro; + if (!File.Exists(oldFileName)) + { + MessageBox.Show("File not found: " + oldFileName, "Cannot rename, Original file not found", MessageBoxButtons.OK, MessageBoxIcon.Error); + e.CancelEdit = true; + return; + } + + if (!Common.IsValidFileName(e.Label)) + { + MessageBox.Show("File name not valid: " + e.Label, "Cannot rename, New file name not valid", MessageBoxButtons.OK, MessageBoxIcon.Error); + e.CancelEdit = true; + return; + } + + try + { + string newFileName = MCEReplacement.MacroFolder + e.Label + Common.FileExtensionMacro; + + File.Move(oldFileName, newFileName); + } + catch (Exception ex) + { + IrssLog.Error(ex.ToString()); + MessageBox.Show(ex.ToString(), "Failed to rename file", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + private void listViewEventMap_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Delete) @@ -698,7 +788,7 @@ } else if (command.StartsWith(Common.CmdPrefixGoto)) { - MPUtils.Forms.GoToScreen goToScreen = new MPUtils.Forms.GoToScreen(command.Substring(Common.CmdPrefixGoto.Length)); + GoToScreen goToScreen = new GoToScreen(command.Substring(Common.CmdPrefixGoto.Length)); if (goToScreen.ShowDialog(this) == DialogResult.Cancel) return; @@ -764,77 +854,6 @@ #endregion Other Controls - private void listViewIR_AfterLabelEdit(object sender, LabelEditEventArgs e) - { - ListView origin = sender as ListView; - if (origin == null) - return; - - ListViewItem originItem = origin.Items[e.Item]; - - string oldFileName = MCEReplacement.IRFolder + originItem.Text + Common.FileExtensionIR; - if (!File.Exists(oldFileName)) - { - MessageBox.Show("File not found: " + oldFileName, "Cannot rename, Original file not found", MessageBoxButtons.OK, MessageBoxIcon.Error); - e.CancelEdit = true; - return; - } - - if (String.IsNullOrEmpty(e.Label) || !Common.IsValidFileName(e.Label)) - { - MessageBox.Show("File name not valid: " + e.Label, "Cannot rename, New file name not valid", MessageBoxButtons.OK, MessageBoxIcon.Error); - e.CancelEdit = true; - return; - } - - try - { - string newFileName = MCEReplacement.IRFolder + e.Label + Common.FileExtensionIR; - - File.Move(oldFileName, newFileName); - } - catch (Exception ex) - { - IrssLog.Error(ex.ToString()); - MessageBox.Show(ex.ToString(), "Failed to rename file", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - private void listViewMacro_AfterLabelEdit(object sender, LabelEditEventArgs e) - { - ListView origin = sender as ListView; - if (origin == null) - return; - - ListViewItem originItem = origin.Items[e.Item]; - - string oldFileName = MCEReplacement.MacroFolder + originItem.Text + Common.FileExtensionMacro; - if (!File.Exists(oldFileName)) - { - MessageBox.Show("File not found: " + oldFileName, "Cannot rename, Original file not found", MessageBoxButtons.OK, MessageBoxIcon.Error); - e.CancelEdit = true; - return; - } - - if (String.IsNullOrEmpty(e.Label) || !Common.IsValidFileName(e.Label)) - { - MessageBox.Show("File name not valid: " + e.Label, "Cannot rename, New file name not valid", MessageBoxButtons.OK, MessageBoxIcon.Error); - e.CancelEdit = true; - return; - } - - try - { - string newFileName = MCEReplacement.MacroFolder + e.Label + Common.FileExtensionMacro; - - File.Move(oldFileName, newFileName); - } - catch (Exception ex) - { - IrssLog.Error(ex.ToString()); - MessageBox.Show(ex.ToString(), "Failed to rename file", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - } } Modified: trunk/plugins/MCEReplacement/Forms/StbSetup.cs =================================================================== --- trunk/plugins/MCEReplacement/Forms/StbSetup.cs 2007-10-27 13:36:02 UTC (rev 1007) +++ trunk/plugins/MCEReplacement/Forms/StbSetup.cs 2007-10-27 13:40:24 UTC (rev 1008) @@ -141,7 +141,7 @@ public void SetToCard(int cardId) { - ExternalChannelConfig config = MCEReplacement.ExternalChannelConfigs[cardId]; + ExternalChannelConfig config = MCEReplacement.GetExternalChannelConfig(cardId); if (config == null) return; @@ -172,7 +172,7 @@ public void SetToConfig(int cardId) { - ExternalChannelConfig config = MCEReplacement.ExternalChannelConfigs[cardId]; + ExternalChannelConfig config = MCEReplacement.GetExternalChannelConfig(cardId); if (config == null) return; Modified: trunk/plugins/MCEReplacement/MCEReplacement.cs =================================================================== --- trunk/plugins/MCEReplacement/MCEReplacement.cs 2007-10-27 13:36:02 UTC (rev 1007) +++ trunk/plugins/MCEReplacement/MCEReplacement.cs 2007-10-27 13:40:24 UTC (rev 1008) @@ -41,7 +41,7 @@ /// <summary> /// The plugin version string. /// </summary> - public const string PluginVersion = "MCE Replacement Plugin 1.0.3.4 for MediaPortal 0.2.3.0"; + internal const string PluginVersion = "MCE Replacement Plugin 1.0.3.5 for MediaPortal 0.2.3.0"; /// <summary> /// The wParam for Message Mode Windows Messages. @@ -49,13 +49,13 @@ public const int MessageModeCommand = 0x0018; // Macro Commands - //public const string WindowStateCommand = "Toggle Window State"; + //internal const string WindowStateCommand = "Toggle Window State"; // Macro File Commands - //public const string WindowStateMacroText = "WINDOW_STATE"; + //internal const string WindowStateMacroText = "WINDOW_STATE"; // English text for Macro commands - //public const string ChangeWindowStateText = "Change Window State"; + //internal const string ChangeWindowStateText = "Change Window State"; internal static readonly string AppDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + @@ -113,7 +113,7 @@ static ExternalChannelConfig[] _externalChannelConfigs; - static bool _inConfiguration = false; + static bool _inConfiguration; static bool _mpBasicHome; static bool _mpMCERemote; @@ -132,7 +132,7 @@ /// Gets or sets the mce transceiver. /// </summary> /// <value>The mce transceiver.</value> - public static MicrosoftMceTransceiver.MicrosoftMceTransceiver MceTransceiver + internal static MicrosoftMceTransceiver.MicrosoftMceTransceiver MceTransceiver { get { return _mceTransceiver; } set { _mceTransceiver = value; } @@ -142,16 +142,27 @@ /// Gets or sets a value indicating whether to log verbosely. /// </summary> /// <value><c>true</c> if logging is set to verbose; otherwise, <c>false</c>.</value> - public static bool LogVerbose + internal static bool LogVerbose { get { return _logVerbose; } set { _logVerbose = value; } } + /// <summary> + /// Gets or sets a value indicating whether in configuration. + /// </summary> + /// <value><c>true</c> if in configuration; otherwise, <c>false</c>.</value> + internal static bool InConfiguration + { + get { return _inConfiguration; } + set { _inConfiguration = value; } + } + + /// <summary> /// Gets or sets a value indicating whether MediaPortal will require focus to handle input. /// </summary> /// <value><c>true</c> if requires focus; otherwise, <c>false</c>.</value> - public static bool RequireFocus + internal static bool RequireFocus { get { return _requireFocus; } set { _requireFocus = value; } @@ -160,7 +171,7 @@ /// Gets or sets a value indicating whether to control external channel tuning. /// </summary> /// <value><c>true</c> if controlling external channel tuning; otherwise, <c>false</c>.</value> - public static bool ControlExternalEnabled + internal static bool ControlExternalEnabled { get { return _controlExternalEnabled; } set { _controlExternalEnabled = value; } @@ -169,7 +180,7 @@ /// Gets or sets a value indicating whether message mode is enabled. /// </summary> /// <value><c>true</c> if message mode is enabled; otherwise, <c>false</c>.</value> - public static bool MessageModeEnabled + internal static bool MessageModeEnabled { get { return _messageModeEnabled; } set { _messageModeEnabled = value; } @@ -178,7 +189,7 @@ /// Gets or sets a value indicating whether the MCE remote is enabled. /// </summary> /// <value><c>true</c> if MCE remote is enabled; otherwise, <c>false</c>.</value> - public static bool MCERemoteEnabled + internal static bool MCERemoteEnabled { get { return _mceRemoteEnabled; } set { _mceRemoteEnabled = value; } @@ -189,7 +200,7 @@ /// <value> /// <c>true</c> if different remote handling is enabled; otherwise, <c>false</c>. /// </value> - public static bool DifferentRemoteEnabled + internal static bool DifferentRemoteEnabled { get { return _differentRemoteEnabled; } set { _differentRemoteEnabled = value; } @@ -198,7 +209,7 @@ /// Gets or sets a value indicating whether multi mapping is enabled. /// </summary> /// <value><c>true</c> if multi mapping is enabled; otherwise, <c>false</c>.</value> - public static bool MultiMappingEnabled + internal static bool MultiMappingEnabled { get { return _multiMappingEnabled; } set { _multiMappingEnabled = value; } @@ -207,7 +218,7 @@ /// Gets or sets a value indicating whether the event mapper is enabled. /// </summary> /// <value><c>true</c> if the event mapper is enabled; otherwise, <c>false</c>.</value> - public static bool EventMapperEnabled + internal static bool EventMapperEnabled { get { return _eventMapperEnabled; } set { _eventMapperEnabled = value; } @@ -217,7 +228,7 @@ /// Gets or sets the mouse mode button. /// </summary> /// <value>The mouse mode button.</value> - public static RemoteButton MouseModeButton + internal static RemoteButton MouseModeButton { get { return _mouseModeButton; } set { _mouseModeButton = value; } @@ -226,7 +237,7 @@ /// Gets or sets a value indicating whether mouse mode is enabled. /// </summary> /// <value><c>true</c> if mouse mode is enabled; otherwise, <c>false</c>.</value> - public static bool MouseModeEnabled + internal static bool MouseModeEnabled { get { return _mouseModeEnabled; } set { _mouseModeEnabled = value; } @@ -235,7 +246,7 @@ /// Gets or sets a value indicating whether mouse mode is active. /// </summary> /// <value><c>true</c> if mouse mode is active; otherwise, <c>false</c>.</value> - public static bool MouseModeActive + internal static bool MouseModeActive { get { return _mouseModeActive; } set { _mouseModeActive = value; } @@ -244,7 +255,7 @@ /// Gets or sets the mouse mode step distance. /// </summary> /// <value>The mouse mode step distance.</value> - public static int MouseModeStep + internal static int MouseModeStep { get { return _mouseModeStep; } set { _mouseModeStep = value; } @@ -253,9 +264,9 @@ /// Gets or sets a value indicating whether mouse mode acceleration is enabled. /// </summary> /// <value> - /// <c>true</c> if mouse mode acceleration is enabled; otherwise, <c>false</c>. + /// <c>true</c> if mouse mode acceleration is enabled; otherwise, <c>false</c>. /// </value> - public static bool MouseModeAcceleration + internal static bool MouseModeAcceleration { get { return _mouseModeAcceleration; } set { _mouseModeAcceleration = value; } @@ -265,7 +276,7 @@ /// Gets the event mappings. /// </summary> /// <value>The event mappings.</value> - public static List<MappedEvent> EventMappings + internal static List<MappedEvent> EventMappings { get { return _eventMappings; } } @@ -274,7 +285,7 @@ /// Gets or sets the multi mapping button. /// </summary> /// <value>The multi mapping button.</value> - public static RemoteButton MultiMappingButton + internal static RemoteButton MultiMappingButton { get { return _multiMappingButton; } set { _multiMappingButton = value; } @@ -283,35 +294,34 @@ /// Gets the multi maps. /// </summary> /// <value>The multi maps.</value> - public static string[] MultiMaps + internal static string[] MultiMaps { get { return _multiMaps; } } /// <summary> - /// Gets the external channel configs. + /// Count of available TV Cards. /// </summary> - /// <value>The external channel configs.</value> - public static ExternalChannelConfig[] ExternalChannelConfigs + internal static int TvCardCount { - get { return _externalChannelConfigs; } - } + get + { + ArrayList cards = new ArrayList(); + MediaPortal.TV.Database.TVDatabase.GetCards(ref cards); - /// <summary> - /// Gets or sets a value indicating whether in configuration. - /// </summary> - /// <value><c>true</c> if in configuration; otherwise, <c>false</c>.</value> - public static bool InConfiguration - { - get { return _inConfiguration; } - set { _inConfiguration = value; } + int cardCount = cards.Count; + if (cardCount == 0) + cardCount = 1; + + return cardCount; + } } /// <summary> /// Gets a value indicating whether MediaPortal has basic home enabled. /// </summary> /// <value><c>true</c> if MediaPortal has basic home enabled; otherwise, <c>false</c>.</value> - public static bool MP_BasicHome + internal static bool MP_BasicHome { get { return _mpBasicHome; } } @@ -319,7 +329,7 @@ /// Gets a value indicating whether MediaPortal has MCE remote enabled. /// </summary> /// <value><c>true</c> if MediaPortal has MCE remote enabled; otherwise, <c>false</c>.</value> - public static bool MP_MCERemote + internal static bool MP_MCERemote { get { return _mpMCERemote; } } @@ -327,7 +337,7 @@ /// Gets the MediaPortal serial uir port. /// </summary> /// <value>The MediaPortal serial uir port.</value> - public static string MP_SerialUirPort + internal static string MP_SerialUirPort { get { return _mpSerialUirPort; } } @@ -551,7 +561,7 @@ /// <returns>true if the plugin can be seen, otherwise false.</returns> public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) { - strButtonText = strButtonImage = strButtonImageFocus = strPictureImage = ""; + strButtonText = strButtonImage = strButtonImageFocus = strPictureImage = String.Empty; return false; } @@ -610,128 +620,9 @@ #endregion IPluginReceiver methods - #region Private Methods + #region Implementation /// <summary> - /// Handles remote buttons received. - /// </summary> - /// <param name="remoteButton">The remote button.</param> - void RemoteButtonReceived(string remoteButton) - { - int keyCode = int.Parse(remoteButton); - - // Handle MCE Remote button presses ... - if (!MessageModeEnabled) - { - // If user has stipulated that MP must have focus to recognize commands ... - if (RequireFocus && !GUIGraphicsContext.HasFocus) - return; - - int button = -1; - - // Map keyCode to button on MCE remote ... - if (MCERemoteEnabled) - { - for (int i = 0; i < _mceRemoteMap.Length; i += 2) - { - if (_mceRemoteMap[i] == keyCode) - { - button = _mceRemoteMap[i + 1]; - - if (MultiMappingEnabled && (RemoteButton)button == MultiMappingButton) - { - ChangeMultiMapping(); - return; - } - - if (MouseModeEnabled) - if (HandleMouseMode((RemoteButton)button)) - return; - - // Get & execute Mapping - bool gotMapped; - if (MultiMappingEnabled) - gotMapped = _multiInputHandlers[_multiMappingSet].MapAction(button); - else - gotMapped = _defaultInputHandler.MapAction(button); - - if (LogVerbose) - { - if (gotMapped) - Log.Debug("MCEReplacement: Command \"{0}\" mapped to MCE remote", button); - else - Log.Debug("MCEReplacement: Command \"{0}\" not mapped to MCE remote", button); - } - - return; - } - } - } - - // Check for different remote mapping ... - if (DifferentRemoteEnabled) - { - for (int i = 0; i < _differentRemoteMap.Length; i += 2) - { - if (_differentRemoteMap[i] == keyCode) - { - button = _differentRemoteMap[i + 1]; - - if (MultiMappingEnabled && (RemoteButton)button == MultiMappingButton) - { - ChangeMultiMapping(); - return; - } - - if (MouseModeEnabled) - if (HandleMouseMode((RemoteButton)button)) - return; - - // Get & execute Mapping - bool gotMapped; - if (MultiMappingEnabled) - gotMapped = _multiInputHandlers[_multiMappingSet].MapAction(button); - else - gotMapped = _defaultInputHandler.MapAction(button); - - if (LogVerbose) - { - if (gotMapped) - Log.Debug("MCEReplacement: Command \"{0}\" mapped to different remote", button); - else - Log.Debug("MCEReplacement: Command \"{0}\" not mapped to different remote", button); - } - - return; - } - } - } - - if (LogVerbose) - Log.Info("MCEReplacement: keyCode \"{0}\" was not handled", keyCode); - } - } - - /// <summary> - /// Handles the PowerModeChanged event of the SystemEvents control. - /// </summary> - /// <param name="sender">The source of the event.</param> - /// <param name="e">The <see cref="Microsoft.Win32.PowerModeChangedEventArgs"/> instance containing the event data.</param> - void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e) - { - switch (e.Mode) - { - case PowerModes.Suspend: - OnSuspend(); - break; - - case PowerModes.Resume: - OnResume(); - break; - } - } - - /// <summary> /// Handles the mouse mode. /// </summary> /// <param name="button">The button pressed.</param> @@ -933,9 +824,153 @@ } /// <summary> + /// Handles remote buttons received. + /// </summary> + /// <param name="remoteButton">The remote button.</param> + void RemoteButtonReceived(string remoteButton) + { + int keyCode = int.Parse(remoteButton); + + // Handle MCE Remote button presses ... + if (!MessageModeEnabled) + { + // If user has stipulated that MP must have focus to recognize commands ... + if (RequireFocus && !GUIGraphicsContext.HasFocus) + return; + + int button = -1; + + // Map keyCode to button on MCE remote ... + if (MCERemoteEnabled) + { + for (int i = 0; i < _mceRemoteMap.Length; i += 2) + { + if (_mceRemoteMap[i] == keyCode) + { + button = _mceRemoteMap[i + 1]; + + if (MultiMappingEnabled && (RemoteButton)button == MultiMappingButton) + { + ChangeMultiMapping(); + return; + } + + if (MouseModeEnabled) + if (HandleMouseMode((RemoteButton)button)) + return; + + // Get & execute Mapping + bool gotMapped; + if (MultiMappingEnabled) + gotMapped = _multiInputHandlers[_multiMappingSet].MapAction(button); + else + gotMapped = _defaultInputHandler.MapAction(button); + + if (LogVerbose) + { + if (gotMapped) + Log.Debug("MCEReplacement: Command \"{0}\" mapped to MCE remote", button); + else + Log.Debug("MCEReplacement: Command \"{0}\" not mapped to MCE remote", button); + } + + return; + } + } + } + + // Check for different remote mapping ... + if (DifferentRemoteEnabled) + { + for (int i = 0; i < _differentRemoteMap.Length; i += 2) + { + if (_differentRemoteMap[i] == keyCode) + { + button = _differentRemoteMap[i + 1]; + + if (MultiMappingEnabled && (RemoteButton)button == MultiMappingButton) + { + ChangeMultiMapping(); + return; + } + + if (MouseModeEnabled) + if (HandleMouseMode((RemoteButton)button)) + return; + + // Get & execute Mapping + bool gotMapped; + if (MultiMappingEnabled) + gotMapped = _multiInputHandlers[_multiMappingSet].MapAction(button); + else + gotMapped = _defaultInputHandler.MapAction(button); + + if (LogVerbose) + { + if (gotMapped) + Log.Debug("MCEReplacement: Command \"{0}\" mapped to different remote", button); + else + Log.Debug("MCEReplacement: Command \"{0}\" not mapped to different remote", button); + } + + return; + } + } + } + + if (LogVerbose) + Log.Info("MCEReplacement: keyCode \"{0}\" was not handled", keyCode); + } + } + + /// <summary> + /// Load external channel configurations. + /// </summary> + static void LoadExternalConfigs() + { + int cardCount = TvCardCount; + + _externalChannelConfigs = new ExternalChannelConfig[cardCount]; + + string fileName; + for (int index = 0; index < cardCount; index++) + { + fileName = String.Format("{0}ExternalChannelConfig{1}.xml", AppDataFolder, Convert.ToString(index + 1)); + try + { + _externalChannelConfigs[index] = ExternalChannelConfig.Load(fileName); + } + catch (Exception ex) + { + _externalChannelConfigs[index] = new ExternalChannelConfig(fileName); + Log.Error(ex); + } + + _externalChannelConfigs[index].CardId = index; + } + } + + /// <summary> + /// Given a card ID returns the configuration for that card. + /// </summary> + /// <param name="cardId">ID of card to retreive configuration for.</param> + /// <returns>Card configuration, null if it doesn't exist.</returns> + internal static ExternalChannelConfig GetExternalChannelConfig(int cardId) + { + if (_externalChannelConfigs == null) + return null; + + foreach (ExternalChannelConfig config in _externalChannelConfigs) + if (config.CardId == cardId) + return config; + + return null; + } + + /// <summary> /// OnMessage is used to receive requests to Tune External Channels and for event mapping. /// </summary> - /// <param name="msg">Message</param> + /// <param name="msg">Message.</param> void OnMessage(GUIMessage msg) { if (ControlExternalEnabled && msg.Message == GUIMessage.MessageType.GUI_MSG_TUNE_EXTERNAL_CHANNEL) @@ -958,24 +993,6 @@ } /// <summary> - /// Loads the external configs. - /// </summary> - static void LoadExternalConfigs() - { - ArrayList cards = new ArrayList(); - MediaPortal.TV.Database.TVDatabase.GetCards(ref cards); - - int cardCount = cards.Count; - if (cardCount == 0) - cardCount = 1; - - _externalChannelConfigs = new ExternalChannelConfig[cardCount]; - - for (int index = 0; index < cardCount; index++) - ExternalChannelConfigs[index] = new ExternalChannelConfig(AppDataFolder + "ExternalChannelConfig" + (index + 1).ToString() + ".xml"); - } - - /// <summary> /// Changes the multi mapping. /// </summary> static void ChangeMultiMapping() @@ -997,6 +1014,8 @@ /// <param name="multiMapping">The multi mapping.</param> static void ChangeMultiMapping(string multiMapping) { + Log.Debug("MCEReplacement: ChangeMultiMapping: {0}", multiMapping); + if (multiMapping == "TOGGLE") { ChangeMultiMapping(); @@ -1023,68 +1042,6 @@ } /// <summary> - /// Loads the settings. - /// </summary> - static void LoadSettings() - { - try - { - using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(MPConfigFile)) - { - LogVerbose = xmlreader.GetValueAsBool("MCEReplacement", "LogVerbose", false); - RequireFocus = xmlreader.GetValueAsBool("MCEReplacement", "RequireFocus", false); - MCERemoteEnabled = xmlreader.GetValueAsBool("MCEReplacement", "MapMCERemote", true); - DifferentRemoteEnabled = xmlreader.GetValueAsBool("MCEReplacement", "MapDifferentRemote", false); - MessageModeEnabled = xmlreader.GetValueAsBool("MCEReplacement", "MessageModeEnabled", false); - ControlExternalEnabled = xmlreader.GetValueAsBool("MCEReplacement", "ControlExternalEnabled", false); - MultiMappingEnabled = xmlreader.GetValueAsBool("MCEReplacement", "MultiMappingEnabled", false); - MultiMappingButton = (RemoteButton)xmlreader.GetValueAsInt("MCEReplacement", "MultiMappingButton", (int)RemoteButton.Start); - EventMapperEnabled = xmlreader.GetValueAsBool("MCEReplacement", "EventMapperEnabled", false); - MouseModeButton = (RemoteButton)xmlreader.GetValueAsInt("MCEReplacement", "MouseModeButton", (int)RemoteButton.Teletext); - MouseModeEnabled = xmlreader.GetValueAsBool("MCEReplacement", "MouseModeEnabled", false); - MouseModeStep = xmlreader.GetValueAsInt("MCEReplacement", "MouseModeStep", 10); - - // MediaPortal settings ... - _mpBasicHome = xmlreader.GetValueAsBool("general", "startbasichome", false); - _mpMCERemote = xmlreader.GetValueAsBool("remote", "MCE", false); - _mpSerialUirPort = xmlreader.GetValueAsString("SerialUIR", "commport", ""); - } - } - catch (Exception ex) - { - Log.Error("MCEReplacement: LoadSettings() {0}", ex.Message); - } - } - /// <summary> - /// Saves the settings. - /// </summary> - static void SaveSettings() - { - try - { - using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(MPConfigFile)) - { - xmlwriter.SetValueAsBool("MCEReplacement", "LogVerbose", LogVerbose); - xmlwriter.SetValueAsBool("MCEReplacement", "RequireFocus", RequireFocus); - xmlwriter.SetValueAsBool("MCEReplacement", "MapMCERemote", MCERemoteEnabled); - xmlwriter.SetValueAsBool("MCEReplacement", "MapDifferentRemote", DifferentRemoteEnabled); - xmlwriter.SetValueAsBool("MCEReplacement", "MessageModeEnabled", MessageModeEnabled); - xmlwriter.SetValueAsBool("MCEReplacement", "ControlExternalEnabled", ControlExternalEnabled); - xmlwriter.SetValueAsBool("MCEReplacement", "MultiMappingEnabled", MultiMappingEnabled); - xmlwriter.SetValue("MCEReplacement", "MultiMappingButton", (int)MultiMappingButton); - xmlwriter.SetValueAsBool("MCEReplacement", "EventMapperEnabled", EventMapperEnabled); - xmlwriter.SetValue("MCEReplacement", "MouseModeButton", (int)MouseModeButton); - xmlwriter.SetValueAsBool("MCEReplacement", "MouseModeEnabled", MouseModeEnabled); - xmlwriter.SetValue("MCEReplacement", "MouseModeStep", MouseModeStep); - } - } - catch (Exception ex) - { - Log.Error("MCEReplacement: SaveSettings() {0}", ex.Message); - } - } - - /// <summary> /// Loads the remote map. /// </summary> /// <param name="remoteFile">The remote file.</param> @@ -1193,15 +1150,14 @@ if (LogVerbose) Log.Info("MCEReplacement: Event Mapper - Event \"{0}\"", Enum.GetName(typeof(MappedEvent.MappingEvent), eventType)); - string command = mappedEvent.Command; - - if (command.StartsWith(Common.CmdPrefixBlast)) - command = command.Substring(Common.CmdPrefixBlast.Length); - - if (!ProcessCommand(command)) + try { - Log.Error("MCEReplacement: Failed to execute Event Mapper command \"{0}\"", mappedEvent.EventType); + ProcessCommand(mappedEvent.Command); } + catch (Exception ex) + { + Log.Error("MCEReplacement: Failed to execute Event Mapper command \"{0}\" - {1}", mappedEvent.EventType, ex.ToString()); + } } } } @@ -1222,20 +1178,38 @@ if (LogVerbose) Log.Info("MCEReplacement: Event Mapper - Event \"{0}\"", Enum.GetName(typeof(MappedEvent.MappingEvent), eventType)); - string command = mappedEvent.Command; - - if (command.StartsWith(Common.CmdPrefixBlast)) - command = command.Substring(Common.CmdPrefixBlast.Length); - - if (!ProcessCommand(command)) + try { - Log.Error("MCEReplacement: Failed to execute Event Mapper command \"{0}\"", mappedEvent.EventType); + ProcessCommand(mappedEvent.Command); } + catch (Exception ex) + { + Log.Error("MCEReplacement: Failed to execute Event Mapper command \"{0}\" - {1}", mappedEvent.EventType, ex.ToString()); + } } } } /// <summary> + /// Handles the PowerModeChanged event of the SystemEvents control. + /// </summary> + /// <param name="sender">The source of the event.</param> + /// <param name="e">The <see cref="Microsoft.Win32.PowerModeChangedEventArgs"/> instance containing the event data.</param> + static void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e) + { + switch (e.Mode) + { + case PowerModes.Resume: + OnResume(); + break; + + case PowerModes.Suspend: + OnSuspend(); + break; + } + } + + /// <summary> /// Processes the external channel. /// </summary> /// <param name="externalChannel">The external channel.</param> @@ -1248,10 +1222,10 @@ if (card < 0) card = 0; - if (card >= ExternalChannelConfigs.Length) + if (card >= _externalChannelConfigs.Length) throw new ArgumentException("Card number is higher than last card in list, reconfigure plugin TV cards.", "tunerCard"); - ExternalChannelConfig config = ExternalChannelConfigs[card]; + ExternalChannelConfig config = _externalChannelConfigs[card]; // Clean up the "externalChannel" string into "channel". StringBuilder channel = new StringBuilder(); @@ -1387,62 +1361,9 @@ } /// <summary> - /// Adds to the Macro Stack. - /// </summary> - /// <param name="fileName">Name of the macro file.</param> - static void MacroStackAdd(string fileName) - { - string lowerCasedFileName = fileName.ToLowerInvariant(); - - if (_macroStack == null) - { - _macroStack = new List<string>(); - } - else if (_macroStack.Contains(lowerCasedFileName)) - { - StringBuilder macroStackTrace = new StringBuilder(); - macroStackTrace.AppendLine("Macro infinite loop detected!"); - macroStackTrace.AppendLine(); - macroStackTrace.AppendLine("Stack trace:"); - - foreach (string macro in _macroStack) - { - if (macro.Equals(lowerCasedFileName)) - macroStackTrace.AppendLine(String.Format("--> {0}", macro)); - else - macroStackTrace.AppendLine(macro); - } - - macroStackTrace.AppendLine(String.Format("--> {0}", lowerCasedFileName)); - - throw new ApplicationException(macroStackTrace.ToString()); - } - - _macroStack.Add(lowerCasedFileName); - } - /// <summary> - /// Removes from the Macro Stack. - /// </summary> - /// <param name="fileName">Name of the macro file.</param> - static void MacroStackRemove(string fileName) - { - string lowerCasedFileName = fileName.ToLowerInvariant(); - - if (_macroStack.Contains(lowerCasedFileName)) - _macroStack.Remove(lowerCasedFileName); - - if (_macroStack.Count == 0) - _macroStack = null; - } - - #endregion Private Methods - - #region Public Methods - - /// <summary> /// Loads the default remote button input handler. /// </summary> - public static void LoadDefaultMapping() + internal static void LoadDefaultMapping() { _defaultInputHandler = new InputHandler("MCE Replacement"); @@ -1453,7 +1374,7 @@ /// <summary> /// Loads multi-mappings for input handling. /// </summary> - public static void LoadMultiMappings() + internal static void LoadMultiMappings() { XmlDocument doc = new XmlDocument(); doc.Load(MultiMappingFile); @@ -1479,7 +1400,7 @@ /// <summary> /// Call this when entering standby to ensure that the Event Mapper is informed. /// </summary> - public static void OnSuspend() + internal static void OnSuspend() { if (!InConfiguration && EventMapperEnabled) MapEvent(MappedEvent.MappingEvent.PC_Suspend); @@ -1496,7 +1417,7 @@ /// <summary> /// Call this when leaving standby to ensure the Event Mapper is informed. /// </summary> - public static void OnResume() + internal static void OnResume() { if (_mceTransceiver != null) { @@ -1511,11 +1432,59 @@ } /// <summary> + /// Adds to the Macro Stack. + /// </summary> + /// <param name="fileName">Name of the macro file.</param> + static void MacroStackAdd(string fileName) + { + string lowerCasedFileName = fileName.ToLowerInvariant(); + + if (_macroStack == null) + { + _macroStack = new List<string>(); + } + else if (_macroStack.Contains(lowerCasedFileName)) + { + StringBuilder macroStackTrace = new StringBuilder(); + macroStackTrace.AppendLine("Macro infinite loop detected!"); + macroStackTrace.AppendLine(); + macroStackTrace.AppendLine("Stack trace:"); + + foreach (string macro in _macroStack) + { + if (macro.Equals(lowerCasedFileName)) + macroStackTrace.AppendLine(String.Format("--> {0}", macro)); + else + macroStackTrace.AppendLine(macro); + } + + macroStackTrace.AppendLine(String.Format("--> {0}", lowerCasedFileName)); + + throw new ApplicationException(macroStackTrace.ToString()); + } + + _macroStack.Add(lowerCasedFileName); + } + /// <summary> + /// Removes from the Macro Stack. + /// </summary> + /// <param name="fileName">Name of the macro file.</param> + static void MacroStackRemove(string fileName) + { + string lowerCasedFileName = fileName.ToLowerInvariant(); + + if (_macroStack.Contains(lowerCasedFileName)) + _macroStack.Remove(lowerCasedFileName); + + if (_macroStack.Count == 0) + _macroStack = null; + } + + /// <summary> /// Process the supplied Macro file. /// </summary> /// <param name="fileName">Macro file to process (absolute path).</param> - /// <returns>Sucess.</returns> - public static bool ProcessMacro(string fileName) + internal static void ProcessMacro(string fileName) { MacroStackAdd(fileName); @@ -1793,11 +1762,8 @@ GUIGraphicsContext.OnAction(new Action(Action.ActionType.ACTION_SHUTDOWN, 0, 0)); break; } - } } - - return true; } finally { @@ -1810,7 +1776,7 @@ /// </summary> /// <param name="fileName">File to blast (absolute path).</param> /// <param name="port">Port to blast to.</param> - public static void BlastIR(string fileName, string port) + internal static void BlastIR(string fileName, string port) { try { @@ -1843,13 +1809,10 @@ } /// <summary> - /// Given a command this method checks if the file exists as an IR - /// command, macro or other command and then processes the request - /// accordingly. + /// Given a command this method processes the request accordingly. /// </summary> /// <param name="command">Command to process.</param> - /// <returns>true if successful, otherwise false.</returns> - public static bool ProcessCommand(string command) + internal static void ProcessCommand(string command) { if (String.IsNullOrEmpty(command)) throw new ArgumentNullException("command"); @@ -1857,7 +1820,7 @@ if (command.StartsWith(Common.CmdPrefixMacro, StringComparison.InvariantCultureIgnoreCase)) // Macro { string fileName = MacroFolder + command.Substring(Common.CmdPrefixMacro.Length) + Common.FileExtensionMacro; - return ProcessMacro(fileName); + ProcessMacro(fileName); } else if (command.StartsWith(Common.CmdPrefixBlast, StringComparison.InvariantCultureIgnoreCase)) // IR Code { @@ -1872,19 +1835,16 @@ else if (command.StartsWith(Common.CmdPrefixRun, StringComparison.InvariantCultureIgnoreCase)) // External Program { string[] commands = Common.SplitRunCommand(command.Substring(Common.CmdPrefixRun.Length)); - Common.ProcessRunCommand(commands); } else if (command.StartsWith(Common.CmdPrefixSerial, StringComparison.InvariantCultureIgnoreCase)) // Serial Port Command { string[] commands = Common.SplitSerialCommand(command.Substring(Common.CmdPrefixSerial.Length)); - Common.ProcessSerialCommand(commands); } else if (command.StartsWith(Common.CmdPrefixWindowMsg, StringComparison.InvariantCultureIgnoreCase)) // Message Command { string[] commands = Common.SplitWindowMessageCommand(command.Substring(Common.CmdPrefixWindowMsg.Length)); - Common.ProcessWindowMessageCommand(commands); } else if (command.StartsWith(Common.CmdPrefixKeys, StringComparison.InvariantCultureIgnoreCase)) // Keystroke Command @@ -1901,11 +1861,8 @@ } else { - Log.Error("MCEReplacement: Unprocessed command \"{0}\"", command); - return false; + throw new ArgumentException(String.Format("Cannot process unrecognized command \"{0}\"", command), "command"); } - - return true; } /// <summary> @@ -1913,7 +1870,7 @@ /// </summary> /// <param name="fileName">File to place learned IR command in (absolute path).</param> /// <returns>true if successful, otherwise false.</returns> - public static IRServerPluginInterface.LearnStatus LearnIRCommand(string fileName) + internal static IRServerPluginInterface.LearnStatus LearnIRCommand(string fileName) { IRServerPluginInterface.LearnStatus status = IRServerPluginInterface.LearnStatus.Failure; @@ -1944,27 +1901,19 @@ /// </summary> /// <param name="commandPrefix">Add the command prefix to each list item.</param> /// <returns>string[] of IR Commands.</returns> - public static string[] GetIRList(bool commandPrefix) + internal static string[] GetIRList(bool commandPrefix) { - try - { - string[] files = Directory.GetFiles(IRFolder, "*" + Common.FileExtensionIR); - string[] list = new string[files.Length]; + string[] files = Directory.GetFiles(IRFolder, "*" + Common.FileExtensionIR); + string[] list = new string[files.Length]; - int i = 0; - foreach (string file in files) - if (commandPrefix) - list[i++] = Common.CmdPrefixBlast + Path.GetFileNameWithoutExtension(file); - else - list[i++] = Path.GetFileNameWithoutExtension(file); + int i = 0; + foreach (string file in files) + if (commandPrefix) + list[i++] = Common.CmdPrefixBlast + Path.GetFileNameWithoutExtension(file); + else + list[i++] = Path.GetFileNameWithoutExtension(file); - return list; - } - catch (Exception ex) - { - Log.Error("MCEReplacement: GetIRList() - {0}", ex.ToString()); - return null; - } + return list; } /// <summary> @@ -1972,29 +1921,21 @@ /// </summary> /// <param name="commandPrefix">Add the command prefix to each list item.</param> /// <returns>string[] of Macros.</returns> - public static string[] GetMacroList(bool commandPrefix) + internal static string[] GetMacroList(bool commandPrefix) { - try - { - string[] files = Directory.GetFiles(MacroFolder, "*" + Common.FileExtensionMacro); - string[] list = new string[files.Length]; + string[] files = Directory.GetFiles(MacroFolder, '*' + Common.FileExtensionMacro); + string[] list = new string[files.Length]; - int i = 0; - foreach (string file in files) - { - if (commandPrefix) - list[i++] = Common.CmdPrefixMacro + Path.GetFileNameWithoutExtension(file); - else - list[i++] = Path.GetFileNameWithoutExtension(file); - } - - return list; - } - catch (Exception ex) + int i = 0; + foreach (string file in files) { - Log.Error("MCEReplacement: GetMacroList() - {0}", ex.ToString()); - return null; + if (commandPrefix) + list[i++] = Common.CmdPrefixMacro + Path.GetFileNameWithoutExtension(file); + else + list[i++] = Path.GetFileNameWithoutExtension(file); } + + return list; } /// <summary> @@ -2002,10 +1943,10 @@ /// </summary> /// <param name="commandPrefix">Add the command prefix to each list item.</param> /// <returns>string[] of IR Commands and Macros.</returns> - public static string[] GetFileList(bool commandPrefix) + internal static string[] GetFileList(bool commandPrefix) { - string[] MacroFiles = Directory.GetFiles(MacroFolder, "*" + Common.FileExtensionMacro); - string[] IRFiles = Directory.GetFiles(IRFolder, "*" + Common.FileExtensionIR); + string[] MacroFiles = Directory.GetFiles(MacroFolder, '*' + Common.FileExtensionMacro); + string[] IRFiles = Directory.GetFiles(IRFolder, '*' + Common.FileExtensionIR); string[] list = new string[MacroFiles.Length + IRFiles.Length]; int i = 0; @@ -2028,8 +1969,70 @@ return list; } - #endregion Public Methods + /// <summary> + /// Loads the settings. + /// </summary> + static void LoadSettings() + { + try + { + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(MPConfigFile)) + { + LogVerbose = xmlreader.GetValueAsBool("MCEReplacement", "LogVerbose", false); + RequireFocus = xmlreader.GetValueAsBool("MCEReplacement", "RequireFocus", false); + MCERemoteEnabled = xmlreader.GetValueAsBool("MCEReplacement", "MapMCERemote", true); + DifferentRemoteEnabled = xmlreader.GetValueAsBool("MCEReplacement", "MapDifferentRemote", false); + MessageModeEnabled = xmlreader.GetValueAsBool("MCEReplacement", "MessageModeEnabled", false); + ControlExternalEnabled = xmlreader.GetValueAsBool("MCEReplacement", "ControlExternalEnabled", false); + MultiMappingEnabled = xmlreader.GetValueAsBool("MCEReplacement", "MultiMappingEnabled", false); + MultiMappingButton = (RemoteButton)xmlreader.GetValueAsInt("MCEReplacement", "MultiMappingButton", (int)RemoteButton.Start); + EventMapperEnabled = xmlreader.GetValueAsBool("MCEReplacement", "EventMapperEnabled", false); + MouseModeButton = (RemoteButton)xmlreader.GetValueAsInt("MCEReplacement", "MouseModeButton", (int)RemoteButton.Teletext); + MouseModeEnabled = xmlreader.GetValueAsBool("MCEReplacement", "MouseModeEnabled", false); + MouseModeStep = xmlreader.GetValueAsInt("MCEReplacement", "MouseModeStep", 10); + // MediaPortal settings ... + _mpBasicHome = xmlreader.GetValueAsBool("general", "startbasichome", false); + _mpMCERemote = xmlreader.GetValueAsBool("remote", "MCE", false); + _mpSerialUirPort = xmlreader.GetValueAsString("SerialUIR", "commport", ""); + } + } + catch (Exception ex) + { + Log.Error("MCEReplacement: LoadSettings() {0}", ex.Message); + } + } + /// <summary> + /// Saves the settings. + /// </summary> + static void SaveSettings() + { + try + { + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(MPConfigFile)) + { + xmlwriter.SetValueAsBool("MCEReplacement", "LogVerbose", LogVerbose); + xmlwriter.SetValueAsBool("MCEReplacement", "RequireFocus", RequireFocus); + xmlwriter.SetValueAsBool("MCEReplacement", "MapMCERemote", MCERemoteEnabled); + xmlwriter.SetValueAsBool("MCEReplacement", "MapDifferentRemote", DifferentRemoteEnabled); + xmlwriter.SetValueAsBool("MCEReplacement", "MessageModeEnabled", MessageModeEnabled); + xmlwriter.SetValueAsBool("MCEReplacement", "ControlExternalEnabled", ControlExternalEnabled); + xmlwriter.SetValueAsBool("MCEReplacement", "MultiMappingEnabled", MultiMappingEnabled); + xmlwriter.SetValue("MCEReplacement", "MultiMappingButton", (int)MultiMappingButton); + xmlwriter.SetValueAsBool("MCEReplacement", "EventMapperEnabled", EventMapperEnabled); + xmlwriter.SetValue("MCEReplacement", "MouseModeButton", (int)MouseModeButton); + xmlwriter.SetValueAsBool("MCEReplacement", "MouseModeEnabled", MouseModeEnabled); + xmlwriter.SetValue("MCEReplacement", "MouseModeStep", MouseModeStep); + } + } + catch (Exception ex) + { + Log.Error("MCEReplacement: SaveSettings() {0}", ex.Message); + } + } + + #endregion Implementation + } } Modified: trunk/plugins/MCEReplacement/Properties/AssemblyInfo.cs =================================================================== --- trunk/plugins/MCEReplacement/Properties/AssemblyInfo.cs 2007-10-27 13:36:02 UTC (rev 1007) +++ trunk/plugins/MCEReplacement/Properties/AssemblyInfo.cs 2007-10-27 13:40:24 UTC (rev 1008) @@ -34,8 +34,8 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.3.4")] -[assembly: AssemblyFileVersionAttribute("1.0.3.4")] +[assembly: AssemblyVersion("1.0.3.5")] +[assembly: AssemblyFileVersionAttribute("1.0.3.5")] // // In order to sign your assembly you must specify a key to use. Refer to the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |