/// <summary> /// Tells the Joystick to re-read settings /// </summary> public override void ApplySettings( ) { appSettings.Reload( ); ResetIgnoreButtons( ); // read ignore buttons String igs = ""; switch (m_joystickNumber) { case 1: igs = appSettings.IgnoreJS1; break; case 2: igs = appSettings.IgnoreJS2; break; case 3: igs = appSettings.IgnoreJS3; break; case 4: igs = appSettings.IgnoreJS4; break; case 5: igs = appSettings.IgnoreJS5; break; case 6: igs = appSettings.IgnoreJS6; break; case 7: igs = appSettings.IgnoreJS7; break; case 8: igs = appSettings.IgnoreJS8; break; default: break; } if (String.IsNullOrWhiteSpace(igs)) { return; // no setting - all allowed } // read the ignore numbers String[] nums = igs.Split(' '); foreach (String s in nums) { int btNum = 0; // gets 1..n if (int.TryParse(s, out btNum)) { if ((btNum > 0) && (btNum <= m_ignoreButtons.Length)) { m_ignoreButtons[--btNum] = true; // zero indexed } } } }
/// <summary> /// Tells the Joystick to re-read settings /// </summary> public override void ApplySettings( ) { appSettings.Reload( ); }