diff --git a/.vs/ForzaDSX/DesignTimeBuild/.dtbcache.v2 b/.vs/ForzaDSX/DesignTimeBuild/.dtbcache.v2 index eb28ffe..085c246 100644 Binary files a/.vs/ForzaDSX/DesignTimeBuild/.dtbcache.v2 and b/.vs/ForzaDSX/DesignTimeBuild/.dtbcache.v2 differ diff --git a/.vs/ForzaDSX/v17/.futdcache.v2 b/.vs/ForzaDSX/v17/.futdcache.v2 index c4ef5e4..fb40ef3 100644 Binary files a/.vs/ForzaDSX/v17/.futdcache.v2 and b/.vs/ForzaDSX/v17/.futdcache.v2 differ diff --git a/.vs/ForzaDSX/v17/.suo b/.vs/ForzaDSX/v17/.suo index bd99a1c..39f7cab 100644 Binary files a/.vs/ForzaDSX/v17/.suo and b/.vs/ForzaDSX/v17/.suo differ diff --git a/AppCheckThread.cs b/AppCheckThread.cs index fea7c5a..0d968c1 100644 --- a/AppCheckThread.cs +++ b/AppCheckThread.cs @@ -1,5 +1,7 @@ using System; +using System.Collections.Generic; using System.Diagnostics; +using System.Linq; namespace ForzaDSX { @@ -9,7 +11,7 @@ public enum AppType : ushort { NONE = 0, DSX = 1, - FORZA = 2 + GAME = 2 } public AppCheckReportStruct(AppType type, string msg, bool val = false) @@ -40,22 +42,60 @@ public AppCheckReportStruct(AppType type) internal class AppCheckThread { - readonly ForzaDSX.Properties.Settings settings; - readonly IProgress progressReporter; + readonly ForzaDSX.Config.Config settings; + private Dictionary processProfilePairs = new Dictionary(); + + readonly IProgress progressReporter; protected bool bRunning = false; - public AppCheckThread(ref ForzaDSX.Properties.Settings currentSettings, IProgress progressReporter) + public AppCheckThread(ref ForzaDSX.Config.Config currentSettings, IProgress progressReporter) { + settings = currentSettings; - this.progressReporter = progressReporter; + + this.progressReporter = progressReporter; bRunning = false; } + public void updateExecutables() + { + lock (this) + { + processProfilePairs.Clear(); + + foreach (var profile in settings.Profiles) + { + if (!profile.Value.IsEnabled) { continue; } + profile.Value.executableNames.ForEach((name) => + { + if (!processProfilePairs.ContainsKey(name)) + { + processProfilePairs.Add(name, profile.Key); + } + }); + } + // settings = currentSettings; + } + } + public void Run() { - bRunning = true; + processProfilePairs.Clear(); + + foreach (var profile in settings.Profiles) + { + if (!profile.Value.IsEnabled) { continue; } + profile.Value.executableNames.ForEach((name) => + { + if (!processProfilePairs.ContainsKey(name)) + { + processProfilePairs.Add(name, profile.Key); + } + }); + } + bRunning = true; try { if (progressReporter != null) @@ -63,33 +103,50 @@ public void Run() progressReporter.Report(new AppCheckReportStruct(0, "Connecting to Forza and DSX")); } - int forzaProcesses = 0; + //int forzaProcesses = 0; Process[] DSX, DSX_2; AppCheckReportStruct dsxReport = new AppCheckReportStruct(AppCheckReportStruct.AppType.DSX); - AppCheckReportStruct forzaReport = new AppCheckReportStruct(AppCheckReportStruct.AppType.FORZA); + AppCheckReportStruct forzaReport = new AppCheckReportStruct(AppCheckReportStruct.AppType.GAME); while (bRunning/*forzaProcesses == 0 || DSX.Length + DSX_2.Length == 0*/) { System.Threading.Thread.Sleep(1000); - - forzaProcesses = Process.GetProcessesByName("ForzaHorizon5").Length; - forzaProcesses += Process.GetProcessesByName("ForzaHorizon4").Length; //Guess at name - forzaProcesses += Process.GetProcessesByName("ForzaMotorsport7").Length; //Guess at name - forzaProcesses += Process.GetProcessesByName("forza_gaming.desktop.x64_release_final").Length; //Guess at name - forzaProcesses += Process.GetProcessesByName("forza_steamworks_release_final").Length; //Guess at name - - // DSX = "DSX" or "DualSenseX" - DSX = Process.GetProcessesByName("DSX"); - DSX_2 = Process.GetProcessesByName("DualsenseX"); - - dsxReport.value = (DSX.Length + DSX_2.Length) > 0; - forzaReport.value = forzaProcesses > 0; - - if (progressReporter != null) - { - progressReporter.Report(dsxReport); - progressReporter.Report(forzaReport); + lock (this) { + if (!bRunning) { break; } + forzaReport.value = false; + forzaReport.message = ""; + foreach (var processName in processProfilePairs.Keys.AsEnumerable()) + { + + if (Process.GetProcessesByName(processName).Length > 0) + { + forzaReport.value = true; + forzaReport.message = processProfilePairs[processName]; + break; + } + } + /* forzaProcesses = Process.GetProcessesByName("ForzaHorizon5").Length; + forzaProcesses += Process.GetProcessesByName("ForzaHorizon4").Length; //Guess at name + forzaProcesses += Process.GetProcessesByName("ForzaMotorsport7").Length; //Guess at name + forzaProcesses += Process.GetProcessesByName("forza_gaming.desktop.x64_release_final").Length; //Guess at name + forzaProcesses += Process.GetProcessesByName("forza_steamworks_release_final").Length; //Guess at name*/ + + // DSX = "DSX" or "DualSenseX" + DSX = Process.GetProcessesByName("DSX"); + DSX_2 = Process.GetProcessesByName("DualsenseX"); + + dsxReport.value = (DSX.Length + DSX_2.Length) > 0; + //forzaReport.value = forzaProcesses > 0; + + //forzaReport.value = true; + //TODO: CHANGE + if (!bRunning) { break; } + if (progressReporter != null) + { + progressReporter.Report(dsxReport); + progressReporter.Report(forzaReport); + } } } } diff --git a/Config/BrakeSettings.cs b/Config/BrakeSettings.cs new file mode 100644 index 0000000..4cff567 --- /dev/null +++ b/Config/BrakeSettings.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ForzaDSX.Config +{ + public class BrakeSettings + { + public TriggerMode TriggerMode { get; set; } = TriggerMode.Vibration; + + public float EffectIntensity { get; set; } = 0.7f; + + public float GripLossValue { get; set; } = 0.5f; + public int VibrationStart { get; set; } = 20; + public int VibrationModeStart { get; set; } = 10; + public int MinVibration { get; set; } = 3; + public int MaxVibration { get; set; } = 35; + public float VibrationSmoothing { get; set; } = 1f; + public int MinStiffness { get; set; } = 200; + public int MaxStiffness { get; set; } = 1; + public int MinResistance { get; set; } = 1; + public int MaxResistance { get; set; } = 6; + public float ResistanceSmoothing { get; set; } = 1f; + } +} diff --git a/Config/Config.cs b/Config/Config.cs new file mode 100644 index 0000000..6298293 --- /dev/null +++ b/Config/Config.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json.Serialization; +using System.Threading.Tasks; + +namespace ForzaDSX.Config +{ + public class Config + { + public bool DisableAppCheck { get; set; } + public VerboseLevel VerboseLevel { get; set; } = VerboseLevel.Off; + public Dictionary Profiles { get; set; } = new Dictionary(); + [JsonIgnore] + public Profile ActiveProfile { get; set; } = null; + + public int DSXPort { get; set; } = 6900; + + public String DefaultProfile { get; set; } = "Forza"; + } +} diff --git a/Config/ConfigHandler.cs b/Config/ConfigHandler.cs new file mode 100644 index 0000000..12eb83a --- /dev/null +++ b/Config/ConfigHandler.cs @@ -0,0 +1,109 @@ +using ForzaDSX.GameParsers; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ForzaDSX.Config +{ + public class ConfigHandler + { + //Methods to read config file + //Method to initialize config file (Using default values), need to account for the different default profiles + //Method to write config file + //Singleton access to config data + private static readonly String configFilePath = "RacingDSX.json"; + private static Config configData; + + private static void InitializeConfig() + { + configData ??= ReadConfigFromDisk(); + configData ??= new Config(); + configData = AddDefaultProfiles(configData); + SaveConfig(); + } + + + + + private static Config AddDefaultProfiles(Config config) + { + config.Profiles ??= new Dictionary(); + if (!config.Profiles.ContainsKey("Forza")) + { + Profile profile = new Profile + { + Name = "Forza", + gameUDPPort = 5300, + GameType = GameTypes.Forza, + }; + profile.executableNames.AddRange(new string[] { "ForzaHorizon5", "ForzaHorizon4", "ForzaMotorsport7", "forza_gaming.desktop.x64_release_final", "forza_steamworks_release_final" }); + config.Profiles.Add("Forza", profile); + } + if (!config.Profiles.ContainsKey("Dirt")) + { + Profile profile = new Profile + { + Name = "Dirt", + gameUDPPort = 5300, + GameType = GameTypes.Dirt + }; + profile.throttleSettings.GripLossValue = 0.4f; + profile.executableNames.AddRange(new string[] { "drt"}); + config.Profiles.Add("Dirt", profile); + } + + return config; + } + + private static Config ReadConfigFromDisk() + { + + try + { + if (!File.Exists(configFilePath)) { + return null; + } + string jsonString = File.ReadAllText(configFilePath); + + Config config = JsonSerializer.Deserialize(jsonString); + return config; + } + catch (Exception) + { + return null; + } + + } + private static void WriteConfigToDisk() + { + try + { + string jsonString = JsonSerializer.Serialize(configData); + File.WriteAllText(configFilePath, jsonString); + } catch (Exception) + { + + } + } + + public static void SaveConfig() + { + WriteConfigToDisk(); + + } + + public static Config GetConfig() + { + if (configData == null) + { + InitializeConfig(); + } + return configData; + } + } +} diff --git a/Config/Profile.cs b/Config/Profile.cs new file mode 100644 index 0000000..c8df9eb --- /dev/null +++ b/Config/Profile.cs @@ -0,0 +1,22 @@ +using ForzaDSX.GameParsers; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ForzaDSX.Config +{ + public class Profile + { + public GameTypes GameType { get; set; } = GameTypes.None; + public bool IsEnabled { get; set; } = true; + public string Name { get; set; } + public int gameUDPPort { get; set; } + public List executableNames { get; set; } = new List(); + public ThrottleSettings throttleSettings { get; set; } = new ThrottleSettings(); + public BrakeSettings brakeSettings { get; set; } = new BrakeSettings(); + + public float RPMRedlineRatio { get; set; } = 0.9f; + } +} diff --git a/Config/ThrottleSettings.cs b/Config/ThrottleSettings.cs new file mode 100644 index 0000000..02aece4 --- /dev/null +++ b/Config/ThrottleSettings.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ForzaDSX.Config +{ + public class ThrottleSettings + { + public TriggerMode TriggerMode { get; set; } = TriggerMode.Vibration; + public float GripLossValue { get; set; } = 0.2f; + public float EffectIntensity { get; set; } = 0.9f; + public float TurnAccelerationScale { get; set; } = 0.5f; + public float ForwardAccelerationScale { get; set; } = 1.0f; + public int AccelerationLimit { get; set; } = 10; + public int VibrationModeStart { get; set; } = 5; + public int MinVibration { get; set; } = 3; + public int MaxVibration { get; set; } = 35; + public float VibrationSmoothing { get; set; } = 0.5f; + public int MinStiffness { get; set; } = 200; + public int MaxStiffness { get; set; } = 75; + public int MinResistance { get; set; } = 1; + public int MaxResistance { get; set; } = 6; + public float ResistanceSmoothing { get; set; } = 0.01f; + + } +} diff --git a/Config/TriggerMode.cs b/Config/TriggerMode.cs new file mode 100644 index 0000000..16ee8b3 --- /dev/null +++ b/Config/TriggerMode.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ForzaDSX.Config +{ + public enum TriggerMode : sbyte + { + Off, + Resistance, + Vibration + } +} diff --git a/Config/VerboseLevel.cs b/Config/VerboseLevel.cs new file mode 100644 index 0000000..c5363c8 --- /dev/null +++ b/Config/VerboseLevel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ForzaDSX.Config +{ + public enum VerboseLevel + { + Off = 0, + Limited, + Full + } +} diff --git a/DataPacket.cs b/DataPacket.cs index 31dc4ed..e75726e 100644 --- a/DataPacket.cs +++ b/DataPacket.cs @@ -3,92 +3,109 @@ public class DataPacket { // Sled + + public float frontLeftContactPatchV { get; set; } public bool IsRaceOn { get; set; } - public uint TimestampMS { get; set; } // Can overflow to 0 eventually + public uint Accelerator { get; set; } + public uint Brake { get; set; } + public float EngineMaxRpm { get; set; } public float EngineIdleRpm { get; set; } public float CurrentEngineRpm { get; set; } public float AccelerationX { get; set; } // In the car's local space; X = right, Y = up, Z = forward - public float AccelerationY { get; set; } + // public float AccelerationY { get; set; } public float AccelerationZ { get; set; } - public float VelocityX { get; set; } // In the car's local space; X = right, Y = up, Z = forward - public float VelocityY { get; set; } - public float VelocityZ { get; set; } - public float AngularVelocityX { get; set; } // In the car's local space; X = pitch, Y = yaw, Z = roll - public float AngularVelocityY { get; set; } - public float AngularVelocityZ { get; set; } - public float Yaw { get; set; } - public float Pitch { get; set; } - public float Roll { get; set; } - public float NormalizedSuspensionTravelFrontLeft { get; set; } // Suspension travel normalized: 0.0f = max stretch; 1.0 = max compression - public float NormalizedSuspensionTravelFrontRight { get; set; } - public float NormalizedSuspensionTravelRearLeft { get; set; } - public float NormalizedSuspensionTravelRearRight { get; set; } - public float TireSlipRatioFrontLeft { get; set; } // Tire normalized slip ratio, = 0 means 100% grip and |ratio| > 1.0 means loss of grip. - public float TireSlipRatioFrontRight { get; set; } - public float TireSlipRatioRearLeft { get; set; } - public float TireSlipRatioRearRight { get; set; } - public float WheelRotationSpeedFrontLeft { get; set; } // Wheel rotation speed radians/sec. - public float WheelRotationSpeedFrontRight { get; set; } - public float WheelRotationSpeedRearLeft { get; set; } - public float WheelRotationSpeedRearRight { get; set; } - public float WheelOnRumbleStripFrontLeft { get; set; } // = 1 when wheel is on rumble strip, = 0 when off. - public float WheelOnRumbleStripFrontRight { get; set; } - public float WheelOnRumbleStripRearLeft { get; set; } - public float WheelOnRumbleStripRearRight { get; set; } - public float WheelInPuddleDepthFrontLeft { get; set; } // = from 0 to 1, where 1 is the deepest puddle - public float WheelInPuddleDepthFrontRight { get; set; } - public float WheelInPuddleDepthRearLeft { get; set; } - public float WheelInPuddleDepthRearRight { get; set; } - public float SurfaceRumbleFrontLeft { get; set; } // Non-dimensional surface rumble values passed to controller force feedback - public float SurfaceRumbleFrontRight { get; set; } - public float SurfaceRumbleRearLeft { get; set; } - public float SurfaceRumbleRearRight { get; set; } - public float TireSlipAngleFrontLeft { get; set; } // Tire normalized slip angle, = 0 means 100% grip and |angle| > 1.0 means loss of grip. - public float TireSlipAngleFrontRight { get; set; } - public float TireSlipAngleRearLeft { get; set; } - public float TireSlipAngleRearRight { get; set; } + public float TireCombinedSlipFrontLeft { get; set; } // Tire normalized combined slip, = 0 means 100% grip and |slip| > 1.0 means loss of grip. public float TireCombinedSlipFrontRight { get; set; } public float TireCombinedSlipRearLeft { get; set; } public float TireCombinedSlipRearRight { get; set; } - public float SuspensionTravelMetersFrontLeft { get; set; } // Actual suspension travel in meters - public float SuspensionTravelMetersFrontRight { get; set; } - public float SuspensionTravelMetersRearLeft { get; set; } - public float SuspensionTravelMetersRearRight { get; set; } - public uint CarOrdinal { get; set; } // Unique ID of the car make/model + public uint CarClass { get; set; } // Between 0 (D -- worst cars) and 7 (X class -- best cars) inclusive public uint CarPerformanceIndex { get; set; } // Between 100 (slowest car) and 999 (fastest car) inclusive - public uint DrivetrainType { get; set; } // Corresponds to EDrivetrainType; 0 = FWD, 1 = RWD, 2 = AWD - public uint NumCylinders { get; set; } // Number of cylinders in the engine - // Dash - public float PositionX { get; set; } - public float PositionY { get; set; } - public float PositionZ { get; set; } public float Speed { get; set; } public float Power { get; set; } - public float Torque { get; set; } - public float TireTempFl { get; set; } - public float TireTempFr { get; set; } - public float TireTempRl { get; set; } - public float TireTempRr { get; set; } - public float Boost { get; set; } - public float Fuel { get; set; } - public float Distance { get; set; } - public float BestLapTime { get; set; } - public float LastLapTime { get; set; } - public float CurrentLapTime { get; set; } - public float CurrentRaceTime { get; set; } - public uint Lap { get; set; } - public uint RacePosition { get; set; } - public uint Accelerator { get; set; } - public uint Brake { get; set; } - public uint Clutch { get; set; } - public uint Handbrake { get; set; } - public uint Gear { get; set; } - public int Steer { get; set; } - public uint NormalDrivingLine { get; set; } - public uint NormalAiBrakeDifference { get; set; } + + public float FourWheelCombinedTireSlip { get; set; } // Combined slip for all wheels where 0 means 100% grip and |slip| > 1.0 means loss of grip. + public float FrontWheelsCombinedTireSlip { get; set; } + public float RearWheelsCombinedTireSlip { get; set; } + + + // public uint TimestampMS { get; set; } // Can overflow to 0 eventually + + // public float VelocityX { get; set; } // In the car's local space; X = right, Y = up, Z = forward + // public float VelocityY { get; set; } + // public float VelocityZ { get; set; } + // public float AngularVelocityX { get; set; } // In the car's local space; X = pitch, Y = yaw, Z = roll + // public float AngularVelocityY { get; set; } + // public float AngularVelocityZ { get; set; } + // public float Yaw { get; set; } + // public float Pitch { get; set; } + // public float Roll { get; set; } + // public float NormalizedSuspensionTravelFrontLeft { get; set; } // Suspension travel normalized: 0.0f = max stretch; 1.0 = max compression + /* public float NormalizedSuspensionTravelFrontRight { get; set; } + public float NormalizedSuspensionTravelRearLeft { get; set; } + public float NormalizedSuspensionTravelRearRight { get; set; } + public float TireSlipRatioFrontLeft { get; set; } // Tire normalized slip ratio, = 0 means 100% grip and |ratio| > 1.0 means loss of grip. + public float TireSlipRatioFrontRight { get; set; } + public float TireSlipRatioRearLeft { get; set; } + public float TireSlipRatioRearRight { get; set; } + public float WheelRotationSpeedFrontLeft { get; set; } // Wheel rotation speed radians/sec. + public float WheelRotationSpeedFrontRight { get; set; } + public float WheelRotationSpeedRearLeft { get; set; } + public float WheelRotationSpeedRearRight { get; set; } + public float WheelOnRumbleStripFrontLeft { get; set; } // = 1 when wheel is on rumble strip, = 0 when off. + public float WheelOnRumbleStripFrontRight { get; set; } + public float WheelOnRumbleStripRearLeft { get; set; } + public float WheelOnRumbleStripRearRight { get; set; } + public float WheelInPuddleDepthFrontLeft { get; set; } // = from 0 to 1, where 1 is the deepest puddle + public float WheelInPuddleDepthFrontRight { get; set; } + public float WheelInPuddleDepthRearLeft { get; set; } + public float WheelInPuddleDepthRearRight { get; set; } + public float SurfaceRumbleFrontLeft { get; set; } // Non-dimensional surface rumble values passed to controller force feedback + public float SurfaceRumbleFrontRight { get; set; } + public float SurfaceRumbleRearLeft { get; set; } + public float SurfaceRumbleRearRight { get; set; } + public float TireSlipAngleFrontLeft { get; set; } // Tire normalized slip angle, = 0 means 100% grip and |angle| > 1.0 means loss of grip. + public float TireSlipAngleFrontRight { get; set; } + public float TireSlipAngleRearLeft { get; set; } + public float TireSlipAngleRearRight { get; set; }*/ + + /* public float SuspensionTravelMetersFrontLeft { get; set; } // Actual suspension travel in meters + public float SuspensionTravelMetersFrontRight { get; set; } + public float SuspensionTravelMetersRearLeft { get; set; } + public float SuspensionTravelMetersRearRight { get; set; } + public uint CarOrdinal { get; set; } // Unique ID of the car make/model*/ + + /* public uint DrivetrainType { get; set; } // Corresponds to EDrivetrainType; 0 = FWD, 1 = RWD, 2 = AWD + public uint NumCylinders { get; set; } // Number of cylinders in the engine + + // Dash + public float PositionX { get; set; } + public float PositionY { get; set; } + public float PositionZ { get; set; }*/ + + /* public float Torque { get; set; } + public float TireTempFl { get; set; } + public float TireTempFr { get; set; } + public float TireTempRl { get; set; } + public float TireTempRr { get; set; } + public float Boost { get; set; } + public float Fuel { get; set; } + public float Distance { get; set; } + public float BestLapTime { get; set; } + public float LastLapTime { get; set; } + public float CurrentLapTime { get; set; } + public float CurrentRaceTime { get; set; } + public uint Lap { get; set; } + public uint RacePosition { get; set; }*/ + + /* public uint Clutch { get; set; } + public uint Handbrake { get; set; } + public uint Gear { get; set; } + public int Steer { get; set; } + public uint NormalDrivingLine { get; set; } + public uint NormalAiBrakeDifference { get; set; }*/ } } diff --git a/ForzaDSX.csproj.user b/ForzaDSX.csproj.user index cf6e5c3..c302bd1 100644 --- a/ForzaDSX.csproj.user +++ b/ForzaDSX.csproj.user @@ -8,6 +8,9 @@ <_LastSelectedProfileId>E:\Development\Projects\ForzaDSX\Properties\PublishProfiles\FolderProfile.pubxml + + Form + Form diff --git a/ForzaDSXWorker.cs b/ForzaDSXWorker.cs index 6f1c2af..ca12355 100644 --- a/ForzaDSXWorker.cs +++ b/ForzaDSXWorker.cs @@ -1,7 +1,10 @@ -using System; +using ForzaDSX.Config; +using ForzaDSX.GameParsers; +using System; using System.IO; using System.Net; using System.Net.Sockets; +using System.Runtime.InteropServices; using System.Text; namespace ForzaDSX @@ -35,21 +38,40 @@ public enum RacingReportType : ushort // 3 = Brake message BRAKE } - - public ForzaDSXReportStruct(ReportType type, RacingReportType racingType, string msg) + public ForzaDSXReportStruct(VerboseLevel level, ReportType type, RacingReportType racingType, string msg) + { + this.verboseLevel = level; + this.type = type; + this.racingType = racingType; + this.message = msg; + } + public ForzaDSXReportStruct(ReportType type, RacingReportType racingType, string msg) { this.type = type; this.racingType = racingType; this.message = msg; } - public ForzaDSXReportStruct(ReportType type, string msg) + public ForzaDSXReportStruct(VerboseLevel level, ReportType type, string msg) + { + this.verboseLevel = level; + this.type = type; + this.message = msg; + } + + public ForzaDSXReportStruct(ReportType type, string msg) { this.type = type; this.message = msg; } + public ForzaDSXReportStruct(VerboseLevel level, string msg) + { + this.verboseLevel = level; + this.type = ReportType.VERBOSEMESSAGE; + this.message = String.Empty; + } - public ForzaDSXReportStruct(string msg) + public ForzaDSXReportStruct(string msg) { this.type = ReportType.VERBOSEMESSAGE; this.message = String.Empty; @@ -58,48 +80,24 @@ public ForzaDSXReportStruct(string msg) public ReportType type = 0; public RacingReportType racingType = 0; public string message = string.Empty; + public VerboseLevel verboseLevel = VerboseLevel.Limited; } - ForzaDSX.Properties.Settings settings; + ForzaDSX.Config.Config settings; IProgress progressReporter; + Parser parser; + + - int lastThrottleResistance = 1; - int lastThrottleFreq = 0; - int lastBrakeResistance = 200; - int lastBrakeFreq = 0; - - uint LastValidCarClass = 0; - int LastValidCarCPI = 0; - float MaxCPI = 255; - - float LastEngineRPM = 0; - // FH does not always correctly set IsRaceOn, so we must also check if the RPM info is the same for a certain ammount of time - uint LastRPMAccumulator = 0; - uint RPMAccumulatorTriggerRaceOff = 200; - - // Colors for Light Bar while in menus -> using car's PI colors from Forza - public static readonly uint CarClassD = 0; - public static readonly int[] ColorClassD = { 107, 185, 236 }; - public static readonly uint CarClassC = 1; - public static readonly int[] ColorClassC = { 234, 202, 49 }; - public static readonly uint CarClassB = 2; - public static readonly int[] ColorClassB = { 211, 90, 37 }; - public static readonly uint CarClassA = 3; - public static readonly int[] ColorClassA = { 187, 59, 34 }; - public static readonly uint CarClassS1 = 4; - public static readonly int[] ColorClassS1 = { 128, 54, 243 }; - public static readonly uint CarClassS2 = 5; - public static readonly int[] ColorClassS2 = { 75, 88, 229 }; - public static readonly int[] ColorClassX = { 105, 182, 72 }; - - - public ForzaDSXWorker(ForzaDSX.Properties.Settings currentSettings, IProgress progressReporter) + + + public ForzaDSXWorker(ForzaDSX.Config.Config currentSettings, IProgress progressReporter) { settings = currentSettings; this.progressReporter = progressReporter; } - public void SetSettings(ForzaDSX.Properties.Settings currentSettings) + public void SetSettings(ForzaDSX.Config.Config currentSettings) { lock(this) { @@ -111,328 +109,66 @@ public void SetSettings(ForzaDSX.Properties.Settings currentSettings) //See DataPacket.cs for more details about what forza parameters can be accessed. //See the Enums at the bottom of this file for details about commands that can be sent to DualSenseX //Also see the Test Function below to see examples about those commands - void SendData(DataPacket data) + void SendData() { Packet p = new Packet(); + // Parser parser = new ForzaParser(settings); CsvData csvRecord = new CsvData(); - //Set the controller to do this for - int controllerIndex = 0; - - ////Initialize our array of instructions - //p.instructions = new Instruction[3]; - - /* Combined variables */ - int resistance = 0; - int filteredResistance = 0; - float avgAccel = 0; - int freq = 0; - int filteredFreq = 0; - - bool bInRace = data.IsRaceOn; - - float currentRPM = data.CurrentEngineRpm; - // FH does not always correctly set IsRaceOn, so we must also check if the RPM info is the same for a certain ammount of time - // Also check if Power <= 0 (car is really stopped) - if (currentRPM == LastEngineRPM - && data.Power <= 0) - { - LastRPMAccumulator++; - if (LastRPMAccumulator > RPMAccumulatorTriggerRaceOff) - { - bInRace = false; - } - } - else - { - LastRPMAccumulator = 0; - } - - LastEngineRPM = currentRPM; - - //Get average tire slippage. This value runs from 0.0 upwards with a value of 1.0 or greater meaning total loss of grip. - float combinedTireSlip = (Math.Abs(data.TireCombinedSlipFrontLeft) + Math.Abs(data.TireCombinedSlipFrontRight) + Math.Abs(data.TireCombinedSlipRearLeft) + Math.Abs(data.TireCombinedSlipRearRight)) / 4; - float combinedFrontTireSlip = (Math.Abs(data.TireCombinedSlipFrontLeft) + Math.Abs(data.TireCombinedSlipFrontRight)) / 2; - float combinedRearTireSlip = (Math.Abs(data.TireCombinedSlipRearLeft) + Math.Abs(data.TireCombinedSlipRearRight)) / 2; - - uint currentClass = LastValidCarClass; - if (data.CarClass > 0) - { - LastValidCarClass = currentClass = data.CarClass; - } - - int currentCPI = LastValidCarCPI; - if (data.CarPerformanceIndex > 0) - { - LastValidCarCPI = currentCPI = Math.Min((int)data.CarPerformanceIndex, 255); - } - - // Right Trigger (index 2) - //int RightTrigger = 2; - Instruction RightTrigger = new Instruction(); - RightTrigger.type = InstructionType.TriggerUpdate; - //p.instructions[RightTrigger].type = InstructionType.TriggerUpdate; - - // Left Trigger - //int LeftTrigger = 1; - //p.instructions[LeftTrigger].type = InstructionType.TriggerUpdate; - Instruction LeftTrigger = new Instruction(); - LeftTrigger.type = InstructionType.TriggerUpdate; - - // Light Bar - //int LightBar = 0; - //p.instructions[LightBar].type = InstructionType.RGBUpdate; - Instruction LightBar = new Instruction(); - LightBar.type = InstructionType.RGBUpdate; + Profile activeProfile = settings.ActiveProfile; + ReportableInstruction reportableInstruction = new ReportableInstruction(); + // No race = normal triggers - if (!bInRace) + if (!parser.IsRaceOn()) { - RightTrigger.parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Normal, 0, 0 }; - LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Normal, 0, 0 }; - - #region Light Bar color - int CPIcolorR = 255; - int CPIcolorG = 255; - int CPIcolorB = 255; - - float cpiRatio = currentCPI / MaxCPI; + - if (currentClass <= CarClassD) + reportableInstruction = parser.GetPreRaceInstructions(); + p.instructions = reportableInstruction.Instructions; + reportableInstruction.ForzaDSXReportStructs.ForEach(x => { - CPIcolorR = (int)Math.Floor(cpiRatio * ColorClassD[0]); - CPIcolorG = (int)Math.Floor(cpiRatio * ColorClassD[1]); - CPIcolorB = (int)Math.Floor(cpiRatio * ColorClassD[2]); - } - else if (currentClass <= CarClassC) - { - CPIcolorR = (int)Math.Floor(cpiRatio * ColorClassC[0]); - CPIcolorG = (int)Math.Floor(cpiRatio * ColorClassC[1]); - CPIcolorB = (int)Math.Floor(cpiRatio * ColorClassC[2]); - } - else if (currentClass <= CarClassB) - { - CPIcolorR = (int)Math.Floor(cpiRatio * ColorClassB[0]); - CPIcolorG = (int)Math.Floor(cpiRatio * ColorClassB[1]); - CPIcolorB = (int)Math.Floor(cpiRatio * ColorClassB[2]); - } - else if (currentClass <= CarClassA) - { - CPIcolorR = (int)Math.Floor(cpiRatio * ColorClassA[0]); - CPIcolorG = (int)Math.Floor(cpiRatio * ColorClassA[1]); - CPIcolorB = (int)Math.Floor(cpiRatio * ColorClassA[2]); - } - else if (currentClass <= CarClassS1) - { - CPIcolorR = (int)Math.Floor(cpiRatio * ColorClassS1[0]); - CPIcolorG = (int)Math.Floor(cpiRatio * ColorClassS1[1]); - CPIcolorB = (int)Math.Floor(cpiRatio * ColorClassS1[2]); - } - else if (currentClass <= CarClassS2) - { - CPIcolorR = (int)Math.Floor(cpiRatio * ColorClassS2[0]); - CPIcolorG = (int)Math.Floor(cpiRatio * ColorClassS2[1]); - CPIcolorB = (int)Math.Floor(cpiRatio * ColorClassS2[2]); - } - else - { - CPIcolorR = ColorClassX[0]; - CPIcolorG = ColorClassX[1]; - CPIcolorB = ColorClassX[2]; - } - - LightBar.parameters = new object[] { controllerIndex, CPIcolorR, CPIcolorG, CPIcolorB }; - #endregion - - if (settings._verbose > 0 - && progressReporter != null) - { - progressReporter.Report(new ForzaDSXReportStruct(ForzaDSXReportStruct.ReportType.NORACE, $"No race going on. Normal Triggers. Car's Class = {currentClass}; CPI = {currentCPI}; CPI Ratio = {cpiRatio}; Color [{CPIcolorR}, {CPIcolorG}, {CPIcolorB}]" )); - } - p.instructions = new Instruction[] { LightBar, LeftTrigger, RightTrigger }; + if (x.verboseLevel <= settings.VerboseLevel + && progressReporter != null) + { + progressReporter.Report(x); + } + }); //Send the commands to DSX Send(p); } else { - #region Right Trigger - //Set the updates for the right Trigger(Throttle) - - avgAccel = (float)Math.Sqrt((settings._turn_Accel_Mod * (data.AccelerationX * data.AccelerationX)) + (settings._forward_Accel_Mod * (data.AccelerationZ * data.AccelerationZ))); - - // Define losing grip as front tires slipping or rear tires slipping while accelerating a fair ammount - bool bLosingAccelGrip = - combinedFrontTireSlip > settings._throttle_Grip_Loss_Val - || (combinedRearTireSlip > settings._throttle_Grip_Loss_Val && data.Accelerator > 200); - - if (settings.ThrottleTriggerMode == (sbyte)InstructionTriggerMode.NONE) - { - RightTrigger.parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Normal, 0, 0 }; - } - // If losing grip, start to "vibrate" - else if (bLosingAccelGrip && settings.ThrottleTriggerMode == (sbyte)InstructionTriggerMode.VIBRATION) - { - freq = (int)Math.Floor(Map(combinedTireSlip, settings._throttle_Grip_Loss_Val, 5, 0, settings._max_Accel_Griploss_Vibration)); - resistance = (int)Math.Floor(Map(avgAccel, 0, settings._acceleration_Limit, settings._min_Accel_Griploss_Stiffness, settings._max_Accel_Griploss_Stiffness)); - filteredResistance = (int)EWMA(resistance, lastThrottleResistance, settings._ewma_Alpha_Throttle); - filteredFreq = (int)EWMA(freq, lastThrottleFreq, settings._ewma_Alpha_Throttle_Freq); + reportableInstruction = parser.GetInRaceRightTriggerInstruction(); + sendReportableInstruction(reportableInstruction); + reportableInstruction = parser.GetInRaceLeftTriggerInstruction(); + sendReportableInstruction(reportableInstruction); + reportableInstruction = parser.GetInRaceLightbarInstruction(); + sendReportableInstruction(reportableInstruction); - lastThrottleResistance = filteredResistance; - lastThrottleFreq = filteredFreq; - - if (filteredFreq <= settings._min_Accel_Griploss_Vibration - || data.Accelerator <= settings._throttle_Vibration_Mode_Start) - { - RightTrigger.parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Resistance, 0, filteredResistance * settings._right_Trigger_Effect_Intensity }; - - filteredFreq = 0; - filteredResistance = 0; - } - else - { - RightTrigger.parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.CustomTriggerValue, CustomTriggerValueMode.VibrateResistance, filteredFreq * settings._right_Trigger_Effect_Intensity, filteredResistance * settings._right_Trigger_Effect_Intensity, settings._throttle_Vibration_Mode_Start, 0, 0, 0, 0 }; - } - - if (settings._verbose > 0 - && progressReporter != null) - { - progressReporter.Report(new ForzaDSXReportStruct(ForzaDSXReportStruct.ReportType.RACING, ForzaDSXReportStruct.RacingReportType.THROTTLE_VIBRATION, $"Setting Throttle to vibration mode with freq: {filteredFreq}, Resistance: {filteredResistance}" )); - } - } - else - { - //It should probably always be uniformly stiff - resistance = (int)Math.Floor(Map(avgAccel, 0, settings._acceleration_Limit, settings._min_Throttle_Resistance, settings._max_Throttle_Resistance)); - filteredResistance = (int)EWMA(resistance, lastThrottleResistance, settings._ewma_Alpha_Throttle); - - lastThrottleResistance = filteredResistance; - RightTrigger.parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Resistance, 0, filteredResistance * settings._right_Trigger_Effect_Intensity }; - - if (settings._verbose > 0 - && progressReporter != null) - { - progressReporter.Report(new ForzaDSXReportStruct(ForzaDSXReportStruct.ReportType.RACING, ForzaDSXReportStruct.RacingReportType.THROTTLE_VIBRATION, String.Empty)); - } - } - - if (settings._verbose > 0 - && progressReporter != null) - { - progressReporter.Report(new ForzaDSXReportStruct(ForzaDSXReportStruct.ReportType.RACING, ForzaDSXReportStruct.RacingReportType.THROTTLE, $"Average Acceleration: {avgAccel}; Throttle Resistance: {filteredResistance}; Accelerator: {data.Accelerator}" )); - } - - p.instructions = new Instruction[] { RightTrigger }; - - //Send the commands to DSX - Send(p); - #endregion - #region Left Trigger - //Update the left(Brake) trigger - - // Define losing grip as tires slipping while braking a fair ammount - bool bLosingBrakeGrip = combinedTireSlip > settings._grip_Loss_Val && data.Brake > 100; - - if (settings.BrakeTriggerMode == (sbyte)InstructionTriggerMode.NONE) - { - LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Normal, 0, 0 }; - } - // If losing grip, start to "vibrate" - else if (bLosingBrakeGrip && settings.BrakeTriggerMode == (sbyte)InstructionTriggerMode.VIBRATION) - { - freq = (int)Math.Floor(Map(combinedTireSlip, settings._grip_Loss_Val, 5, 0, settings._max_Brake_Vibration)); - resistance = (int)Math.Floor(Map(data.Brake, 0, 255, settings._max_Brake_Stiffness, settings._min_Brake_Stiffness)); - filteredResistance = (int)EWMA(resistance, lastBrakeResistance, settings._ewma_Alpha_Brake); - filteredFreq = (int)EWMA(freq, lastBrakeFreq, settings._ewma_Alpha_Brake_Freq); - - lastBrakeResistance = filteredResistance; - lastBrakeFreq = filteredFreq; - - if (filteredFreq <= settings._min_Brake_Vibration) - { - LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Resistance, 0, 0 }; - } - else - { - LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.CustomTriggerValue, CustomTriggerValueMode.VibrateResistance, filteredFreq * settings._left_Trigger_Effect_Intensity, filteredResistance * settings._left_Trigger_Effect_Intensity, settings._brake_Vibration_Start, 0, 0, 0, 0 }; - } - //Set left trigger to the custom mode VibrateResitance with values of Frequency = freq, Stiffness = 104, startPostion = 76. - if (settings._verbose > 0 - && progressReporter != null) - { - progressReporter.Report(new ForzaDSXReportStruct(ForzaDSXReportStruct.ReportType.RACING, ForzaDSXReportStruct.RacingReportType.BRAKE_VIBRATION, $"Setting Brake to vibration mode with freq: {filteredFreq}, Resistance: {filteredResistance}" )); - } - } - else - { - //By default, Increasingly resistant to force - resistance = (int)Math.Floor(Map(data.Brake, 0, 255, settings._min_Brake_Resistance, settings._max_Brake_Resistance)); - filteredResistance = (int)EWMA(resistance, lastBrakeResistance, settings._ewma_Alpha_Brake); - lastBrakeResistance = filteredResistance; - - LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Resistance, 0, filteredResistance * settings._left_Trigger_Effect_Intensity }; - - if (settings._verbose > 0 - && progressReporter != null) - { - progressReporter.Report(new ForzaDSXReportStruct(ForzaDSXReportStruct.ReportType.RACING, ForzaDSXReportStruct.RacingReportType.BRAKE_VIBRATION, String.Empty )); - } - } - - if (settings._verbose > 0 - && progressReporter != null) - { - progressReporter.Report(new ForzaDSXReportStruct(ForzaDSXReportStruct.ReportType.RACING, ForzaDSXReportStruct.RacingReportType.BRAKE, $"Brake: {data.Brake}; Brake Resistance: {filteredResistance}; Tire Slip: {combinedTireSlip}" )); - } - - p.instructions = new Instruction[] { LeftTrigger}; - - //Send the commands to DSX - Send(p); - #endregion - - #region Light Bar - //Update the light bar - //Currently registers intensity on the green channel based on engine RPM as a percantage of the maxium. Changes to red if RPM ratio > 80% (usually red line) - float engineRange = data.EngineMaxRpm - data.EngineIdleRpm; - float CurrentRPMRatio = (currentRPM - data.EngineIdleRpm) / engineRange; - int GreenChannel = Math.Max((int)Math.Floor(CurrentRPMRatio * 255), 50); - int RedChannel = (int)Math.Floor(CurrentRPMRatio * 255); - if (CurrentRPMRatio >= settings._rpm_Redline_Ratio) - { - // Remove Green - GreenChannel = 255 - GreenChannel; - } - - LightBar.parameters = new object[] { controllerIndex, RedChannel, GreenChannel, 0 }; - - if (settings._verbose > 1 - && progressReporter != null) - { - progressReporter.Report(new ForzaDSXReportStruct($"Engine RPM: {data.CurrentEngineRpm}; Engine Max RPM: {data.EngineMaxRpm}; Engine Idle RPM: {data.EngineIdleRpm}")); - } - - p.instructions = new Instruction[] { LightBar }; - - //Send the commands to DSX - Send(p); - #endregion } } - //Maps floats from one range to another. - public float Map(float x, float in_min, float in_max, float out_min, float out_max) + private void sendReportableInstruction(ReportableInstruction reportableInstruction) { - if (x > in_max) - { - x = in_max; - } - else if (x < in_min) + reportableInstruction.ForzaDSXReportStructs.ForEach(x => { - x = in_min; - } - return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; - } + + if (x.verboseLevel <= settings.VerboseLevel + && progressReporter != null) + { + progressReporter.Report(x); + } + }); + Packet p = new Packet(); + p.instructions = reportableInstruction.Instructions; + //Send the commands to DSX + Send(p); + } + + //Maps floats from one range to another. + //private DataPacket data; static UdpClient senderClient; @@ -442,7 +178,7 @@ public float Map(float x, float in_min, float in_max, float out_min, float out_m void Connect() { senderClient = new UdpClient(); - var portNumber = settings._dsx_PORT; + var portNumber = settings.DSXPort; if (progressReporter != null) { @@ -458,9 +194,9 @@ void Connect() { if (progressReporter != null) { - progressReporter.Report(new ForzaDSXReportStruct($"DSX provided a non-numerical port! Using configured default ({settings._dsx_PORT}).")); + progressReporter.Report(new ForzaDSXReportStruct($"DSX provided a non-numerical port! Using configured default ({settings.DSXPort}).")); } - portNum = settings._dsx_PORT; + portNum = settings.DSXPort; } endPoint = new IPEndPoint(Triggers.localhost, portNum); @@ -495,20 +231,20 @@ void Connect() //Send Data to DSX void Send(Packet data) { - if (settings._verbose > 1 + if (settings.VerboseLevel > VerboseLevel.Limited && progressReporter != null) { progressReporter.Report(new ForzaDSXReportStruct($"Converting Message to JSON" )); } byte[] RequestData = Encoding.ASCII.GetBytes(Triggers.PacketToJson(data)); - if (settings._verbose > 1 + if (settings.VerboseLevel > VerboseLevel.Limited && progressReporter != null) { progressReporter.Report(new ForzaDSXReportStruct($"{Encoding.ASCII.GetString(RequestData)}" )); } try { - if (settings._verbose > 1 + if (settings.VerboseLevel > VerboseLevel.Limited && progressReporter != null) { progressReporter.Report(new ForzaDSXReportStruct($"Sending Message to DSX..." )); @@ -516,7 +252,7 @@ void Send(Packet data) senderClient.Send(RequestData, RequestData.Length); - if (settings._verbose > 1 + if (settings.VerboseLevel > VerboseLevel.Limited && progressReporter != null) { progressReporter.Report(new ForzaDSXReportStruct($"Message sent to DSX" )); @@ -571,10 +307,30 @@ public void Run() try { Connect(); - + if (settings.ActiveProfile == null) + { + if (progressReporter != null) + { + progressReporter.Report(new ForzaDSXReportStruct("No active profile selected. Exiting...")); + } + return; + } + switch (settings.ActiveProfile.GameType) + { + case GameTypes.Forza: + parser = new ForzaParser(settings); + break; + case GameTypes.Dirt: + parser = new DirtParser(settings); + break; + default: + parser = new NullParser(settings); + break; + } + //parser = new ForzaParser(settings); //Connect to Forza - ipEndPoint = new IPEndPoint(IPAddress.Loopback, settings._forza_PORT); - client = new UdpClient(settings._forza_PORT); + ipEndPoint = new IPEndPoint(IPAddress.Loopback, settings.ActiveProfile.gameUDPPort); + client = new UdpClient(settings.ActiveProfile.gameUDPPort); DataPacket data; byte[] resultBuffer; @@ -588,7 +344,7 @@ public void Run() if (resultBuffer == null) continue; //receive = await client.ReceiveAsync(); - if (settings._verbose > 1 + if (settings.VerboseLevel > VerboseLevel.Limited && progressReporter != null) { progressReporter.Report(new ForzaDSXReportStruct("recieved Message from Forza!")); @@ -599,15 +355,16 @@ public void Run() { // return; } - data = ParseData(resultBuffer); - if (settings._verbose > 1 + //data = parseDirtData(resultBuffer); + parser.ParsePacket(resultBuffer); + if (settings.VerboseLevel > VerboseLevel.Limited && progressReporter != null) { progressReporter.Report(new ForzaDSXReportStruct("Data Parsed")); } //Process and send data to DSX - SendData(data); + SendData(); } } catch (Exception e) @@ -627,7 +384,7 @@ public void Stop() { bRunning = false; - if (settings._verbose > 0 + if (settings.VerboseLevel > VerboseLevel.Off && progressReporter != null) { progressReporter.Report(new ForzaDSXReportStruct($"Cleaning Up")); @@ -644,23 +401,17 @@ public void Stop() senderClient.Dispose(); } - if (settings._verbose > 0) + if (settings.VerboseLevel > VerboseLevel.Off) { progressReporter.Report(new ForzaDSXReportStruct($"Cleanup Finished. Exiting...")); } } - static float EWMA(float input, float last, float alpha) - { - return (alpha * input) + (1 - alpha) * last; - } - static int EWMA(int input, int last, float alpha) - { - return (int)Math.Floor(EWMA((float)input, (float)last, alpha)); - } - //Parses data from Forza into a DataPacket - DataPacket ParseData(byte[] packet) + + + //Parses data from Forza into a DataPacket + /* DataPacket ParseData(byte[] packet) { DataPacket data = new DataPacket(); @@ -754,7 +505,7 @@ DataPacket ParseData(byte[] packet) data.NormalAiBrakeDifference = packet.NormalAiBrakeDifference(); return data; - } + }*/ //Support different standards static bool AdjustToBufferType(int bufferLength) diff --git a/GameParsers/DirtParser.cs b/GameParsers/DirtParser.cs new file mode 100644 index 0000000..07e5892 --- /dev/null +++ b/GameParsers/DirtParser.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ForzaDSX.GameParsers +{ + internal class DirtParser : Parser + { + public DirtParser(Config.Config settings) : base(settings) + { + } + + public override void ParsePacket(byte[] packet) + { + data = new DataPacket(); + //data.AccelerationX + + data.IsRaceOn = true; + data.Power = 1; + data.CurrentEngineRpm = PacketParse.GetSingle(packet, 148) * 10.0f; + data.Speed = PacketParse.GetSingle(packet, 28); + data.frontLeftContactPatchV = PacketParse.GetSingle(packet, 108); + data.TireCombinedSlipFrontLeft = calcTireSlip(PacketParse.GetSingle(packet, 108), data.Speed); + data.TireCombinedSlipFrontRight = calcTireSlip(PacketParse.GetSingle(packet, 112), data.Speed); + data.TireCombinedSlipRearLeft = calcTireSlip(PacketParse.GetSingle(packet, 100), data.Speed); + data.TireCombinedSlipRearRight = calcTireSlip(PacketParse.GetSingle(packet, 104), data.Speed); + + + data.CarClass = 0; + + data.CarPerformanceIndex = 0; + + data.AccelerationX = PacketParse.GetSingle(packet, 136); + + data.AccelerationZ = PacketParse.GetSingle(packet, 140); + + data.Accelerator = (uint)(PacketParse.GetSingle(packet, 116) * 255.0f); + + data.Brake = (uint)(PacketParse.GetSingle(packet, 120) * 255.0f); + + data.EngineMaxRpm = PacketParse.GetSingle(packet, 252) * 10.0f; + data.EngineIdleRpm = 0; + data.FourWheelCombinedTireSlip = (Math.Abs(data.TireCombinedSlipFrontLeft) + Math.Abs(data.TireCombinedSlipFrontRight) + Math.Abs(data.TireCombinedSlipRearLeft) + Math.Abs(data.TireCombinedSlipRearRight)) / 4; + data.FrontWheelsCombinedTireSlip = (Math.Abs(data.TireCombinedSlipFrontLeft) + Math.Abs(data.TireCombinedSlipFrontRight)) / 2; + data.RearWheelsCombinedTireSlip = (Math.Abs(data.TireCombinedSlipRearLeft) + Math.Abs(data.TireCombinedSlipRearRight)) / 2; + } + static float calcTireSlip(float contactPatchSpeed, float vehicleSpeed) + { + if (Math.Abs(vehicleSpeed) < 0.1f) + { + return 0; + } + return 3.0f * (Math.Abs(Math.Abs(contactPatchSpeed) - vehicleSpeed) / vehicleSpeed); + } + + } +} diff --git a/GameParsers/ForzaParser.cs b/GameParsers/ForzaParser.cs new file mode 100644 index 0000000..a34993f --- /dev/null +++ b/GameParsers/ForzaParser.cs @@ -0,0 +1,247 @@ +using ForzaDSX.Config; +using ForzaDSX.Properties; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static ForzaDSX.ForzaDSXWorker; + +namespace ForzaDSX.GameParsers +{ + internal class ForzaParser : Parser + { + // Colors for Light Bar while in menus -> using car's PI colors from Forza + public static readonly uint CarClassD = 0; + public static readonly int[] ColorClassD = { 107, 185, 236 }; + public static readonly uint CarClassC = 1; + public static readonly int[] ColorClassC = { 234, 202, 49 }; + public static readonly uint CarClassB = 2; + public static readonly int[] ColorClassB = { 211, 90, 37 }; + public static readonly uint CarClassA = 3; + public static readonly int[] ColorClassA = { 187, 59, 34 }; + public static readonly uint CarClassS1 = 4; + public static readonly int[] ColorClassS1 = { 128, 54, 243 }; + public static readonly uint CarClassS2 = 5; + public static readonly int[] ColorClassS2 = { 75, 88, 229 }; + public static readonly int[] ColorClassX = { 105, 182, 72 }; + public ForzaParser(Config.Config settings) : base(settings) + { + } + + public override bool IsRaceOn() + { + bool bInRace = data.IsRaceOn; + float currentRPM = data.CurrentEngineRpm; + + if (currentRPM == LastEngineRPM + && data.Power <= 0) + { + LastRPMAccumulator++; + if (LastRPMAccumulator > RPMAccumulatorTriggerRaceOff) + { + bInRace = false; + } + } + else + { + LastRPMAccumulator = 0; + } + + LastEngineRPM = currentRPM; + return bInRace; + } + + public override ReportableInstruction GetPreRaceInstructions() + { + ReportableInstruction reportableInstruction = new ReportableInstruction(); + + uint currentClass = LastValidCarClass; + if (data.CarClass > 0) + { + LastValidCarClass = currentClass = data.CarClass; + } + + int currentCPI = LastValidCarCPI; + if (data.CarPerformanceIndex > 0) + { + LastValidCarCPI = currentCPI = Math.Min((int)data.CarPerformanceIndex, 255); + } + + + RightTrigger.parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Normal, 0, 0 }; + LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Normal, 0, 0 }; + + #region Light Bar color + int CPIcolorR = 255; + int CPIcolorG = 255; + int CPIcolorB = 255; + + float cpiRatio = currentCPI / MaxCPI; + + if (currentClass <= CarClassD) + { + CPIcolorR = (int)Math.Floor(cpiRatio * ColorClassD[0]); + CPIcolorG = (int)Math.Floor(cpiRatio * ColorClassD[1]); + CPIcolorB = (int)Math.Floor(cpiRatio * ColorClassD[2]); + } + else if (currentClass <= CarClassC) + { + CPIcolorR = (int)Math.Floor(cpiRatio * ColorClassC[0]); + CPIcolorG = (int)Math.Floor(cpiRatio * ColorClassC[1]); + CPIcolorB = (int)Math.Floor(cpiRatio * ColorClassC[2]); + } + else if (currentClass <= CarClassB) + { + CPIcolorR = (int)Math.Floor(cpiRatio * ColorClassB[0]); + CPIcolorG = (int)Math.Floor(cpiRatio * ColorClassB[1]); + CPIcolorB = (int)Math.Floor(cpiRatio * ColorClassB[2]); + } + else if (currentClass <= CarClassA) + { + CPIcolorR = (int)Math.Floor(cpiRatio * ColorClassA[0]); + CPIcolorG = (int)Math.Floor(cpiRatio * ColorClassA[1]); + CPIcolorB = (int)Math.Floor(cpiRatio * ColorClassA[2]); + } + else if (currentClass <= CarClassS1) + { + CPIcolorR = (int)Math.Floor(cpiRatio * ColorClassS1[0]); + CPIcolorG = (int)Math.Floor(cpiRatio * ColorClassS1[1]); + CPIcolorB = (int)Math.Floor(cpiRatio * ColorClassS1[2]); + } + else if (currentClass <= CarClassS2) + { + CPIcolorR = (int)Math.Floor(cpiRatio * ColorClassS2[0]); + CPIcolorG = (int)Math.Floor(cpiRatio * ColorClassS2[1]); + CPIcolorB = (int)Math.Floor(cpiRatio * ColorClassS2[2]); + } + else + { + CPIcolorR = ColorClassX[0]; + CPIcolorG = ColorClassX[1]; + CPIcolorB = ColorClassX[2]; + } + + LightBar.parameters = new object[] { controllerIndex, CPIcolorR, CPIcolorG, CPIcolorB }; + #endregion + + + reportableInstruction.ForzaDSXReportStructs.Add(new ForzaDSXReportStruct(VerboseLevel.Limited, ForzaDSXReportStruct.ReportType.NORACE, $"No race going on. Normal Triggers. Car's Class = {currentClass}; CPI = {currentCPI}; CPI Ratio = {cpiRatio}; Color [{CPIcolorR}, {CPIcolorG}, {CPIcolorB}]")); + + + reportableInstruction.Instructions = new Instruction[] { LightBar, LeftTrigger, RightTrigger }; + return reportableInstruction; + } + + + public override void ParsePacket(byte[] packet) + { + data = new DataPacket(); + + + + // sled + data.IsRaceOn = packet.IsRaceOn(); + data.EngineMaxRpm = packet.EngineMaxRpm(); + data.EngineIdleRpm = packet.EngineIdleRpm(); + data.CurrentEngineRpm = packet.CurrentEngineRpm(); + data.AccelerationX = packet.AccelerationX(); + data.AccelerationZ = packet.AccelerationZ(); + + data.TireCombinedSlipFrontLeft = packet.TireCombinedSlipFl(); + data.TireCombinedSlipFrontRight = packet.TireCombinedSlipFr(); + data.TireCombinedSlipRearLeft = packet.TireCombinedSlipRl(); + data.TireCombinedSlipRearRight = packet.TireCombinedSlipRr(); + + data.CarClass = packet.CarClass(); + data.CarPerformanceIndex = packet.CarPerformanceIndex(); + + data.Speed = packet.Speed(); + data.Power = packet.Power(); + + data.Accelerator = packet.Accelerator(); + data.Brake = packet.Brake(); + + + data.FourWheelCombinedTireSlip = (Math.Abs(data.TireCombinedSlipFrontLeft) + Math.Abs(data.TireCombinedSlipFrontRight) + Math.Abs(data.TireCombinedSlipRearLeft) + Math.Abs(data.TireCombinedSlipRearRight)) / 4; + data.FrontWheelsCombinedTireSlip = (Math.Abs(data.TireCombinedSlipFrontLeft) + Math.Abs(data.TireCombinedSlipFrontRight)) / 2; + data.RearWheelsCombinedTireSlip = (Math.Abs(data.TireCombinedSlipRearLeft) + Math.Abs(data.TireCombinedSlipRearRight)) / 2; + + + /* data.TimestampMS = packet.TimestampMs(); + data.AccelerationY = packet.AccelerationY(); + + data.SuspensionTravelMetersFrontLeft = packet.SuspensionTravelMetersFl(); + data.SuspensionTravelMetersFrontRight = packet.SuspensionTravelMetersFr(); + data.SuspensionTravelMetersRearLeft = packet.SuspensionTravelMetersRl(); + data.SuspensionTravelMetersRearRight = packet.SuspensionTravelMetersRr(); + data.CarOrdinal = packet.CarOrdinal(); + data.DrivetrainType = packet.DriveTrain(); + data.NumCylinders = packet.NumCylinders(); + + // dash + data.PositionX = packet.PositionX(); + data.PositionY = packet.PositionY(); + data.PositionZ = packet.PositionZ(); + data.Torque = packet.Torque(); + data.TireTempFl = packet.TireTempFl(); + data.TireTempFr = packet.TireTempFr(); + data.TireTempRl = packet.TireTempRl(); + data.TireTempRr = packet.TireTempRr(); + data.Boost = packet.Boost(); + data.Fuel = packet.Fuel(); + data.Distance = packet.Distance(); + data.BestLapTime = packet.BestLapTime(); + data.LastLapTime = packet.LastLapTime(); + data.CurrentLapTime = packet.CurrentLapTime(); + data.CurrentRaceTime = packet.CurrentRaceTime(); + data.Lap = packet.Lap(); + data.RacePosition = packet.RacePosition(); + data.Clutch = packet.Clutch(); + data.Handbrake = packet.Handbrake(); + data.Gear = packet.Gear(); + data.Steer = packet.Steer(); + data.NormalDrivingLine = packet.NormalDrivingLine(); + data.NormalAiBrakeDifference = packet.NormalAiBrakeDifference(); + data.VelocityX = packet.VelocityX(); + data.VelocityY = packet.VelocityY(); + data.VelocityZ = packet.VelocityZ(); + data.AngularVelocityX = packet.AngularVelocityX(); + data.AngularVelocityY = packet.AngularVelocityY(); + data.AngularVelocityZ = packet.AngularVelocityZ(); + data.Yaw = packet.Yaw(); + data.Pitch = packet.Pitch(); + data.Roll = packet.Roll(); + data.NormalizedSuspensionTravelFrontLeft = packet.NormSuspensionTravelFl(); + data.NormalizedSuspensionTravelFrontRight = packet.NormSuspensionTravelFr(); + data.NormalizedSuspensionTravelRearLeft = packet.NormSuspensionTravelRl(); + data.NormalizedSuspensionTravelRearRight = packet.NormSuspensionTravelRr(); + data.TireSlipRatioFrontLeft = packet.TireSlipRatioFl(); + data.TireSlipRatioFrontRight = packet.TireSlipRatioFr(); + data.TireSlipRatioRearLeft = packet.TireSlipRatioRl(); + data.TireSlipRatioRearRight = packet.TireSlipRatioRr(); + data.WheelRotationSpeedFrontLeft = packet.WheelRotationSpeedFl(); + data.WheelRotationSpeedFrontRight = packet.WheelRotationSpeedFr(); + data.WheelRotationSpeedRearLeft = packet.WheelRotationSpeedRl(); + data.WheelRotationSpeedRearRight = packet.WheelRotationSpeedRr(); + data.WheelOnRumbleStripFrontLeft = packet.WheelOnRumbleStripFl(); + data.WheelOnRumbleStripFrontRight = packet.WheelOnRumbleStripFr(); + data.WheelOnRumbleStripRearLeft = packet.WheelOnRumbleStripRl(); + data.WheelOnRumbleStripRearRight = packet.WheelOnRumbleStripRr(); + data.WheelInPuddleDepthFrontLeft = packet.WheelInPuddleFl(); + data.WheelInPuddleDepthFrontRight = packet.WheelInPuddleFr(); + data.WheelInPuddleDepthRearLeft = packet.WheelInPuddleRl(); + data.WheelInPuddleDepthRearRight = packet.WheelInPuddleRr(); + data.SurfaceRumbleFrontLeft = packet.SurfaceRumbleFl(); + data.SurfaceRumbleFrontRight = packet.SurfaceRumbleFr(); + data.SurfaceRumbleRearLeft = packet.SurfaceRumbleRl(); + data.SurfaceRumbleRearRight = packet.SurfaceRumbleRr(); + data.TireSlipAngleFrontLeft = packet.TireSlipAngleFl(); + data.TireSlipAngleFrontRight = packet.TireSlipAngleFr(); + data.TireSlipAngleRearLeft = packet.TireSlipAngleRl(); + data.TireSlipAngleRearRight = packet.TireSlipAngleRr(); + return data; + throw new NotImplementedException();*/ + } + } +} diff --git a/GameParsers/GameTypes.cs b/GameParsers/GameTypes.cs new file mode 100644 index 0000000..5e499d0 --- /dev/null +++ b/GameParsers/GameTypes.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ForzaDSX.GameParsers +{ + public enum GameTypes + { + None = 0, + Forza, + Dirt + } +} diff --git a/GameParsers/NullParser.cs b/GameParsers/NullParser.cs new file mode 100644 index 0000000..b78c346 --- /dev/null +++ b/GameParsers/NullParser.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ForzaDSX.GameParsers +{ + internal class NullParser : Parser + { + public NullParser(Config.Config settings) : base(settings) + { + } + + public override void ParsePacket(byte[] packet) + { + data = new DataPacket(); + //data.AccelerationX + + data.IsRaceOn = true; + data.Power = 1; + data.CurrentEngineRpm = 0; + data.Speed = 0; + data.TireCombinedSlipFrontLeft = 0; + data.TireCombinedSlipFrontRight = 0; + data.TireCombinedSlipRearLeft = 0; + data.TireCombinedSlipRearRight = 0; + } + } +} diff --git a/GameParsers/Parser.cs b/GameParsers/Parser.cs new file mode 100644 index 0000000..8ccffb1 --- /dev/null +++ b/GameParsers/Parser.cs @@ -0,0 +1,243 @@ +using ForzaDSX.Config; +using ForzaDSX.Properties; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static ForzaDSX.ForzaDSXWorker; +using static System.Runtime.InteropServices.JavaScript.JSType; + +namespace ForzaDSX.GameParsers +{ + public abstract class Parser + { + // Packet p = new Packet(); + protected Instruction RightTrigger = new Instruction(InstructionType.TriggerUpdate); + protected Instruction LeftTrigger = new Instruction(InstructionType.TriggerUpdate); + protected Instruction LightBar = new Instruction(InstructionType.RGBUpdate); + protected int controllerIndex = 0; + protected DataPacket data; + protected ForzaDSX.Config.Config settings; + protected ForzaDSX.Config.Profile activeProfile; + + + protected int lastThrottleResistance = 1; + protected int lastThrottleFreq = 0; + protected int lastBrakeResistance = 200; + protected int lastBrakeFreq = 0; + + protected uint LastValidCarClass = 0; + protected int LastValidCarCPI = 0; + protected float MaxCPI = 255; + + protected float LastEngineRPM = 0; + // FH does not always correctly set IsRaceOn, so we must also check if the RPM info is the same for a certain ammount of time + protected uint LastRPMAccumulator = 0; + protected uint RPMAccumulatorTriggerRaceOff = 200; + + + protected Parser(ForzaDSX.Config.Config settings) { + this.settings = settings; + activeProfile = settings.ActiveProfile; + } + public virtual bool IsRaceOn() + { + return true; + } + + public virtual ReportableInstruction GetPreRaceInstructions() + { + ReportableInstruction p = new ReportableInstruction(); + RightTrigger.parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Normal, 0, 0 }; + LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Normal, 0, 0 }; + LightBar.parameters = new object[] { controllerIndex, 220, 120, 220}; + p.Instructions = new Instruction[] { LightBar, LeftTrigger, RightTrigger }; + + return p; + } + + public virtual ReportableInstruction GetInRaceLightbarInstruction() + { + ReportableInstruction reportableInstruction = new ReportableInstruction(); + //Update the light bar + //Currently registers intensity on the green channel based on engine RPM as a percantage of the maxium. Changes to red if RPM ratio > 80% (usually red line) + float engineRange = data.EngineMaxRpm - data.EngineIdleRpm; + float CurrentRPMRatio = (data.CurrentEngineRpm - data.EngineIdleRpm) / engineRange; + int GreenChannel = Math.Max((int)Math.Floor(CurrentRPMRatio * 255), 50); + int RedChannel = (int)Math.Floor(CurrentRPMRatio * 255); + if (CurrentRPMRatio >= activeProfile.RPMRedlineRatio) + { + // Remove Green + GreenChannel = 255 - GreenChannel; + } + + LightBar.parameters = new object[] { controllerIndex, RedChannel, GreenChannel, 0 }; + + + reportableInstruction.ForzaDSXReportStructs.Add(new ForzaDSXReportStruct(VerboseLevel.Full, $"Engine RPM: {data.CurrentEngineRpm}; Engine Max RPM: {data.EngineMaxRpm}; Engine Idle RPM: {data.EngineIdleRpm}")); + reportableInstruction.Instructions = new Instruction[] {LeftTrigger}; + + return reportableInstruction; + + } + public virtual ReportableInstruction GetInRaceLeftTriggerInstruction() + { + ReportableInstruction reportableInstruction = new ReportableInstruction(); + + int resistance = 0; + int filteredResistance = 0; + float avgAccel = 0; + int freq = 0; + int filteredFreq = 0; + //Update the left(Brake) trigger + BrakeSettings brakeSettings = activeProfile.brakeSettings; + // Define losing grip as tires slipping while braking a fair ammount + bool bLosingBrakeGrip = data.FourWheelCombinedTireSlip > brakeSettings.GripLossValue && data.Brake > 100; + + if (brakeSettings.TriggerMode == Config.TriggerMode.Off) + { + LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Normal, 0, 0 }; + } + // If losing grip, start to "vibrate" + else if (bLosingBrakeGrip && brakeSettings.TriggerMode == Config.TriggerMode.Vibration) + { + freq = (int)Math.Floor(Map(data.FourWheelCombinedTireSlip, brakeSettings.GripLossValue, 5, 0, brakeSettings.MaxVibration)); + resistance = (int)Math.Floor(Map(data.Brake, 0, 255, brakeSettings.MaxStiffness, brakeSettings.MinStiffness)); + filteredResistance = (int)EWMA(resistance, lastBrakeResistance, brakeSettings.ResistanceSmoothing); + filteredFreq = (int)EWMA(freq, lastBrakeFreq, brakeSettings.VibrationSmoothing); + + lastBrakeResistance = filteredResistance; + lastBrakeFreq = filteredFreq; + + if (filteredFreq <= brakeSettings.MinVibration) + { + LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Resistance, 0, 0 }; + } + else + { + LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.CustomTriggerValue, CustomTriggerValueMode.VibrateResistance, + filteredFreq *brakeSettings.EffectIntensity, filteredResistance * brakeSettings.EffectIntensity, brakeSettings.VibrationStart, 0, 0, 0, 0 }; + } + //Set left trigger to the custom mode VibrateResitance with values of Frequency = freq, Stiffness = 104, startPostion = 76. + reportableInstruction.ForzaDSXReportStructs.Add(new ForzaDSXReportStruct(VerboseLevel.Limited, ForzaDSXReportStruct.ReportType.RACING, ForzaDSXReportStruct.RacingReportType.BRAKE_VIBRATION, $"Setting Brake to vibration mode with freq: {filteredFreq}\r\n Resistance: {filteredResistance}")); + + } + else + { + //By default, Increasingly resistant to force + resistance = (int)Math.Floor(Map(data.Brake, 0, 255, brakeSettings.MinResistance, brakeSettings.MaxResistance)); + filteredResistance = (int)EWMA(resistance, lastBrakeResistance, brakeSettings.ResistanceSmoothing); + lastBrakeResistance = filteredResistance; + + LeftTrigger.parameters = new object[] { controllerIndex, Trigger.Left, TriggerMode.Resistance, 0, filteredResistance * brakeSettings.EffectIntensity }; + + reportableInstruction.ForzaDSXReportStructs.Add(new ForzaDSXReportStruct(VerboseLevel.Limited, ForzaDSXReportStruct.ReportType.RACING, ForzaDSXReportStruct.RacingReportType.BRAKE_VIBRATION, "")); + + } + + + reportableInstruction.ForzaDSXReportStructs.Add(new ForzaDSXReportStruct(VerboseLevel.Limited, ForzaDSXReportStruct.ReportType.RACING, ForzaDSXReportStruct.RacingReportType.BRAKE, $"Brake: {data.Brake}\r\n Brake Resistance: {filteredResistance}\r\n Tire Slip: {data.FourWheelCombinedTireSlip} \r\n FLCPS: {data.frontLeftContactPatchV} \r\n speed: {data.Speed}")); + + reportableInstruction.Instructions = new Instruction[] { LeftTrigger }; + return reportableInstruction; + + } + public virtual ReportableInstruction GetInRaceRightTriggerInstruction() + { + + ReportableInstruction reportableInstruction = new ReportableInstruction(); + int resistance = 0; + int filteredResistance = 0; + float avgAccel = 0; + int freq = 0; + int filteredFreq = 0; + + //Set the updates for the right Trigger(Throttle) + ThrottleSettings throttleSettings = activeProfile.throttleSettings; + avgAccel = (float)Math.Sqrt((throttleSettings.TurnAccelerationScale * (data.AccelerationX * data.AccelerationX)) + (throttleSettings.ForwardAccelerationScale * (data.AccelerationZ * data.AccelerationZ))); + + // Define losing grip as front tires slipping or rear tires slipping while accelerating a fair ammount + bool bLosingAccelGrip = + data.FrontWheelsCombinedTireSlip > throttleSettings.GripLossValue + || (data.RearWheelsCombinedTireSlip > throttleSettings.GripLossValue && data.Accelerator > 200); + + if (throttleSettings.TriggerMode == Config.TriggerMode.Off) + { + RightTrigger.parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Normal, 0, 0 }; + } + // If losing grip, start to "vibrate" + else if (bLosingAccelGrip && throttleSettings.TriggerMode == Config.TriggerMode.Vibration) + { + freq = (int)Math.Floor(Map(data.FourWheelCombinedTireSlip, throttleSettings.GripLossValue, 5, 0, throttleSettings.MaxVibration)); + resistance = (int)Math.Floor(Map(avgAccel, 0, throttleSettings.AccelerationLimit, throttleSettings.MinStiffness, throttleSettings.MaxStiffness)); + filteredResistance = (int)EWMA(resistance, lastThrottleResistance, throttleSettings.ResistanceSmoothing); + filteredFreq = (int)EWMA(freq, lastThrottleFreq, throttleSettings.VibrationSmoothing); + + lastThrottleResistance = filteredResistance; + lastThrottleFreq = filteredFreq; + + if (filteredFreq <= throttleSettings.MinVibration + || data.Accelerator <= throttleSettings.VibrationModeStart) + { + RightTrigger.parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Resistance, 0, filteredResistance * throttleSettings.EffectIntensity }; + + filteredFreq = 0; + filteredResistance = 0; + } + else + { + RightTrigger.parameters = new object[] { + controllerIndex, Trigger.Right, TriggerMode.CustomTriggerValue, CustomTriggerValueMode.VibrateResistance, + filteredFreq * throttleSettings.EffectIntensity, filteredResistance * throttleSettings.EffectIntensity,throttleSettings.VibrationModeStart, 0, 0, 0, 0 }; + } + + reportableInstruction.ForzaDSXReportStructs.Add(new ForzaDSXReportStruct(VerboseLevel.Limited, ForzaDSXReportStruct.ReportType.RACING, ForzaDSXReportStruct.RacingReportType.THROTTLE_VIBRATION, $"Setting Throttle to vibration mode with freq: {filteredFreq}\r\n Resistance: {filteredResistance}")); + + } + else + { + //It should probably always be uniformly stiff + resistance = (int)Math.Floor(Map(avgAccel, 0, throttleSettings.AccelerationLimit, throttleSettings.MinResistance, throttleSettings.MaxResistance)); + filteredResistance = (int)EWMA(resistance, lastThrottleResistance, throttleSettings.ResistanceSmoothing); + + lastThrottleResistance = filteredResistance; + RightTrigger.parameters = new object[] { controllerIndex, Trigger.Right, TriggerMode.Resistance, 0, filteredResistance * throttleSettings.EffectIntensity }; + + reportableInstruction.ForzaDSXReportStructs.Add(new ForzaDSXReportStruct(VerboseLevel.Limited, ForzaDSXReportStruct.ReportType.RACING, ForzaDSXReportStruct.RacingReportType.THROTTLE_VIBRATION, "")); + + } + reportableInstruction.ForzaDSXReportStructs.Add(new ForzaDSXReportStruct(VerboseLevel.Limited, ForzaDSXReportStruct.ReportType.RACING, ForzaDSXReportStruct.RacingReportType.THROTTLE, $"Average Acceleration: {avgAccel}\r\n Throttle Resistance: {filteredResistance}\r\n Accelerator: {data.Accelerator}")); + + + reportableInstruction.Instructions = new Instruction[] { RightTrigger }; + + return reportableInstruction; + } + + public float Map(float x, float in_min, float in_max, float out_min, float out_max) + { + if (x > in_max) + { + x = in_max; + } + else if (x < in_min) + { + x = in_min; + } + return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; + } + + static float EWMA(float input, float last, float alpha) + { + return (alpha * input) + (1 - alpha) * last; + } + static int EWMA(int input, int last, float alpha) + { + return (int)Math.Floor(EWMA((float)input, (float)last, alpha)); + } + + public abstract void ParsePacket(byte[] packet); + + } +} diff --git a/GameParsers/ReportableInstruction.cs b/GameParsers/ReportableInstruction.cs new file mode 100644 index 0000000..3efe2b8 --- /dev/null +++ b/GameParsers/ReportableInstruction.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ForzaDSX.GameParsers +{ + public class ReportableInstruction + { + public Instruction[] Instructions { get; set; } + public List ForzaDSXReportStructs { get; set; } = new List(); + } +} diff --git a/NameForm.Designer.cs b/NameForm.Designer.cs new file mode 100644 index 0000000..d0fe5af --- /dev/null +++ b/NameForm.Designer.cs @@ -0,0 +1,131 @@ +namespace ForzaDSX +{ + partial class NameForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + OkButton = new System.Windows.Forms.Button(); + CancelButton = new System.Windows.Forms.Button(); + flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); + label1 = new System.Windows.Forms.Label(); + NameTextBox = new System.Windows.Forms.TextBox(); + flowLayoutPanel1.SuspendLayout(); + flowLayoutPanel2.SuspendLayout(); + SuspendLayout(); + // + // flowLayoutPanel1 + // + flowLayoutPanel1.Controls.Add(OkButton); + flowLayoutPanel1.Controls.Add(CancelButton); + flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; + flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; + flowLayoutPanel1.Location = new System.Drawing.Point(0, 52); + flowLayoutPanel1.Name = "flowLayoutPanel1"; + flowLayoutPanel1.Size = new System.Drawing.Size(800, 50); + flowLayoutPanel1.TabIndex = 0; + // + // OkButton + // + OkButton.DialogResult = System.Windows.Forms.DialogResult.OK; + OkButton.Location = new System.Drawing.Point(685, 3); + OkButton.Name = "OkButton"; + OkButton.Size = new System.Drawing.Size(112, 34); + OkButton.TabIndex = 0; + OkButton.Text = "OK"; + OkButton.UseVisualStyleBackColor = true; + OkButton.Click += OkButton_Click; + // + // CancelButton + // + CancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + CancelButton.Location = new System.Drawing.Point(567, 3); + CancelButton.Name = "CancelButton"; + CancelButton.Size = new System.Drawing.Size(112, 34); + CancelButton.TabIndex = 1; + CancelButton.Text = "Cancel"; + CancelButton.UseVisualStyleBackColor = true; + // + // flowLayoutPanel2 + // + flowLayoutPanel2.Controls.Add(label1); + flowLayoutPanel2.Controls.Add(NameTextBox); + flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + flowLayoutPanel2.Location = new System.Drawing.Point(0, 0); + flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(20); + flowLayoutPanel2.Name = "flowLayoutPanel2"; + flowLayoutPanel2.Padding = new System.Windows.Forms.Padding(5); + flowLayoutPanel2.Size = new System.Drawing.Size(800, 52); + flowLayoutPanel2.TabIndex = 1; + // + // label1 + // + label1.AutoSize = true; + label1.Location = new System.Drawing.Point(8, 5); + label1.Name = "label1"; + label1.Size = new System.Drawing.Size(68, 25); + label1.TabIndex = 0; + label1.Text = "Name: "; + // + // NameTextBox + // + NameTextBox.Dock = System.Windows.Forms.DockStyle.Fill; + NameTextBox.Location = new System.Drawing.Point(82, 8); + NameTextBox.Name = "NameTextBox"; + NameTextBox.Size = new System.Drawing.Size(684, 31); + NameTextBox.TabIndex = 1; + // + // NameForm + // + AcceptButton = OkButton; + AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + ClientSize = new System.Drawing.Size(800, 102); + Controls.Add(flowLayoutPanel2); + Controls.Add(flowLayoutPanel1); + FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + Name = "NameForm"; + StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + Text = "Please Enter the Profile Name:"; + TopMost = true; + Load += NameForm_Load; + flowLayoutPanel1.ResumeLayout(false); + flowLayoutPanel2.ResumeLayout(false); + flowLayoutPanel2.PerformLayout(); + ResumeLayout(false); + } + + #endregion + + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Button OkButton; + private System.Windows.Forms.Button CancelButton; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox NameTextBox; + } +} \ No newline at end of file diff --git a/NameForm.cs b/NameForm.cs new file mode 100644 index 0000000..f32f5e5 --- /dev/null +++ b/NameForm.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ForzaDSX +{ + public partial class NameForm : Form + { + + public static string ShowDialog(string name, String title = "Please enter the Name") + { + NameForm form = new NameForm(name, title); + return form.ShowDialog() == DialogResult.OK ? form.NameTextBox.Text : name; + } + + public NameForm(String name, String title) + { + InitializeComponent(); + this.Text = title; + NameTextBox.Text = name; + NameTextBox.Focus(); + + } + + private void OkButton_Click(object sender, EventArgs e) + { + + } + + private void NameForm_Load(object sender, EventArgs e) + { + + } + } +} diff --git a/NameForm.resx b/NameForm.resx new file mode 100644 index 0000000..af32865 --- /dev/null +++ b/NameForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Program.cs b/Program.cs index b197a06..5cd0d7d 100644 --- a/Program.cs +++ b/Program.cs @@ -7,7 +7,7 @@ namespace ForzaDSX { public class Program { - public const String VERSION = "0.5.8"; + public const String VERSION = "0.6.0"; [STAThread] static void Main(string[] args) @@ -136,6 +136,10 @@ public enum InstructionType public struct Instruction { + public Instruction(InstructionType type) + { + this.type = type; + } public InstructionType type; public object[] parameters; } diff --git a/Readme.md b/Readme.md index de4d2c2..bf75644 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,23 @@ 💛Thank you for using ForzaDSX💛 💛As of right now DSX V3 does not have a mod interface and will not be getting one any time soon :( Naturally this also slows development of this mod as there's no point in developing for v2 considering how broken that is..💛 + + + +# Setting up DiRT Rally 1 / 2 for UDP Connection: +1. Go to `C:\Users\\Documents\My Games\DiRT Rally X.0\hardwaresettings`; +2. Open `hardware_settings_config` file with your favorite text editor; +3. Find for **udp** tag and configure as shown below: + ```xml + + ... + + ... + + ``` + - **enabled = true** + - **extradata = 3** + - **port = 5300** + 🔺🔺 Note for Forza 4 (THIS IS REQUIRED FOR IT TO WORK) 🔺🔺 1. Install [Window 8 AppContainer Loopback Utility](https://telerik-fiddler.s3.amazonaws.com/fiddler/addons/enableloopbackutility.exe) 2. Start the utility (if it shows a message about orphan sid, you can safely ignore it) diff --git a/Settings.cs b/Settings.cs new file mode 100644 index 0000000..c5c38b4 --- /dev/null +++ b/Settings.cs @@ -0,0 +1,28 @@ +namespace ForzaDSX.Properties { + + + // This class allows you to handle specific events on the settings class: + // The SettingChanging event is raised before a setting's value is changed. + // The PropertyChanged event is raised after a setting's value is changed. + // The SettingsLoaded event is raised after the setting values are loaded. + // The SettingsSaving event is raised before the setting values are saved. + public sealed partial class Settings { + + public Settings() { + // // To add event handlers for saving and changing settings, uncomment the lines below: + // + // this.SettingChanging += this.SettingChangingEventHandler; + // + // this.SettingsSaving += this.SettingsSavingEventHandler; + // + } + + private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { + // Add code to handle the SettingChangingEvent event here. + } + + private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { + // Add code to handle the SettingsSaving event here. + } + } +} diff --git a/UI.Designer.cs b/UI.Designer.cs index 3352e03..742b6d6 100644 --- a/UI.Designer.cs +++ b/UI.Designer.cs @@ -23,1993 +23,2325 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } - #region Windows Form Designer generated code + #region Windows Form Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - components = new Container(); - mainPanel = new System.Windows.Forms.Panel(); - mainTabControl = new System.Windows.Forms.TabControl(); - miscTabPage = new System.Windows.Forms.TabPage(); - miscTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); - forzaPortNumericUpDown = new System.Windows.Forms.NumericUpDown(); - forzaPortLabel = new System.Windows.Forms.Label(); - dsxPortLabel = new System.Windows.Forms.Label(); - appCheckLabel = new System.Windows.Forms.Label(); - rpmLabel = new System.Windows.Forms.Label(); - rpmTrackBar = new System.Windows.Forms.TrackBar(); - appCheckBox = new System.Windows.Forms.CheckBox(); - dsxNumericUpDown = new System.Windows.Forms.NumericUpDown(); - rpmValueNumericUpDown = new System.Windows.Forms.NumericUpDown(); - buttonApplyMisc = new System.Windows.Forms.Button(); - miscDefaultsButton = new System.Windows.Forms.Button(); - brakeConfigTabPage = new System.Windows.Forms.TabPage(); - brakeTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); - brakeResistanceSmoothNumericUpDown = new System.Windows.Forms.NumericUpDown(); - maxBrakeResistanceNumericUpDown = new System.Windows.Forms.NumericUpDown(); - minBrakeResistanceNumericUpDown = new System.Windows.Forms.NumericUpDown(); - maxBrakeStifnessNumericUpDown = new System.Windows.Forms.NumericUpDown(); - minBrakeStifnessNumericUpDown = new System.Windows.Forms.NumericUpDown(); - brakeVibrationSmoothNumericUpDown = new System.Windows.Forms.NumericUpDown(); - maxBrakeVibrationNumericUpDown = new System.Windows.Forms.NumericUpDown(); - minBrakeVibrationNumericUpDown = new System.Windows.Forms.NumericUpDown(); - brakeVibrationModeNumericUpDown = new System.Windows.Forms.NumericUpDown(); - brakeVibrationStartNumericUpDown = new System.Windows.Forms.NumericUpDown(); - gripLossNumericUpDown = new System.Windows.Forms.NumericUpDown(); - brakeEffectNumericUpDown = new System.Windows.Forms.NumericUpDown(); - brakeResistanceSmoothingTrackBar = new System.Windows.Forms.TrackBar(); - brakeResistanceSmoothingLabel = new System.Windows.Forms.Label(); - maxBrakeResistanceTrackBar = new System.Windows.Forms.TrackBar(); - maxBrakeResistanceLabel = new System.Windows.Forms.Label(); - minBrakeResistanceTrackBar = new System.Windows.Forms.TrackBar(); - minBrakeResistanceLabel = new System.Windows.Forms.Label(); - maxBrakeStiffnessTrackBar = new System.Windows.Forms.TrackBar(); - maxBrakeStiffnessLabel = new System.Windows.Forms.Label(); - minBrakeStiffnessTrackBar = new System.Windows.Forms.TrackBar(); - minBrakeStiffnessLabel = new System.Windows.Forms.Label(); - vibrationSmoothingTrackBar = new System.Windows.Forms.TrackBar(); - vibrationSmoothingLabel = new System.Windows.Forms.Label(); - maxBrakeVibrationTrackBar = new System.Windows.Forms.TrackBar(); - maxBrakeVibrationLabel = new System.Windows.Forms.Label(); - minBrakeVibrationTrackBar = new System.Windows.Forms.TrackBar(); - minBrakeVibrationLabel = new System.Windows.Forms.Label(); - brakeVibrationModeTrackBar = new System.Windows.Forms.TrackBar(); - brakeVibrationModeStartLabel = new System.Windows.Forms.Label(); - brakeVibrationStartTrackBar = new System.Windows.Forms.TrackBar(); - brakeVibrationStartLabel = new System.Windows.Forms.Label(); - gripLossTrackBar = new System.Windows.Forms.TrackBar(); - gripLossLabel = new System.Windows.Forms.Label(); - brakeEffectIntensityLabel = new System.Windows.Forms.Label(); - brakeEffectIntensityTrackBar = new System.Windows.Forms.TrackBar(); - buttonApply_Brake = new System.Windows.Forms.Button(); - brakeDefaultsButton = new System.Windows.Forms.Button(); - brakeTriggerMode = new System.Windows.Forms.Label(); - brakeTriggerModeComboBox = new System.Windows.Forms.ComboBox(); - throttleConfigTabPage = new System.Windows.Forms.TabPage(); - throttleTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); - throttleTriggerModeComboBox = new System.Windows.Forms.ComboBox(); - throttleTriggerMode = new System.Windows.Forms.Label(); - throttleResistanceSmoothNumericUpDown = new System.Windows.Forms.NumericUpDown(); - throttleMaxResistanceNumericUpDown = new System.Windows.Forms.NumericUpDown(); - throttleMinResistanceNumericUpDown = new System.Windows.Forms.NumericUpDown(); - throttleMaxStiffnessNumericUpDown = new System.Windows.Forms.NumericUpDown(); - throttleMinStiffnessNumericUpDown = new System.Windows.Forms.NumericUpDown(); - throttleVibrationSmoothNumericUpDown = new System.Windows.Forms.NumericUpDown(); - throttleMaxVibrationNumericUpDown = new System.Windows.Forms.NumericUpDown(); - throttleMinVibrationNumericUpDown = new System.Windows.Forms.NumericUpDown(); - throttleVibrationStartNumericUpDown = new System.Windows.Forms.NumericUpDown(); - throttleAccelLimitNumericUpDown = new System.Windows.Forms.NumericUpDown(); - throttleForwardAccelScaleNumericUpDown = new System.Windows.Forms.NumericUpDown(); - throttleTurnAccelScaleNumericUpDown = new System.Windows.Forms.NumericUpDown(); - throttleGripLossNumericUpDown = new System.Windows.Forms.NumericUpDown(); - throttleIntensityNumericUpDown = new System.Windows.Forms.NumericUpDown(); - throttleResistanceSmoothTrackBar = new System.Windows.Forms.TrackBar(); - throttleMaxResistanceTrackBar = new System.Windows.Forms.TrackBar(); - throttleMinResistanceTrackBar = new System.Windows.Forms.TrackBar(); - throttleMaxStiffnessTrackBar = new System.Windows.Forms.TrackBar(); - throttleMinStiffnessTrackBar = new System.Windows.Forms.TrackBar(); - throttleVibrationSmoothTrackBar = new System.Windows.Forms.TrackBar(); - throttleMaxVibrationTrackBar = new System.Windows.Forms.TrackBar(); - throttleMinVibrationTrackBar = new System.Windows.Forms.TrackBar(); - throttleVibrationModeStartTrackBar = new System.Windows.Forms.TrackBar(); - throttleAccelLimitTrackBar = new System.Windows.Forms.TrackBar(); - throttleForwardAccelScaleTrackBar = new System.Windows.Forms.TrackBar(); - throttleTurnAccelScaleTrackBar = new System.Windows.Forms.TrackBar(); - throttleGripLossTrackBar = new System.Windows.Forms.TrackBar(); - throttleIntensityTrackBar = new System.Windows.Forms.TrackBar(); - throttleResistanceSmoothingLabel = new System.Windows.Forms.Label(); - maxThrottleResistanceLabel = new System.Windows.Forms.Label(); - minThrottleResistanceLabel = new System.Windows.Forms.Label(); - maxThrottleStiffnessLabel = new System.Windows.Forms.Label(); - minThrottleStiffnessLabel = new System.Windows.Forms.Label(); - throttleVibrationSmoothingLabel = new System.Windows.Forms.Label(); - maxThrottleVibrationLabel = new System.Windows.Forms.Label(); - minThrottleVibrationLabel = new System.Windows.Forms.Label(); - throttleVibrationStartLabel = new System.Windows.Forms.Label(); - accelerationLimitLabel = new System.Windows.Forms.Label(); - forwardAccelLabel = new System.Windows.Forms.Label(); - turnAccelLabel = new System.Windows.Forms.Label(); - throttleGripLossLabel = new System.Windows.Forms.Label(); - throttleIntensityLabel = new System.Windows.Forms.Label(); - buttonApply_Throttle = new System.Windows.Forms.Button(); - throttleDefaultsButton = new System.Windows.Forms.Button(); - outputTabPage = new System.Windows.Forms.TabPage(); - raceGroupBox = new System.Windows.Forms.GroupBox(); - tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - brakeMsg = new System.Windows.Forms.Label(); - brakeVibrationMsg = new System.Windows.Forms.Label(); - throttleMsg = new System.Windows.Forms.Label(); - throttleVibrationMsg = new System.Windows.Forms.Label(); - noRaceGroupBox = new System.Windows.Forms.GroupBox(); - noRaceText = new System.Windows.Forms.Label(); - outputListBox = new System.Windows.Forms.ListBox(); - toolStripStatusDSX = new System.Windows.Forms.ToolStripStatusLabel(); - toolStripStatusForza = new System.Windows.Forms.ToolStripStatusLabel(); - toolStripVerboseMode = new System.Windows.Forms.ToolStripDropDownButton(); - verboseModeOffToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - verboseModeLowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - verboseModeFullToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - statusStrip1 = new System.Windows.Forms.StatusStrip(); - toolTip = new System.Windows.Forms.ToolTip(components); - mainPanel.SuspendLayout(); - mainTabControl.SuspendLayout(); - miscTabPage.SuspendLayout(); - miscTableLayoutPanel.SuspendLayout(); - ((ISupportInitialize)forzaPortNumericUpDown).BeginInit(); - ((ISupportInitialize)rpmTrackBar).BeginInit(); - ((ISupportInitialize)dsxNumericUpDown).BeginInit(); - ((ISupportInitialize)rpmValueNumericUpDown).BeginInit(); - brakeConfigTabPage.SuspendLayout(); - brakeTableLayoutPanel.SuspendLayout(); - ((ISupportInitialize)brakeResistanceSmoothNumericUpDown).BeginInit(); - ((ISupportInitialize)maxBrakeResistanceNumericUpDown).BeginInit(); - ((ISupportInitialize)minBrakeResistanceNumericUpDown).BeginInit(); - ((ISupportInitialize)maxBrakeStifnessNumericUpDown).BeginInit(); - ((ISupportInitialize)minBrakeStifnessNumericUpDown).BeginInit(); - ((ISupportInitialize)brakeVibrationSmoothNumericUpDown).BeginInit(); - ((ISupportInitialize)maxBrakeVibrationNumericUpDown).BeginInit(); - ((ISupportInitialize)minBrakeVibrationNumericUpDown).BeginInit(); - ((ISupportInitialize)brakeVibrationModeNumericUpDown).BeginInit(); - ((ISupportInitialize)brakeVibrationStartNumericUpDown).BeginInit(); - ((ISupportInitialize)gripLossNumericUpDown).BeginInit(); - ((ISupportInitialize)brakeEffectNumericUpDown).BeginInit(); - ((ISupportInitialize)brakeResistanceSmoothingTrackBar).BeginInit(); - ((ISupportInitialize)maxBrakeResistanceTrackBar).BeginInit(); - ((ISupportInitialize)minBrakeResistanceTrackBar).BeginInit(); - ((ISupportInitialize)maxBrakeStiffnessTrackBar).BeginInit(); - ((ISupportInitialize)minBrakeStiffnessTrackBar).BeginInit(); - ((ISupportInitialize)vibrationSmoothingTrackBar).BeginInit(); - ((ISupportInitialize)maxBrakeVibrationTrackBar).BeginInit(); - ((ISupportInitialize)minBrakeVibrationTrackBar).BeginInit(); - ((ISupportInitialize)brakeVibrationModeTrackBar).BeginInit(); - ((ISupportInitialize)brakeVibrationStartTrackBar).BeginInit(); - ((ISupportInitialize)gripLossTrackBar).BeginInit(); - ((ISupportInitialize)brakeEffectIntensityTrackBar).BeginInit(); - throttleConfigTabPage.SuspendLayout(); - throttleTableLayoutPanel.SuspendLayout(); - ((ISupportInitialize)throttleResistanceSmoothNumericUpDown).BeginInit(); - ((ISupportInitialize)throttleMaxResistanceNumericUpDown).BeginInit(); - ((ISupportInitialize)throttleMinResistanceNumericUpDown).BeginInit(); - ((ISupportInitialize)throttleMaxStiffnessNumericUpDown).BeginInit(); - ((ISupportInitialize)throttleMinStiffnessNumericUpDown).BeginInit(); - ((ISupportInitialize)throttleVibrationSmoothNumericUpDown).BeginInit(); - ((ISupportInitialize)throttleMaxVibrationNumericUpDown).BeginInit(); - ((ISupportInitialize)throttleMinVibrationNumericUpDown).BeginInit(); - ((ISupportInitialize)throttleVibrationStartNumericUpDown).BeginInit(); - ((ISupportInitialize)throttleAccelLimitNumericUpDown).BeginInit(); - ((ISupportInitialize)throttleForwardAccelScaleNumericUpDown).BeginInit(); - ((ISupportInitialize)throttleTurnAccelScaleNumericUpDown).BeginInit(); - ((ISupportInitialize)throttleGripLossNumericUpDown).BeginInit(); - ((ISupportInitialize)throttleIntensityNumericUpDown).BeginInit(); - ((ISupportInitialize)throttleResistanceSmoothTrackBar).BeginInit(); - ((ISupportInitialize)throttleMaxResistanceTrackBar).BeginInit(); - ((ISupportInitialize)throttleMinResistanceTrackBar).BeginInit(); - ((ISupportInitialize)throttleMaxStiffnessTrackBar).BeginInit(); - ((ISupportInitialize)throttleMinStiffnessTrackBar).BeginInit(); - ((ISupportInitialize)throttleVibrationSmoothTrackBar).BeginInit(); - ((ISupportInitialize)throttleMaxVibrationTrackBar).BeginInit(); - ((ISupportInitialize)throttleMinVibrationTrackBar).BeginInit(); - ((ISupportInitialize)throttleVibrationModeStartTrackBar).BeginInit(); - ((ISupportInitialize)throttleAccelLimitTrackBar).BeginInit(); - ((ISupportInitialize)throttleForwardAccelScaleTrackBar).BeginInit(); - ((ISupportInitialize)throttleTurnAccelScaleTrackBar).BeginInit(); - ((ISupportInitialize)throttleGripLossTrackBar).BeginInit(); - ((ISupportInitialize)throttleIntensityTrackBar).BeginInit(); - outputTabPage.SuspendLayout(); - raceGroupBox.SuspendLayout(); - tableLayoutPanel1.SuspendLayout(); - noRaceGroupBox.SuspendLayout(); - statusStrip1.SuspendLayout(); - SuspendLayout(); - // - // mainPanel - // - mainPanel.Controls.Add(mainTabControl); - mainPanel.Dock = System.Windows.Forms.DockStyle.Fill; - mainPanel.Location = new System.Drawing.Point(0, 0); - mainPanel.Name = "mainPanel"; - mainPanel.Size = new System.Drawing.Size(721, 761); - mainPanel.TabIndex = 0; - // - // mainTabControl - // - mainTabControl.Controls.Add(miscTabPage); - mainTabControl.Controls.Add(brakeConfigTabPage); - mainTabControl.Controls.Add(throttleConfigTabPage); - mainTabControl.Controls.Add(outputTabPage); - mainTabControl.Dock = System.Windows.Forms.DockStyle.Fill; - mainTabControl.Location = new System.Drawing.Point(0, 0); - mainTabControl.Name = "mainTabControl"; - mainTabControl.SelectedIndex = 0; - mainTabControl.Size = new System.Drawing.Size(721, 761); - mainTabControl.TabIndex = 0; - // - // miscTabPage - // - miscTabPage.Controls.Add(miscTableLayoutPanel); - miscTabPage.Location = new System.Drawing.Point(4, 24); - miscTabPage.Name = "miscTabPage"; - miscTabPage.Padding = new System.Windows.Forms.Padding(3); - miscTabPage.Size = new System.Drawing.Size(713, 733); - miscTabPage.TabIndex = 3; - miscTabPage.Text = "Misc"; - miscTabPage.UseVisualStyleBackColor = true; - // - // miscTableLayoutPanel - // - miscTableLayoutPanel.AutoScroll = true; - miscTableLayoutPanel.AutoSize = true; - miscTableLayoutPanel.ColumnCount = 3; - miscTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - miscTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - miscTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - miscTableLayoutPanel.Controls.Add(forzaPortNumericUpDown, 1, 3); - miscTableLayoutPanel.Controls.Add(forzaPortLabel, 0, 3); - miscTableLayoutPanel.Controls.Add(dsxPortLabel, 0, 2); - miscTableLayoutPanel.Controls.Add(appCheckLabel, 0, 1); - miscTableLayoutPanel.Controls.Add(rpmLabel, 0, 0); - miscTableLayoutPanel.Controls.Add(rpmTrackBar, 1, 0); - miscTableLayoutPanel.Controls.Add(appCheckBox, 1, 1); - miscTableLayoutPanel.Controls.Add(dsxNumericUpDown, 1, 2); - miscTableLayoutPanel.Controls.Add(rpmValueNumericUpDown, 2, 0); - miscTableLayoutPanel.Controls.Add(buttonApplyMisc, 1, 4); - miscTableLayoutPanel.Controls.Add(miscDefaultsButton, 2, 4); - miscTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; - miscTableLayoutPanel.Location = new System.Drawing.Point(3, 3); - miscTableLayoutPanel.Name = "miscTableLayoutPanel"; - miscTableLayoutPanel.RowCount = 5; - miscTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - miscTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - miscTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - miscTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - miscTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - miscTableLayoutPanel.Size = new System.Drawing.Size(707, 727); - miscTableLayoutPanel.TabIndex = 0; - // - // forzaPortNumericUpDown - // - forzaPortNumericUpDown.AutoSize = true; - forzaPortNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - forzaPortNumericUpDown.Dock = System.Windows.Forms.DockStyle.Fill; - forzaPortNumericUpDown.Location = new System.Drawing.Point(120, 103); - forzaPortNumericUpDown.Maximum = new decimal(new int[] { 65353, 0, 0, 0 }); - forzaPortNumericUpDown.MaximumSize = new System.Drawing.Size(100, 0); - forzaPortNumericUpDown.Name = "forzaPortNumericUpDown"; - forzaPortNumericUpDown.Size = new System.Drawing.Size(100, 23); - forzaPortNumericUpDown.TabIndex = 7; - toolTip.SetToolTip(forzaPortNumericUpDown, "Port for Forza UDP server"); - forzaPortNumericUpDown.ValueChanged += forzaPortNumericUpDown_ValueChanged; - // - // forzaPortLabel - // - forzaPortLabel.AutoSize = true; - forzaPortLabel.Dock = System.Windows.Forms.DockStyle.Fill; - forzaPortLabel.Location = new System.Drawing.Point(3, 100); - forzaPortLabel.Name = "forzaPortLabel"; - forzaPortLabel.Size = new System.Drawing.Size(111, 29); - forzaPortLabel.TabIndex = 6; - forzaPortLabel.Text = "Forza Port"; - forzaPortLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(forzaPortLabel, "Port for Forza UDP server"); - // - // dsxPortLabel - // - dsxPortLabel.AutoSize = true; - dsxPortLabel.Dock = System.Windows.Forms.DockStyle.Fill; - dsxPortLabel.Location = new System.Drawing.Point(3, 71); - dsxPortLabel.Name = "dsxPortLabel"; - dsxPortLabel.Size = new System.Drawing.Size(111, 29); - dsxPortLabel.TabIndex = 4; - dsxPortLabel.Text = "DSX Port"; - dsxPortLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(dsxPortLabel, "Port for DSX Port Listener"); - // - // appCheckLabel - // - appCheckLabel.AutoSize = true; - appCheckLabel.Dock = System.Windows.Forms.DockStyle.Fill; - appCheckLabel.Location = new System.Drawing.Point(3, 51); - appCheckLabel.Name = "appCheckLabel"; - appCheckLabel.Size = new System.Drawing.Size(111, 20); - appCheckLabel.TabIndex = 2; - appCheckLabel.Text = "Disable App Check?"; - appCheckLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(appCheckLabel, "Should we disable the check for running applications?"); - // - // rpmLabel - // - rpmLabel.AutoSize = true; - rpmLabel.Dock = System.Windows.Forms.DockStyle.Fill; - rpmLabel.LiveSetting = System.Windows.Forms.Automation.AutomationLiveSetting.Polite; - rpmLabel.Location = new System.Drawing.Point(3, 0); - rpmLabel.Name = "rpmLabel"; - rpmLabel.Size = new System.Drawing.Size(111, 51); - rpmLabel.TabIndex = 0; - rpmLabel.Text = "RPM Redline Ratio"; - rpmLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(rpmLabel, "The percentage of the current RPM when we are in the \"redline\" of the engine"); - // - // rpmTrackBar - // - rpmTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - rpmTrackBar.Cursor = System.Windows.Forms.Cursors.NoMoveHoriz; - rpmTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - rpmTrackBar.LargeChange = 50; - rpmTrackBar.Location = new System.Drawing.Point(120, 3); - rpmTrackBar.Maximum = 100; - rpmTrackBar.Name = "rpmTrackBar"; - rpmTrackBar.Size = new System.Drawing.Size(415, 45); - rpmTrackBar.TabIndex = 1; - rpmTrackBar.TickFrequency = 5; - rpmTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(rpmTrackBar, "The percentage of the current RPM when we are in the \"redline\" of the engine"); - rpmTrackBar.Scroll += rpmTrackBar_Scroll; - // - // appCheckBox - // - appCheckBox.AutoSize = true; - appCheckBox.Dock = System.Windows.Forms.DockStyle.Fill; - appCheckBox.Location = new System.Drawing.Point(120, 54); - appCheckBox.Name = "appCheckBox"; - appCheckBox.Size = new System.Drawing.Size(415, 14); - appCheckBox.TabIndex = 3; - toolTip.SetToolTip(appCheckBox, "Should we disable the check for running applications?"); - appCheckBox.UseVisualStyleBackColor = true; - appCheckBox.CheckedChanged += appCheckBox_CheckedChanged; - // - // dsxNumericUpDown - // - dsxNumericUpDown.AutoSize = true; - dsxNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - dsxNumericUpDown.Dock = System.Windows.Forms.DockStyle.Fill; - dsxNumericUpDown.Location = new System.Drawing.Point(120, 74); - dsxNumericUpDown.Maximum = new decimal(new int[] { 65353, 0, 0, 0 }); - dsxNumericUpDown.MaximumSize = new System.Drawing.Size(100, 0); - dsxNumericUpDown.Name = "dsxNumericUpDown"; - dsxNumericUpDown.Size = new System.Drawing.Size(100, 23); - dsxNumericUpDown.TabIndex = 5; - toolTip.SetToolTip(dsxNumericUpDown, "Port for DSX Port Listener"); - dsxNumericUpDown.ValueChanged += dsxNumericUpDown_ValueChanged; - // - // rpmValueNumericUpDown - // - rpmValueNumericUpDown.AutoSize = true; - rpmValueNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - rpmValueNumericUpDown.Dock = System.Windows.Forms.DockStyle.Fill; - rpmValueNumericUpDown.Location = new System.Drawing.Point(541, 3); - rpmValueNumericUpDown.Name = "rpmValueNumericUpDown"; - rpmValueNumericUpDown.Size = new System.Drawing.Size(163, 23); - rpmValueNumericUpDown.TabIndex = 8; - toolTip.SetToolTip(rpmValueNumericUpDown, "The percentage of the current RPM when we are in the \"redline\" of the engine"); - rpmValueNumericUpDown.ValueChanged += rpmValueNumericUpDown_ValueChanged; - // - // buttonApplyMisc - // - buttonApplyMisc.Dock = System.Windows.Forms.DockStyle.Top; - buttonApplyMisc.Location = new System.Drawing.Point(120, 132); - buttonApplyMisc.MaximumSize = new System.Drawing.Size(300, 30); - buttonApplyMisc.MinimumSize = new System.Drawing.Size(200, 25); - buttonApplyMisc.Name = "buttonApplyMisc"; - buttonApplyMisc.Size = new System.Drawing.Size(300, 25); - buttonApplyMisc.TabIndex = 9; - buttonApplyMisc.Text = "Apply"; - buttonApplyMisc.UseVisualStyleBackColor = true; - buttonApplyMisc.Click += buttonApplyMisc_Click; - // - // miscDefaultsButton - // - miscDefaultsButton.Location = new System.Drawing.Point(541, 132); - miscDefaultsButton.Name = "miscDefaultsButton"; - miscDefaultsButton.Size = new System.Drawing.Size(75, 23); - miscDefaultsButton.TabIndex = 39; - miscDefaultsButton.Text = "Defaults"; - miscDefaultsButton.UseVisualStyleBackColor = true; - miscDefaultsButton.Click += miscDefaultsButton_Click; - // - // brakeConfigTabPage - // - brakeConfigTabPage.Controls.Add(brakeTableLayoutPanel); - brakeConfigTabPage.Location = new System.Drawing.Point(4, 24); - brakeConfigTabPage.Name = "brakeConfigTabPage"; - brakeConfigTabPage.Size = new System.Drawing.Size(713, 733); - brakeConfigTabPage.TabIndex = 4; - brakeConfigTabPage.Text = "Brake Trigger"; - // - // brakeTableLayoutPanel - // - brakeTableLayoutPanel.AutoScroll = true; - brakeTableLayoutPanel.AutoSize = true; - brakeTableLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - brakeTableLayoutPanel.BackColor = System.Drawing.SystemColors.ControlLightLight; - brakeTableLayoutPanel.ColumnCount = 3; - brakeTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - brakeTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - brakeTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - brakeTableLayoutPanel.Controls.Add(brakeResistanceSmoothNumericUpDown, 2, 12); - brakeTableLayoutPanel.Controls.Add(maxBrakeResistanceNumericUpDown, 2, 11); - brakeTableLayoutPanel.Controls.Add(minBrakeResistanceNumericUpDown, 2, 10); - brakeTableLayoutPanel.Controls.Add(maxBrakeStifnessNumericUpDown, 2, 9); - brakeTableLayoutPanel.Controls.Add(minBrakeStifnessNumericUpDown, 2, 8); - brakeTableLayoutPanel.Controls.Add(brakeVibrationSmoothNumericUpDown, 2, 7); - brakeTableLayoutPanel.Controls.Add(maxBrakeVibrationNumericUpDown, 2, 6); - brakeTableLayoutPanel.Controls.Add(minBrakeVibrationNumericUpDown, 2, 5); - brakeTableLayoutPanel.Controls.Add(brakeVibrationModeNumericUpDown, 2, 4); - brakeTableLayoutPanel.Controls.Add(brakeVibrationStartNumericUpDown, 2, 3); - brakeTableLayoutPanel.Controls.Add(gripLossNumericUpDown, 2, 2); - brakeTableLayoutPanel.Controls.Add(brakeEffectNumericUpDown, 2, 1); - brakeTableLayoutPanel.Controls.Add(brakeResistanceSmoothingTrackBar, 1, 12); - brakeTableLayoutPanel.Controls.Add(brakeResistanceSmoothingLabel, 0, 12); - brakeTableLayoutPanel.Controls.Add(maxBrakeResistanceTrackBar, 1, 11); - brakeTableLayoutPanel.Controls.Add(maxBrakeResistanceLabel, 0, 11); - brakeTableLayoutPanel.Controls.Add(minBrakeResistanceTrackBar, 1, 10); - brakeTableLayoutPanel.Controls.Add(minBrakeResistanceLabel, 0, 10); - brakeTableLayoutPanel.Controls.Add(maxBrakeStiffnessTrackBar, 1, 9); - brakeTableLayoutPanel.Controls.Add(maxBrakeStiffnessLabel, 0, 9); - brakeTableLayoutPanel.Controls.Add(minBrakeStiffnessTrackBar, 1, 8); - brakeTableLayoutPanel.Controls.Add(minBrakeStiffnessLabel, 0, 8); - brakeTableLayoutPanel.Controls.Add(vibrationSmoothingTrackBar, 1, 7); - brakeTableLayoutPanel.Controls.Add(vibrationSmoothingLabel, 0, 7); - brakeTableLayoutPanel.Controls.Add(maxBrakeVibrationTrackBar, 1, 6); - brakeTableLayoutPanel.Controls.Add(maxBrakeVibrationLabel, 0, 6); - brakeTableLayoutPanel.Controls.Add(minBrakeVibrationTrackBar, 1, 5); - brakeTableLayoutPanel.Controls.Add(minBrakeVibrationLabel, 0, 5); - brakeTableLayoutPanel.Controls.Add(brakeVibrationModeTrackBar, 1, 4); - brakeTableLayoutPanel.Controls.Add(brakeVibrationModeStartLabel, 0, 4); - brakeTableLayoutPanel.Controls.Add(brakeVibrationStartTrackBar, 1, 3); - brakeTableLayoutPanel.Controls.Add(brakeVibrationStartLabel, 0, 3); - brakeTableLayoutPanel.Controls.Add(gripLossTrackBar, 1, 2); - brakeTableLayoutPanel.Controls.Add(gripLossLabel, 0, 2); - brakeTableLayoutPanel.Controls.Add(brakeEffectIntensityLabel, 0, 1); - brakeTableLayoutPanel.Controls.Add(brakeEffectIntensityTrackBar, 1, 1); - brakeTableLayoutPanel.Controls.Add(buttonApply_Brake, 1, 13); - brakeTableLayoutPanel.Controls.Add(brakeDefaultsButton, 2, 13); - brakeTableLayoutPanel.Controls.Add(brakeTriggerMode, 0, 0); - brakeTableLayoutPanel.Controls.Add(brakeTriggerModeComboBox, 1, 0); - brakeTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; - brakeTableLayoutPanel.Location = new System.Drawing.Point(0, 0); - brakeTableLayoutPanel.Name = "brakeTableLayoutPanel"; - brakeTableLayoutPanel.RowCount = 15; - brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); - brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 8F)); - brakeTableLayoutPanel.Size = new System.Drawing.Size(713, 733); - brakeTableLayoutPanel.TabIndex = 0; - // - // brakeResistanceSmoothNumericUpDown - // - brakeResistanceSmoothNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - brakeResistanceSmoothNumericUpDown.AutoSize = true; - brakeResistanceSmoothNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - brakeResistanceSmoothNumericUpDown.Location = new System.Drawing.Point(541, 604); - brakeResistanceSmoothNumericUpDown.Maximum = new decimal(new int[] { 500, 0, 0, 0 }); - brakeResistanceSmoothNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); - brakeResistanceSmoothNumericUpDown.Name = "brakeResistanceSmoothNumericUpDown"; - brakeResistanceSmoothNumericUpDown.Size = new System.Drawing.Size(41, 23); - brakeResistanceSmoothNumericUpDown.TabIndex = 36; - toolTip.SetToolTip(brakeResistanceSmoothNumericUpDown, "Smoothing for Brake Resistance output. Lower = smoother. Must be greater than 0"); - brakeResistanceSmoothNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); - brakeResistanceSmoothNumericUpDown.ValueChanged += brakeResistanceSmoothNumericUpDown_ValueChanged; - // - // maxBrakeResistanceNumericUpDown - // - maxBrakeResistanceNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - maxBrakeResistanceNumericUpDown.AutoSize = true; - maxBrakeResistanceNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - maxBrakeResistanceNumericUpDown.Location = new System.Drawing.Point(541, 553); - maxBrakeResistanceNumericUpDown.Maximum = new decimal(new int[] { 7, 0, 0, 0 }); - maxBrakeResistanceNumericUpDown.Name = "maxBrakeResistanceNumericUpDown"; - maxBrakeResistanceNumericUpDown.Size = new System.Drawing.Size(29, 23); - maxBrakeResistanceNumericUpDown.TabIndex = 35; - toolTip.SetToolTip(maxBrakeResistanceNumericUpDown, "The Maximum resistance on the Brake (0-7)"); - maxBrakeResistanceNumericUpDown.ValueChanged += maxBrakeResistanceNumericUpDown_ValueChanged; - // - // minBrakeResistanceNumericUpDown - // - minBrakeResistanceNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - minBrakeResistanceNumericUpDown.AutoSize = true; - minBrakeResistanceNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - minBrakeResistanceNumericUpDown.Location = new System.Drawing.Point(541, 502); - minBrakeResistanceNumericUpDown.Maximum = new decimal(new int[] { 7, 0, 0, 0 }); - minBrakeResistanceNumericUpDown.Name = "minBrakeResistanceNumericUpDown"; - minBrakeResistanceNumericUpDown.Size = new System.Drawing.Size(29, 23); - minBrakeResistanceNumericUpDown.TabIndex = 34; - toolTip.SetToolTip(minBrakeResistanceNumericUpDown, "The Minimum resistance on the Brake (0-7)"); - minBrakeResistanceNumericUpDown.ValueChanged += minBrakeResistanceNumericUpDown_ValueChanged; - // - // maxBrakeStifnessNumericUpDown - // - maxBrakeStifnessNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - maxBrakeStifnessNumericUpDown.AutoSize = true; - maxBrakeStifnessNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - maxBrakeStifnessNumericUpDown.Location = new System.Drawing.Point(541, 451); - maxBrakeStifnessNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); - maxBrakeStifnessNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); - maxBrakeStifnessNumericUpDown.Name = "maxBrakeStifnessNumericUpDown"; - maxBrakeStifnessNumericUpDown.Size = new System.Drawing.Size(41, 23); - maxBrakeStifnessNumericUpDown.TabIndex = 33; - toolTip.SetToolTip(maxBrakeStifnessNumericUpDown, "On a scale of 1-255 with 1 being most stiff"); - maxBrakeStifnessNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); - maxBrakeStifnessNumericUpDown.ValueChanged += maxBrakeStifnessNumericUpDown_ValueChanged; - // - // minBrakeStifnessNumericUpDown - // - minBrakeStifnessNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - minBrakeStifnessNumericUpDown.AutoSize = true; - minBrakeStifnessNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - minBrakeStifnessNumericUpDown.Location = new System.Drawing.Point(541, 400); - minBrakeStifnessNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); - minBrakeStifnessNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); - minBrakeStifnessNumericUpDown.Name = "minBrakeStifnessNumericUpDown"; - minBrakeStifnessNumericUpDown.Size = new System.Drawing.Size(41, 23); - minBrakeStifnessNumericUpDown.TabIndex = 32; - toolTip.SetToolTip(minBrakeStifnessNumericUpDown, "On a scale of 1-255 with 1 being most stiff"); - minBrakeStifnessNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); - minBrakeStifnessNumericUpDown.ValueChanged += minBrakeStifnessNumericUpDown_ValueChanged; - // - // brakeVibrationSmoothNumericUpDown - // - brakeVibrationSmoothNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - brakeVibrationSmoothNumericUpDown.AutoSize = true; - brakeVibrationSmoothNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - brakeVibrationSmoothNumericUpDown.Location = new System.Drawing.Point(541, 349); - brakeVibrationSmoothNumericUpDown.Maximum = new decimal(new int[] { 500, 0, 0, 0 }); - brakeVibrationSmoothNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); - brakeVibrationSmoothNumericUpDown.Name = "brakeVibrationSmoothNumericUpDown"; - brakeVibrationSmoothNumericUpDown.Size = new System.Drawing.Size(41, 23); - brakeVibrationSmoothNumericUpDown.TabIndex = 31; - toolTip.SetToolTip(brakeVibrationSmoothNumericUpDown, "Smoothing for Brake Frequency output. Lower = smoother. Must be greater than 0"); - brakeVibrationSmoothNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); - brakeVibrationSmoothNumericUpDown.ValueChanged += brakeVibrationSmoothNumericUpDown_ValueChanged; - // - // maxBrakeVibrationNumericUpDown - // - maxBrakeVibrationNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - maxBrakeVibrationNumericUpDown.AutoSize = true; - maxBrakeVibrationNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - maxBrakeVibrationNumericUpDown.Location = new System.Drawing.Point(541, 298); - maxBrakeVibrationNumericUpDown.Name = "maxBrakeVibrationNumericUpDown"; - maxBrakeVibrationNumericUpDown.Size = new System.Drawing.Size(41, 23); - maxBrakeVibrationNumericUpDown.TabIndex = 30; - toolTip.SetToolTip(maxBrakeVibrationNumericUpDown, "The maximum brake frequency in Hz (avoid over 40). Correlates to better grip"); - maxBrakeVibrationNumericUpDown.ValueChanged += maxBrakeVibrationNumericUpDown_ValueChanged; - // - // minBrakeVibrationNumericUpDown - // - minBrakeVibrationNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - minBrakeVibrationNumericUpDown.AutoSize = true; - minBrakeVibrationNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - minBrakeVibrationNumericUpDown.Location = new System.Drawing.Point(541, 247); - minBrakeVibrationNumericUpDown.Name = "minBrakeVibrationNumericUpDown"; - minBrakeVibrationNumericUpDown.Size = new System.Drawing.Size(41, 23); - minBrakeVibrationNumericUpDown.TabIndex = 29; - toolTip.SetToolTip(minBrakeVibrationNumericUpDown, "The Minimum brake frequency in Hz (avoid over 40). Helps avoid clicking in controller"); - minBrakeVibrationNumericUpDown.ValueChanged += minBrakeVibrationNumericUpDown_ValueChanged; - // - // brakeVibrationModeNumericUpDown - // - brakeVibrationModeNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - brakeVibrationModeNumericUpDown.AutoSize = true; - brakeVibrationModeNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - brakeVibrationModeNumericUpDown.Location = new System.Drawing.Point(541, 196); - brakeVibrationModeNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); - brakeVibrationModeNumericUpDown.Name = "brakeVibrationModeNumericUpDown"; - brakeVibrationModeNumericUpDown.Size = new System.Drawing.Size(41, 23); - brakeVibrationModeNumericUpDown.TabIndex = 28; - toolTip.SetToolTip(brakeVibrationModeNumericUpDown, "The depression of the brake lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied. "); - brakeVibrationModeNumericUpDown.ValueChanged += brakeVibrationModeNumericUpDown_ValueChanged; - // - // brakeVibrationStartNumericUpDown - // - brakeVibrationStartNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - brakeVibrationStartNumericUpDown.AutoSize = true; - brakeVibrationStartNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - brakeVibrationStartNumericUpDown.Location = new System.Drawing.Point(541, 145); - brakeVibrationStartNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); - brakeVibrationStartNumericUpDown.Name = "brakeVibrationStartNumericUpDown"; - brakeVibrationStartNumericUpDown.Size = new System.Drawing.Size(41, 23); - brakeVibrationStartNumericUpDown.TabIndex = 27; - toolTip.SetToolTip(brakeVibrationStartNumericUpDown, "The position in the Trigger (0-255) at which the brake should feel engaged with low grip surfaces"); - brakeVibrationStartNumericUpDown.ValueChanged += brakeVibrationStartNumericUpDown_ValueChanged; - // - // gripLossNumericUpDown - // - gripLossNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - gripLossNumericUpDown.AutoSize = true; - gripLossNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - gripLossNumericUpDown.Location = new System.Drawing.Point(541, 94); - gripLossNumericUpDown.Name = "gripLossNumericUpDown"; - gripLossNumericUpDown.Size = new System.Drawing.Size(41, 23); - gripLossNumericUpDown.TabIndex = 26; - toolTip.SetToolTip(gripLossNumericUpDown, "The point at which the brake will begin to become choppy (0 = full grip, 100 = no grip)"); - gripLossNumericUpDown.ValueChanged += gripLossNumericUpDown_ValueChanged; - // - // brakeEffectNumericUpDown - // - brakeEffectNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - brakeEffectNumericUpDown.AutoSize = true; - brakeEffectNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - brakeEffectNumericUpDown.Location = new System.Drawing.Point(541, 43); - brakeEffectNumericUpDown.Name = "brakeEffectNumericUpDown"; - brakeEffectNumericUpDown.Size = new System.Drawing.Size(41, 23); - brakeEffectNumericUpDown.TabIndex = 2; - toolTip.SetToolTip(brakeEffectNumericUpDown, "The percentage of the current RPM when we are in the \"redline\" of the engine"); - brakeEffectNumericUpDown.ValueChanged += brakeEffectNumericUpDown_ValueChanged; - // - // brakeResistanceSmoothingTrackBar - // - brakeResistanceSmoothingTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - brakeResistanceSmoothingTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - brakeResistanceSmoothingTrackBar.LargeChange = 50; - brakeResistanceSmoothingTrackBar.Location = new System.Drawing.Point(133, 593); - brakeResistanceSmoothingTrackBar.Maximum = 500; - brakeResistanceSmoothingTrackBar.Minimum = 1; - brakeResistanceSmoothingTrackBar.Name = "brakeResistanceSmoothingTrackBar"; - brakeResistanceSmoothingTrackBar.Size = new System.Drawing.Size(402, 45); - brakeResistanceSmoothingTrackBar.TabIndex = 23; - brakeResistanceSmoothingTrackBar.TickFrequency = 10; - brakeResistanceSmoothingTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(brakeResistanceSmoothingTrackBar, "Smoothing for Brake Resistance output. Lower = smoother. Must be greater than 0"); - brakeResistanceSmoothingTrackBar.Value = 1; - brakeResistanceSmoothingTrackBar.Scroll += brakeResistanceSmoothingTrackBar_Scroll; - // - // brakeResistanceSmoothingLabel - // - brakeResistanceSmoothingLabel.AutoSize = true; - brakeResistanceSmoothingLabel.Dock = System.Windows.Forms.DockStyle.Fill; - brakeResistanceSmoothingLabel.Location = new System.Drawing.Point(3, 590); - brakeResistanceSmoothingLabel.Name = "brakeResistanceSmoothingLabel"; - brakeResistanceSmoothingLabel.Size = new System.Drawing.Size(124, 51); - brakeResistanceSmoothingLabel.TabIndex = 22; - brakeResistanceSmoothingLabel.Text = "Resistance Smoothing"; - brakeResistanceSmoothingLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(brakeResistanceSmoothingLabel, "Smoothing for Brake Resistance output. Lower = smoother. Must be greater than 0"); - // - // maxBrakeResistanceTrackBar - // - maxBrakeResistanceTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - maxBrakeResistanceTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - maxBrakeResistanceTrackBar.LargeChange = 50; - maxBrakeResistanceTrackBar.Location = new System.Drawing.Point(133, 542); - maxBrakeResistanceTrackBar.Maximum = 7; - maxBrakeResistanceTrackBar.Name = "maxBrakeResistanceTrackBar"; - maxBrakeResistanceTrackBar.Size = new System.Drawing.Size(402, 45); - maxBrakeResistanceTrackBar.TabIndex = 21; - maxBrakeResistanceTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(maxBrakeResistanceTrackBar, "The Maximum resistance on the Brake (0-7)"); - maxBrakeResistanceTrackBar.Scroll += maxBrakeResistanceTrackBar_Scroll; - // - // maxBrakeResistanceLabel - // - maxBrakeResistanceLabel.AutoSize = true; - maxBrakeResistanceLabel.Dock = System.Windows.Forms.DockStyle.Fill; - maxBrakeResistanceLabel.Location = new System.Drawing.Point(3, 539); - maxBrakeResistanceLabel.Name = "maxBrakeResistanceLabel"; - maxBrakeResistanceLabel.Size = new System.Drawing.Size(124, 51); - maxBrakeResistanceLabel.TabIndex = 20; - maxBrakeResistanceLabel.Text = "Max Resistance"; - maxBrakeResistanceLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(maxBrakeResistanceLabel, "The Maximum resistance on the Brake (0-7)"); - // - // minBrakeResistanceTrackBar - // - minBrakeResistanceTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - minBrakeResistanceTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - minBrakeResistanceTrackBar.LargeChange = 50; - minBrakeResistanceTrackBar.Location = new System.Drawing.Point(133, 491); - minBrakeResistanceTrackBar.Maximum = 7; - minBrakeResistanceTrackBar.Name = "minBrakeResistanceTrackBar"; - minBrakeResistanceTrackBar.Size = new System.Drawing.Size(402, 45); - minBrakeResistanceTrackBar.TabIndex = 19; - minBrakeResistanceTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(minBrakeResistanceTrackBar, "The Minimum resistance on the Brake (0-7)"); - minBrakeResistanceTrackBar.Scroll += minBrakeResistanceTrackBar_Scroll; - // - // minBrakeResistanceLabel - // - minBrakeResistanceLabel.AutoSize = true; - minBrakeResistanceLabel.Dock = System.Windows.Forms.DockStyle.Fill; - minBrakeResistanceLabel.Location = new System.Drawing.Point(3, 488); - minBrakeResistanceLabel.Name = "minBrakeResistanceLabel"; - minBrakeResistanceLabel.Size = new System.Drawing.Size(124, 51); - minBrakeResistanceLabel.TabIndex = 18; - minBrakeResistanceLabel.Text = "Min Resistance"; - minBrakeResistanceLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(minBrakeResistanceLabel, "The Minimum resistance on the Brake (0-7)"); - // - // maxBrakeStiffnessTrackBar - // - maxBrakeStiffnessTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - maxBrakeStiffnessTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - maxBrakeStiffnessTrackBar.LargeChange = 50; - maxBrakeStiffnessTrackBar.Location = new System.Drawing.Point(133, 440); - maxBrakeStiffnessTrackBar.Maximum = 255; - maxBrakeStiffnessTrackBar.Minimum = 1; - maxBrakeStiffnessTrackBar.Name = "maxBrakeStiffnessTrackBar"; - maxBrakeStiffnessTrackBar.Size = new System.Drawing.Size(402, 45); - maxBrakeStiffnessTrackBar.TabIndex = 17; - maxBrakeStiffnessTrackBar.TickFrequency = 5; - maxBrakeStiffnessTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(maxBrakeStiffnessTrackBar, "On a scale of 1-255 with 1 being most stiff"); - maxBrakeStiffnessTrackBar.Value = 1; - maxBrakeStiffnessTrackBar.Scroll += maxBrakeStiffnessTrackBar_Scroll; - // - // maxBrakeStiffnessLabel - // - maxBrakeStiffnessLabel.AutoSize = true; - maxBrakeStiffnessLabel.Dock = System.Windows.Forms.DockStyle.Fill; - maxBrakeStiffnessLabel.Location = new System.Drawing.Point(3, 437); - maxBrakeStiffnessLabel.Name = "maxBrakeStiffnessLabel"; - maxBrakeStiffnessLabel.Size = new System.Drawing.Size(124, 51); - maxBrakeStiffnessLabel.TabIndex = 16; - maxBrakeStiffnessLabel.Text = "Max Stiffness"; - maxBrakeStiffnessLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(maxBrakeStiffnessLabel, "On a scale of 1-255 with 1 being most stiff"); - // - // minBrakeStiffnessTrackBar - // - minBrakeStiffnessTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - minBrakeStiffnessTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - minBrakeStiffnessTrackBar.LargeChange = 50; - minBrakeStiffnessTrackBar.Location = new System.Drawing.Point(133, 389); - minBrakeStiffnessTrackBar.Maximum = 255; - minBrakeStiffnessTrackBar.Minimum = 1; - minBrakeStiffnessTrackBar.Name = "minBrakeStiffnessTrackBar"; - minBrakeStiffnessTrackBar.Size = new System.Drawing.Size(402, 45); - minBrakeStiffnessTrackBar.TabIndex = 15; - minBrakeStiffnessTrackBar.TickFrequency = 5; - minBrakeStiffnessTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(minBrakeStiffnessTrackBar, "On a scale of 1-255 with 1 being most stiff"); - minBrakeStiffnessTrackBar.Value = 1; - minBrakeStiffnessTrackBar.Scroll += minBrakeStiffnessTrackBar_Scroll; - // - // minBrakeStiffnessLabel - // - minBrakeStiffnessLabel.AutoSize = true; - minBrakeStiffnessLabel.Dock = System.Windows.Forms.DockStyle.Fill; - minBrakeStiffnessLabel.Location = new System.Drawing.Point(3, 386); - minBrakeStiffnessLabel.Name = "minBrakeStiffnessLabel"; - minBrakeStiffnessLabel.Size = new System.Drawing.Size(124, 51); - minBrakeStiffnessLabel.TabIndex = 14; - minBrakeStiffnessLabel.Text = "Min Stifness"; - minBrakeStiffnessLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(minBrakeStiffnessLabel, "On a scale of 1-255 with 1 being most stiff"); - // - // vibrationSmoothingTrackBar - // - vibrationSmoothingTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - vibrationSmoothingTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - vibrationSmoothingTrackBar.LargeChange = 50; - vibrationSmoothingTrackBar.Location = new System.Drawing.Point(133, 338); - vibrationSmoothingTrackBar.Maximum = 500; - vibrationSmoothingTrackBar.Minimum = 1; - vibrationSmoothingTrackBar.Name = "vibrationSmoothingTrackBar"; - vibrationSmoothingTrackBar.Size = new System.Drawing.Size(402, 45); - vibrationSmoothingTrackBar.TabIndex = 13; - vibrationSmoothingTrackBar.TickFrequency = 10; - vibrationSmoothingTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(vibrationSmoothingTrackBar, "Smoothing for Brake Frequency output. Lower = smoother. Must be greater than 0"); - vibrationSmoothingTrackBar.Value = 1; - vibrationSmoothingTrackBar.Scroll += vibrationSmoothingTrackBar_Scroll; - // - // vibrationSmoothingLabel - // - vibrationSmoothingLabel.AutoSize = true; - vibrationSmoothingLabel.Dock = System.Windows.Forms.DockStyle.Fill; - vibrationSmoothingLabel.Location = new System.Drawing.Point(3, 335); - vibrationSmoothingLabel.Name = "vibrationSmoothingLabel"; - vibrationSmoothingLabel.Size = new System.Drawing.Size(124, 51); - vibrationSmoothingLabel.TabIndex = 12; - vibrationSmoothingLabel.Text = "Vibration Smoothing"; - vibrationSmoothingLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(vibrationSmoothingLabel, "Smoothing for Brake Frequency output. Lower = smoother. Must be greater than 0"); - // - // maxBrakeVibrationTrackBar - // - maxBrakeVibrationTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - maxBrakeVibrationTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - maxBrakeVibrationTrackBar.LargeChange = 50; - maxBrakeVibrationTrackBar.Location = new System.Drawing.Point(133, 287); - maxBrakeVibrationTrackBar.Maximum = 100; - maxBrakeVibrationTrackBar.Name = "maxBrakeVibrationTrackBar"; - maxBrakeVibrationTrackBar.Size = new System.Drawing.Size(402, 45); - maxBrakeVibrationTrackBar.TabIndex = 11; - maxBrakeVibrationTrackBar.TickFrequency = 5; - maxBrakeVibrationTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(maxBrakeVibrationTrackBar, "The maximum brake frequency in Hz (avoid over 40). Correlates to better grip"); - maxBrakeVibrationTrackBar.Scroll += maxBrakeVibrationTrackBar_Scroll; - // - // maxBrakeVibrationLabel - // - maxBrakeVibrationLabel.AutoSize = true; - maxBrakeVibrationLabel.Dock = System.Windows.Forms.DockStyle.Fill; - maxBrakeVibrationLabel.Location = new System.Drawing.Point(3, 284); - maxBrakeVibrationLabel.Name = "maxBrakeVibrationLabel"; - maxBrakeVibrationLabel.Size = new System.Drawing.Size(124, 51); - maxBrakeVibrationLabel.TabIndex = 10; - maxBrakeVibrationLabel.Text = "Max Brake Vibration"; - maxBrakeVibrationLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(maxBrakeVibrationLabel, "The maximum brake frequency in Hz (avoid over 40). Correlates to better grip"); - // - // minBrakeVibrationTrackBar - // - minBrakeVibrationTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - minBrakeVibrationTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - minBrakeVibrationTrackBar.LargeChange = 50; - minBrakeVibrationTrackBar.Location = new System.Drawing.Point(133, 236); - minBrakeVibrationTrackBar.Maximum = 100; - minBrakeVibrationTrackBar.Name = "minBrakeVibrationTrackBar"; - minBrakeVibrationTrackBar.Size = new System.Drawing.Size(402, 45); - minBrakeVibrationTrackBar.TabIndex = 9; - minBrakeVibrationTrackBar.TickFrequency = 5; - minBrakeVibrationTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(minBrakeVibrationTrackBar, "The Minimum brake frequency in Hz (avoid over 40). Helps avoid clicking in controller"); - minBrakeVibrationTrackBar.Scroll += minBrakeVibrationTrackBar_Scroll; - // - // minBrakeVibrationLabel - // - minBrakeVibrationLabel.AutoSize = true; - minBrakeVibrationLabel.Dock = System.Windows.Forms.DockStyle.Fill; - minBrakeVibrationLabel.Location = new System.Drawing.Point(3, 233); - minBrakeVibrationLabel.Name = "minBrakeVibrationLabel"; - minBrakeVibrationLabel.Size = new System.Drawing.Size(124, 51); - minBrakeVibrationLabel.TabIndex = 8; - minBrakeVibrationLabel.Text = "Min Brake Vibration"; - minBrakeVibrationLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(minBrakeVibrationLabel, "The Minimum brake frequency in Hz (avoid over 40). Helps avoid clicking in controller"); - // - // brakeVibrationModeTrackBar - // - brakeVibrationModeTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - brakeVibrationModeTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - brakeVibrationModeTrackBar.LargeChange = 50; - brakeVibrationModeTrackBar.Location = new System.Drawing.Point(133, 185); - brakeVibrationModeTrackBar.Maximum = 255; - brakeVibrationModeTrackBar.Name = "brakeVibrationModeTrackBar"; - brakeVibrationModeTrackBar.Size = new System.Drawing.Size(402, 45); - brakeVibrationModeTrackBar.TabIndex = 7; - brakeVibrationModeTrackBar.TickFrequency = 5; - brakeVibrationModeTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(brakeVibrationModeTrackBar, "The depression of the brake lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied. "); - brakeVibrationModeTrackBar.Scroll += brakeVibrationModeTrackBar_Scroll; - // - // brakeVibrationModeStartLabel - // - brakeVibrationModeStartLabel.AutoSize = true; - brakeVibrationModeStartLabel.Dock = System.Windows.Forms.DockStyle.Fill; - brakeVibrationModeStartLabel.Location = new System.Drawing.Point(3, 182); - brakeVibrationModeStartLabel.Name = "brakeVibrationModeStartLabel"; - brakeVibrationModeStartLabel.Size = new System.Drawing.Size(124, 51); - brakeVibrationModeStartLabel.TabIndex = 6; - brakeVibrationModeStartLabel.Text = "Vibration Mode Start"; - brakeVibrationModeStartLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(brakeVibrationModeStartLabel, "The depression of the brake lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied. "); - // - // brakeVibrationStartTrackBar - // - brakeVibrationStartTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - brakeVibrationStartTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - brakeVibrationStartTrackBar.LargeChange = 50; - brakeVibrationStartTrackBar.Location = new System.Drawing.Point(133, 134); - brakeVibrationStartTrackBar.Maximum = 255; - brakeVibrationStartTrackBar.Name = "brakeVibrationStartTrackBar"; - brakeVibrationStartTrackBar.Size = new System.Drawing.Size(402, 45); - brakeVibrationStartTrackBar.TabIndex = 5; - brakeVibrationStartTrackBar.TickFrequency = 5; - brakeVibrationStartTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(brakeVibrationStartTrackBar, "The position in the Trigger (0-255) at which the brake should feel engaged with low grip surfaces"); - brakeVibrationStartTrackBar.Scroll += brakeVibrationStartTrackBar_Scroll; - // - // brakeVibrationStartLabel - // - brakeVibrationStartLabel.AutoSize = true; - brakeVibrationStartLabel.Dock = System.Windows.Forms.DockStyle.Fill; - brakeVibrationStartLabel.Location = new System.Drawing.Point(3, 131); - brakeVibrationStartLabel.Name = "brakeVibrationStartLabel"; - brakeVibrationStartLabel.Size = new System.Drawing.Size(124, 51); - brakeVibrationStartLabel.TabIndex = 4; - brakeVibrationStartLabel.Text = "Vibration Start"; - brakeVibrationStartLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(brakeVibrationStartLabel, "The position in the Trigger (0-255) at which the brake should feel engaged with low grip surfaces"); - // - // gripLossTrackBar - // - gripLossTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - gripLossTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - gripLossTrackBar.Location = new System.Drawing.Point(133, 83); - gripLossTrackBar.Maximum = 100; - gripLossTrackBar.Name = "gripLossTrackBar"; - gripLossTrackBar.Size = new System.Drawing.Size(402, 45); - gripLossTrackBar.TabIndex = 3; - gripLossTrackBar.TickFrequency = 5; - gripLossTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(gripLossTrackBar, "The point at which the brake will begin to become choppy (0 = full grip, 100 = no grip)"); - gripLossTrackBar.Value = 50; - gripLossTrackBar.Scroll += gripLossTrackBar_Scroll; - // - // gripLossLabel - // - gripLossLabel.AutoSize = true; - gripLossLabel.Dock = System.Windows.Forms.DockStyle.Fill; - gripLossLabel.Location = new System.Drawing.Point(3, 80); - gripLossLabel.Name = "gripLossLabel"; - gripLossLabel.Size = new System.Drawing.Size(124, 51); - gripLossLabel.TabIndex = 2; - gripLossLabel.Text = "Grip Loss Value"; - gripLossLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(gripLossLabel, "The point at which the brake will begin to become choppy (0 = full grip, 100 = no grip)"); - // - // brakeEffectIntensityLabel - // - brakeEffectIntensityLabel.AutoSize = true; - brakeEffectIntensityLabel.Dock = System.Windows.Forms.DockStyle.Fill; - brakeEffectIntensityLabel.Location = new System.Drawing.Point(3, 29); - brakeEffectIntensityLabel.Name = "brakeEffectIntensityLabel"; - brakeEffectIntensityLabel.Size = new System.Drawing.Size(124, 51); - brakeEffectIntensityLabel.TabIndex = 0; - brakeEffectIntensityLabel.Text = "Effect Intensity"; - brakeEffectIntensityLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(brakeEffectIntensityLabel, "The percentage of the trigger effects"); - // - // brakeEffectIntensityTrackBar - // - brakeEffectIntensityTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - brakeEffectIntensityTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - brakeEffectIntensityTrackBar.LargeChange = 10; - brakeEffectIntensityTrackBar.Location = new System.Drawing.Point(133, 32); - brakeEffectIntensityTrackBar.Maximum = 100; - brakeEffectIntensityTrackBar.Name = "brakeEffectIntensityTrackBar"; - brakeEffectIntensityTrackBar.Size = new System.Drawing.Size(402, 45); - brakeEffectIntensityTrackBar.TabIndex = 1; - brakeEffectIntensityTrackBar.TickFrequency = 5; - brakeEffectIntensityTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(brakeEffectIntensityTrackBar, "The percentage of the trigger effects"); - brakeEffectIntensityTrackBar.Value = 100; - brakeEffectIntensityTrackBar.Scroll += brakeEffectIntensityTrackBar_Scroll; - // - // buttonApply_Brake - // - buttonApply_Brake.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; - buttonApply_Brake.AutoSize = true; - buttonApply_Brake.Location = new System.Drawing.Point(133, 644); - buttonApply_Brake.Name = "buttonApply_Brake"; - buttonApply_Brake.Size = new System.Drawing.Size(402, 25); - buttonApply_Brake.TabIndex = 37; - buttonApply_Brake.Text = "Apply"; - buttonApply_Brake.UseVisualStyleBackColor = true; - buttonApply_Brake.Click += buttonApply_Brake_Click; - // - // brakeDefaultsButton - // - brakeDefaultsButton.AutoSize = true; - brakeDefaultsButton.Location = new System.Drawing.Point(541, 644); - brakeDefaultsButton.Name = "brakeDefaultsButton"; - brakeDefaultsButton.Size = new System.Drawing.Size(75, 25); - brakeDefaultsButton.TabIndex = 38; - brakeDefaultsButton.Text = "Defaults"; - brakeDefaultsButton.UseVisualStyleBackColor = true; - brakeDefaultsButton.Click += brakeDefaultsButton_Click; - // - // brakeTriggerMode - // - brakeTriggerMode.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; - brakeTriggerMode.AutoSize = true; - brakeTriggerMode.Location = new System.Drawing.Point(18, 0); - brakeTriggerMode.Name = "brakeTriggerMode"; - brakeTriggerMode.Size = new System.Drawing.Size(109, 29); - brakeTriggerMode.TabIndex = 39; - brakeTriggerMode.Text = "Brake Trigger Mode"; - brakeTriggerMode.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // brakeTriggerModeComboBox - // - brakeTriggerModeComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; - brakeTriggerModeComboBox.FormattingEnabled = true; - brakeTriggerModeComboBox.Items.AddRange(new object[] { "Off", "Resistance", "Vibration" }); - brakeTriggerModeComboBox.Location = new System.Drawing.Point(133, 3); - brakeTriggerModeComboBox.Name = "brakeTriggerModeComboBox"; - brakeTriggerModeComboBox.Size = new System.Drawing.Size(402, 23); - brakeTriggerModeComboBox.TabIndex = 40; - brakeTriggerModeComboBox.SelectedIndexChanged += brakeTriggerModeComboBox_SelectedIndexChanged; - // - // throttleConfigTabPage - // - throttleConfigTabPage.Controls.Add(throttleTableLayoutPanel); - throttleConfigTabPage.Location = new System.Drawing.Point(4, 24); - throttleConfigTabPage.Name = "throttleConfigTabPage"; - throttleConfigTabPage.Padding = new System.Windows.Forms.Padding(3); - throttleConfigTabPage.Size = new System.Drawing.Size(713, 733); - throttleConfigTabPage.TabIndex = 2; - throttleConfigTabPage.Text = "Throttle Trigger"; - throttleConfigTabPage.UseVisualStyleBackColor = true; - // - // throttleTableLayoutPanel - // - throttleTableLayoutPanel.AutoScroll = true; - throttleTableLayoutPanel.ColumnCount = 3; - throttleTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - throttleTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - throttleTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - throttleTableLayoutPanel.Controls.Add(throttleTriggerModeComboBox, 1, 0); - throttleTableLayoutPanel.Controls.Add(throttleTriggerMode, 0, 0); - throttleTableLayoutPanel.Controls.Add(throttleResistanceSmoothNumericUpDown, 2, 14); - throttleTableLayoutPanel.Controls.Add(throttleMaxResistanceNumericUpDown, 2, 13); - throttleTableLayoutPanel.Controls.Add(throttleMinResistanceNumericUpDown, 2, 12); - throttleTableLayoutPanel.Controls.Add(throttleMaxStiffnessNumericUpDown, 2, 11); - throttleTableLayoutPanel.Controls.Add(throttleMinStiffnessNumericUpDown, 2, 10); - throttleTableLayoutPanel.Controls.Add(throttleVibrationSmoothNumericUpDown, 2, 9); - throttleTableLayoutPanel.Controls.Add(throttleMaxVibrationNumericUpDown, 2, 8); - throttleTableLayoutPanel.Controls.Add(throttleMinVibrationNumericUpDown, 2, 7); - throttleTableLayoutPanel.Controls.Add(throttleVibrationStartNumericUpDown, 2, 6); - throttleTableLayoutPanel.Controls.Add(throttleAccelLimitNumericUpDown, 2, 5); - throttleTableLayoutPanel.Controls.Add(throttleForwardAccelScaleNumericUpDown, 2, 4); - throttleTableLayoutPanel.Controls.Add(throttleTurnAccelScaleNumericUpDown, 2, 3); - throttleTableLayoutPanel.Controls.Add(throttleGripLossNumericUpDown, 2, 2); - throttleTableLayoutPanel.Controls.Add(throttleIntensityNumericUpDown, 2, 1); - throttleTableLayoutPanel.Controls.Add(throttleResistanceSmoothTrackBar, 1, 14); - throttleTableLayoutPanel.Controls.Add(throttleMaxResistanceTrackBar, 1, 13); - throttleTableLayoutPanel.Controls.Add(throttleMinResistanceTrackBar, 1, 12); - throttleTableLayoutPanel.Controls.Add(throttleMaxStiffnessTrackBar, 1, 11); - throttleTableLayoutPanel.Controls.Add(throttleMinStiffnessTrackBar, 1, 10); - throttleTableLayoutPanel.Controls.Add(throttleVibrationSmoothTrackBar, 1, 9); - throttleTableLayoutPanel.Controls.Add(throttleMaxVibrationTrackBar, 1, 8); - throttleTableLayoutPanel.Controls.Add(throttleMinVibrationTrackBar, 1, 7); - throttleTableLayoutPanel.Controls.Add(throttleVibrationModeStartTrackBar, 1, 6); - throttleTableLayoutPanel.Controls.Add(throttleAccelLimitTrackBar, 1, 5); - throttleTableLayoutPanel.Controls.Add(throttleForwardAccelScaleTrackBar, 1, 4); - throttleTableLayoutPanel.Controls.Add(throttleTurnAccelScaleTrackBar, 1, 3); - throttleTableLayoutPanel.Controls.Add(throttleGripLossTrackBar, 1, 2); - throttleTableLayoutPanel.Controls.Add(throttleIntensityTrackBar, 1, 1); - throttleTableLayoutPanel.Controls.Add(throttleResistanceSmoothingLabel, 0, 14); - throttleTableLayoutPanel.Controls.Add(maxThrottleResistanceLabel, 0, 13); - throttleTableLayoutPanel.Controls.Add(minThrottleResistanceLabel, 0, 12); - throttleTableLayoutPanel.Controls.Add(maxThrottleStiffnessLabel, 0, 11); - throttleTableLayoutPanel.Controls.Add(minThrottleStiffnessLabel, 0, 10); - throttleTableLayoutPanel.Controls.Add(throttleVibrationSmoothingLabel, 0, 9); - throttleTableLayoutPanel.Controls.Add(maxThrottleVibrationLabel, 0, 8); - throttleTableLayoutPanel.Controls.Add(minThrottleVibrationLabel, 0, 7); - throttleTableLayoutPanel.Controls.Add(throttleVibrationStartLabel, 0, 6); - throttleTableLayoutPanel.Controls.Add(accelerationLimitLabel, 0, 5); - throttleTableLayoutPanel.Controls.Add(forwardAccelLabel, 0, 4); - throttleTableLayoutPanel.Controls.Add(turnAccelLabel, 0, 3); - throttleTableLayoutPanel.Controls.Add(throttleGripLossLabel, 0, 2); - throttleTableLayoutPanel.Controls.Add(throttleIntensityLabel, 0, 1); - throttleTableLayoutPanel.Controls.Add(buttonApply_Throttle, 1, 15); - throttleTableLayoutPanel.Controls.Add(throttleDefaultsButton, 2, 15); - throttleTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; - throttleTableLayoutPanel.Location = new System.Drawing.Point(3, 3); - throttleTableLayoutPanel.Name = "throttleTableLayoutPanel"; - throttleTableLayoutPanel.RowCount = 16; - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); - throttleTableLayoutPanel.Size = new System.Drawing.Size(707, 727); - throttleTableLayoutPanel.TabIndex = 0; - // - // throttleTriggerModeComboBox - // - throttleTriggerModeComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; - throttleTriggerModeComboBox.FormattingEnabled = true; - throttleTriggerModeComboBox.Items.AddRange(new object[] { "Off", "Resistance", "Vibration" }); - throttleTriggerModeComboBox.Location = new System.Drawing.Point(141, 3); - throttleTriggerModeComboBox.Name = "throttleTriggerModeComboBox"; - throttleTriggerModeComboBox.Size = new System.Drawing.Size(402, 23); - throttleTriggerModeComboBox.TabIndex = 46; - throttleTriggerModeComboBox.SelectedIndexChanged += throttleTriggerModeComboBox_SelectedIndexChanged; - // - // throttleTriggerMode - // - throttleTriggerMode.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; - throttleTriggerMode.AutoSize = true; - throttleTriggerMode.Location = new System.Drawing.Point(14, 0); - throttleTriggerMode.Name = "throttleTriggerMode"; - throttleTriggerMode.Size = new System.Drawing.Size(121, 29); - throttleTriggerMode.TabIndex = 45; - throttleTriggerMode.Text = "Throttle Trigger Mode"; - throttleTriggerMode.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - // - // throttleResistanceSmoothNumericUpDown - // - throttleResistanceSmoothNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - throttleResistanceSmoothNumericUpDown.AutoSize = true; - throttleResistanceSmoothNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - throttleResistanceSmoothNumericUpDown.Location = new System.Drawing.Point(549, 706); - throttleResistanceSmoothNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); - throttleResistanceSmoothNumericUpDown.Name = "throttleResistanceSmoothNumericUpDown"; - throttleResistanceSmoothNumericUpDown.Size = new System.Drawing.Size(41, 23); - throttleResistanceSmoothNumericUpDown.TabIndex = 42; - toolTip.SetToolTip(throttleResistanceSmoothNumericUpDown, "Smoothing for Throttle Resistance output. Lower = smoother. Must be greater than 0"); - throttleResistanceSmoothNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); - throttleResistanceSmoothNumericUpDown.ValueChanged += throttleResistanceSmoothNumericUpDown_ValueChanged; - // - // throttleMaxResistanceNumericUpDown - // - throttleMaxResistanceNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - throttleMaxResistanceNumericUpDown.AutoSize = true; - throttleMaxResistanceNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - throttleMaxResistanceNumericUpDown.Location = new System.Drawing.Point(549, 655); - throttleMaxResistanceNumericUpDown.Maximum = new decimal(new int[] { 7, 0, 0, 0 }); - throttleMaxResistanceNumericUpDown.Name = "throttleMaxResistanceNumericUpDown"; - throttleMaxResistanceNumericUpDown.Size = new System.Drawing.Size(29, 23); - throttleMaxResistanceNumericUpDown.TabIndex = 41; - toolTip.SetToolTip(throttleMaxResistanceNumericUpDown, "The Maximum resistance on the throttle (0-7)"); - throttleMaxResistanceNumericUpDown.ValueChanged += throttleMaxResistanceNumericUpDown_ValueChanged; - // - // throttleMinResistanceNumericUpDown - // - throttleMinResistanceNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - throttleMinResistanceNumericUpDown.AutoSize = true; - throttleMinResistanceNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - throttleMinResistanceNumericUpDown.Location = new System.Drawing.Point(549, 604); - throttleMinResistanceNumericUpDown.Maximum = new decimal(new int[] { 7, 0, 0, 0 }); - throttleMinResistanceNumericUpDown.Name = "throttleMinResistanceNumericUpDown"; - throttleMinResistanceNumericUpDown.Size = new System.Drawing.Size(29, 23); - throttleMinResistanceNumericUpDown.TabIndex = 40; - toolTip.SetToolTip(throttleMinResistanceNumericUpDown, "The Minimum resistance on the throttle (0-7)"); - throttleMinResistanceNumericUpDown.ValueChanged += throttleMinResistanceNumericUpDown_ValueChanged; - // - // throttleMaxStiffnessNumericUpDown - // - throttleMaxStiffnessNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - throttleMaxStiffnessNumericUpDown.AutoSize = true; - throttleMaxStiffnessNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - throttleMaxStiffnessNumericUpDown.Location = new System.Drawing.Point(549, 553); - throttleMaxStiffnessNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); - throttleMaxStiffnessNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); - throttleMaxStiffnessNumericUpDown.Name = "throttleMaxStiffnessNumericUpDown"; - throttleMaxStiffnessNumericUpDown.Size = new System.Drawing.Size(41, 23); - throttleMaxStiffnessNumericUpDown.TabIndex = 39; - toolTip.SetToolTip(throttleMaxStiffnessNumericUpDown, "On a scale of 1-255 with 1 being most stiff"); - throttleMaxStiffnessNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); - throttleMaxStiffnessNumericUpDown.ValueChanged += throttleMaxStiffnessNumericUpDown_ValueChanged; - // - // throttleMinStiffnessNumericUpDown - // - throttleMinStiffnessNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - throttleMinStiffnessNumericUpDown.AutoSize = true; - throttleMinStiffnessNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - throttleMinStiffnessNumericUpDown.Location = new System.Drawing.Point(549, 502); - throttleMinStiffnessNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); - throttleMinStiffnessNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); - throttleMinStiffnessNumericUpDown.Name = "throttleMinStiffnessNumericUpDown"; - throttleMinStiffnessNumericUpDown.Size = new System.Drawing.Size(41, 23); - throttleMinStiffnessNumericUpDown.TabIndex = 38; - toolTip.SetToolTip(throttleMinStiffnessNumericUpDown, "On a scale of 1-255 with 1 being most stiff"); - throttleMinStiffnessNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); - throttleMinStiffnessNumericUpDown.ValueChanged += throttleMinStiffnessNumericUpDown_ValueChanged; - // - // throttleVibrationSmoothNumericUpDown - // - throttleVibrationSmoothNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - throttleVibrationSmoothNumericUpDown.AutoSize = true; - throttleVibrationSmoothNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - throttleVibrationSmoothNumericUpDown.Location = new System.Drawing.Point(549, 451); - throttleVibrationSmoothNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); - throttleVibrationSmoothNumericUpDown.Name = "throttleVibrationSmoothNumericUpDown"; - throttleVibrationSmoothNumericUpDown.Size = new System.Drawing.Size(41, 23); - throttleVibrationSmoothNumericUpDown.TabIndex = 37; - toolTip.SetToolTip(throttleVibrationSmoothNumericUpDown, "Smoothing for Throttle Vibration output. Lower = smoother. Must be greater than 0"); - throttleVibrationSmoothNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); - throttleVibrationSmoothNumericUpDown.ValueChanged += throttleVibrationSmoothNumericUpDown_ValueChanged; - // - // throttleMaxVibrationNumericUpDown - // - throttleMaxVibrationNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - throttleMaxVibrationNumericUpDown.AutoSize = true; - throttleMaxVibrationNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - throttleMaxVibrationNumericUpDown.Location = new System.Drawing.Point(549, 400); - throttleMaxVibrationNumericUpDown.Name = "throttleMaxVibrationNumericUpDown"; - throttleMaxVibrationNumericUpDown.Size = new System.Drawing.Size(41, 23); - throttleMaxVibrationNumericUpDown.TabIndex = 36; - toolTip.SetToolTip(throttleMaxVibrationNumericUpDown, "The maximum acceleration frequency in Hz (avoid over 40). Correlates to better grip"); - throttleMaxVibrationNumericUpDown.ValueChanged += throttleMaxVibrationNumericUpDown_ValueChanged; - // - // throttleMinVibrationNumericUpDown - // - throttleMinVibrationNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - throttleMinVibrationNumericUpDown.AutoSize = true; - throttleMinVibrationNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - throttleMinVibrationNumericUpDown.Location = new System.Drawing.Point(549, 349); - throttleMinVibrationNumericUpDown.Name = "throttleMinVibrationNumericUpDown"; - throttleMinVibrationNumericUpDown.Size = new System.Drawing.Size(41, 23); - throttleMinVibrationNumericUpDown.TabIndex = 35; - toolTip.SetToolTip(throttleMinVibrationNumericUpDown, "The minimum acceleration frequency in Hz (avoid over 40). Helps avoid clicking in controller"); - throttleMinVibrationNumericUpDown.ValueChanged += throttleMinVibrationNumericUpDown_ValueChanged; - // - // throttleVibrationStartNumericUpDown - // - throttleVibrationStartNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - throttleVibrationStartNumericUpDown.AutoSize = true; - throttleVibrationStartNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - throttleVibrationStartNumericUpDown.Location = new System.Drawing.Point(549, 298); - throttleVibrationStartNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); - throttleVibrationStartNumericUpDown.Name = "throttleVibrationStartNumericUpDown"; - throttleVibrationStartNumericUpDown.Size = new System.Drawing.Size(41, 23); - throttleVibrationStartNumericUpDown.TabIndex = 34; - toolTip.SetToolTip(throttleVibrationStartNumericUpDown, "The depression of the throttle lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied."); - throttleVibrationStartNumericUpDown.ValueChanged += throttleVibrationStartNumericUpDown_ValueChanged; - // - // throttleAccelLimitNumericUpDown - // - throttleAccelLimitNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - throttleAccelLimitNumericUpDown.AutoSize = true; - throttleAccelLimitNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - throttleAccelLimitNumericUpDown.Location = new System.Drawing.Point(549, 247); - throttleAccelLimitNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); - throttleAccelLimitNumericUpDown.Name = "throttleAccelLimitNumericUpDown"; - throttleAccelLimitNumericUpDown.Size = new System.Drawing.Size(41, 23); - throttleAccelLimitNumericUpDown.TabIndex = 33; - toolTip.SetToolTip(throttleAccelLimitNumericUpDown, "The upper end acceleration when calculating the throttle resistance. Any acceleration above this will be counted as this value when determining the throttle resistance."); - throttleAccelLimitNumericUpDown.ValueChanged += throttleAccelLimitNumericUpDown_ValueChanged; - // - // throttleForwardAccelScaleNumericUpDown - // - throttleForwardAccelScaleNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - throttleForwardAccelScaleNumericUpDown.AutoSize = true; - throttleForwardAccelScaleNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - throttleForwardAccelScaleNumericUpDown.Location = new System.Drawing.Point(549, 196); - throttleForwardAccelScaleNumericUpDown.Name = "throttleForwardAccelScaleNumericUpDown"; - throttleForwardAccelScaleNumericUpDown.Size = new System.Drawing.Size(41, 23); - throttleForwardAccelScaleNumericUpDown.TabIndex = 32; - toolTip.SetToolTip(throttleForwardAccelScaleNumericUpDown, "How to scale Forward acceleration in determining throttle stiffness."); - throttleForwardAccelScaleNumericUpDown.ValueChanged += throttleForwardAccelScaleNumericUpDown_ValueChanged; - // - // throttleTurnAccelScaleNumericUpDown - // - throttleTurnAccelScaleNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - throttleTurnAccelScaleNumericUpDown.AutoSize = true; - throttleTurnAccelScaleNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - throttleTurnAccelScaleNumericUpDown.Location = new System.Drawing.Point(549, 145); - throttleTurnAccelScaleNumericUpDown.Name = "throttleTurnAccelScaleNumericUpDown"; - throttleTurnAccelScaleNumericUpDown.Size = new System.Drawing.Size(41, 23); - throttleTurnAccelScaleNumericUpDown.TabIndex = 31; - toolTip.SetToolTip(throttleTurnAccelScaleNumericUpDown, "How to scale turning acceleration in determining throttle stiffness."); - throttleTurnAccelScaleNumericUpDown.ValueChanged += throttleTurnAccelScaleNumericUpDown_ValueChanged; - // - // throttleGripLossNumericUpDown - // - throttleGripLossNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - throttleGripLossNumericUpDown.AutoSize = true; - throttleGripLossNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - throttleGripLossNumericUpDown.Location = new System.Drawing.Point(549, 94); - throttleGripLossNumericUpDown.Name = "throttleGripLossNumericUpDown"; - throttleGripLossNumericUpDown.Size = new System.Drawing.Size(41, 23); - throttleGripLossNumericUpDown.TabIndex = 30; - toolTip.SetToolTip(throttleGripLossNumericUpDown, "The point at which the throttle will begin to become choppy (0 = full grip, 100 = no grip)"); - throttleGripLossNumericUpDown.ValueChanged += throttleGripLossNumericUpDown_ValueChanged; - // - // throttleIntensityNumericUpDown - // - throttleIntensityNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; - throttleIntensityNumericUpDown.AutoSize = true; - throttleIntensityNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; - throttleIntensityNumericUpDown.Location = new System.Drawing.Point(549, 43); - throttleIntensityNumericUpDown.Name = "throttleIntensityNumericUpDown"; - throttleIntensityNumericUpDown.Size = new System.Drawing.Size(41, 23); - throttleIntensityNumericUpDown.TabIndex = 29; - toolTip.SetToolTip(throttleIntensityNumericUpDown, "The percentage of the trigger effects"); - throttleIntensityNumericUpDown.ValueChanged += throttleIntensityNumericUpDown_ValueChanged; - // - // throttleResistanceSmoothTrackBar - // - throttleResistanceSmoothTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - throttleResistanceSmoothTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - throttleResistanceSmoothTrackBar.LargeChange = 50; - throttleResistanceSmoothTrackBar.Location = new System.Drawing.Point(141, 695); - throttleResistanceSmoothTrackBar.Maximum = 100; - throttleResistanceSmoothTrackBar.Minimum = 1; - throttleResistanceSmoothTrackBar.Name = "throttleResistanceSmoothTrackBar"; - throttleResistanceSmoothTrackBar.Size = new System.Drawing.Size(402, 45); - throttleResistanceSmoothTrackBar.TabIndex = 28; - throttleResistanceSmoothTrackBar.TickFrequency = 10; - throttleResistanceSmoothTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(throttleResistanceSmoothTrackBar, "Smoothing for Throttle Resistance output. Lower = smoother. Must be greater than 0"); - throttleResistanceSmoothTrackBar.Value = 1; - throttleResistanceSmoothTrackBar.Scroll += throttleResistanceSmoothTrackBar_Scroll; - // - // throttleMaxResistanceTrackBar - // - throttleMaxResistanceTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - throttleMaxResistanceTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - throttleMaxResistanceTrackBar.LargeChange = 50; - throttleMaxResistanceTrackBar.Location = new System.Drawing.Point(141, 644); - throttleMaxResistanceTrackBar.Maximum = 7; - throttleMaxResistanceTrackBar.Name = "throttleMaxResistanceTrackBar"; - throttleMaxResistanceTrackBar.Size = new System.Drawing.Size(402, 45); - throttleMaxResistanceTrackBar.TabIndex = 27; - throttleMaxResistanceTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(throttleMaxResistanceTrackBar, "The Maximum resistance on the throttle (0-7)"); - throttleMaxResistanceTrackBar.Scroll += throttleMaxResistanceTrackBar_Scroll; - // - // throttleMinResistanceTrackBar - // - throttleMinResistanceTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - throttleMinResistanceTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - throttleMinResistanceTrackBar.LargeChange = 50; - throttleMinResistanceTrackBar.Location = new System.Drawing.Point(141, 593); - throttleMinResistanceTrackBar.Maximum = 7; - throttleMinResistanceTrackBar.Name = "throttleMinResistanceTrackBar"; - throttleMinResistanceTrackBar.Size = new System.Drawing.Size(402, 45); - throttleMinResistanceTrackBar.TabIndex = 26; - throttleMinResistanceTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(throttleMinResistanceTrackBar, "The Minimum resistance on the throttle (0-7)"); - throttleMinResistanceTrackBar.Scroll += throttleMinResistanceTrackBar_Scroll; - // - // throttleMaxStiffnessTrackBar - // - throttleMaxStiffnessTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - throttleMaxStiffnessTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - throttleMaxStiffnessTrackBar.LargeChange = 50; - throttleMaxStiffnessTrackBar.Location = new System.Drawing.Point(141, 542); - throttleMaxStiffnessTrackBar.Maximum = 255; - throttleMaxStiffnessTrackBar.Minimum = 1; - throttleMaxStiffnessTrackBar.Name = "throttleMaxStiffnessTrackBar"; - throttleMaxStiffnessTrackBar.Size = new System.Drawing.Size(402, 45); - throttleMaxStiffnessTrackBar.TabIndex = 25; - throttleMaxStiffnessTrackBar.TickFrequency = 5; - throttleMaxStiffnessTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(throttleMaxStiffnessTrackBar, "On a scale of 1-255 with 1 being most stiff"); - throttleMaxStiffnessTrackBar.Value = 1; - throttleMaxStiffnessTrackBar.Scroll += throttleMaxStiffnessTrackBar_Scroll; - // - // throttleMinStiffnessTrackBar - // - throttleMinStiffnessTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - throttleMinStiffnessTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - throttleMinStiffnessTrackBar.LargeChange = 50; - throttleMinStiffnessTrackBar.Location = new System.Drawing.Point(141, 491); - throttleMinStiffnessTrackBar.Maximum = 255; - throttleMinStiffnessTrackBar.Minimum = 1; - throttleMinStiffnessTrackBar.Name = "throttleMinStiffnessTrackBar"; - throttleMinStiffnessTrackBar.Size = new System.Drawing.Size(402, 45); - throttleMinStiffnessTrackBar.TabIndex = 24; - throttleMinStiffnessTrackBar.TickFrequency = 5; - throttleMinStiffnessTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(throttleMinStiffnessTrackBar, "On a scale of 1-255 with 1 being most stiff"); - throttleMinStiffnessTrackBar.Value = 1; - throttleMinStiffnessTrackBar.Scroll += throttleMinStiffnessTrackBar_Scroll; - // - // throttleVibrationSmoothTrackBar - // - throttleVibrationSmoothTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - throttleVibrationSmoothTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - throttleVibrationSmoothTrackBar.LargeChange = 50; - throttleVibrationSmoothTrackBar.Location = new System.Drawing.Point(141, 440); - throttleVibrationSmoothTrackBar.Maximum = 100; - throttleVibrationSmoothTrackBar.Minimum = 1; - throttleVibrationSmoothTrackBar.Name = "throttleVibrationSmoothTrackBar"; - throttleVibrationSmoothTrackBar.Size = new System.Drawing.Size(402, 45); - throttleVibrationSmoothTrackBar.TabIndex = 23; - throttleVibrationSmoothTrackBar.TickFrequency = 10; - throttleVibrationSmoothTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(throttleVibrationSmoothTrackBar, "Smoothing for Throttle Vibration output. Lower = smoother. Must be greater than 0"); - throttleVibrationSmoothTrackBar.Value = 1; - throttleVibrationSmoothTrackBar.Scroll += throttleVibrationSmoothTrackBar_Scroll; - // - // throttleMaxVibrationTrackBar - // - throttleMaxVibrationTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - throttleMaxVibrationTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - throttleMaxVibrationTrackBar.LargeChange = 50; - throttleMaxVibrationTrackBar.Location = new System.Drawing.Point(141, 389); - throttleMaxVibrationTrackBar.Maximum = 100; - throttleMaxVibrationTrackBar.Name = "throttleMaxVibrationTrackBar"; - throttleMaxVibrationTrackBar.Size = new System.Drawing.Size(402, 45); - throttleMaxVibrationTrackBar.TabIndex = 22; - throttleMaxVibrationTrackBar.TickFrequency = 5; - throttleMaxVibrationTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(throttleMaxVibrationTrackBar, "The maximum acceleration frequency in Hz (avoid over 40). Correlates to better grip"); - throttleMaxVibrationTrackBar.Scroll += throttleMaxVibrationTrackBar_Scroll; - // - // throttleMinVibrationTrackBar - // - throttleMinVibrationTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - throttleMinVibrationTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - throttleMinVibrationTrackBar.LargeChange = 50; - throttleMinVibrationTrackBar.Location = new System.Drawing.Point(141, 338); - throttleMinVibrationTrackBar.Maximum = 100; - throttleMinVibrationTrackBar.Name = "throttleMinVibrationTrackBar"; - throttleMinVibrationTrackBar.Size = new System.Drawing.Size(402, 45); - throttleMinVibrationTrackBar.TabIndex = 21; - throttleMinVibrationTrackBar.TickFrequency = 5; - throttleMinVibrationTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(throttleMinVibrationTrackBar, "The minimum acceleration frequency in Hz (avoid over 40). Helps avoid clicking in controller"); - throttleMinVibrationTrackBar.Scroll += throttleMinVibrationTrackBar_Scroll; - // - // throttleVibrationModeStartTrackBar - // - throttleVibrationModeStartTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - throttleVibrationModeStartTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - throttleVibrationModeStartTrackBar.LargeChange = 50; - throttleVibrationModeStartTrackBar.Location = new System.Drawing.Point(141, 287); - throttleVibrationModeStartTrackBar.Maximum = 255; - throttleVibrationModeStartTrackBar.Name = "throttleVibrationModeStartTrackBar"; - throttleVibrationModeStartTrackBar.Size = new System.Drawing.Size(402, 45); - throttleVibrationModeStartTrackBar.TabIndex = 20; - throttleVibrationModeStartTrackBar.TickFrequency = 5; - throttleVibrationModeStartTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(throttleVibrationModeStartTrackBar, "The depression of the throttle lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied."); - throttleVibrationModeStartTrackBar.Scroll += throttleVibrationModeStartTrackBar_Scroll; - // - // throttleAccelLimitTrackBar - // - throttleAccelLimitTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - throttleAccelLimitTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - throttleAccelLimitTrackBar.LargeChange = 50; - throttleAccelLimitTrackBar.Location = new System.Drawing.Point(141, 236); - throttleAccelLimitTrackBar.Maximum = 255; - throttleAccelLimitTrackBar.Name = "throttleAccelLimitTrackBar"; - throttleAccelLimitTrackBar.Size = new System.Drawing.Size(402, 45); - throttleAccelLimitTrackBar.TabIndex = 19; - throttleAccelLimitTrackBar.TickFrequency = 5; - throttleAccelLimitTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(throttleAccelLimitTrackBar, "The upper end acceleration when calculating the throttle resistance. Any acceleration above this will be counted as this value when determining the throttle resistance."); - throttleAccelLimitTrackBar.Scroll += throttleAccelLimitTrackBar_Scroll; - // - // throttleForwardAccelScaleTrackBar - // - throttleForwardAccelScaleTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - throttleForwardAccelScaleTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - throttleForwardAccelScaleTrackBar.Location = new System.Drawing.Point(141, 185); - throttleForwardAccelScaleTrackBar.Maximum = 100; - throttleForwardAccelScaleTrackBar.Name = "throttleForwardAccelScaleTrackBar"; - throttleForwardAccelScaleTrackBar.Size = new System.Drawing.Size(402, 45); - throttleForwardAccelScaleTrackBar.TabIndex = 18; - throttleForwardAccelScaleTrackBar.TickFrequency = 5; - throttleForwardAccelScaleTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(throttleForwardAccelScaleTrackBar, "How to scale Forward acceleration in determining throttle stiffness."); - throttleForwardAccelScaleTrackBar.Value = 50; - throttleForwardAccelScaleTrackBar.Scroll += throttleForwardAccelScaleTrackBar_Scroll; - // - // throttleTurnAccelScaleTrackBar - // - throttleTurnAccelScaleTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - throttleTurnAccelScaleTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - throttleTurnAccelScaleTrackBar.Location = new System.Drawing.Point(141, 134); - throttleTurnAccelScaleTrackBar.Maximum = 100; - throttleTurnAccelScaleTrackBar.Name = "throttleTurnAccelScaleTrackBar"; - throttleTurnAccelScaleTrackBar.Size = new System.Drawing.Size(402, 45); - throttleTurnAccelScaleTrackBar.TabIndex = 17; - throttleTurnAccelScaleTrackBar.TickFrequency = 5; - throttleTurnAccelScaleTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(throttleTurnAccelScaleTrackBar, "How to scale turning acceleration in determining throttle stiffness."); - throttleTurnAccelScaleTrackBar.Value = 50; - throttleTurnAccelScaleTrackBar.Scroll += throttleTurnAccelScaleTrackBar_Scroll; - // - // throttleGripLossTrackBar - // - throttleGripLossTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - throttleGripLossTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - throttleGripLossTrackBar.LargeChange = 50; - throttleGripLossTrackBar.Location = new System.Drawing.Point(141, 83); - throttleGripLossTrackBar.Maximum = 100; - throttleGripLossTrackBar.Name = "throttleGripLossTrackBar"; - throttleGripLossTrackBar.Size = new System.Drawing.Size(402, 45); - throttleGripLossTrackBar.TabIndex = 16; - throttleGripLossTrackBar.TickFrequency = 5; - throttleGripLossTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(throttleGripLossTrackBar, "The point at which the throttle will begin to become choppy (0 = full grip, 100 = no grip)"); - throttleGripLossTrackBar.Scroll += throttleGripLossTrackBar_Scroll; - // - // throttleIntensityTrackBar - // - throttleIntensityTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; - throttleIntensityTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - throttleIntensityTrackBar.LargeChange = 10; - throttleIntensityTrackBar.Location = new System.Drawing.Point(141, 32); - throttleIntensityTrackBar.Maximum = 100; - throttleIntensityTrackBar.Name = "throttleIntensityTrackBar"; - throttleIntensityTrackBar.Size = new System.Drawing.Size(402, 45); - throttleIntensityTrackBar.TabIndex = 2; - throttleIntensityTrackBar.TickFrequency = 5; - throttleIntensityTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - toolTip.SetToolTip(throttleIntensityTrackBar, "The percentage of the trigger effects"); - throttleIntensityTrackBar.Value = 100; - throttleIntensityTrackBar.Scroll += throttleIntensityTrackBar_Scroll; - // - // throttleResistanceSmoothingLabel - // - throttleResistanceSmoothingLabel.AutoSize = true; - throttleResistanceSmoothingLabel.Dock = System.Windows.Forms.DockStyle.Fill; - throttleResistanceSmoothingLabel.Location = new System.Drawing.Point(3, 692); - throttleResistanceSmoothingLabel.Name = "throttleResistanceSmoothingLabel"; - throttleResistanceSmoothingLabel.Size = new System.Drawing.Size(132, 51); - throttleResistanceSmoothingLabel.TabIndex = 15; - throttleResistanceSmoothingLabel.Text = "Resistance Smoothing"; - throttleResistanceSmoothingLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(throttleResistanceSmoothingLabel, "Smoothing for Throttle Resistance output. Lower = smoother. Must be greater than 0"); - // - // maxThrottleResistanceLabel - // - maxThrottleResistanceLabel.AutoSize = true; - maxThrottleResistanceLabel.Dock = System.Windows.Forms.DockStyle.Fill; - maxThrottleResistanceLabel.Location = new System.Drawing.Point(3, 641); - maxThrottleResistanceLabel.Name = "maxThrottleResistanceLabel"; - maxThrottleResistanceLabel.Size = new System.Drawing.Size(132, 51); - maxThrottleResistanceLabel.TabIndex = 14; - maxThrottleResistanceLabel.Text = "Max Throttle Resistance"; - maxThrottleResistanceLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(maxThrottleResistanceLabel, "The Maximum resistance on the throttle (0-7)"); - // - // minThrottleResistanceLabel - // - minThrottleResistanceLabel.AutoSize = true; - minThrottleResistanceLabel.Dock = System.Windows.Forms.DockStyle.Fill; - minThrottleResistanceLabel.Location = new System.Drawing.Point(3, 590); - minThrottleResistanceLabel.Name = "minThrottleResistanceLabel"; - minThrottleResistanceLabel.Size = new System.Drawing.Size(132, 51); - minThrottleResistanceLabel.TabIndex = 13; - minThrottleResistanceLabel.Text = "Min Throttle Resistance"; - minThrottleResistanceLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(minThrottleResistanceLabel, "The Minimum resistance on the throttle (0-7)"); - // - // maxThrottleStiffnessLabel - // - maxThrottleStiffnessLabel.AutoSize = true; - maxThrottleStiffnessLabel.Dock = System.Windows.Forms.DockStyle.Fill; - maxThrottleStiffnessLabel.Location = new System.Drawing.Point(3, 539); - maxThrottleStiffnessLabel.Name = "maxThrottleStiffnessLabel"; - maxThrottleStiffnessLabel.Size = new System.Drawing.Size(132, 51); - maxThrottleStiffnessLabel.TabIndex = 12; - maxThrottleStiffnessLabel.Text = "Max Throttle Stiffness"; - maxThrottleStiffnessLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(maxThrottleStiffnessLabel, "On a scale of 1-255 with 1 being most stiff"); - // - // minThrottleStiffnessLabel - // - minThrottleStiffnessLabel.AutoSize = true; - minThrottleStiffnessLabel.Dock = System.Windows.Forms.DockStyle.Fill; - minThrottleStiffnessLabel.Location = new System.Drawing.Point(3, 488); - minThrottleStiffnessLabel.Name = "minThrottleStiffnessLabel"; - minThrottleStiffnessLabel.Size = new System.Drawing.Size(132, 51); - minThrottleStiffnessLabel.TabIndex = 11; - minThrottleStiffnessLabel.Text = "Min Throttle Stiffness"; - minThrottleStiffnessLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(minThrottleStiffnessLabel, "On a scale of 1-255 with 1 being most stiff"); - // - // throttleVibrationSmoothingLabel - // - throttleVibrationSmoothingLabel.AutoSize = true; - throttleVibrationSmoothingLabel.Dock = System.Windows.Forms.DockStyle.Fill; - throttleVibrationSmoothingLabel.Location = new System.Drawing.Point(3, 437); - throttleVibrationSmoothingLabel.Name = "throttleVibrationSmoothingLabel"; - throttleVibrationSmoothingLabel.Size = new System.Drawing.Size(132, 51); - throttleVibrationSmoothingLabel.TabIndex = 10; - throttleVibrationSmoothingLabel.Text = "Vibration Smoothing"; - throttleVibrationSmoothingLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(throttleVibrationSmoothingLabel, "Smoothing for Throttle Vibration output. Lower = smoother. Must be greater than 0"); - // - // maxThrottleVibrationLabel - // - maxThrottleVibrationLabel.AutoSize = true; - maxThrottleVibrationLabel.Dock = System.Windows.Forms.DockStyle.Fill; - maxThrottleVibrationLabel.Location = new System.Drawing.Point(3, 386); - maxThrottleVibrationLabel.Name = "maxThrottleVibrationLabel"; - maxThrottleVibrationLabel.Size = new System.Drawing.Size(132, 51); - maxThrottleVibrationLabel.TabIndex = 9; - maxThrottleVibrationLabel.Text = "Max Throttle Vibration"; - maxThrottleVibrationLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(maxThrottleVibrationLabel, "The maximum acceleration frequency in Hz (avoid over 40). Correlates to better grip"); - // - // minThrottleVibrationLabel - // - minThrottleVibrationLabel.AutoSize = true; - minThrottleVibrationLabel.Dock = System.Windows.Forms.DockStyle.Fill; - minThrottleVibrationLabel.Location = new System.Drawing.Point(3, 335); - minThrottleVibrationLabel.Name = "minThrottleVibrationLabel"; - minThrottleVibrationLabel.Size = new System.Drawing.Size(132, 51); - minThrottleVibrationLabel.TabIndex = 8; - minThrottleVibrationLabel.Text = "Min Throttle Vibration"; - minThrottleVibrationLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(minThrottleVibrationLabel, "The minimum acceleration frequency in Hz (avoid over 40). Helps avoid clicking in controller"); - // - // throttleVibrationStartLabel - // - throttleVibrationStartLabel.AutoSize = true; - throttleVibrationStartLabel.Dock = System.Windows.Forms.DockStyle.Fill; - throttleVibrationStartLabel.Location = new System.Drawing.Point(3, 284); - throttleVibrationStartLabel.Name = "throttleVibrationStartLabel"; - throttleVibrationStartLabel.Size = new System.Drawing.Size(132, 51); - throttleVibrationStartLabel.TabIndex = 7; - throttleVibrationStartLabel.Text = "Vibration Mode Start"; - throttleVibrationStartLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(throttleVibrationStartLabel, "The depression of the throttle lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied."); - // - // accelerationLimitLabel - // - accelerationLimitLabel.AutoSize = true; - accelerationLimitLabel.Dock = System.Windows.Forms.DockStyle.Fill; - accelerationLimitLabel.Location = new System.Drawing.Point(3, 233); - accelerationLimitLabel.Name = "accelerationLimitLabel"; - accelerationLimitLabel.Size = new System.Drawing.Size(132, 51); - accelerationLimitLabel.TabIndex = 5; - accelerationLimitLabel.Text = "Accel Limit"; - accelerationLimitLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(accelerationLimitLabel, "The upper end acceleration when calculating the throttle resistance. Any acceleration above this will be counted as this value when determining the throttle resistance."); - // - // forwardAccelLabel - // - forwardAccelLabel.AutoSize = true; - forwardAccelLabel.Dock = System.Windows.Forms.DockStyle.Fill; - forwardAccelLabel.Location = new System.Drawing.Point(3, 182); - forwardAccelLabel.Name = "forwardAccelLabel"; - forwardAccelLabel.Size = new System.Drawing.Size(132, 51); - forwardAccelLabel.TabIndex = 6; - forwardAccelLabel.Text = "Forward Accel Scale"; - forwardAccelLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(forwardAccelLabel, "How to scale Forward acceleration in determining throttle stiffness."); - // - // turnAccelLabel - // - turnAccelLabel.AutoSize = true; - turnAccelLabel.Dock = System.Windows.Forms.DockStyle.Fill; - turnAccelLabel.Location = new System.Drawing.Point(3, 131); - turnAccelLabel.Name = "turnAccelLabel"; - turnAccelLabel.Size = new System.Drawing.Size(132, 51); - turnAccelLabel.TabIndex = 4; - turnAccelLabel.Text = "Turn Accel Scale"; - turnAccelLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(turnAccelLabel, "How to scale turning acceleration in determining throttle stiffness."); - // - // throttleGripLossLabel - // - throttleGripLossLabel.AutoSize = true; - throttleGripLossLabel.Dock = System.Windows.Forms.DockStyle.Fill; - throttleGripLossLabel.Location = new System.Drawing.Point(3, 80); - throttleGripLossLabel.Name = "throttleGripLossLabel"; - throttleGripLossLabel.Size = new System.Drawing.Size(132, 51); - throttleGripLossLabel.TabIndex = 3; - throttleGripLossLabel.Text = "Grip Loss Value"; - throttleGripLossLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(throttleGripLossLabel, "The point at which the throttle will begin to become choppy (0 = full grip, 100 = no grip)"); - // - // throttleIntensityLabel - // - throttleIntensityLabel.AutoSize = true; - throttleIntensityLabel.Dock = System.Windows.Forms.DockStyle.Fill; - throttleIntensityLabel.Location = new System.Drawing.Point(3, 29); - throttleIntensityLabel.Name = "throttleIntensityLabel"; - throttleIntensityLabel.Size = new System.Drawing.Size(132, 51); - throttleIntensityLabel.TabIndex = 1; - throttleIntensityLabel.Text = "Effect Intensity"; - throttleIntensityLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - toolTip.SetToolTip(throttleIntensityLabel, "The percentage of the trigger effects"); - // - // buttonApply_Throttle - // - buttonApply_Throttle.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; - buttonApply_Throttle.Location = new System.Drawing.Point(141, 746); - buttonApply_Throttle.Name = "buttonApply_Throttle"; - buttonApply_Throttle.Size = new System.Drawing.Size(402, 23); - buttonApply_Throttle.TabIndex = 43; - buttonApply_Throttle.Text = "Apply"; - buttonApply_Throttle.UseVisualStyleBackColor = true; - buttonApply_Throttle.Click += buttonApply_Throttle_Click; - // - // throttleDefaultsButton - // - throttleDefaultsButton.Location = new System.Drawing.Point(549, 746); - throttleDefaultsButton.Name = "throttleDefaultsButton"; - throttleDefaultsButton.Size = new System.Drawing.Size(75, 23); - throttleDefaultsButton.TabIndex = 44; - throttleDefaultsButton.Text = "Defaults"; - throttleDefaultsButton.UseVisualStyleBackColor = true; - throttleDefaultsButton.Click += throttleDefaultsButton_Click; - // - // outputTabPage - // - outputTabPage.Controls.Add(raceGroupBox); - outputTabPage.Controls.Add(noRaceGroupBox); - outputTabPage.Controls.Add(outputListBox); - outputTabPage.Location = new System.Drawing.Point(4, 24); - outputTabPage.Name = "outputTabPage"; - outputTabPage.Padding = new System.Windows.Forms.Padding(3); - outputTabPage.Size = new System.Drawing.Size(713, 733); - outputTabPage.TabIndex = 1; - outputTabPage.Text = "Output"; - outputTabPage.UseVisualStyleBackColor = true; - // - // raceGroupBox - // - raceGroupBox.Controls.Add(tableLayoutPanel1); - raceGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom; - raceGroupBox.Location = new System.Drawing.Point(3, 530); - raceGroupBox.Name = "raceGroupBox"; - raceGroupBox.Size = new System.Drawing.Size(707, 100); - raceGroupBox.TabIndex = 3; - raceGroupBox.TabStop = false; - raceGroupBox.Text = "Racing"; - // - // tableLayoutPanel1 - // - tableLayoutPanel1.ColumnCount = 1; - tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - tableLayoutPanel1.Controls.Add(brakeMsg, 0, 3); - tableLayoutPanel1.Controls.Add(brakeVibrationMsg, 0, 2); - tableLayoutPanel1.Controls.Add(throttleMsg, 0, 1); - tableLayoutPanel1.Controls.Add(throttleVibrationMsg, 0, 0); - tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - tableLayoutPanel1.Location = new System.Drawing.Point(3, 19); - tableLayoutPanel1.Name = "tableLayoutPanel1"; - tableLayoutPanel1.RowCount = 4; - tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - tableLayoutPanel1.Size = new System.Drawing.Size(701, 78); - tableLayoutPanel1.TabIndex = 0; - // - // brakeMsg - // - brakeMsg.AutoSize = true; - brakeMsg.Location = new System.Drawing.Point(3, 45); - brakeMsg.Name = "brakeMsg"; - brakeMsg.Size = new System.Drawing.Size(38, 15); - brakeMsg.TabIndex = 3; - brakeMsg.Text = "label1"; - // - // brakeVibrationMsg - // - brakeVibrationMsg.AutoSize = true; - brakeVibrationMsg.Location = new System.Drawing.Point(3, 30); - brakeVibrationMsg.Name = "brakeVibrationMsg"; - brakeVibrationMsg.Size = new System.Drawing.Size(38, 15); - brakeVibrationMsg.TabIndex = 2; - brakeVibrationMsg.Text = "label1"; - // - // throttleMsg - // - throttleMsg.AutoSize = true; - throttleMsg.Location = new System.Drawing.Point(3, 15); - throttleMsg.Name = "throttleMsg"; - throttleMsg.Size = new System.Drawing.Size(38, 15); - throttleMsg.TabIndex = 1; - throttleMsg.Text = "label1"; - // - // throttleVibrationMsg - // - throttleVibrationMsg.AutoSize = true; - throttleVibrationMsg.Location = new System.Drawing.Point(3, 0); - throttleVibrationMsg.Name = "throttleVibrationMsg"; - throttleVibrationMsg.Size = new System.Drawing.Size(38, 15); - throttleVibrationMsg.TabIndex = 0; - throttleVibrationMsg.Text = "label1"; - // - // noRaceGroupBox - // - noRaceGroupBox.Controls.Add(noRaceText); - noRaceGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom; - noRaceGroupBox.Location = new System.Drawing.Point(3, 630); - noRaceGroupBox.Name = "noRaceGroupBox"; - noRaceGroupBox.Size = new System.Drawing.Size(707, 100); - noRaceGroupBox.TabIndex = 2; - noRaceGroupBox.TabStop = false; - noRaceGroupBox.Text = "Menus"; - // - // noRaceText - // - noRaceText.AutoSize = true; - noRaceText.Dock = System.Windows.Forms.DockStyle.Fill; - noRaceText.Location = new System.Drawing.Point(3, 19); - noRaceText.Name = "noRaceText"; - noRaceText.Size = new System.Drawing.Size(38, 15); - noRaceText.TabIndex = 1; - noRaceText.Text = "label1"; - // - // outputListBox - // - outputListBox.Dock = System.Windows.Forms.DockStyle.Top; - outputListBox.FormattingEnabled = true; - outputListBox.ItemHeight = 15; - outputListBox.Location = new System.Drawing.Point(3, 3); - outputListBox.Name = "outputListBox"; - outputListBox.Size = new System.Drawing.Size(707, 634); - outputListBox.TabIndex = 0; - // - // toolStripStatusDSX - // - toolStripStatusDSX.Image = Properties.Resources.redBtn; - toolStripStatusDSX.Name = "toolStripStatusDSX"; - toolStripStatusDSX.Size = new System.Drawing.Size(112, 17); - toolStripStatusDSX.Text = "DSX Connection:"; - toolStripStatusDSX.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; - // - // toolStripStatusForza - // - toolStripStatusForza.Image = Properties.Resources.redBtn; - toolStripStatusForza.Name = "toolStripStatusForza"; - toolStripStatusForza.Size = new System.Drawing.Size(119, 17); - toolStripStatusForza.Text = "Forza Connection:"; - toolStripStatusForza.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; - // - // toolStripVerboseMode - // - toolStripVerboseMode.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - toolStripVerboseMode.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { verboseModeOffToolStripMenuItem, verboseModeLowToolStripMenuItem, verboseModeFullToolStripMenuItem }); - toolStripVerboseMode.ImageTransparentColor = System.Drawing.Color.Magenta; - toolStripVerboseMode.Name = "toolStripVerboseMode"; - toolStripVerboseMode.Size = new System.Drawing.Size(95, 20); - toolStripVerboseMode.Text = "Verbose Mode"; - // - // verboseModeOffToolStripMenuItem - // - verboseModeOffToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - verboseModeOffToolStripMenuItem.Name = "verboseModeOffToolStripMenuItem"; - verboseModeOffToolStripMenuItem.Size = new System.Drawing.Size(140, 22); - verboseModeOffToolStripMenuItem.Text = "Off"; - verboseModeOffToolStripMenuItem.Click += verboseModeOffToolStripMenuItem_Click; - // - // verboseModeLowToolStripMenuItem - // - verboseModeLowToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - verboseModeLowToolStripMenuItem.Name = "verboseModeLowToolStripMenuItem"; - verboseModeLowToolStripMenuItem.Size = new System.Drawing.Size(140, 22); - verboseModeLowToolStripMenuItem.Text = "Low Verbose"; - verboseModeLowToolStripMenuItem.Click += verboseModeLowToolStripMenuItem_Click; - // - // verboseModeFullToolStripMenuItem - // - verboseModeFullToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - verboseModeFullToolStripMenuItem.Name = "verboseModeFullToolStripMenuItem"; - verboseModeFullToolStripMenuItem.Size = new System.Drawing.Size(140, 22); - verboseModeFullToolStripMenuItem.Text = "Full Verbose"; - verboseModeFullToolStripMenuItem.Click += verboseModeFullToolStripMenuItem_Click; - // - // statusStrip1 - // - statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { toolStripStatusDSX, toolStripStatusForza, toolStripVerboseMode }); - statusStrip1.Location = new System.Drawing.Point(0, 761); - statusStrip1.Name = "statusStrip1"; - statusStrip1.Size = new System.Drawing.Size(721, 22); - statusStrip1.TabIndex = 0; - statusStrip1.Text = "statusStrip1"; - // - // UI - // - AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); - AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - ClientSize = new System.Drawing.Size(721, 783); - Controls.Add(mainPanel); - Controls.Add(statusStrip1); - DoubleBuffered = true; - MinimumSize = new System.Drawing.Size(350, 200); - Name = "UI"; - Text = "UI"; - Load += UI_Load; - mainPanel.ResumeLayout(false); - mainTabControl.ResumeLayout(false); - miscTabPage.ResumeLayout(false); - miscTabPage.PerformLayout(); - miscTableLayoutPanel.ResumeLayout(false); - miscTableLayoutPanel.PerformLayout(); - ((ISupportInitialize)forzaPortNumericUpDown).EndInit(); - ((ISupportInitialize)rpmTrackBar).EndInit(); - ((ISupportInitialize)dsxNumericUpDown).EndInit(); - ((ISupportInitialize)rpmValueNumericUpDown).EndInit(); - brakeConfigTabPage.ResumeLayout(false); - brakeConfigTabPage.PerformLayout(); - brakeTableLayoutPanel.ResumeLayout(false); - brakeTableLayoutPanel.PerformLayout(); - ((ISupportInitialize)brakeResistanceSmoothNumericUpDown).EndInit(); - ((ISupportInitialize)maxBrakeResistanceNumericUpDown).EndInit(); - ((ISupportInitialize)minBrakeResistanceNumericUpDown).EndInit(); - ((ISupportInitialize)maxBrakeStifnessNumericUpDown).EndInit(); - ((ISupportInitialize)minBrakeStifnessNumericUpDown).EndInit(); - ((ISupportInitialize)brakeVibrationSmoothNumericUpDown).EndInit(); - ((ISupportInitialize)maxBrakeVibrationNumericUpDown).EndInit(); - ((ISupportInitialize)minBrakeVibrationNumericUpDown).EndInit(); - ((ISupportInitialize)brakeVibrationModeNumericUpDown).EndInit(); - ((ISupportInitialize)brakeVibrationStartNumericUpDown).EndInit(); - ((ISupportInitialize)gripLossNumericUpDown).EndInit(); - ((ISupportInitialize)brakeEffectNumericUpDown).EndInit(); - ((ISupportInitialize)brakeResistanceSmoothingTrackBar).EndInit(); - ((ISupportInitialize)maxBrakeResistanceTrackBar).EndInit(); - ((ISupportInitialize)minBrakeResistanceTrackBar).EndInit(); - ((ISupportInitialize)maxBrakeStiffnessTrackBar).EndInit(); - ((ISupportInitialize)minBrakeStiffnessTrackBar).EndInit(); - ((ISupportInitialize)vibrationSmoothingTrackBar).EndInit(); - ((ISupportInitialize)maxBrakeVibrationTrackBar).EndInit(); - ((ISupportInitialize)minBrakeVibrationTrackBar).EndInit(); - ((ISupportInitialize)brakeVibrationModeTrackBar).EndInit(); - ((ISupportInitialize)brakeVibrationStartTrackBar).EndInit(); - ((ISupportInitialize)gripLossTrackBar).EndInit(); - ((ISupportInitialize)brakeEffectIntensityTrackBar).EndInit(); - throttleConfigTabPage.ResumeLayout(false); - throttleTableLayoutPanel.ResumeLayout(false); - throttleTableLayoutPanel.PerformLayout(); - ((ISupportInitialize)throttleResistanceSmoothNumericUpDown).EndInit(); - ((ISupportInitialize)throttleMaxResistanceNumericUpDown).EndInit(); - ((ISupportInitialize)throttleMinResistanceNumericUpDown).EndInit(); - ((ISupportInitialize)throttleMaxStiffnessNumericUpDown).EndInit(); - ((ISupportInitialize)throttleMinStiffnessNumericUpDown).EndInit(); - ((ISupportInitialize)throttleVibrationSmoothNumericUpDown).EndInit(); - ((ISupportInitialize)throttleMaxVibrationNumericUpDown).EndInit(); - ((ISupportInitialize)throttleMinVibrationNumericUpDown).EndInit(); - ((ISupportInitialize)throttleVibrationStartNumericUpDown).EndInit(); - ((ISupportInitialize)throttleAccelLimitNumericUpDown).EndInit(); - ((ISupportInitialize)throttleForwardAccelScaleNumericUpDown).EndInit(); - ((ISupportInitialize)throttleTurnAccelScaleNumericUpDown).EndInit(); - ((ISupportInitialize)throttleGripLossNumericUpDown).EndInit(); - ((ISupportInitialize)throttleIntensityNumericUpDown).EndInit(); - ((ISupportInitialize)throttleResistanceSmoothTrackBar).EndInit(); - ((ISupportInitialize)throttleMaxResistanceTrackBar).EndInit(); - ((ISupportInitialize)throttleMinResistanceTrackBar).EndInit(); - ((ISupportInitialize)throttleMaxStiffnessTrackBar).EndInit(); - ((ISupportInitialize)throttleMinStiffnessTrackBar).EndInit(); - ((ISupportInitialize)throttleVibrationSmoothTrackBar).EndInit(); - ((ISupportInitialize)throttleMaxVibrationTrackBar).EndInit(); - ((ISupportInitialize)throttleMinVibrationTrackBar).EndInit(); - ((ISupportInitialize)throttleVibrationModeStartTrackBar).EndInit(); - ((ISupportInitialize)throttleAccelLimitTrackBar).EndInit(); - ((ISupportInitialize)throttleForwardAccelScaleTrackBar).EndInit(); - ((ISupportInitialize)throttleTurnAccelScaleTrackBar).EndInit(); - ((ISupportInitialize)throttleGripLossTrackBar).EndInit(); - ((ISupportInitialize)throttleIntensityTrackBar).EndInit(); - outputTabPage.ResumeLayout(false); - raceGroupBox.ResumeLayout(false); - tableLayoutPanel1.ResumeLayout(false); - tableLayoutPanel1.PerformLayout(); - noRaceGroupBox.ResumeLayout(false); - noRaceGroupBox.PerformLayout(); - statusStrip1.ResumeLayout(false); - statusStrip1.PerformLayout(); - ResumeLayout(false); - PerformLayout(); - } + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + components = new Container(); + System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem("test"); + System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem("test2"); + ComponentResourceManager resources = new ComponentResourceManager(typeof(UI)); + mainPanel = new System.Windows.Forms.Panel(); + mainSplitContainer = new System.Windows.Forms.SplitContainer(); + profilesGroupBox = new System.Windows.Forms.GroupBox(); + profilesListView = new System.Windows.Forms.ListView(); + mainTabControl = new System.Windows.Forms.TabControl(); + miscTabPage = new System.Windows.Forms.TabPage(); + miscTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + forzaPortNumericUpDown = new System.Windows.Forms.NumericUpDown(); + forzaPortLabel = new System.Windows.Forms.Label(); + rpmLabel = new System.Windows.Forms.Label(); + rpmTrackBar = new System.Windows.Forms.TrackBar(); + rpmValueNumericUpDown = new System.Windows.Forms.NumericUpDown(); + buttonApplyMisc = new System.Windows.Forms.Button(); + miscDefaultsButton = new System.Windows.Forms.Button(); + ExecutableListLabel = new System.Windows.Forms.Label(); + ExecutableListBox = new System.Windows.Forms.ListBox(); + flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + AddExecutableButton = new System.Windows.Forms.Button(); + EditExecutableButton = new System.Windows.Forms.Button(); + RemoveExecutableButton = new System.Windows.Forms.Button(); + GameModeLabel = new System.Windows.Forms.Label(); + GameModeComboBox = new System.Windows.Forms.ComboBox(); + brakeConfigTabPage = new System.Windows.Forms.TabPage(); + brakeTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + brakeResistanceSmoothNumericUpDown = new System.Windows.Forms.NumericUpDown(); + maxBrakeResistanceNumericUpDown = new System.Windows.Forms.NumericUpDown(); + minBrakeResistanceNumericUpDown = new System.Windows.Forms.NumericUpDown(); + maxBrakeStifnessNumericUpDown = new System.Windows.Forms.NumericUpDown(); + minBrakeStifnessNumericUpDown = new System.Windows.Forms.NumericUpDown(); + brakeVibrationSmoothNumericUpDown = new System.Windows.Forms.NumericUpDown(); + maxBrakeVibrationNumericUpDown = new System.Windows.Forms.NumericUpDown(); + minBrakeVibrationNumericUpDown = new System.Windows.Forms.NumericUpDown(); + brakeVibrationModeNumericUpDown = new System.Windows.Forms.NumericUpDown(); + brakeVibrationStartNumericUpDown = new System.Windows.Forms.NumericUpDown(); + gripLossNumericUpDown = new System.Windows.Forms.NumericUpDown(); + brakeEffectNumericUpDown = new System.Windows.Forms.NumericUpDown(); + brakeResistanceSmoothingTrackBar = new System.Windows.Forms.TrackBar(); + brakeResistanceSmoothingLabel = new System.Windows.Forms.Label(); + maxBrakeResistanceTrackBar = new System.Windows.Forms.TrackBar(); + maxBrakeResistanceLabel = new System.Windows.Forms.Label(); + minBrakeResistanceTrackBar = new System.Windows.Forms.TrackBar(); + minBrakeResistanceLabel = new System.Windows.Forms.Label(); + maxBrakeStiffnessTrackBar = new System.Windows.Forms.TrackBar(); + maxBrakeStiffnessLabel = new System.Windows.Forms.Label(); + minBrakeStiffnessTrackBar = new System.Windows.Forms.TrackBar(); + minBrakeStiffnessLabel = new System.Windows.Forms.Label(); + vibrationSmoothingTrackBar = new System.Windows.Forms.TrackBar(); + vibrationSmoothingLabel = new System.Windows.Forms.Label(); + maxBrakeVibrationTrackBar = new System.Windows.Forms.TrackBar(); + maxBrakeVibrationLabel = new System.Windows.Forms.Label(); + minBrakeVibrationTrackBar = new System.Windows.Forms.TrackBar(); + minBrakeVibrationLabel = new System.Windows.Forms.Label(); + brakeVibrationModeTrackBar = new System.Windows.Forms.TrackBar(); + brakeVibrationModeStartLabel = new System.Windows.Forms.Label(); + brakeVibrationStartTrackBar = new System.Windows.Forms.TrackBar(); + brakeVibrationStartLabel = new System.Windows.Forms.Label(); + gripLossTrackBar = new System.Windows.Forms.TrackBar(); + gripLossLabel = new System.Windows.Forms.Label(); + brakeEffectIntensityLabel = new System.Windows.Forms.Label(); + brakeEffectIntensityTrackBar = new System.Windows.Forms.TrackBar(); + buttonApply_Brake = new System.Windows.Forms.Button(); + brakeDefaultsButton = new System.Windows.Forms.Button(); + brakeTriggerMode = new System.Windows.Forms.Label(); + brakeTriggerModeComboBox = new System.Windows.Forms.ComboBox(); + throttleConfigTabPage = new System.Windows.Forms.TabPage(); + throttleTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + throttleTriggerModeComboBox = new System.Windows.Forms.ComboBox(); + throttleTriggerMode = new System.Windows.Forms.Label(); + throttleResistanceSmoothNumericUpDown = new System.Windows.Forms.NumericUpDown(); + throttleMaxResistanceNumericUpDown = new System.Windows.Forms.NumericUpDown(); + throttleMinResistanceNumericUpDown = new System.Windows.Forms.NumericUpDown(); + throttleMaxStiffnessNumericUpDown = new System.Windows.Forms.NumericUpDown(); + throttleMinStiffnessNumericUpDown = new System.Windows.Forms.NumericUpDown(); + throttleVibrationSmoothNumericUpDown = new System.Windows.Forms.NumericUpDown(); + throttleMaxVibrationNumericUpDown = new System.Windows.Forms.NumericUpDown(); + throttleMinVibrationNumericUpDown = new System.Windows.Forms.NumericUpDown(); + throttleVibrationStartNumericUpDown = new System.Windows.Forms.NumericUpDown(); + throttleAccelLimitNumericUpDown = new System.Windows.Forms.NumericUpDown(); + throttleForwardAccelScaleNumericUpDown = new System.Windows.Forms.NumericUpDown(); + throttleTurnAccelScaleNumericUpDown = new System.Windows.Forms.NumericUpDown(); + throttleGripLossNumericUpDown = new System.Windows.Forms.NumericUpDown(); + throttleIntensityNumericUpDown = new System.Windows.Forms.NumericUpDown(); + throttleResistanceSmoothTrackBar = new System.Windows.Forms.TrackBar(); + throttleMaxResistanceTrackBar = new System.Windows.Forms.TrackBar(); + throttleMinResistanceTrackBar = new System.Windows.Forms.TrackBar(); + throttleMaxStiffnessTrackBar = new System.Windows.Forms.TrackBar(); + throttleMinStiffnessTrackBar = new System.Windows.Forms.TrackBar(); + throttleVibrationSmoothTrackBar = new System.Windows.Forms.TrackBar(); + throttleMaxVibrationTrackBar = new System.Windows.Forms.TrackBar(); + throttleMinVibrationTrackBar = new System.Windows.Forms.TrackBar(); + throttleVibrationModeStartTrackBar = new System.Windows.Forms.TrackBar(); + throttleAccelLimitTrackBar = new System.Windows.Forms.TrackBar(); + throttleForwardAccelScaleTrackBar = new System.Windows.Forms.TrackBar(); + throttleTurnAccelScaleTrackBar = new System.Windows.Forms.TrackBar(); + throttleGripLossTrackBar = new System.Windows.Forms.TrackBar(); + throttleIntensityTrackBar = new System.Windows.Forms.TrackBar(); + throttleResistanceSmoothingLabel = new System.Windows.Forms.Label(); + maxThrottleResistanceLabel = new System.Windows.Forms.Label(); + minThrottleResistanceLabel = new System.Windows.Forms.Label(); + maxThrottleStiffnessLabel = new System.Windows.Forms.Label(); + minThrottleStiffnessLabel = new System.Windows.Forms.Label(); + throttleVibrationSmoothingLabel = new System.Windows.Forms.Label(); + maxThrottleVibrationLabel = new System.Windows.Forms.Label(); + minThrottleVibrationLabel = new System.Windows.Forms.Label(); + throttleVibrationStartLabel = new System.Windows.Forms.Label(); + accelerationLimitLabel = new System.Windows.Forms.Label(); + forwardAccelLabel = new System.Windows.Forms.Label(); + turnAccelLabel = new System.Windows.Forms.Label(); + throttleGripLossLabel = new System.Windows.Forms.Label(); + throttleIntensityLabel = new System.Windows.Forms.Label(); + buttonApply_Throttle = new System.Windows.Forms.Button(); + throttleDefaultsButton = new System.Windows.Forms.Button(); + outputTabPage = new System.Windows.Forms.TabPage(); + raceGroupBox = new System.Windows.Forms.GroupBox(); + tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + brakeMsg = new System.Windows.Forms.Label(); + brakeVibrationMsg = new System.Windows.Forms.Label(); + throttleMsg = new System.Windows.Forms.Label(); + throttleVibrationMsg = new System.Windows.Forms.Label(); + noRaceGroupBox = new System.Windows.Forms.GroupBox(); + noRaceText = new System.Windows.Forms.Label(); + outputListBox = new System.Windows.Forms.ListBox(); + toolStripStatusDSX = new System.Windows.Forms.ToolStripStatusLabel(); + toolStripStatusForza = new System.Windows.Forms.ToolStripStatusLabel(); + toolStripVerboseMode = new System.Windows.Forms.ToolStripDropDownButton(); + verboseModeOffToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + verboseModeLowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + verboseModeFullToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + statusStrip1 = new System.Windows.Forms.StatusStrip(); + toolStripDSXPortButton = new System.Windows.Forms.ToolStripDropDownButton(); + toolStripDSXPortTextBox = new System.Windows.Forms.ToolStripTextBox(); + toolStripAppCheckButton = new System.Windows.Forms.ToolStripDropDownButton(); + toolStripAppCheckOffItem = new System.Windows.Forms.ToolStripMenuItem(); + toolStripAppCheckOnItem = new System.Windows.Forms.ToolStripMenuItem(); + toolTip = new System.Windows.Forms.ToolTip(components); + ProfilesContextMenu = new System.Windows.Forms.ContextMenuStrip(components); + newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + renameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + disableToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + defaultToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + setActiveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + mainPanel.SuspendLayout(); + ((ISupportInitialize)mainSplitContainer).BeginInit(); + mainSplitContainer.Panel1.SuspendLayout(); + mainSplitContainer.Panel2.SuspendLayout(); + mainSplitContainer.SuspendLayout(); + profilesGroupBox.SuspendLayout(); + mainTabControl.SuspendLayout(); + miscTabPage.SuspendLayout(); + miscTableLayoutPanel.SuspendLayout(); + ((ISupportInitialize)forzaPortNumericUpDown).BeginInit(); + ((ISupportInitialize)rpmTrackBar).BeginInit(); + ((ISupportInitialize)rpmValueNumericUpDown).BeginInit(); + flowLayoutPanel1.SuspendLayout(); + brakeConfigTabPage.SuspendLayout(); + brakeTableLayoutPanel.SuspendLayout(); + ((ISupportInitialize)brakeResistanceSmoothNumericUpDown).BeginInit(); + ((ISupportInitialize)maxBrakeResistanceNumericUpDown).BeginInit(); + ((ISupportInitialize)minBrakeResistanceNumericUpDown).BeginInit(); + ((ISupportInitialize)maxBrakeStifnessNumericUpDown).BeginInit(); + ((ISupportInitialize)minBrakeStifnessNumericUpDown).BeginInit(); + ((ISupportInitialize)brakeVibrationSmoothNumericUpDown).BeginInit(); + ((ISupportInitialize)maxBrakeVibrationNumericUpDown).BeginInit(); + ((ISupportInitialize)minBrakeVibrationNumericUpDown).BeginInit(); + ((ISupportInitialize)brakeVibrationModeNumericUpDown).BeginInit(); + ((ISupportInitialize)brakeVibrationStartNumericUpDown).BeginInit(); + ((ISupportInitialize)gripLossNumericUpDown).BeginInit(); + ((ISupportInitialize)brakeEffectNumericUpDown).BeginInit(); + ((ISupportInitialize)brakeResistanceSmoothingTrackBar).BeginInit(); + ((ISupportInitialize)maxBrakeResistanceTrackBar).BeginInit(); + ((ISupportInitialize)minBrakeResistanceTrackBar).BeginInit(); + ((ISupportInitialize)maxBrakeStiffnessTrackBar).BeginInit(); + ((ISupportInitialize)minBrakeStiffnessTrackBar).BeginInit(); + ((ISupportInitialize)vibrationSmoothingTrackBar).BeginInit(); + ((ISupportInitialize)maxBrakeVibrationTrackBar).BeginInit(); + ((ISupportInitialize)minBrakeVibrationTrackBar).BeginInit(); + ((ISupportInitialize)brakeVibrationModeTrackBar).BeginInit(); + ((ISupportInitialize)brakeVibrationStartTrackBar).BeginInit(); + ((ISupportInitialize)gripLossTrackBar).BeginInit(); + ((ISupportInitialize)brakeEffectIntensityTrackBar).BeginInit(); + throttleConfigTabPage.SuspendLayout(); + throttleTableLayoutPanel.SuspendLayout(); + ((ISupportInitialize)throttleResistanceSmoothNumericUpDown).BeginInit(); + ((ISupportInitialize)throttleMaxResistanceNumericUpDown).BeginInit(); + ((ISupportInitialize)throttleMinResistanceNumericUpDown).BeginInit(); + ((ISupportInitialize)throttleMaxStiffnessNumericUpDown).BeginInit(); + ((ISupportInitialize)throttleMinStiffnessNumericUpDown).BeginInit(); + ((ISupportInitialize)throttleVibrationSmoothNumericUpDown).BeginInit(); + ((ISupportInitialize)throttleMaxVibrationNumericUpDown).BeginInit(); + ((ISupportInitialize)throttleMinVibrationNumericUpDown).BeginInit(); + ((ISupportInitialize)throttleVibrationStartNumericUpDown).BeginInit(); + ((ISupportInitialize)throttleAccelLimitNumericUpDown).BeginInit(); + ((ISupportInitialize)throttleForwardAccelScaleNumericUpDown).BeginInit(); + ((ISupportInitialize)throttleTurnAccelScaleNumericUpDown).BeginInit(); + ((ISupportInitialize)throttleGripLossNumericUpDown).BeginInit(); + ((ISupportInitialize)throttleIntensityNumericUpDown).BeginInit(); + ((ISupportInitialize)throttleResistanceSmoothTrackBar).BeginInit(); + ((ISupportInitialize)throttleMaxResistanceTrackBar).BeginInit(); + ((ISupportInitialize)throttleMinResistanceTrackBar).BeginInit(); + ((ISupportInitialize)throttleMaxStiffnessTrackBar).BeginInit(); + ((ISupportInitialize)throttleMinStiffnessTrackBar).BeginInit(); + ((ISupportInitialize)throttleVibrationSmoothTrackBar).BeginInit(); + ((ISupportInitialize)throttleMaxVibrationTrackBar).BeginInit(); + ((ISupportInitialize)throttleMinVibrationTrackBar).BeginInit(); + ((ISupportInitialize)throttleVibrationModeStartTrackBar).BeginInit(); + ((ISupportInitialize)throttleAccelLimitTrackBar).BeginInit(); + ((ISupportInitialize)throttleForwardAccelScaleTrackBar).BeginInit(); + ((ISupportInitialize)throttleTurnAccelScaleTrackBar).BeginInit(); + ((ISupportInitialize)throttleGripLossTrackBar).BeginInit(); + ((ISupportInitialize)throttleIntensityTrackBar).BeginInit(); + outputTabPage.SuspendLayout(); + raceGroupBox.SuspendLayout(); + tableLayoutPanel1.SuspendLayout(); + noRaceGroupBox.SuspendLayout(); + statusStrip1.SuspendLayout(); + ProfilesContextMenu.SuspendLayout(); + SuspendLayout(); + // + // mainPanel + // + mainPanel.Controls.Add(mainSplitContainer); + mainPanel.Dock = System.Windows.Forms.DockStyle.Fill; + mainPanel.Location = new System.Drawing.Point(0, 0); + mainPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + mainPanel.Name = "mainPanel"; + mainPanel.Size = new System.Drawing.Size(1848, 1228); + mainPanel.TabIndex = 0; + // + // mainSplitContainer + // + mainSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill; + mainSplitContainer.Location = new System.Drawing.Point(0, 0); + mainSplitContainer.Name = "mainSplitContainer"; + // + // mainSplitContainer.Panel1 + // + mainSplitContainer.Panel1.Controls.Add(profilesGroupBox); + // + // mainSplitContainer.Panel2 + // + mainSplitContainer.Panel2.Controls.Add(mainTabControl); + mainSplitContainer.Size = new System.Drawing.Size(1848, 1228); + mainSplitContainer.SplitterDistance = 236; + mainSplitContainer.TabIndex = 1; + // + // profilesGroupBox + // + profilesGroupBox.Controls.Add(profilesListView); + profilesGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; + profilesGroupBox.Location = new System.Drawing.Point(0, 0); + profilesGroupBox.Name = "profilesGroupBox"; + profilesGroupBox.Size = new System.Drawing.Size(236, 1228); + profilesGroupBox.TabIndex = 3; + profilesGroupBox.TabStop = false; + profilesGroupBox.Text = "Profiles"; + // + // profilesListView + // + profilesListView.Dock = System.Windows.Forms.DockStyle.Fill; + profilesListView.FullRowSelect = true; + profilesListView.Items.AddRange(new System.Windows.Forms.ListViewItem[] { listViewItem1, listViewItem2 }); + profilesListView.Location = new System.Drawing.Point(3, 27); + profilesListView.MultiSelect = false; + profilesListView.Name = "profilesListView"; + profilesListView.Size = new System.Drawing.Size(230, 1198); + profilesListView.TabIndex = 0; + profilesListView.UseCompatibleStateImageBehavior = false; + profilesListView.View = System.Windows.Forms.View.List; + profilesListView.MouseDown += profilesListView_MouseDown; + // + // mainTabControl + // + mainTabControl.Controls.Add(miscTabPage); + mainTabControl.Controls.Add(brakeConfigTabPage); + mainTabControl.Controls.Add(throttleConfigTabPage); + mainTabControl.Controls.Add(outputTabPage); + mainTabControl.Dock = System.Windows.Forms.DockStyle.Fill; + mainTabControl.Location = new System.Drawing.Point(0, 0); + mainTabControl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + mainTabControl.Name = "mainTabControl"; + mainTabControl.SelectedIndex = 0; + mainTabControl.Size = new System.Drawing.Size(1608, 1228); + mainTabControl.TabIndex = 0; + // + // miscTabPage + // + miscTabPage.Controls.Add(miscTableLayoutPanel); + miscTabPage.Location = new System.Drawing.Point(4, 34); + miscTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + miscTabPage.Name = "miscTabPage"; + miscTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + miscTabPage.Size = new System.Drawing.Size(1600, 1190); + miscTabPage.TabIndex = 3; + miscTabPage.Text = "Misc"; + miscTabPage.UseVisualStyleBackColor = true; + // + // miscTableLayoutPanel + // + miscTableLayoutPanel.AutoScroll = true; + miscTableLayoutPanel.AutoSize = true; + miscTableLayoutPanel.ColumnCount = 3; + miscTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + miscTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + miscTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + miscTableLayoutPanel.Controls.Add(forzaPortNumericUpDown, 1, 4); + miscTableLayoutPanel.Controls.Add(forzaPortLabel, 0, 4); + miscTableLayoutPanel.Controls.Add(rpmLabel, 0, 0); + miscTableLayoutPanel.Controls.Add(rpmTrackBar, 1, 0); + miscTableLayoutPanel.Controls.Add(rpmValueNumericUpDown, 2, 0); + miscTableLayoutPanel.Controls.Add(buttonApplyMisc, 1, 7); + miscTableLayoutPanel.Controls.Add(miscDefaultsButton, 2, 7); + miscTableLayoutPanel.Controls.Add(ExecutableListLabel, 0, 6); + miscTableLayoutPanel.Controls.Add(ExecutableListBox, 1, 6); + miscTableLayoutPanel.Controls.Add(flowLayoutPanel1, 2, 6); + miscTableLayoutPanel.Controls.Add(GameModeLabel, 0, 5); + miscTableLayoutPanel.Controls.Add(GameModeComboBox, 1, 5); + miscTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + miscTableLayoutPanel.Location = new System.Drawing.Point(4, 5); + miscTableLayoutPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + miscTableLayoutPanel.Name = "miscTableLayoutPanel"; + miscTableLayoutPanel.RowCount = 8; + miscTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + miscTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + miscTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + miscTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + miscTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + miscTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + miscTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + miscTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 33F)); + miscTableLayoutPanel.Size = new System.Drawing.Size(1592, 1180); + miscTableLayoutPanel.TabIndex = 0; + // + // forzaPortNumericUpDown + // + forzaPortNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + forzaPortNumericUpDown.Dock = System.Windows.Forms.DockStyle.Fill; + forzaPortNumericUpDown.Location = new System.Drawing.Point(190, 84); + forzaPortNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + forzaPortNumericUpDown.Maximum = new decimal(new int[] { 65353, 0, 0, 0 }); + forzaPortNumericUpDown.Name = "forzaPortNumericUpDown"; + forzaPortNumericUpDown.Size = new System.Drawing.Size(593, 31); + forzaPortNumericUpDown.TabIndex = 7; + toolTip.SetToolTip(forzaPortNumericUpDown, "Port for Forza UDP server"); + forzaPortNumericUpDown.ValueChanged += forzaPortNumericUpDown_ValueChanged; + // + // forzaPortLabel + // + forzaPortLabel.AutoSize = true; + forzaPortLabel.Dock = System.Windows.Forms.DockStyle.Fill; + forzaPortLabel.Location = new System.Drawing.Point(4, 79); + forzaPortLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + forzaPortLabel.Name = "forzaPortLabel"; + forzaPortLabel.Size = new System.Drawing.Size(178, 41); + forzaPortLabel.TabIndex = 6; + forzaPortLabel.Text = "Game Port"; + forzaPortLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(forzaPortLabel, "Port for Game's UDP Server"); + // + // rpmLabel + // + rpmLabel.AutoSize = true; + rpmLabel.Dock = System.Windows.Forms.DockStyle.Fill; + rpmLabel.LiveSetting = System.Windows.Forms.Automation.AutomationLiveSetting.Polite; + rpmLabel.Location = new System.Drawing.Point(4, 0); + rpmLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + rpmLabel.Name = "rpmLabel"; + rpmLabel.Size = new System.Drawing.Size(178, 79); + rpmLabel.TabIndex = 0; + rpmLabel.Text = "RPM Redline Ratio"; + rpmLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(rpmLabel, "The percentage of the current RPM when we are in the \"redline\" of the engine"); + // + // rpmTrackBar + // + rpmTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + rpmTrackBar.Cursor = System.Windows.Forms.Cursors.NoMoveHoriz; + rpmTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + rpmTrackBar.LargeChange = 50; + rpmTrackBar.Location = new System.Drawing.Point(190, 5); + rpmTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + rpmTrackBar.Maximum = 100; + rpmTrackBar.Name = "rpmTrackBar"; + rpmTrackBar.Size = new System.Drawing.Size(593, 69); + rpmTrackBar.TabIndex = 1; + rpmTrackBar.TickFrequency = 5; + rpmTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(rpmTrackBar, "The percentage of the current RPM when we are in the \"redline\" of the engine"); + rpmTrackBar.Scroll += rpmTrackBar_Scroll; + // + // rpmValueNumericUpDown + // + rpmValueNumericUpDown.AutoSize = true; + rpmValueNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + rpmValueNumericUpDown.Dock = System.Windows.Forms.DockStyle.Fill; + rpmValueNumericUpDown.Location = new System.Drawing.Point(791, 5); + rpmValueNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + rpmValueNumericUpDown.Name = "rpmValueNumericUpDown"; + rpmValueNumericUpDown.Size = new System.Drawing.Size(797, 31); + rpmValueNumericUpDown.TabIndex = 8; + toolTip.SetToolTip(rpmValueNumericUpDown, "The percentage of the current RPM when we are in the \"redline\" of the engine"); + rpmValueNumericUpDown.ValueChanged += rpmValueNumericUpDown_ValueChanged; + // + // buttonApplyMisc + // + buttonApplyMisc.Dock = System.Windows.Forms.DockStyle.Top; + buttonApplyMisc.Location = new System.Drawing.Point(190, 320); + buttonApplyMisc.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonApplyMisc.MaximumSize = new System.Drawing.Size(429, 50); + buttonApplyMisc.MinimumSize = new System.Drawing.Size(286, 42); + buttonApplyMisc.Name = "buttonApplyMisc"; + buttonApplyMisc.Size = new System.Drawing.Size(429, 42); + buttonApplyMisc.TabIndex = 9; + buttonApplyMisc.Text = "Apply"; + buttonApplyMisc.UseVisualStyleBackColor = true; + buttonApplyMisc.Click += buttonApplyMisc_Click; + // + // miscDefaultsButton + // + miscDefaultsButton.Location = new System.Drawing.Point(791, 320); + miscDefaultsButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + miscDefaultsButton.Name = "miscDefaultsButton"; + miscDefaultsButton.Size = new System.Drawing.Size(107, 38); + miscDefaultsButton.TabIndex = 39; + miscDefaultsButton.Text = "Defaults"; + miscDefaultsButton.UseVisualStyleBackColor = true; + miscDefaultsButton.Click += miscDefaultsButton_Click; + // + // ExecutableListLabel + // + ExecutableListLabel.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + ExecutableListLabel.AutoSize = true; + ExecutableListLabel.Location = new System.Drawing.Point(3, 224); + ExecutableListLabel.Name = "ExecutableListLabel"; + ExecutableListLabel.Size = new System.Drawing.Size(180, 25); + ExecutableListLabel.TabIndex = 40; + ExecutableListLabel.Text = "Executables To Match"; + ExecutableListLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(ExecutableListLabel, "This is the list of executable names that will be used to activate this profile"); + // + // ExecutableListBox + // + ExecutableListBox.Dock = System.Windows.Forms.DockStyle.Fill; + ExecutableListBox.FormattingEnabled = true; + ExecutableListBox.ItemHeight = 25; + ExecutableListBox.Location = new System.Drawing.Point(189, 162); + ExecutableListBox.Name = "ExecutableListBox"; + ExecutableListBox.Size = new System.Drawing.Size(595, 150); + ExecutableListBox.TabIndex = 41; + ExecutableListBox.SelectedIndexChanged += ExecutableListBox_SelectedIndexChanged; + // + // flowLayoutPanel1 + // + flowLayoutPanel1.Controls.Add(AddExecutableButton); + flowLayoutPanel1.Controls.Add(EditExecutableButton); + flowLayoutPanel1.Controls.Add(RemoveExecutableButton); + flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + flowLayoutPanel1.Location = new System.Drawing.Point(790, 162); + flowLayoutPanel1.Name = "flowLayoutPanel1"; + flowLayoutPanel1.Size = new System.Drawing.Size(799, 150); + flowLayoutPanel1.TabIndex = 42; + // + // AddExecutableButton + // + AddExecutableButton.Location = new System.Drawing.Point(3, 3); + AddExecutableButton.Name = "AddExecutableButton"; + AddExecutableButton.Size = new System.Drawing.Size(112, 34); + AddExecutableButton.TabIndex = 0; + AddExecutableButton.Text = "Add"; + AddExecutableButton.UseVisualStyleBackColor = true; + AddExecutableButton.Click += AddExecutableButton_Click; + // + // EditExecutableButton + // + EditExecutableButton.Location = new System.Drawing.Point(3, 43); + EditExecutableButton.Name = "EditExecutableButton"; + EditExecutableButton.Size = new System.Drawing.Size(112, 34); + EditExecutableButton.TabIndex = 1; + EditExecutableButton.Text = "Edit"; + EditExecutableButton.UseVisualStyleBackColor = true; + EditExecutableButton.Click += EditExecutableButton_Click; + // + // RemoveExecutableButton + // + RemoveExecutableButton.Location = new System.Drawing.Point(3, 83); + RemoveExecutableButton.Name = "RemoveExecutableButton"; + RemoveExecutableButton.Size = new System.Drawing.Size(112, 34); + RemoveExecutableButton.TabIndex = 2; + RemoveExecutableButton.Text = "Remove"; + RemoveExecutableButton.UseVisualStyleBackColor = true; + RemoveExecutableButton.Click += RemoveExecutableButton_Click; + // + // GameModeLabel + // + GameModeLabel.Anchor = System.Windows.Forms.AnchorStyles.Right; + GameModeLabel.AutoSize = true; + GameModeLabel.Location = new System.Drawing.Point(84, 127); + GameModeLabel.Name = "GameModeLabel"; + GameModeLabel.Size = new System.Drawing.Size(99, 25); + GameModeLabel.TabIndex = 43; + GameModeLabel.Text = "UDP Mode"; + GameModeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(GameModeLabel, "The Parser and backend to use to conver the game UDP to the DSX Commands"); + // + // GameModeComboBox + // + GameModeComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left; + GameModeComboBox.FormattingEnabled = true; + GameModeComboBox.Items.AddRange(new object[] { "(None)", "Forza", "Dirt" }); + GameModeComboBox.Location = new System.Drawing.Point(189, 123); + GameModeComboBox.Name = "GameModeComboBox"; + GameModeComboBox.Size = new System.Drawing.Size(182, 33); + GameModeComboBox.TabIndex = 44; + GameModeComboBox.SelectedIndexChanged += GameModeComboBox_SelectedIndexChanged; + // + // brakeConfigTabPage + // + brakeConfigTabPage.Controls.Add(brakeTableLayoutPanel); + brakeConfigTabPage.Location = new System.Drawing.Point(4, 34); + brakeConfigTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + brakeConfigTabPage.Name = "brakeConfigTabPage"; + brakeConfigTabPage.Size = new System.Drawing.Size(1600, 1190); + brakeConfigTabPage.TabIndex = 4; + brakeConfigTabPage.Text = "Brake Trigger"; + // + // brakeTableLayoutPanel + // + brakeTableLayoutPanel.AutoScroll = true; + brakeTableLayoutPanel.AutoSize = true; + brakeTableLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + brakeTableLayoutPanel.BackColor = System.Drawing.SystemColors.ControlLightLight; + brakeTableLayoutPanel.ColumnCount = 3; + brakeTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + brakeTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + brakeTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + brakeTableLayoutPanel.Controls.Add(brakeResistanceSmoothNumericUpDown, 2, 12); + brakeTableLayoutPanel.Controls.Add(maxBrakeResistanceNumericUpDown, 2, 11); + brakeTableLayoutPanel.Controls.Add(minBrakeResistanceNumericUpDown, 2, 10); + brakeTableLayoutPanel.Controls.Add(maxBrakeStifnessNumericUpDown, 2, 9); + brakeTableLayoutPanel.Controls.Add(minBrakeStifnessNumericUpDown, 2, 8); + brakeTableLayoutPanel.Controls.Add(brakeVibrationSmoothNumericUpDown, 2, 7); + brakeTableLayoutPanel.Controls.Add(maxBrakeVibrationNumericUpDown, 2, 6); + brakeTableLayoutPanel.Controls.Add(minBrakeVibrationNumericUpDown, 2, 5); + brakeTableLayoutPanel.Controls.Add(brakeVibrationModeNumericUpDown, 2, 4); + brakeTableLayoutPanel.Controls.Add(brakeVibrationStartNumericUpDown, 2, 3); + brakeTableLayoutPanel.Controls.Add(gripLossNumericUpDown, 2, 2); + brakeTableLayoutPanel.Controls.Add(brakeEffectNumericUpDown, 2, 1); + brakeTableLayoutPanel.Controls.Add(brakeResistanceSmoothingTrackBar, 1, 12); + brakeTableLayoutPanel.Controls.Add(brakeResistanceSmoothingLabel, 0, 12); + brakeTableLayoutPanel.Controls.Add(maxBrakeResistanceTrackBar, 1, 11); + brakeTableLayoutPanel.Controls.Add(maxBrakeResistanceLabel, 0, 11); + brakeTableLayoutPanel.Controls.Add(minBrakeResistanceTrackBar, 1, 10); + brakeTableLayoutPanel.Controls.Add(minBrakeResistanceLabel, 0, 10); + brakeTableLayoutPanel.Controls.Add(maxBrakeStiffnessTrackBar, 1, 9); + brakeTableLayoutPanel.Controls.Add(maxBrakeStiffnessLabel, 0, 9); + brakeTableLayoutPanel.Controls.Add(minBrakeStiffnessTrackBar, 1, 8); + brakeTableLayoutPanel.Controls.Add(minBrakeStiffnessLabel, 0, 8); + brakeTableLayoutPanel.Controls.Add(vibrationSmoothingTrackBar, 1, 7); + brakeTableLayoutPanel.Controls.Add(vibrationSmoothingLabel, 0, 7); + brakeTableLayoutPanel.Controls.Add(maxBrakeVibrationTrackBar, 1, 6); + brakeTableLayoutPanel.Controls.Add(maxBrakeVibrationLabel, 0, 6); + brakeTableLayoutPanel.Controls.Add(minBrakeVibrationTrackBar, 1, 5); + brakeTableLayoutPanel.Controls.Add(minBrakeVibrationLabel, 0, 5); + brakeTableLayoutPanel.Controls.Add(brakeVibrationModeTrackBar, 1, 4); + brakeTableLayoutPanel.Controls.Add(brakeVibrationModeStartLabel, 0, 4); + brakeTableLayoutPanel.Controls.Add(brakeVibrationStartTrackBar, 1, 3); + brakeTableLayoutPanel.Controls.Add(brakeVibrationStartLabel, 0, 3); + brakeTableLayoutPanel.Controls.Add(gripLossTrackBar, 1, 2); + brakeTableLayoutPanel.Controls.Add(gripLossLabel, 0, 2); + brakeTableLayoutPanel.Controls.Add(brakeEffectIntensityLabel, 0, 1); + brakeTableLayoutPanel.Controls.Add(brakeEffectIntensityTrackBar, 1, 1); + brakeTableLayoutPanel.Controls.Add(buttonApply_Brake, 1, 13); + brakeTableLayoutPanel.Controls.Add(brakeDefaultsButton, 2, 13); + brakeTableLayoutPanel.Controls.Add(brakeTriggerMode, 0, 0); + brakeTableLayoutPanel.Controls.Add(brakeTriggerModeComboBox, 1, 0); + brakeTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + brakeTableLayoutPanel.Location = new System.Drawing.Point(0, 0); + brakeTableLayoutPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + brakeTableLayoutPanel.Name = "brakeTableLayoutPanel"; + brakeTableLayoutPanel.RowCount = 15; + brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 67F)); + brakeTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 13F)); + brakeTableLayoutPanel.Size = new System.Drawing.Size(1600, 1190); + brakeTableLayoutPanel.TabIndex = 0; + // + // brakeResistanceSmoothNumericUpDown + // + brakeResistanceSmoothNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + brakeResistanceSmoothNumericUpDown.AutoSize = true; + brakeResistanceSmoothNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + brakeResistanceSmoothNumericUpDown.Location = new System.Drawing.Point(781, 936); + brakeResistanceSmoothNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + brakeResistanceSmoothNumericUpDown.Maximum = new decimal(new int[] { 500, 0, 0, 0 }); + brakeResistanceSmoothNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); + brakeResistanceSmoothNumericUpDown.Name = "brakeResistanceSmoothNumericUpDown"; + brakeResistanceSmoothNumericUpDown.Size = new System.Drawing.Size(66, 31); + brakeResistanceSmoothNumericUpDown.TabIndex = 36; + toolTip.SetToolTip(brakeResistanceSmoothNumericUpDown, "Smoothing for Brake Resistance output. Lower = smoother. Must be greater than 0"); + brakeResistanceSmoothNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); + brakeResistanceSmoothNumericUpDown.ValueChanged += brakeResistanceSmoothNumericUpDown_ValueChanged; + // + // maxBrakeResistanceNumericUpDown + // + maxBrakeResistanceNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + maxBrakeResistanceNumericUpDown.AutoSize = true; + maxBrakeResistanceNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + maxBrakeResistanceNumericUpDown.Location = new System.Drawing.Point(781, 857); + maxBrakeResistanceNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + maxBrakeResistanceNumericUpDown.Maximum = new decimal(new int[] { 7, 0, 0, 0 }); + maxBrakeResistanceNumericUpDown.Name = "maxBrakeResistanceNumericUpDown"; + maxBrakeResistanceNumericUpDown.Size = new System.Drawing.Size(46, 31); + maxBrakeResistanceNumericUpDown.TabIndex = 35; + toolTip.SetToolTip(maxBrakeResistanceNumericUpDown, "The Maximum resistance on the Brake (0-7)"); + maxBrakeResistanceNumericUpDown.ValueChanged += maxBrakeResistanceNumericUpDown_ValueChanged; + // + // minBrakeResistanceNumericUpDown + // + minBrakeResistanceNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + minBrakeResistanceNumericUpDown.AutoSize = true; + minBrakeResistanceNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + minBrakeResistanceNumericUpDown.Location = new System.Drawing.Point(781, 778); + minBrakeResistanceNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + minBrakeResistanceNumericUpDown.Maximum = new decimal(new int[] { 7, 0, 0, 0 }); + minBrakeResistanceNumericUpDown.Name = "minBrakeResistanceNumericUpDown"; + minBrakeResistanceNumericUpDown.Size = new System.Drawing.Size(46, 31); + minBrakeResistanceNumericUpDown.TabIndex = 34; + toolTip.SetToolTip(minBrakeResistanceNumericUpDown, "The Minimum resistance on the Brake (0-7)"); + minBrakeResistanceNumericUpDown.ValueChanged += minBrakeResistanceNumericUpDown_ValueChanged; + // + // maxBrakeStifnessNumericUpDown + // + maxBrakeStifnessNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + maxBrakeStifnessNumericUpDown.AutoSize = true; + maxBrakeStifnessNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + maxBrakeStifnessNumericUpDown.Location = new System.Drawing.Point(781, 699); + maxBrakeStifnessNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + maxBrakeStifnessNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + maxBrakeStifnessNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); + maxBrakeStifnessNumericUpDown.Name = "maxBrakeStifnessNumericUpDown"; + maxBrakeStifnessNumericUpDown.Size = new System.Drawing.Size(66, 31); + maxBrakeStifnessNumericUpDown.TabIndex = 33; + toolTip.SetToolTip(maxBrakeStifnessNumericUpDown, "On a scale of 1-255 with 1 being most stiff"); + maxBrakeStifnessNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); + maxBrakeStifnessNumericUpDown.ValueChanged += maxBrakeStifnessNumericUpDown_ValueChanged; + // + // minBrakeStifnessNumericUpDown + // + minBrakeStifnessNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + minBrakeStifnessNumericUpDown.AutoSize = true; + minBrakeStifnessNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + minBrakeStifnessNumericUpDown.Location = new System.Drawing.Point(781, 620); + minBrakeStifnessNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + minBrakeStifnessNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + minBrakeStifnessNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); + minBrakeStifnessNumericUpDown.Name = "minBrakeStifnessNumericUpDown"; + minBrakeStifnessNumericUpDown.Size = new System.Drawing.Size(66, 31); + minBrakeStifnessNumericUpDown.TabIndex = 32; + toolTip.SetToolTip(minBrakeStifnessNumericUpDown, "On a scale of 1-255 with 1 being most stiff"); + minBrakeStifnessNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); + minBrakeStifnessNumericUpDown.ValueChanged += minBrakeStifnessNumericUpDown_ValueChanged; + // + // brakeVibrationSmoothNumericUpDown + // + brakeVibrationSmoothNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + brakeVibrationSmoothNumericUpDown.AutoSize = true; + brakeVibrationSmoothNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + brakeVibrationSmoothNumericUpDown.Location = new System.Drawing.Point(781, 541); + brakeVibrationSmoothNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + brakeVibrationSmoothNumericUpDown.Maximum = new decimal(new int[] { 500, 0, 0, 0 }); + brakeVibrationSmoothNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); + brakeVibrationSmoothNumericUpDown.Name = "brakeVibrationSmoothNumericUpDown"; + brakeVibrationSmoothNumericUpDown.Size = new System.Drawing.Size(66, 31); + brakeVibrationSmoothNumericUpDown.TabIndex = 31; + toolTip.SetToolTip(brakeVibrationSmoothNumericUpDown, "Smoothing for Brake Frequency output. Lower = smoother. Must be greater than 0"); + brakeVibrationSmoothNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); + brakeVibrationSmoothNumericUpDown.ValueChanged += brakeVibrationSmoothNumericUpDown_ValueChanged; + // + // maxBrakeVibrationNumericUpDown + // + maxBrakeVibrationNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + maxBrakeVibrationNumericUpDown.AutoSize = true; + maxBrakeVibrationNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + maxBrakeVibrationNumericUpDown.Location = new System.Drawing.Point(781, 462); + maxBrakeVibrationNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + maxBrakeVibrationNumericUpDown.Name = "maxBrakeVibrationNumericUpDown"; + maxBrakeVibrationNumericUpDown.Size = new System.Drawing.Size(66, 31); + maxBrakeVibrationNumericUpDown.TabIndex = 30; + toolTip.SetToolTip(maxBrakeVibrationNumericUpDown, "The maximum brake frequency in Hz (avoid over 40). Correlates to better grip"); + maxBrakeVibrationNumericUpDown.ValueChanged += maxBrakeVibrationNumericUpDown_ValueChanged; + // + // minBrakeVibrationNumericUpDown + // + minBrakeVibrationNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + minBrakeVibrationNumericUpDown.AutoSize = true; + minBrakeVibrationNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + minBrakeVibrationNumericUpDown.Location = new System.Drawing.Point(781, 383); + minBrakeVibrationNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + minBrakeVibrationNumericUpDown.Name = "minBrakeVibrationNumericUpDown"; + minBrakeVibrationNumericUpDown.Size = new System.Drawing.Size(66, 31); + minBrakeVibrationNumericUpDown.TabIndex = 29; + toolTip.SetToolTip(minBrakeVibrationNumericUpDown, "The Minimum brake frequency in Hz (avoid over 40). Helps avoid clicking in controller"); + minBrakeVibrationNumericUpDown.ValueChanged += minBrakeVibrationNumericUpDown_ValueChanged; + // + // brakeVibrationModeNumericUpDown + // + brakeVibrationModeNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + brakeVibrationModeNumericUpDown.AutoSize = true; + brakeVibrationModeNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + brakeVibrationModeNumericUpDown.Location = new System.Drawing.Point(781, 304); + brakeVibrationModeNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + brakeVibrationModeNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + brakeVibrationModeNumericUpDown.Name = "brakeVibrationModeNumericUpDown"; + brakeVibrationModeNumericUpDown.Size = new System.Drawing.Size(66, 31); + brakeVibrationModeNumericUpDown.TabIndex = 28; + toolTip.SetToolTip(brakeVibrationModeNumericUpDown, "The depression of the brake lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied. "); + brakeVibrationModeNumericUpDown.ValueChanged += brakeVibrationModeNumericUpDown_ValueChanged; + // + // brakeVibrationStartNumericUpDown + // + brakeVibrationStartNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + brakeVibrationStartNumericUpDown.AutoSize = true; + brakeVibrationStartNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + brakeVibrationStartNumericUpDown.Location = new System.Drawing.Point(781, 225); + brakeVibrationStartNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + brakeVibrationStartNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + brakeVibrationStartNumericUpDown.Name = "brakeVibrationStartNumericUpDown"; + brakeVibrationStartNumericUpDown.Size = new System.Drawing.Size(66, 31); + brakeVibrationStartNumericUpDown.TabIndex = 27; + toolTip.SetToolTip(brakeVibrationStartNumericUpDown, "The position in the Trigger (0-255) at which the brake should feel engaged with low grip surfaces"); + brakeVibrationStartNumericUpDown.ValueChanged += brakeVibrationStartNumericUpDown_ValueChanged; + // + // gripLossNumericUpDown + // + gripLossNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + gripLossNumericUpDown.AutoSize = true; + gripLossNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + gripLossNumericUpDown.Location = new System.Drawing.Point(781, 146); + gripLossNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + gripLossNumericUpDown.Name = "gripLossNumericUpDown"; + gripLossNumericUpDown.Size = new System.Drawing.Size(66, 31); + gripLossNumericUpDown.TabIndex = 26; + toolTip.SetToolTip(gripLossNumericUpDown, "The point at which the brake will begin to become choppy (0 = full grip, 100 = no grip)"); + gripLossNumericUpDown.ValueChanged += gripLossNumericUpDown_ValueChanged; + // + // brakeEffectNumericUpDown + // + brakeEffectNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + brakeEffectNumericUpDown.AutoSize = true; + brakeEffectNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + brakeEffectNumericUpDown.Location = new System.Drawing.Point(781, 67); + brakeEffectNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + brakeEffectNumericUpDown.Name = "brakeEffectNumericUpDown"; + brakeEffectNumericUpDown.Size = new System.Drawing.Size(66, 31); + brakeEffectNumericUpDown.TabIndex = 2; + toolTip.SetToolTip(brakeEffectNumericUpDown, "The percentage of the current RPM when we are in the \"redline\" of the engine"); + brakeEffectNumericUpDown.ValueChanged += brakeEffectNumericUpDown_ValueChanged; + // + // brakeResistanceSmoothingTrackBar + // + brakeResistanceSmoothingTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + brakeResistanceSmoothingTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + brakeResistanceSmoothingTrackBar.LargeChange = 50; + brakeResistanceSmoothingTrackBar.Location = new System.Drawing.Point(199, 917); + brakeResistanceSmoothingTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + brakeResistanceSmoothingTrackBar.Maximum = 500; + brakeResistanceSmoothingTrackBar.Minimum = 1; + brakeResistanceSmoothingTrackBar.Name = "brakeResistanceSmoothingTrackBar"; + brakeResistanceSmoothingTrackBar.Size = new System.Drawing.Size(574, 69); + brakeResistanceSmoothingTrackBar.TabIndex = 23; + brakeResistanceSmoothingTrackBar.TickFrequency = 10; + brakeResistanceSmoothingTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(brakeResistanceSmoothingTrackBar, "Smoothing for Brake Resistance output. Lower = smoother. Must be greater than 0"); + brakeResistanceSmoothingTrackBar.Value = 1; + brakeResistanceSmoothingTrackBar.Scroll += brakeResistanceSmoothingTrackBar_Scroll; + // + // brakeResistanceSmoothingLabel + // + brakeResistanceSmoothingLabel.AutoSize = true; + brakeResistanceSmoothingLabel.Dock = System.Windows.Forms.DockStyle.Fill; + brakeResistanceSmoothingLabel.Location = new System.Drawing.Point(4, 912); + brakeResistanceSmoothingLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + brakeResistanceSmoothingLabel.Name = "brakeResistanceSmoothingLabel"; + brakeResistanceSmoothingLabel.Size = new System.Drawing.Size(187, 79); + brakeResistanceSmoothingLabel.TabIndex = 22; + brakeResistanceSmoothingLabel.Text = "Resistance Smoothing"; + brakeResistanceSmoothingLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(brakeResistanceSmoothingLabel, "Smoothing for Brake Resistance output. Lower = smoother. Must be greater than 0"); + // + // maxBrakeResistanceTrackBar + // + maxBrakeResistanceTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + maxBrakeResistanceTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + maxBrakeResistanceTrackBar.LargeChange = 50; + maxBrakeResistanceTrackBar.Location = new System.Drawing.Point(199, 838); + maxBrakeResistanceTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + maxBrakeResistanceTrackBar.Maximum = 7; + maxBrakeResistanceTrackBar.Name = "maxBrakeResistanceTrackBar"; + maxBrakeResistanceTrackBar.Size = new System.Drawing.Size(574, 69); + maxBrakeResistanceTrackBar.TabIndex = 21; + maxBrakeResistanceTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(maxBrakeResistanceTrackBar, "The Maximum resistance on the Brake (0-7)"); + maxBrakeResistanceTrackBar.Scroll += maxBrakeResistanceTrackBar_Scroll; + // + // maxBrakeResistanceLabel + // + maxBrakeResistanceLabel.AutoSize = true; + maxBrakeResistanceLabel.Dock = System.Windows.Forms.DockStyle.Fill; + maxBrakeResistanceLabel.Location = new System.Drawing.Point(4, 833); + maxBrakeResistanceLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + maxBrakeResistanceLabel.Name = "maxBrakeResistanceLabel"; + maxBrakeResistanceLabel.Size = new System.Drawing.Size(187, 79); + maxBrakeResistanceLabel.TabIndex = 20; + maxBrakeResistanceLabel.Text = "Max Resistance"; + maxBrakeResistanceLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(maxBrakeResistanceLabel, "The Maximum resistance on the Brake (0-7)"); + // + // minBrakeResistanceTrackBar + // + minBrakeResistanceTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + minBrakeResistanceTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + minBrakeResistanceTrackBar.LargeChange = 50; + minBrakeResistanceTrackBar.Location = new System.Drawing.Point(199, 759); + minBrakeResistanceTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + minBrakeResistanceTrackBar.Maximum = 7; + minBrakeResistanceTrackBar.Name = "minBrakeResistanceTrackBar"; + minBrakeResistanceTrackBar.Size = new System.Drawing.Size(574, 69); + minBrakeResistanceTrackBar.TabIndex = 19; + minBrakeResistanceTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(minBrakeResistanceTrackBar, "The Minimum resistance on the Brake (0-7)"); + minBrakeResistanceTrackBar.Scroll += minBrakeResistanceTrackBar_Scroll; + // + // minBrakeResistanceLabel + // + minBrakeResistanceLabel.AutoSize = true; + minBrakeResistanceLabel.Dock = System.Windows.Forms.DockStyle.Fill; + minBrakeResistanceLabel.Location = new System.Drawing.Point(4, 754); + minBrakeResistanceLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + minBrakeResistanceLabel.Name = "minBrakeResistanceLabel"; + minBrakeResistanceLabel.Size = new System.Drawing.Size(187, 79); + minBrakeResistanceLabel.TabIndex = 18; + minBrakeResistanceLabel.Text = "Min Resistance"; + minBrakeResistanceLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(minBrakeResistanceLabel, "The Minimum resistance on the Brake (0-7)"); + // + // maxBrakeStiffnessTrackBar + // + maxBrakeStiffnessTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + maxBrakeStiffnessTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + maxBrakeStiffnessTrackBar.LargeChange = 50; + maxBrakeStiffnessTrackBar.Location = new System.Drawing.Point(199, 680); + maxBrakeStiffnessTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + maxBrakeStiffnessTrackBar.Maximum = 255; + maxBrakeStiffnessTrackBar.Minimum = 1; + maxBrakeStiffnessTrackBar.Name = "maxBrakeStiffnessTrackBar"; + maxBrakeStiffnessTrackBar.Size = new System.Drawing.Size(574, 69); + maxBrakeStiffnessTrackBar.TabIndex = 17; + maxBrakeStiffnessTrackBar.TickFrequency = 5; + maxBrakeStiffnessTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(maxBrakeStiffnessTrackBar, "On a scale of 1-255 with 1 being most stiff"); + maxBrakeStiffnessTrackBar.Value = 1; + maxBrakeStiffnessTrackBar.Scroll += maxBrakeStiffnessTrackBar_Scroll; + // + // maxBrakeStiffnessLabel + // + maxBrakeStiffnessLabel.AutoSize = true; + maxBrakeStiffnessLabel.Dock = System.Windows.Forms.DockStyle.Fill; + maxBrakeStiffnessLabel.Location = new System.Drawing.Point(4, 675); + maxBrakeStiffnessLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + maxBrakeStiffnessLabel.Name = "maxBrakeStiffnessLabel"; + maxBrakeStiffnessLabel.Size = new System.Drawing.Size(187, 79); + maxBrakeStiffnessLabel.TabIndex = 16; + maxBrakeStiffnessLabel.Text = "Max Stiffness"; + maxBrakeStiffnessLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(maxBrakeStiffnessLabel, "On a scale of 1-255 with 1 being most stiff"); + // + // minBrakeStiffnessTrackBar + // + minBrakeStiffnessTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + minBrakeStiffnessTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + minBrakeStiffnessTrackBar.LargeChange = 50; + minBrakeStiffnessTrackBar.Location = new System.Drawing.Point(199, 601); + minBrakeStiffnessTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + minBrakeStiffnessTrackBar.Maximum = 255; + minBrakeStiffnessTrackBar.Minimum = 1; + minBrakeStiffnessTrackBar.Name = "minBrakeStiffnessTrackBar"; + minBrakeStiffnessTrackBar.Size = new System.Drawing.Size(574, 69); + minBrakeStiffnessTrackBar.TabIndex = 15; + minBrakeStiffnessTrackBar.TickFrequency = 5; + minBrakeStiffnessTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(minBrakeStiffnessTrackBar, "On a scale of 1-255 with 1 being most stiff"); + minBrakeStiffnessTrackBar.Value = 1; + minBrakeStiffnessTrackBar.Scroll += minBrakeStiffnessTrackBar_Scroll; + // + // minBrakeStiffnessLabel + // + minBrakeStiffnessLabel.AutoSize = true; + minBrakeStiffnessLabel.Dock = System.Windows.Forms.DockStyle.Fill; + minBrakeStiffnessLabel.Location = new System.Drawing.Point(4, 596); + minBrakeStiffnessLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + minBrakeStiffnessLabel.Name = "minBrakeStiffnessLabel"; + minBrakeStiffnessLabel.Size = new System.Drawing.Size(187, 79); + minBrakeStiffnessLabel.TabIndex = 14; + minBrakeStiffnessLabel.Text = "Min Stifness"; + minBrakeStiffnessLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(minBrakeStiffnessLabel, "On a scale of 1-255 with 1 being most stiff"); + // + // vibrationSmoothingTrackBar + // + vibrationSmoothingTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + vibrationSmoothingTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + vibrationSmoothingTrackBar.LargeChange = 50; + vibrationSmoothingTrackBar.Location = new System.Drawing.Point(199, 522); + vibrationSmoothingTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + vibrationSmoothingTrackBar.Maximum = 500; + vibrationSmoothingTrackBar.Minimum = 1; + vibrationSmoothingTrackBar.Name = "vibrationSmoothingTrackBar"; + vibrationSmoothingTrackBar.Size = new System.Drawing.Size(574, 69); + vibrationSmoothingTrackBar.TabIndex = 13; + vibrationSmoothingTrackBar.TickFrequency = 10; + vibrationSmoothingTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(vibrationSmoothingTrackBar, "Smoothing for Brake Frequency output. Lower = smoother. Must be greater than 0"); + vibrationSmoothingTrackBar.Value = 1; + vibrationSmoothingTrackBar.Scroll += vibrationSmoothingTrackBar_Scroll; + // + // vibrationSmoothingLabel + // + vibrationSmoothingLabel.AutoSize = true; + vibrationSmoothingLabel.Dock = System.Windows.Forms.DockStyle.Fill; + vibrationSmoothingLabel.Location = new System.Drawing.Point(4, 517); + vibrationSmoothingLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + vibrationSmoothingLabel.Name = "vibrationSmoothingLabel"; + vibrationSmoothingLabel.Size = new System.Drawing.Size(187, 79); + vibrationSmoothingLabel.TabIndex = 12; + vibrationSmoothingLabel.Text = "Vibration Smoothing"; + vibrationSmoothingLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(vibrationSmoothingLabel, "Smoothing for Brake Frequency output. Lower = smoother. Must be greater than 0"); + // + // maxBrakeVibrationTrackBar + // + maxBrakeVibrationTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + maxBrakeVibrationTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + maxBrakeVibrationTrackBar.LargeChange = 50; + maxBrakeVibrationTrackBar.Location = new System.Drawing.Point(199, 443); + maxBrakeVibrationTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + maxBrakeVibrationTrackBar.Maximum = 100; + maxBrakeVibrationTrackBar.Name = "maxBrakeVibrationTrackBar"; + maxBrakeVibrationTrackBar.Size = new System.Drawing.Size(574, 69); + maxBrakeVibrationTrackBar.TabIndex = 11; + maxBrakeVibrationTrackBar.TickFrequency = 5; + maxBrakeVibrationTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(maxBrakeVibrationTrackBar, "The maximum brake frequency in Hz (avoid over 40). Correlates to better grip"); + maxBrakeVibrationTrackBar.Scroll += maxBrakeVibrationTrackBar_Scroll; + // + // maxBrakeVibrationLabel + // + maxBrakeVibrationLabel.AutoSize = true; + maxBrakeVibrationLabel.Dock = System.Windows.Forms.DockStyle.Fill; + maxBrakeVibrationLabel.Location = new System.Drawing.Point(4, 438); + maxBrakeVibrationLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + maxBrakeVibrationLabel.Name = "maxBrakeVibrationLabel"; + maxBrakeVibrationLabel.Size = new System.Drawing.Size(187, 79); + maxBrakeVibrationLabel.TabIndex = 10; + maxBrakeVibrationLabel.Text = "Max Brake Vibration"; + maxBrakeVibrationLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(maxBrakeVibrationLabel, "The maximum brake frequency in Hz (avoid over 40). Correlates to better grip"); + // + // minBrakeVibrationTrackBar + // + minBrakeVibrationTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + minBrakeVibrationTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + minBrakeVibrationTrackBar.LargeChange = 50; + minBrakeVibrationTrackBar.Location = new System.Drawing.Point(199, 364); + minBrakeVibrationTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + minBrakeVibrationTrackBar.Maximum = 100; + minBrakeVibrationTrackBar.Name = "minBrakeVibrationTrackBar"; + minBrakeVibrationTrackBar.Size = new System.Drawing.Size(574, 69); + minBrakeVibrationTrackBar.TabIndex = 9; + minBrakeVibrationTrackBar.TickFrequency = 5; + minBrakeVibrationTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(minBrakeVibrationTrackBar, "The Minimum brake frequency in Hz (avoid over 40). Helps avoid clicking in controller"); + minBrakeVibrationTrackBar.Scroll += minBrakeVibrationTrackBar_Scroll; + // + // minBrakeVibrationLabel + // + minBrakeVibrationLabel.AutoSize = true; + minBrakeVibrationLabel.Dock = System.Windows.Forms.DockStyle.Fill; + minBrakeVibrationLabel.Location = new System.Drawing.Point(4, 359); + minBrakeVibrationLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + minBrakeVibrationLabel.Name = "minBrakeVibrationLabel"; + minBrakeVibrationLabel.Size = new System.Drawing.Size(187, 79); + minBrakeVibrationLabel.TabIndex = 8; + minBrakeVibrationLabel.Text = "Min Brake Vibration"; + minBrakeVibrationLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(minBrakeVibrationLabel, "The Minimum brake frequency in Hz (avoid over 40). Helps avoid clicking in controller"); + // + // brakeVibrationModeTrackBar + // + brakeVibrationModeTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + brakeVibrationModeTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + brakeVibrationModeTrackBar.LargeChange = 50; + brakeVibrationModeTrackBar.Location = new System.Drawing.Point(199, 285); + brakeVibrationModeTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + brakeVibrationModeTrackBar.Maximum = 255; + brakeVibrationModeTrackBar.Name = "brakeVibrationModeTrackBar"; + brakeVibrationModeTrackBar.Size = new System.Drawing.Size(574, 69); + brakeVibrationModeTrackBar.TabIndex = 7; + brakeVibrationModeTrackBar.TickFrequency = 5; + brakeVibrationModeTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(brakeVibrationModeTrackBar, "The depression of the brake lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied. "); + brakeVibrationModeTrackBar.Scroll += brakeVibrationModeTrackBar_Scroll; + // + // brakeVibrationModeStartLabel + // + brakeVibrationModeStartLabel.AutoSize = true; + brakeVibrationModeStartLabel.Dock = System.Windows.Forms.DockStyle.Fill; + brakeVibrationModeStartLabel.Location = new System.Drawing.Point(4, 280); + brakeVibrationModeStartLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + brakeVibrationModeStartLabel.Name = "brakeVibrationModeStartLabel"; + brakeVibrationModeStartLabel.Size = new System.Drawing.Size(187, 79); + brakeVibrationModeStartLabel.TabIndex = 6; + brakeVibrationModeStartLabel.Text = "Vibration Mode Start"; + brakeVibrationModeStartLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(brakeVibrationModeStartLabel, "The depression of the brake lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied. "); + // + // brakeVibrationStartTrackBar + // + brakeVibrationStartTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + brakeVibrationStartTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + brakeVibrationStartTrackBar.LargeChange = 50; + brakeVibrationStartTrackBar.Location = new System.Drawing.Point(199, 206); + brakeVibrationStartTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + brakeVibrationStartTrackBar.Maximum = 255; + brakeVibrationStartTrackBar.Name = "brakeVibrationStartTrackBar"; + brakeVibrationStartTrackBar.Size = new System.Drawing.Size(574, 69); + brakeVibrationStartTrackBar.TabIndex = 5; + brakeVibrationStartTrackBar.TickFrequency = 5; + brakeVibrationStartTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(brakeVibrationStartTrackBar, "The position in the Trigger (0-255) at which the brake should feel engaged with low grip surfaces"); + brakeVibrationStartTrackBar.Scroll += brakeVibrationStartTrackBar_Scroll; + // + // brakeVibrationStartLabel + // + brakeVibrationStartLabel.AutoSize = true; + brakeVibrationStartLabel.Dock = System.Windows.Forms.DockStyle.Fill; + brakeVibrationStartLabel.Location = new System.Drawing.Point(4, 201); + brakeVibrationStartLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + brakeVibrationStartLabel.Name = "brakeVibrationStartLabel"; + brakeVibrationStartLabel.Size = new System.Drawing.Size(187, 79); + brakeVibrationStartLabel.TabIndex = 4; + brakeVibrationStartLabel.Text = "Vibration Start"; + brakeVibrationStartLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(brakeVibrationStartLabel, "The position in the Trigger (0-255) at which the brake should feel engaged with low grip surfaces"); + // + // gripLossTrackBar + // + gripLossTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + gripLossTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + gripLossTrackBar.Location = new System.Drawing.Point(199, 127); + gripLossTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + gripLossTrackBar.Maximum = 100; + gripLossTrackBar.Name = "gripLossTrackBar"; + gripLossTrackBar.Size = new System.Drawing.Size(574, 69); + gripLossTrackBar.TabIndex = 3; + gripLossTrackBar.TickFrequency = 5; + gripLossTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(gripLossTrackBar, "The point at which the brake will begin to become choppy (0 = full grip, 100 = no grip)"); + gripLossTrackBar.Value = 50; + gripLossTrackBar.Scroll += gripLossTrackBar_Scroll; + // + // gripLossLabel + // + gripLossLabel.AutoSize = true; + gripLossLabel.Dock = System.Windows.Forms.DockStyle.Fill; + gripLossLabel.Location = new System.Drawing.Point(4, 122); + gripLossLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + gripLossLabel.Name = "gripLossLabel"; + gripLossLabel.Size = new System.Drawing.Size(187, 79); + gripLossLabel.TabIndex = 2; + gripLossLabel.Text = "Grip Loss Value"; + gripLossLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(gripLossLabel, "The point at which the brake will begin to become choppy (0 = full grip, 100 = no grip)"); + // + // brakeEffectIntensityLabel + // + brakeEffectIntensityLabel.AutoSize = true; + brakeEffectIntensityLabel.Dock = System.Windows.Forms.DockStyle.Fill; + brakeEffectIntensityLabel.Location = new System.Drawing.Point(4, 43); + brakeEffectIntensityLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + brakeEffectIntensityLabel.Name = "brakeEffectIntensityLabel"; + brakeEffectIntensityLabel.Size = new System.Drawing.Size(187, 79); + brakeEffectIntensityLabel.TabIndex = 0; + brakeEffectIntensityLabel.Text = "Effect Intensity"; + brakeEffectIntensityLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(brakeEffectIntensityLabel, "The percentage of the trigger effects"); + // + // brakeEffectIntensityTrackBar + // + brakeEffectIntensityTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + brakeEffectIntensityTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + brakeEffectIntensityTrackBar.LargeChange = 10; + brakeEffectIntensityTrackBar.Location = new System.Drawing.Point(199, 48); + brakeEffectIntensityTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + brakeEffectIntensityTrackBar.Maximum = 100; + brakeEffectIntensityTrackBar.Name = "brakeEffectIntensityTrackBar"; + brakeEffectIntensityTrackBar.Size = new System.Drawing.Size(574, 69); + brakeEffectIntensityTrackBar.TabIndex = 1; + brakeEffectIntensityTrackBar.TickFrequency = 5; + brakeEffectIntensityTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(brakeEffectIntensityTrackBar, "The percentage of the trigger effects"); + brakeEffectIntensityTrackBar.Value = 100; + brakeEffectIntensityTrackBar.Scroll += brakeEffectIntensityTrackBar_Scroll; + // + // buttonApply_Brake + // + buttonApply_Brake.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + buttonApply_Brake.AutoSize = true; + buttonApply_Brake.Location = new System.Drawing.Point(199, 996); + buttonApply_Brake.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonApply_Brake.Name = "buttonApply_Brake"; + buttonApply_Brake.Size = new System.Drawing.Size(574, 57); + buttonApply_Brake.TabIndex = 37; + buttonApply_Brake.Text = "Apply"; + buttonApply_Brake.UseVisualStyleBackColor = true; + buttonApply_Brake.Click += buttonApply_Brake_Click; + // + // brakeDefaultsButton + // + brakeDefaultsButton.AutoSize = true; + brakeDefaultsButton.Location = new System.Drawing.Point(781, 996); + brakeDefaultsButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + brakeDefaultsButton.Name = "brakeDefaultsButton"; + brakeDefaultsButton.Size = new System.Drawing.Size(124, 57); + brakeDefaultsButton.TabIndex = 38; + brakeDefaultsButton.Text = "Defaults"; + brakeDefaultsButton.UseVisualStyleBackColor = true; + brakeDefaultsButton.Click += brakeDefaultsButton_Click; + // + // brakeTriggerMode + // + brakeTriggerMode.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + brakeTriggerMode.AutoSize = true; + brakeTriggerMode.Location = new System.Drawing.Point(25, 0); + brakeTriggerMode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + brakeTriggerMode.Name = "brakeTriggerMode"; + brakeTriggerMode.Size = new System.Drawing.Size(166, 43); + brakeTriggerMode.TabIndex = 39; + brakeTriggerMode.Text = "Brake Trigger Mode"; + brakeTriggerMode.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // brakeTriggerModeComboBox + // + brakeTriggerModeComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + brakeTriggerModeComboBox.FormattingEnabled = true; + brakeTriggerModeComboBox.Items.AddRange(new object[] { "Off", "Resistance", "Vibration" }); + brakeTriggerModeComboBox.Location = new System.Drawing.Point(199, 5); + brakeTriggerModeComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + brakeTriggerModeComboBox.Name = "brakeTriggerModeComboBox"; + brakeTriggerModeComboBox.Size = new System.Drawing.Size(574, 33); + brakeTriggerModeComboBox.TabIndex = 40; + brakeTriggerModeComboBox.SelectedIndexChanged += brakeTriggerModeComboBox_SelectedIndexChanged; + // + // throttleConfigTabPage + // + throttleConfigTabPage.Controls.Add(throttleTableLayoutPanel); + throttleConfigTabPage.Location = new System.Drawing.Point(4, 34); + throttleConfigTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleConfigTabPage.Name = "throttleConfigTabPage"; + throttleConfigTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleConfigTabPage.Size = new System.Drawing.Size(1600, 1190); + throttleConfigTabPage.TabIndex = 2; + throttleConfigTabPage.Text = "Throttle Trigger"; + throttleConfigTabPage.UseVisualStyleBackColor = true; + // + // throttleTableLayoutPanel + // + throttleTableLayoutPanel.AutoScroll = true; + throttleTableLayoutPanel.ColumnCount = 3; + throttleTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + throttleTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + throttleTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + throttleTableLayoutPanel.Controls.Add(throttleTriggerModeComboBox, 1, 0); + throttleTableLayoutPanel.Controls.Add(throttleTriggerMode, 0, 0); + throttleTableLayoutPanel.Controls.Add(throttleResistanceSmoothNumericUpDown, 2, 14); + throttleTableLayoutPanel.Controls.Add(throttleMaxResistanceNumericUpDown, 2, 13); + throttleTableLayoutPanel.Controls.Add(throttleMinResistanceNumericUpDown, 2, 12); + throttleTableLayoutPanel.Controls.Add(throttleMaxStiffnessNumericUpDown, 2, 11); + throttleTableLayoutPanel.Controls.Add(throttleMinStiffnessNumericUpDown, 2, 10); + throttleTableLayoutPanel.Controls.Add(throttleVibrationSmoothNumericUpDown, 2, 9); + throttleTableLayoutPanel.Controls.Add(throttleMaxVibrationNumericUpDown, 2, 8); + throttleTableLayoutPanel.Controls.Add(throttleMinVibrationNumericUpDown, 2, 7); + throttleTableLayoutPanel.Controls.Add(throttleVibrationStartNumericUpDown, 2, 6); + throttleTableLayoutPanel.Controls.Add(throttleAccelLimitNumericUpDown, 2, 5); + throttleTableLayoutPanel.Controls.Add(throttleForwardAccelScaleNumericUpDown, 2, 4); + throttleTableLayoutPanel.Controls.Add(throttleTurnAccelScaleNumericUpDown, 2, 3); + throttleTableLayoutPanel.Controls.Add(throttleGripLossNumericUpDown, 2, 2); + throttleTableLayoutPanel.Controls.Add(throttleIntensityNumericUpDown, 2, 1); + throttleTableLayoutPanel.Controls.Add(throttleResistanceSmoothTrackBar, 1, 14); + throttleTableLayoutPanel.Controls.Add(throttleMaxResistanceTrackBar, 1, 13); + throttleTableLayoutPanel.Controls.Add(throttleMinResistanceTrackBar, 1, 12); + throttleTableLayoutPanel.Controls.Add(throttleMaxStiffnessTrackBar, 1, 11); + throttleTableLayoutPanel.Controls.Add(throttleMinStiffnessTrackBar, 1, 10); + throttleTableLayoutPanel.Controls.Add(throttleVibrationSmoothTrackBar, 1, 9); + throttleTableLayoutPanel.Controls.Add(throttleMaxVibrationTrackBar, 1, 8); + throttleTableLayoutPanel.Controls.Add(throttleMinVibrationTrackBar, 1, 7); + throttleTableLayoutPanel.Controls.Add(throttleVibrationModeStartTrackBar, 1, 6); + throttleTableLayoutPanel.Controls.Add(throttleAccelLimitTrackBar, 1, 5); + throttleTableLayoutPanel.Controls.Add(throttleForwardAccelScaleTrackBar, 1, 4); + throttleTableLayoutPanel.Controls.Add(throttleTurnAccelScaleTrackBar, 1, 3); + throttleTableLayoutPanel.Controls.Add(throttleGripLossTrackBar, 1, 2); + throttleTableLayoutPanel.Controls.Add(throttleIntensityTrackBar, 1, 1); + throttleTableLayoutPanel.Controls.Add(throttleResistanceSmoothingLabel, 0, 14); + throttleTableLayoutPanel.Controls.Add(maxThrottleResistanceLabel, 0, 13); + throttleTableLayoutPanel.Controls.Add(minThrottleResistanceLabel, 0, 12); + throttleTableLayoutPanel.Controls.Add(maxThrottleStiffnessLabel, 0, 11); + throttleTableLayoutPanel.Controls.Add(minThrottleStiffnessLabel, 0, 10); + throttleTableLayoutPanel.Controls.Add(throttleVibrationSmoothingLabel, 0, 9); + throttleTableLayoutPanel.Controls.Add(maxThrottleVibrationLabel, 0, 8); + throttleTableLayoutPanel.Controls.Add(minThrottleVibrationLabel, 0, 7); + throttleTableLayoutPanel.Controls.Add(throttleVibrationStartLabel, 0, 6); + throttleTableLayoutPanel.Controls.Add(accelerationLimitLabel, 0, 5); + throttleTableLayoutPanel.Controls.Add(forwardAccelLabel, 0, 4); + throttleTableLayoutPanel.Controls.Add(turnAccelLabel, 0, 3); + throttleTableLayoutPanel.Controls.Add(throttleGripLossLabel, 0, 2); + throttleTableLayoutPanel.Controls.Add(throttleIntensityLabel, 0, 1); + throttleTableLayoutPanel.Controls.Add(buttonApply_Throttle, 1, 15); + throttleTableLayoutPanel.Controls.Add(throttleDefaultsButton, 2, 15); + throttleTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + throttleTableLayoutPanel.Location = new System.Drawing.Point(4, 5); + throttleTableLayoutPanel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleTableLayoutPanel.Name = "throttleTableLayoutPanel"; + throttleTableLayoutPanel.RowCount = 16; + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle()); + throttleTableLayoutPanel.Size = new System.Drawing.Size(1592, 1180); + throttleTableLayoutPanel.TabIndex = 0; + // + // throttleTriggerModeComboBox + // + throttleTriggerModeComboBox.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + throttleTriggerModeComboBox.FormattingEnabled = true; + throttleTriggerModeComboBox.Items.AddRange(new object[] { "Off", "Resistance", "Vibration" }); + throttleTriggerModeComboBox.Location = new System.Drawing.Point(209, 5); + throttleTriggerModeComboBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleTriggerModeComboBox.Name = "throttleTriggerModeComboBox"; + throttleTriggerModeComboBox.Size = new System.Drawing.Size(574, 33); + throttleTriggerModeComboBox.TabIndex = 46; + throttleTriggerModeComboBox.SelectedIndexChanged += throttleTriggerModeComboBox_SelectedIndexChanged; + // + // throttleTriggerMode + // + throttleTriggerMode.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right; + throttleTriggerMode.AutoSize = true; + throttleTriggerMode.Location = new System.Drawing.Point(17, 0); + throttleTriggerMode.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + throttleTriggerMode.Name = "throttleTriggerMode"; + throttleTriggerMode.Size = new System.Drawing.Size(184, 43); + throttleTriggerMode.TabIndex = 45; + throttleTriggerMode.Text = "Throttle Trigger Mode"; + throttleTriggerMode.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // throttleResistanceSmoothNumericUpDown + // + throttleResistanceSmoothNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + throttleResistanceSmoothNumericUpDown.AutoSize = true; + throttleResistanceSmoothNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + throttleResistanceSmoothNumericUpDown.Location = new System.Drawing.Point(791, 1094); + throttleResistanceSmoothNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleResistanceSmoothNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); + throttleResistanceSmoothNumericUpDown.Name = "throttleResistanceSmoothNumericUpDown"; + throttleResistanceSmoothNumericUpDown.Size = new System.Drawing.Size(66, 31); + throttleResistanceSmoothNumericUpDown.TabIndex = 42; + toolTip.SetToolTip(throttleResistanceSmoothNumericUpDown, "Smoothing for Throttle Resistance output. Lower = smoother. Must be greater than 0"); + throttleResistanceSmoothNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); + throttleResistanceSmoothNumericUpDown.ValueChanged += throttleResistanceSmoothNumericUpDown_ValueChanged; + // + // throttleMaxResistanceNumericUpDown + // + throttleMaxResistanceNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + throttleMaxResistanceNumericUpDown.AutoSize = true; + throttleMaxResistanceNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + throttleMaxResistanceNumericUpDown.Location = new System.Drawing.Point(791, 1015); + throttleMaxResistanceNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleMaxResistanceNumericUpDown.Maximum = new decimal(new int[] { 7, 0, 0, 0 }); + throttleMaxResistanceNumericUpDown.Name = "throttleMaxResistanceNumericUpDown"; + throttleMaxResistanceNumericUpDown.Size = new System.Drawing.Size(46, 31); + throttleMaxResistanceNumericUpDown.TabIndex = 41; + toolTip.SetToolTip(throttleMaxResistanceNumericUpDown, "The Maximum resistance on the throttle (0-7)"); + throttleMaxResistanceNumericUpDown.ValueChanged += throttleMaxResistanceNumericUpDown_ValueChanged; + // + // throttleMinResistanceNumericUpDown + // + throttleMinResistanceNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + throttleMinResistanceNumericUpDown.AutoSize = true; + throttleMinResistanceNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + throttleMinResistanceNumericUpDown.Location = new System.Drawing.Point(791, 936); + throttleMinResistanceNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleMinResistanceNumericUpDown.Maximum = new decimal(new int[] { 7, 0, 0, 0 }); + throttleMinResistanceNumericUpDown.Name = "throttleMinResistanceNumericUpDown"; + throttleMinResistanceNumericUpDown.Size = new System.Drawing.Size(46, 31); + throttleMinResistanceNumericUpDown.TabIndex = 40; + toolTip.SetToolTip(throttleMinResistanceNumericUpDown, "The Minimum resistance on the throttle (0-7)"); + throttleMinResistanceNumericUpDown.ValueChanged += throttleMinResistanceNumericUpDown_ValueChanged; + // + // throttleMaxStiffnessNumericUpDown + // + throttleMaxStiffnessNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + throttleMaxStiffnessNumericUpDown.AutoSize = true; + throttleMaxStiffnessNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + throttleMaxStiffnessNumericUpDown.Location = new System.Drawing.Point(791, 857); + throttleMaxStiffnessNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleMaxStiffnessNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + throttleMaxStiffnessNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); + throttleMaxStiffnessNumericUpDown.Name = "throttleMaxStiffnessNumericUpDown"; + throttleMaxStiffnessNumericUpDown.Size = new System.Drawing.Size(66, 31); + throttleMaxStiffnessNumericUpDown.TabIndex = 39; + toolTip.SetToolTip(throttleMaxStiffnessNumericUpDown, "On a scale of 1-255 with 1 being most stiff"); + throttleMaxStiffnessNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); + throttleMaxStiffnessNumericUpDown.ValueChanged += throttleMaxStiffnessNumericUpDown_ValueChanged; + // + // throttleMinStiffnessNumericUpDown + // + throttleMinStiffnessNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + throttleMinStiffnessNumericUpDown.AutoSize = true; + throttleMinStiffnessNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + throttleMinStiffnessNumericUpDown.Location = new System.Drawing.Point(791, 778); + throttleMinStiffnessNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleMinStiffnessNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + throttleMinStiffnessNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); + throttleMinStiffnessNumericUpDown.Name = "throttleMinStiffnessNumericUpDown"; + throttleMinStiffnessNumericUpDown.Size = new System.Drawing.Size(66, 31); + throttleMinStiffnessNumericUpDown.TabIndex = 38; + toolTip.SetToolTip(throttleMinStiffnessNumericUpDown, "On a scale of 1-255 with 1 being most stiff"); + throttleMinStiffnessNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); + throttleMinStiffnessNumericUpDown.ValueChanged += throttleMinStiffnessNumericUpDown_ValueChanged; + // + // throttleVibrationSmoothNumericUpDown + // + throttleVibrationSmoothNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + throttleVibrationSmoothNumericUpDown.AutoSize = true; + throttleVibrationSmoothNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + throttleVibrationSmoothNumericUpDown.Location = new System.Drawing.Point(791, 699); + throttleVibrationSmoothNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleVibrationSmoothNumericUpDown.Minimum = new decimal(new int[] { 1, 0, 0, 0 }); + throttleVibrationSmoothNumericUpDown.Name = "throttleVibrationSmoothNumericUpDown"; + throttleVibrationSmoothNumericUpDown.Size = new System.Drawing.Size(66, 31); + throttleVibrationSmoothNumericUpDown.TabIndex = 37; + toolTip.SetToolTip(throttleVibrationSmoothNumericUpDown, "Smoothing for Throttle Vibration output. Lower = smoother. Must be greater than 0"); + throttleVibrationSmoothNumericUpDown.Value = new decimal(new int[] { 1, 0, 0, 0 }); + throttleVibrationSmoothNumericUpDown.ValueChanged += throttleVibrationSmoothNumericUpDown_ValueChanged; + // + // throttleMaxVibrationNumericUpDown + // + throttleMaxVibrationNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + throttleMaxVibrationNumericUpDown.AutoSize = true; + throttleMaxVibrationNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + throttleMaxVibrationNumericUpDown.Location = new System.Drawing.Point(791, 620); + throttleMaxVibrationNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleMaxVibrationNumericUpDown.Name = "throttleMaxVibrationNumericUpDown"; + throttleMaxVibrationNumericUpDown.Size = new System.Drawing.Size(66, 31); + throttleMaxVibrationNumericUpDown.TabIndex = 36; + toolTip.SetToolTip(throttleMaxVibrationNumericUpDown, "The maximum acceleration frequency in Hz (avoid over 40). Correlates to better grip"); + throttleMaxVibrationNumericUpDown.ValueChanged += throttleMaxVibrationNumericUpDown_ValueChanged; + // + // throttleMinVibrationNumericUpDown + // + throttleMinVibrationNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + throttleMinVibrationNumericUpDown.AutoSize = true; + throttleMinVibrationNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + throttleMinVibrationNumericUpDown.Location = new System.Drawing.Point(791, 541); + throttleMinVibrationNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleMinVibrationNumericUpDown.Name = "throttleMinVibrationNumericUpDown"; + throttleMinVibrationNumericUpDown.Size = new System.Drawing.Size(66, 31); + throttleMinVibrationNumericUpDown.TabIndex = 35; + toolTip.SetToolTip(throttleMinVibrationNumericUpDown, "The minimum acceleration frequency in Hz (avoid over 40). Helps avoid clicking in controller"); + throttleMinVibrationNumericUpDown.ValueChanged += throttleMinVibrationNumericUpDown_ValueChanged; + // + // throttleVibrationStartNumericUpDown + // + throttleVibrationStartNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + throttleVibrationStartNumericUpDown.AutoSize = true; + throttleVibrationStartNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + throttleVibrationStartNumericUpDown.Location = new System.Drawing.Point(791, 462); + throttleVibrationStartNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleVibrationStartNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + throttleVibrationStartNumericUpDown.Name = "throttleVibrationStartNumericUpDown"; + throttleVibrationStartNumericUpDown.Size = new System.Drawing.Size(66, 31); + throttleVibrationStartNumericUpDown.TabIndex = 34; + toolTip.SetToolTip(throttleVibrationStartNumericUpDown, "The depression of the throttle lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied."); + throttleVibrationStartNumericUpDown.ValueChanged += throttleVibrationStartNumericUpDown_ValueChanged; + // + // throttleAccelLimitNumericUpDown + // + throttleAccelLimitNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + throttleAccelLimitNumericUpDown.AutoSize = true; + throttleAccelLimitNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + throttleAccelLimitNumericUpDown.Location = new System.Drawing.Point(791, 383); + throttleAccelLimitNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleAccelLimitNumericUpDown.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); + throttleAccelLimitNumericUpDown.Name = "throttleAccelLimitNumericUpDown"; + throttleAccelLimitNumericUpDown.Size = new System.Drawing.Size(66, 31); + throttleAccelLimitNumericUpDown.TabIndex = 33; + toolTip.SetToolTip(throttleAccelLimitNumericUpDown, "The upper end acceleration when calculating the throttle resistance. Any acceleration above this will be counted as this value when determining the throttle resistance."); + throttleAccelLimitNumericUpDown.ValueChanged += throttleAccelLimitNumericUpDown_ValueChanged; + // + // throttleForwardAccelScaleNumericUpDown + // + throttleForwardAccelScaleNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + throttleForwardAccelScaleNumericUpDown.AutoSize = true; + throttleForwardAccelScaleNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + throttleForwardAccelScaleNumericUpDown.Location = new System.Drawing.Point(791, 304); + throttleForwardAccelScaleNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleForwardAccelScaleNumericUpDown.Name = "throttleForwardAccelScaleNumericUpDown"; + throttleForwardAccelScaleNumericUpDown.Size = new System.Drawing.Size(66, 31); + throttleForwardAccelScaleNumericUpDown.TabIndex = 32; + toolTip.SetToolTip(throttleForwardAccelScaleNumericUpDown, "How to scale Forward acceleration in determining throttle stiffness."); + throttleForwardAccelScaleNumericUpDown.ValueChanged += throttleForwardAccelScaleNumericUpDown_ValueChanged; + // + // throttleTurnAccelScaleNumericUpDown + // + throttleTurnAccelScaleNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + throttleTurnAccelScaleNumericUpDown.AutoSize = true; + throttleTurnAccelScaleNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + throttleTurnAccelScaleNumericUpDown.Location = new System.Drawing.Point(791, 225); + throttleTurnAccelScaleNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleTurnAccelScaleNumericUpDown.Name = "throttleTurnAccelScaleNumericUpDown"; + throttleTurnAccelScaleNumericUpDown.Size = new System.Drawing.Size(66, 31); + throttleTurnAccelScaleNumericUpDown.TabIndex = 31; + toolTip.SetToolTip(throttleTurnAccelScaleNumericUpDown, "How to scale turning acceleration in determining throttle stiffness."); + throttleTurnAccelScaleNumericUpDown.ValueChanged += throttleTurnAccelScaleNumericUpDown_ValueChanged; + // + // throttleGripLossNumericUpDown + // + throttleGripLossNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + throttleGripLossNumericUpDown.AutoSize = true; + throttleGripLossNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + throttleGripLossNumericUpDown.Location = new System.Drawing.Point(791, 146); + throttleGripLossNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleGripLossNumericUpDown.Name = "throttleGripLossNumericUpDown"; + throttleGripLossNumericUpDown.Size = new System.Drawing.Size(66, 31); + throttleGripLossNumericUpDown.TabIndex = 30; + toolTip.SetToolTip(throttleGripLossNumericUpDown, "The point at which the throttle will begin to become choppy (0 = full grip, 100 = no grip)"); + throttleGripLossNumericUpDown.ValueChanged += throttleGripLossNumericUpDown_ValueChanged; + // + // throttleIntensityNumericUpDown + // + throttleIntensityNumericUpDown.Anchor = System.Windows.Forms.AnchorStyles.Left; + throttleIntensityNumericUpDown.AutoSize = true; + throttleIntensityNumericUpDown.Cursor = System.Windows.Forms.Cursors.IBeam; + throttleIntensityNumericUpDown.Location = new System.Drawing.Point(791, 67); + throttleIntensityNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleIntensityNumericUpDown.Name = "throttleIntensityNumericUpDown"; + throttleIntensityNumericUpDown.Size = new System.Drawing.Size(66, 31); + throttleIntensityNumericUpDown.TabIndex = 29; + toolTip.SetToolTip(throttleIntensityNumericUpDown, "The percentage of the trigger effects"); + throttleIntensityNumericUpDown.ValueChanged += throttleIntensityNumericUpDown_ValueChanged; + // + // throttleResistanceSmoothTrackBar + // + throttleResistanceSmoothTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + throttleResistanceSmoothTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + throttleResistanceSmoothTrackBar.LargeChange = 50; + throttleResistanceSmoothTrackBar.Location = new System.Drawing.Point(209, 1075); + throttleResistanceSmoothTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleResistanceSmoothTrackBar.Maximum = 100; + throttleResistanceSmoothTrackBar.Minimum = 1; + throttleResistanceSmoothTrackBar.Name = "throttleResistanceSmoothTrackBar"; + throttleResistanceSmoothTrackBar.Size = new System.Drawing.Size(574, 69); + throttleResistanceSmoothTrackBar.TabIndex = 28; + throttleResistanceSmoothTrackBar.TickFrequency = 10; + throttleResistanceSmoothTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(throttleResistanceSmoothTrackBar, "Smoothing for Throttle Resistance output. Lower = smoother. Must be greater than 0"); + throttleResistanceSmoothTrackBar.Value = 1; + throttleResistanceSmoothTrackBar.Scroll += throttleResistanceSmoothTrackBar_Scroll; + // + // throttleMaxResistanceTrackBar + // + throttleMaxResistanceTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + throttleMaxResistanceTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + throttleMaxResistanceTrackBar.LargeChange = 50; + throttleMaxResistanceTrackBar.Location = new System.Drawing.Point(209, 996); + throttleMaxResistanceTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleMaxResistanceTrackBar.Maximum = 7; + throttleMaxResistanceTrackBar.Name = "throttleMaxResistanceTrackBar"; + throttleMaxResistanceTrackBar.Size = new System.Drawing.Size(574, 69); + throttleMaxResistanceTrackBar.TabIndex = 27; + throttleMaxResistanceTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(throttleMaxResistanceTrackBar, "The Maximum resistance on the throttle (0-7)"); + throttleMaxResistanceTrackBar.Scroll += throttleMaxResistanceTrackBar_Scroll; + // + // throttleMinResistanceTrackBar + // + throttleMinResistanceTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + throttleMinResistanceTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + throttleMinResistanceTrackBar.LargeChange = 50; + throttleMinResistanceTrackBar.Location = new System.Drawing.Point(209, 917); + throttleMinResistanceTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleMinResistanceTrackBar.Maximum = 7; + throttleMinResistanceTrackBar.Name = "throttleMinResistanceTrackBar"; + throttleMinResistanceTrackBar.Size = new System.Drawing.Size(574, 69); + throttleMinResistanceTrackBar.TabIndex = 26; + throttleMinResistanceTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(throttleMinResistanceTrackBar, "The Minimum resistance on the throttle (0-7)"); + throttleMinResistanceTrackBar.Scroll += throttleMinResistanceTrackBar_Scroll; + // + // throttleMaxStiffnessTrackBar + // + throttleMaxStiffnessTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + throttleMaxStiffnessTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + throttleMaxStiffnessTrackBar.LargeChange = 50; + throttleMaxStiffnessTrackBar.Location = new System.Drawing.Point(209, 838); + throttleMaxStiffnessTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleMaxStiffnessTrackBar.Maximum = 255; + throttleMaxStiffnessTrackBar.Minimum = 1; + throttleMaxStiffnessTrackBar.Name = "throttleMaxStiffnessTrackBar"; + throttleMaxStiffnessTrackBar.Size = new System.Drawing.Size(574, 69); + throttleMaxStiffnessTrackBar.TabIndex = 25; + throttleMaxStiffnessTrackBar.TickFrequency = 5; + throttleMaxStiffnessTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(throttleMaxStiffnessTrackBar, "On a scale of 1-255 with 1 being most stiff"); + throttleMaxStiffnessTrackBar.Value = 1; + throttleMaxStiffnessTrackBar.Scroll += throttleMaxStiffnessTrackBar_Scroll; + // + // throttleMinStiffnessTrackBar + // + throttleMinStiffnessTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + throttleMinStiffnessTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + throttleMinStiffnessTrackBar.LargeChange = 50; + throttleMinStiffnessTrackBar.Location = new System.Drawing.Point(209, 759); + throttleMinStiffnessTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleMinStiffnessTrackBar.Maximum = 255; + throttleMinStiffnessTrackBar.Minimum = 1; + throttleMinStiffnessTrackBar.Name = "throttleMinStiffnessTrackBar"; + throttleMinStiffnessTrackBar.Size = new System.Drawing.Size(574, 69); + throttleMinStiffnessTrackBar.TabIndex = 24; + throttleMinStiffnessTrackBar.TickFrequency = 5; + throttleMinStiffnessTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(throttleMinStiffnessTrackBar, "On a scale of 1-255 with 1 being most stiff"); + throttleMinStiffnessTrackBar.Value = 1; + throttleMinStiffnessTrackBar.Scroll += throttleMinStiffnessTrackBar_Scroll; + // + // throttleVibrationSmoothTrackBar + // + throttleVibrationSmoothTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + throttleVibrationSmoothTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + throttleVibrationSmoothTrackBar.LargeChange = 50; + throttleVibrationSmoothTrackBar.Location = new System.Drawing.Point(209, 680); + throttleVibrationSmoothTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleVibrationSmoothTrackBar.Maximum = 100; + throttleVibrationSmoothTrackBar.Minimum = 1; + throttleVibrationSmoothTrackBar.Name = "throttleVibrationSmoothTrackBar"; + throttleVibrationSmoothTrackBar.Size = new System.Drawing.Size(574, 69); + throttleVibrationSmoothTrackBar.TabIndex = 23; + throttleVibrationSmoothTrackBar.TickFrequency = 10; + throttleVibrationSmoothTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(throttleVibrationSmoothTrackBar, "Smoothing for Throttle Vibration output. Lower = smoother. Must be greater than 0"); + throttleVibrationSmoothTrackBar.Value = 1; + throttleVibrationSmoothTrackBar.Scroll += throttleVibrationSmoothTrackBar_Scroll; + // + // throttleMaxVibrationTrackBar + // + throttleMaxVibrationTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + throttleMaxVibrationTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + throttleMaxVibrationTrackBar.LargeChange = 50; + throttleMaxVibrationTrackBar.Location = new System.Drawing.Point(209, 601); + throttleMaxVibrationTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleMaxVibrationTrackBar.Maximum = 100; + throttleMaxVibrationTrackBar.Name = "throttleMaxVibrationTrackBar"; + throttleMaxVibrationTrackBar.Size = new System.Drawing.Size(574, 69); + throttleMaxVibrationTrackBar.TabIndex = 22; + throttleMaxVibrationTrackBar.TickFrequency = 5; + throttleMaxVibrationTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(throttleMaxVibrationTrackBar, "The maximum acceleration frequency in Hz (avoid over 40). Correlates to better grip"); + throttleMaxVibrationTrackBar.Scroll += throttleMaxVibrationTrackBar_Scroll; + // + // throttleMinVibrationTrackBar + // + throttleMinVibrationTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + throttleMinVibrationTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + throttleMinVibrationTrackBar.LargeChange = 50; + throttleMinVibrationTrackBar.Location = new System.Drawing.Point(209, 522); + throttleMinVibrationTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleMinVibrationTrackBar.Maximum = 100; + throttleMinVibrationTrackBar.Name = "throttleMinVibrationTrackBar"; + throttleMinVibrationTrackBar.Size = new System.Drawing.Size(574, 69); + throttleMinVibrationTrackBar.TabIndex = 21; + throttleMinVibrationTrackBar.TickFrequency = 5; + throttleMinVibrationTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(throttleMinVibrationTrackBar, "The minimum acceleration frequency in Hz (avoid over 40). Helps avoid clicking in controller"); + throttleMinVibrationTrackBar.Scroll += throttleMinVibrationTrackBar_Scroll; + // + // throttleVibrationModeStartTrackBar + // + throttleVibrationModeStartTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + throttleVibrationModeStartTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + throttleVibrationModeStartTrackBar.LargeChange = 50; + throttleVibrationModeStartTrackBar.Location = new System.Drawing.Point(209, 443); + throttleVibrationModeStartTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleVibrationModeStartTrackBar.Maximum = 255; + throttleVibrationModeStartTrackBar.Name = "throttleVibrationModeStartTrackBar"; + throttleVibrationModeStartTrackBar.Size = new System.Drawing.Size(574, 69); + throttleVibrationModeStartTrackBar.TabIndex = 20; + throttleVibrationModeStartTrackBar.TickFrequency = 5; + throttleVibrationModeStartTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(throttleVibrationModeStartTrackBar, "The depression of the throttle lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied."); + throttleVibrationModeStartTrackBar.Scroll += throttleVibrationModeStartTrackBar_Scroll; + // + // throttleAccelLimitTrackBar + // + throttleAccelLimitTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + throttleAccelLimitTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + throttleAccelLimitTrackBar.LargeChange = 50; + throttleAccelLimitTrackBar.Location = new System.Drawing.Point(209, 364); + throttleAccelLimitTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleAccelLimitTrackBar.Maximum = 255; + throttleAccelLimitTrackBar.Name = "throttleAccelLimitTrackBar"; + throttleAccelLimitTrackBar.Size = new System.Drawing.Size(574, 69); + throttleAccelLimitTrackBar.TabIndex = 19; + throttleAccelLimitTrackBar.TickFrequency = 5; + throttleAccelLimitTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(throttleAccelLimitTrackBar, "The upper end acceleration when calculating the throttle resistance. Any acceleration above this will be counted as this value when determining the throttle resistance."); + throttleAccelLimitTrackBar.Scroll += throttleAccelLimitTrackBar_Scroll; + // + // throttleForwardAccelScaleTrackBar + // + throttleForwardAccelScaleTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + throttleForwardAccelScaleTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + throttleForwardAccelScaleTrackBar.Location = new System.Drawing.Point(209, 285); + throttleForwardAccelScaleTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleForwardAccelScaleTrackBar.Maximum = 100; + throttleForwardAccelScaleTrackBar.Name = "throttleForwardAccelScaleTrackBar"; + throttleForwardAccelScaleTrackBar.Size = new System.Drawing.Size(574, 69); + throttleForwardAccelScaleTrackBar.TabIndex = 18; + throttleForwardAccelScaleTrackBar.TickFrequency = 5; + throttleForwardAccelScaleTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(throttleForwardAccelScaleTrackBar, "How to scale Forward acceleration in determining throttle stiffness."); + throttleForwardAccelScaleTrackBar.Value = 50; + throttleForwardAccelScaleTrackBar.Scroll += throttleForwardAccelScaleTrackBar_Scroll; + // + // throttleTurnAccelScaleTrackBar + // + throttleTurnAccelScaleTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + throttleTurnAccelScaleTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + throttleTurnAccelScaleTrackBar.Location = new System.Drawing.Point(209, 206); + throttleTurnAccelScaleTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleTurnAccelScaleTrackBar.Maximum = 100; + throttleTurnAccelScaleTrackBar.Name = "throttleTurnAccelScaleTrackBar"; + throttleTurnAccelScaleTrackBar.Size = new System.Drawing.Size(574, 69); + throttleTurnAccelScaleTrackBar.TabIndex = 17; + throttleTurnAccelScaleTrackBar.TickFrequency = 5; + throttleTurnAccelScaleTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(throttleTurnAccelScaleTrackBar, "How to scale turning acceleration in determining throttle stiffness."); + throttleTurnAccelScaleTrackBar.Value = 50; + throttleTurnAccelScaleTrackBar.Scroll += throttleTurnAccelScaleTrackBar_Scroll; + // + // throttleGripLossTrackBar + // + throttleGripLossTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + throttleGripLossTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + throttleGripLossTrackBar.LargeChange = 50; + throttleGripLossTrackBar.Location = new System.Drawing.Point(209, 127); + throttleGripLossTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleGripLossTrackBar.Maximum = 100; + throttleGripLossTrackBar.Name = "throttleGripLossTrackBar"; + throttleGripLossTrackBar.Size = new System.Drawing.Size(574, 69); + throttleGripLossTrackBar.TabIndex = 16; + throttleGripLossTrackBar.TickFrequency = 5; + throttleGripLossTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(throttleGripLossTrackBar, "The point at which the throttle will begin to become choppy (0 = full grip, 100 = no grip)"); + throttleGripLossTrackBar.Scroll += throttleGripLossTrackBar_Scroll; + // + // throttleIntensityTrackBar + // + throttleIntensityTrackBar.BackColor = System.Drawing.SystemColors.ControlLightLight; + throttleIntensityTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + throttleIntensityTrackBar.LargeChange = 10; + throttleIntensityTrackBar.Location = new System.Drawing.Point(209, 48); + throttleIntensityTrackBar.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleIntensityTrackBar.Maximum = 100; + throttleIntensityTrackBar.Name = "throttleIntensityTrackBar"; + throttleIntensityTrackBar.Size = new System.Drawing.Size(574, 69); + throttleIntensityTrackBar.TabIndex = 2; + throttleIntensityTrackBar.TickFrequency = 5; + throttleIntensityTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + toolTip.SetToolTip(throttleIntensityTrackBar, "The percentage of the trigger effects"); + throttleIntensityTrackBar.Value = 100; + throttleIntensityTrackBar.Scroll += throttleIntensityTrackBar_Scroll; + // + // throttleResistanceSmoothingLabel + // + throttleResistanceSmoothingLabel.AutoSize = true; + throttleResistanceSmoothingLabel.Dock = System.Windows.Forms.DockStyle.Fill; + throttleResistanceSmoothingLabel.Location = new System.Drawing.Point(4, 1070); + throttleResistanceSmoothingLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + throttleResistanceSmoothingLabel.Name = "throttleResistanceSmoothingLabel"; + throttleResistanceSmoothingLabel.Size = new System.Drawing.Size(197, 79); + throttleResistanceSmoothingLabel.TabIndex = 15; + throttleResistanceSmoothingLabel.Text = "Resistance Smoothing"; + throttleResistanceSmoothingLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(throttleResistanceSmoothingLabel, "Smoothing for Throttle Resistance output. Lower = smoother. Must be greater than 0"); + // + // maxThrottleResistanceLabel + // + maxThrottleResistanceLabel.AutoSize = true; + maxThrottleResistanceLabel.Dock = System.Windows.Forms.DockStyle.Fill; + maxThrottleResistanceLabel.Location = new System.Drawing.Point(4, 991); + maxThrottleResistanceLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + maxThrottleResistanceLabel.Name = "maxThrottleResistanceLabel"; + maxThrottleResistanceLabel.Size = new System.Drawing.Size(197, 79); + maxThrottleResistanceLabel.TabIndex = 14; + maxThrottleResistanceLabel.Text = "Max Throttle Resistance"; + maxThrottleResistanceLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(maxThrottleResistanceLabel, "The Maximum resistance on the throttle (0-7)"); + // + // minThrottleResistanceLabel + // + minThrottleResistanceLabel.AutoSize = true; + minThrottleResistanceLabel.Dock = System.Windows.Forms.DockStyle.Fill; + minThrottleResistanceLabel.Location = new System.Drawing.Point(4, 912); + minThrottleResistanceLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + minThrottleResistanceLabel.Name = "minThrottleResistanceLabel"; + minThrottleResistanceLabel.Size = new System.Drawing.Size(197, 79); + minThrottleResistanceLabel.TabIndex = 13; + minThrottleResistanceLabel.Text = "Min Throttle Resistance"; + minThrottleResistanceLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(minThrottleResistanceLabel, "The Minimum resistance on the throttle (0-7)"); + // + // maxThrottleStiffnessLabel + // + maxThrottleStiffnessLabel.AutoSize = true; + maxThrottleStiffnessLabel.Dock = System.Windows.Forms.DockStyle.Fill; + maxThrottleStiffnessLabel.Location = new System.Drawing.Point(4, 833); + maxThrottleStiffnessLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + maxThrottleStiffnessLabel.Name = "maxThrottleStiffnessLabel"; + maxThrottleStiffnessLabel.Size = new System.Drawing.Size(197, 79); + maxThrottleStiffnessLabel.TabIndex = 12; + maxThrottleStiffnessLabel.Text = "Max Throttle Stiffness"; + maxThrottleStiffnessLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(maxThrottleStiffnessLabel, "On a scale of 1-255 with 1 being most stiff"); + // + // minThrottleStiffnessLabel + // + minThrottleStiffnessLabel.AutoSize = true; + minThrottleStiffnessLabel.Dock = System.Windows.Forms.DockStyle.Fill; + minThrottleStiffnessLabel.Location = new System.Drawing.Point(4, 754); + minThrottleStiffnessLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + minThrottleStiffnessLabel.Name = "minThrottleStiffnessLabel"; + minThrottleStiffnessLabel.Size = new System.Drawing.Size(197, 79); + minThrottleStiffnessLabel.TabIndex = 11; + minThrottleStiffnessLabel.Text = "Min Throttle Stiffness"; + minThrottleStiffnessLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(minThrottleStiffnessLabel, "On a scale of 1-255 with 1 being most stiff"); + // + // throttleVibrationSmoothingLabel + // + throttleVibrationSmoothingLabel.AutoSize = true; + throttleVibrationSmoothingLabel.Dock = System.Windows.Forms.DockStyle.Fill; + throttleVibrationSmoothingLabel.Location = new System.Drawing.Point(4, 675); + throttleVibrationSmoothingLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + throttleVibrationSmoothingLabel.Name = "throttleVibrationSmoothingLabel"; + throttleVibrationSmoothingLabel.Size = new System.Drawing.Size(197, 79); + throttleVibrationSmoothingLabel.TabIndex = 10; + throttleVibrationSmoothingLabel.Text = "Vibration Smoothing"; + throttleVibrationSmoothingLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(throttleVibrationSmoothingLabel, "Smoothing for Throttle Vibration output. Lower = smoother. Must be greater than 0"); + // + // maxThrottleVibrationLabel + // + maxThrottleVibrationLabel.AutoSize = true; + maxThrottleVibrationLabel.Dock = System.Windows.Forms.DockStyle.Fill; + maxThrottleVibrationLabel.Location = new System.Drawing.Point(4, 596); + maxThrottleVibrationLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + maxThrottleVibrationLabel.Name = "maxThrottleVibrationLabel"; + maxThrottleVibrationLabel.Size = new System.Drawing.Size(197, 79); + maxThrottleVibrationLabel.TabIndex = 9; + maxThrottleVibrationLabel.Text = "Max Throttle Vibration"; + maxThrottleVibrationLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(maxThrottleVibrationLabel, "The maximum acceleration frequency in Hz (avoid over 40). Correlates to better grip"); + // + // minThrottleVibrationLabel + // + minThrottleVibrationLabel.AutoSize = true; + minThrottleVibrationLabel.Dock = System.Windows.Forms.DockStyle.Fill; + minThrottleVibrationLabel.Location = new System.Drawing.Point(4, 517); + minThrottleVibrationLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + minThrottleVibrationLabel.Name = "minThrottleVibrationLabel"; + minThrottleVibrationLabel.Size = new System.Drawing.Size(197, 79); + minThrottleVibrationLabel.TabIndex = 8; + minThrottleVibrationLabel.Text = "Min Throttle Vibration"; + minThrottleVibrationLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(minThrottleVibrationLabel, "The minimum acceleration frequency in Hz (avoid over 40). Helps avoid clicking in controller"); + // + // throttleVibrationStartLabel + // + throttleVibrationStartLabel.AutoSize = true; + throttleVibrationStartLabel.Dock = System.Windows.Forms.DockStyle.Fill; + throttleVibrationStartLabel.Location = new System.Drawing.Point(4, 438); + throttleVibrationStartLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + throttleVibrationStartLabel.Name = "throttleVibrationStartLabel"; + throttleVibrationStartLabel.Size = new System.Drawing.Size(197, 79); + throttleVibrationStartLabel.TabIndex = 7; + throttleVibrationStartLabel.Text = "Vibration Mode Start"; + throttleVibrationStartLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(throttleVibrationStartLabel, "The depression of the throttle lever at which the program should switch to vibration mode rather than smooth resistance. This helps to avoid clicking as vibration mode clicks when no force is applied."); + // + // accelerationLimitLabel + // + accelerationLimitLabel.AutoSize = true; + accelerationLimitLabel.Dock = System.Windows.Forms.DockStyle.Fill; + accelerationLimitLabel.Location = new System.Drawing.Point(4, 359); + accelerationLimitLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + accelerationLimitLabel.Name = "accelerationLimitLabel"; + accelerationLimitLabel.Size = new System.Drawing.Size(197, 79); + accelerationLimitLabel.TabIndex = 5; + accelerationLimitLabel.Text = "Accel Limit"; + accelerationLimitLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(accelerationLimitLabel, "The upper end acceleration when calculating the throttle resistance. Any acceleration above this will be counted as this value when determining the throttle resistance."); + // + // forwardAccelLabel + // + forwardAccelLabel.AutoSize = true; + forwardAccelLabel.Dock = System.Windows.Forms.DockStyle.Fill; + forwardAccelLabel.Location = new System.Drawing.Point(4, 280); + forwardAccelLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + forwardAccelLabel.Name = "forwardAccelLabel"; + forwardAccelLabel.Size = new System.Drawing.Size(197, 79); + forwardAccelLabel.TabIndex = 6; + forwardAccelLabel.Text = "Forward Accel Scale"; + forwardAccelLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(forwardAccelLabel, "How to scale Forward acceleration in determining throttle stiffness."); + // + // turnAccelLabel + // + turnAccelLabel.AutoSize = true; + turnAccelLabel.Dock = System.Windows.Forms.DockStyle.Fill; + turnAccelLabel.Location = new System.Drawing.Point(4, 201); + turnAccelLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + turnAccelLabel.Name = "turnAccelLabel"; + turnAccelLabel.Size = new System.Drawing.Size(197, 79); + turnAccelLabel.TabIndex = 4; + turnAccelLabel.Text = "Turn Accel Scale"; + turnAccelLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(turnAccelLabel, "How to scale turning acceleration in determining throttle stiffness."); + // + // throttleGripLossLabel + // + throttleGripLossLabel.AutoSize = true; + throttleGripLossLabel.Dock = System.Windows.Forms.DockStyle.Fill; + throttleGripLossLabel.Location = new System.Drawing.Point(4, 122); + throttleGripLossLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + throttleGripLossLabel.Name = "throttleGripLossLabel"; + throttleGripLossLabel.Size = new System.Drawing.Size(197, 79); + throttleGripLossLabel.TabIndex = 3; + throttleGripLossLabel.Text = "Grip Loss Value"; + throttleGripLossLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(throttleGripLossLabel, "The point at which the throttle will begin to become choppy (0 = full grip, 100 = no grip)"); + // + // throttleIntensityLabel + // + throttleIntensityLabel.AutoSize = true; + throttleIntensityLabel.Dock = System.Windows.Forms.DockStyle.Fill; + throttleIntensityLabel.Location = new System.Drawing.Point(4, 43); + throttleIntensityLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + throttleIntensityLabel.Name = "throttleIntensityLabel"; + throttleIntensityLabel.Size = new System.Drawing.Size(197, 79); + throttleIntensityLabel.TabIndex = 1; + throttleIntensityLabel.Text = "Effect Intensity"; + throttleIntensityLabel.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + toolTip.SetToolTip(throttleIntensityLabel, "The percentage of the trigger effects"); + // + // buttonApply_Throttle + // + buttonApply_Throttle.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right; + buttonApply_Throttle.Location = new System.Drawing.Point(209, 1154); + buttonApply_Throttle.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + buttonApply_Throttle.Name = "buttonApply_Throttle"; + buttonApply_Throttle.Size = new System.Drawing.Size(574, 38); + buttonApply_Throttle.TabIndex = 43; + buttonApply_Throttle.Text = "Apply"; + buttonApply_Throttle.UseVisualStyleBackColor = true; + buttonApply_Throttle.Click += buttonApply_Throttle_Click; + // + // throttleDefaultsButton + // + throttleDefaultsButton.Location = new System.Drawing.Point(791, 1154); + throttleDefaultsButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + throttleDefaultsButton.Name = "throttleDefaultsButton"; + throttleDefaultsButton.Size = new System.Drawing.Size(107, 38); + throttleDefaultsButton.TabIndex = 44; + throttleDefaultsButton.Text = "Defaults"; + throttleDefaultsButton.UseVisualStyleBackColor = true; + throttleDefaultsButton.Click += throttleDefaultsButton_Click; + // + // outputTabPage + // + outputTabPage.Controls.Add(raceGroupBox); + outputTabPage.Controls.Add(noRaceGroupBox); + outputTabPage.Controls.Add(outputListBox); + outputTabPage.Location = new System.Drawing.Point(4, 34); + outputTabPage.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + outputTabPage.Name = "outputTabPage"; + outputTabPage.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + outputTabPage.Size = new System.Drawing.Size(1600, 1190); + outputTabPage.TabIndex = 1; + outputTabPage.Text = "Output"; + outputTabPage.UseVisualStyleBackColor = true; + // + // raceGroupBox + // + raceGroupBox.Controls.Add(tableLayoutPanel1); + raceGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom; + raceGroupBox.Location = new System.Drawing.Point(4, 564); + raceGroupBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + raceGroupBox.Name = "raceGroupBox"; + raceGroupBox.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + raceGroupBox.Size = new System.Drawing.Size(1592, 454); + raceGroupBox.TabIndex = 3; + raceGroupBox.TabStop = false; + raceGroupBox.Text = "Racing"; + // + // tableLayoutPanel1 + // + tableLayoutPanel1.ColumnCount = 1; + tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 29F)); + tableLayoutPanel1.Controls.Add(brakeMsg, 0, 3); + tableLayoutPanel1.Controls.Add(brakeVibrationMsg, 0, 2); + tableLayoutPanel1.Controls.Add(throttleMsg, 0, 1); + tableLayoutPanel1.Controls.Add(throttleVibrationMsg, 0, 0); + tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + tableLayoutPanel1.Location = new System.Drawing.Point(4, 29); + tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + tableLayoutPanel1.Name = "tableLayoutPanel1"; + tableLayoutPanel1.RowCount = 4; + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); + tableLayoutPanel1.Size = new System.Drawing.Size(1584, 420); + tableLayoutPanel1.TabIndex = 0; + // + // brakeMsg + // + brakeMsg.AutoSize = true; + brakeMsg.Location = new System.Drawing.Point(4, 75); + brakeMsg.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + brakeMsg.Name = "brakeMsg"; + brakeMsg.Size = new System.Drawing.Size(59, 25); + brakeMsg.TabIndex = 3; + brakeMsg.Text = "label1"; + // + // brakeVibrationMsg + // + brakeVibrationMsg.AutoSize = true; + brakeVibrationMsg.Location = new System.Drawing.Point(4, 50); + brakeVibrationMsg.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + brakeVibrationMsg.Name = "brakeVibrationMsg"; + brakeVibrationMsg.Size = new System.Drawing.Size(59, 25); + brakeVibrationMsg.TabIndex = 2; + brakeVibrationMsg.Text = "label1"; + // + // throttleMsg + // + throttleMsg.AutoSize = true; + throttleMsg.Location = new System.Drawing.Point(4, 25); + throttleMsg.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + throttleMsg.Name = "throttleMsg"; + throttleMsg.Size = new System.Drawing.Size(59, 25); + throttleMsg.TabIndex = 1; + throttleMsg.Text = "label1"; + // + // throttleVibrationMsg + // + throttleVibrationMsg.AutoSize = true; + throttleVibrationMsg.Location = new System.Drawing.Point(4, 0); + throttleVibrationMsg.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + throttleVibrationMsg.Name = "throttleVibrationMsg"; + throttleVibrationMsg.Size = new System.Drawing.Size(59, 25); + throttleVibrationMsg.TabIndex = 0; + throttleVibrationMsg.Text = "label1"; + // + // noRaceGroupBox + // + noRaceGroupBox.Controls.Add(noRaceText); + noRaceGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom; + noRaceGroupBox.Location = new System.Drawing.Point(4, 1018); + noRaceGroupBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + noRaceGroupBox.Name = "noRaceGroupBox"; + noRaceGroupBox.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + noRaceGroupBox.Size = new System.Drawing.Size(1592, 167); + noRaceGroupBox.TabIndex = 2; + noRaceGroupBox.TabStop = false; + noRaceGroupBox.Text = "Menus"; + // + // noRaceText + // + noRaceText.AutoSize = true; + noRaceText.Dock = System.Windows.Forms.DockStyle.Fill; + noRaceText.Location = new System.Drawing.Point(4, 29); + noRaceText.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + noRaceText.Name = "noRaceText"; + noRaceText.Size = new System.Drawing.Size(59, 25); + noRaceText.TabIndex = 1; + noRaceText.Text = "label1"; + // + // outputListBox + // + outputListBox.Dock = System.Windows.Forms.DockStyle.Top; + outputListBox.FormattingEnabled = true; + outputListBox.ItemHeight = 25; + outputListBox.Location = new System.Drawing.Point(4, 5); + outputListBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + outputListBox.Name = "outputListBox"; + outputListBox.Size = new System.Drawing.Size(1592, 1054); + outputListBox.TabIndex = 0; + // + // toolStripStatusDSX + // + toolStripStatusDSX.Image = Properties.Resources.redBtn; + toolStripStatusDSX.Name = "toolStripStatusDSX"; + toolStripStatusDSX.Size = new System.Drawing.Size(169, 25); + toolStripStatusDSX.Text = "DSX Connection:"; + toolStripStatusDSX.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + // + // toolStripStatusForza + // + toolStripStatusForza.Image = Properties.Resources.redBtn; + toolStripStatusForza.Name = "toolStripStatusForza"; + toolStripStatusForza.Size = new System.Drawing.Size(181, 25); + toolStripStatusForza.Text = "Game Connection:"; + toolStripStatusForza.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + // + // toolStripVerboseMode + // + toolStripVerboseMode.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + toolStripVerboseMode.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { verboseModeOffToolStripMenuItem, verboseModeLowToolStripMenuItem, verboseModeFullToolStripMenuItem }); + toolStripVerboseMode.ImageTransparentColor = System.Drawing.Color.Magenta; + toolStripVerboseMode.Name = "toolStripVerboseMode"; + toolStripVerboseMode.Size = new System.Drawing.Size(146, 29); + toolStripVerboseMode.Text = "Verbose Mode"; + // + // verboseModeOffToolStripMenuItem + // + verboseModeOffToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + verboseModeOffToolStripMenuItem.Name = "verboseModeOffToolStripMenuItem"; + verboseModeOffToolStripMenuItem.Size = new System.Drawing.Size(215, 34); + verboseModeOffToolStripMenuItem.Text = "Off"; + verboseModeOffToolStripMenuItem.Click += verboseModeOffToolStripMenuItem_Click; + // + // verboseModeLowToolStripMenuItem + // + verboseModeLowToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + verboseModeLowToolStripMenuItem.Name = "verboseModeLowToolStripMenuItem"; + verboseModeLowToolStripMenuItem.Size = new System.Drawing.Size(215, 34); + verboseModeLowToolStripMenuItem.Text = "Low Verbose"; + verboseModeLowToolStripMenuItem.Click += verboseModeLowToolStripMenuItem_Click; + // + // verboseModeFullToolStripMenuItem + // + verboseModeFullToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + verboseModeFullToolStripMenuItem.Name = "verboseModeFullToolStripMenuItem"; + verboseModeFullToolStripMenuItem.Size = new System.Drawing.Size(215, 34); + verboseModeFullToolStripMenuItem.Text = "Full Verbose"; + verboseModeFullToolStripMenuItem.Click += verboseModeFullToolStripMenuItem_Click; + // + // statusStrip1 + // + statusStrip1.ImageScalingSize = new System.Drawing.Size(24, 24); + statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { toolStripStatusDSX, toolStripStatusForza, toolStripVerboseMode, toolStripDSXPortButton, toolStripAppCheckButton }); + statusStrip1.Location = new System.Drawing.Point(0, 1228); + statusStrip1.Name = "statusStrip1"; + statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 20, 0); + statusStrip1.Size = new System.Drawing.Size(1848, 32); + statusStrip1.TabIndex = 0; + statusStrip1.Text = "statusStrip1"; + // + // toolStripDSXPortButton + // + toolStripDSXPortButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + toolStripDSXPortButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { toolStripDSXPortTextBox }); + toolStripDSXPortButton.Image = (System.Drawing.Image)resources.GetObject("toolStripDSXPortButton.Image"); + toolStripDSXPortButton.ImageTransparentColor = System.Drawing.Color.Magenta; + toolStripDSXPortButton.Name = "toolStripDSXPortButton"; + toolStripDSXPortButton.Size = new System.Drawing.Size(101, 29); + toolStripDSXPortButton.Text = "DSX Port"; + toolStripDSXPortButton.Click += toolStripDSXPortButton_Click; + // + // toolStripDSXPortTextBox + // + toolStripDSXPortTextBox.MaxLength = 5; + toolStripDSXPortTextBox.Name = "toolStripDSXPortTextBox"; + toolStripDSXPortTextBox.Size = new System.Drawing.Size(100, 31); + toolStripDSXPortTextBox.Text = "0"; + toolStripDSXPortTextBox.KeyDown += toolStripDSXPortTextBox_KeyDown; + // + // toolStripAppCheckButton + // + toolStripAppCheckButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + toolStripAppCheckButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { toolStripAppCheckOffItem, toolStripAppCheckOnItem }); + toolStripAppCheckButton.Image = (System.Drawing.Image)resources.GetObject("toolStripAppCheckButton.Image"); + toolStripAppCheckButton.ImageTransparentColor = System.Drawing.Color.Magenta; + toolStripAppCheckButton.Name = "toolStripAppCheckButton"; + toolStripAppCheckButton.Size = new System.Drawing.Size(184, 29); + toolStripAppCheckButton.Text = "App Check Enabled"; + // + // toolStripAppCheckOffItem + // + toolStripAppCheckOffItem.Name = "toolStripAppCheckOffItem"; + toolStripAppCheckOffItem.Size = new System.Drawing.Size(140, 34); + toolStripAppCheckOffItem.Text = "Off"; + toolStripAppCheckOffItem.Click += toolStripAppCheckOffItem_Click; + // + // toolStripAppCheckOnItem + // + toolStripAppCheckOnItem.Name = "toolStripAppCheckOnItem"; + toolStripAppCheckOnItem.Size = new System.Drawing.Size(140, 34); + toolStripAppCheckOnItem.Text = "On"; + toolStripAppCheckOnItem.Click += toolStripAppCheckOnItem_Click; + // + // ProfilesContextMenu + // + ProfilesContextMenu.ImageScalingSize = new System.Drawing.Size(24, 24); + ProfilesContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { newToolStripMenuItem, renameToolStripMenuItem, disableToolStripMenuItem, deleteToolStripMenuItem, copyToolStripMenuItem, defaultToolStripMenuItem, setActiveToolStripMenuItem }); + ProfilesContextMenu.Name = "ProfilesContextMenu"; + ProfilesContextMenu.Size = new System.Drawing.Size(163, 228); + // + // newToolStripMenuItem + // + newToolStripMenuItem.Name = "newToolStripMenuItem"; + newToolStripMenuItem.Size = new System.Drawing.Size(162, 32); + newToolStripMenuItem.Text = "New"; + newToolStripMenuItem.Click += newToolStripMenuItem_Click; + // + // renameToolStripMenuItem + // + renameToolStripMenuItem.Name = "renameToolStripMenuItem"; + renameToolStripMenuItem.Size = new System.Drawing.Size(162, 32); + renameToolStripMenuItem.Text = "Rename"; + renameToolStripMenuItem.Click += renameToolStripMenuItem_Click; + // + // disableToolStripMenuItem + // + disableToolStripMenuItem.Name = "disableToolStripMenuItem"; + disableToolStripMenuItem.Size = new System.Drawing.Size(162, 32); + disableToolStripMenuItem.Text = "Disable"; + disableToolStripMenuItem.Click += disableToolStripMenuItem_Click; + // + // deleteToolStripMenuItem + // + deleteToolStripMenuItem.Name = "deleteToolStripMenuItem"; + deleteToolStripMenuItem.Size = new System.Drawing.Size(162, 32); + deleteToolStripMenuItem.Text = "Delete"; + deleteToolStripMenuItem.Click += deleteToolStripMenuItem_Click; + // + // copyToolStripMenuItem + // + copyToolStripMenuItem.Name = "copyToolStripMenuItem"; + copyToolStripMenuItem.Size = new System.Drawing.Size(162, 32); + copyToolStripMenuItem.Text = "Copy"; + copyToolStripMenuItem.Click += copyToolStripMenuItem_Click; + // + // defaultToolStripMenuItem + // + defaultToolStripMenuItem.Name = "defaultToolStripMenuItem"; + defaultToolStripMenuItem.Size = new System.Drawing.Size(162, 32); + defaultToolStripMenuItem.Text = "Default"; + defaultToolStripMenuItem.Click += defaultToolStripMenuItem_Click; + // + // setActiveToolStripMenuItem + // + setActiveToolStripMenuItem.Name = "setActiveToolStripMenuItem"; + setActiveToolStripMenuItem.Size = new System.Drawing.Size(162, 32); + setActiveToolStripMenuItem.Text = "Set Active"; + setActiveToolStripMenuItem.Click += setActiveToolStripMenuItem_Click; + // + // UI + // + AutoScaleDimensions = new System.Drawing.SizeF(10F, 25F); + AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + ClientSize = new System.Drawing.Size(1848, 1260); + Controls.Add(mainPanel); + Controls.Add(statusStrip1); + DoubleBuffered = true; + Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + MinimumSize = new System.Drawing.Size(491, 296); + Name = "UI"; + Text = "UI"; + Load += UI_Load; + mainPanel.ResumeLayout(false); + mainSplitContainer.Panel1.ResumeLayout(false); + mainSplitContainer.Panel2.ResumeLayout(false); + ((ISupportInitialize)mainSplitContainer).EndInit(); + mainSplitContainer.ResumeLayout(false); + profilesGroupBox.ResumeLayout(false); + mainTabControl.ResumeLayout(false); + miscTabPage.ResumeLayout(false); + miscTabPage.PerformLayout(); + miscTableLayoutPanel.ResumeLayout(false); + miscTableLayoutPanel.PerformLayout(); + ((ISupportInitialize)forzaPortNumericUpDown).EndInit(); + ((ISupportInitialize)rpmTrackBar).EndInit(); + ((ISupportInitialize)rpmValueNumericUpDown).EndInit(); + flowLayoutPanel1.ResumeLayout(false); + brakeConfigTabPage.ResumeLayout(false); + brakeConfigTabPage.PerformLayout(); + brakeTableLayoutPanel.ResumeLayout(false); + brakeTableLayoutPanel.PerformLayout(); + ((ISupportInitialize)brakeResistanceSmoothNumericUpDown).EndInit(); + ((ISupportInitialize)maxBrakeResistanceNumericUpDown).EndInit(); + ((ISupportInitialize)minBrakeResistanceNumericUpDown).EndInit(); + ((ISupportInitialize)maxBrakeStifnessNumericUpDown).EndInit(); + ((ISupportInitialize)minBrakeStifnessNumericUpDown).EndInit(); + ((ISupportInitialize)brakeVibrationSmoothNumericUpDown).EndInit(); + ((ISupportInitialize)maxBrakeVibrationNumericUpDown).EndInit(); + ((ISupportInitialize)minBrakeVibrationNumericUpDown).EndInit(); + ((ISupportInitialize)brakeVibrationModeNumericUpDown).EndInit(); + ((ISupportInitialize)brakeVibrationStartNumericUpDown).EndInit(); + ((ISupportInitialize)gripLossNumericUpDown).EndInit(); + ((ISupportInitialize)brakeEffectNumericUpDown).EndInit(); + ((ISupportInitialize)brakeResistanceSmoothingTrackBar).EndInit(); + ((ISupportInitialize)maxBrakeResistanceTrackBar).EndInit(); + ((ISupportInitialize)minBrakeResistanceTrackBar).EndInit(); + ((ISupportInitialize)maxBrakeStiffnessTrackBar).EndInit(); + ((ISupportInitialize)minBrakeStiffnessTrackBar).EndInit(); + ((ISupportInitialize)vibrationSmoothingTrackBar).EndInit(); + ((ISupportInitialize)maxBrakeVibrationTrackBar).EndInit(); + ((ISupportInitialize)minBrakeVibrationTrackBar).EndInit(); + ((ISupportInitialize)brakeVibrationModeTrackBar).EndInit(); + ((ISupportInitialize)brakeVibrationStartTrackBar).EndInit(); + ((ISupportInitialize)gripLossTrackBar).EndInit(); + ((ISupportInitialize)brakeEffectIntensityTrackBar).EndInit(); + throttleConfigTabPage.ResumeLayout(false); + throttleTableLayoutPanel.ResumeLayout(false); + throttleTableLayoutPanel.PerformLayout(); + ((ISupportInitialize)throttleResistanceSmoothNumericUpDown).EndInit(); + ((ISupportInitialize)throttleMaxResistanceNumericUpDown).EndInit(); + ((ISupportInitialize)throttleMinResistanceNumericUpDown).EndInit(); + ((ISupportInitialize)throttleMaxStiffnessNumericUpDown).EndInit(); + ((ISupportInitialize)throttleMinStiffnessNumericUpDown).EndInit(); + ((ISupportInitialize)throttleVibrationSmoothNumericUpDown).EndInit(); + ((ISupportInitialize)throttleMaxVibrationNumericUpDown).EndInit(); + ((ISupportInitialize)throttleMinVibrationNumericUpDown).EndInit(); + ((ISupportInitialize)throttleVibrationStartNumericUpDown).EndInit(); + ((ISupportInitialize)throttleAccelLimitNumericUpDown).EndInit(); + ((ISupportInitialize)throttleForwardAccelScaleNumericUpDown).EndInit(); + ((ISupportInitialize)throttleTurnAccelScaleNumericUpDown).EndInit(); + ((ISupportInitialize)throttleGripLossNumericUpDown).EndInit(); + ((ISupportInitialize)throttleIntensityNumericUpDown).EndInit(); + ((ISupportInitialize)throttleResistanceSmoothTrackBar).EndInit(); + ((ISupportInitialize)throttleMaxResistanceTrackBar).EndInit(); + ((ISupportInitialize)throttleMinResistanceTrackBar).EndInit(); + ((ISupportInitialize)throttleMaxStiffnessTrackBar).EndInit(); + ((ISupportInitialize)throttleMinStiffnessTrackBar).EndInit(); + ((ISupportInitialize)throttleVibrationSmoothTrackBar).EndInit(); + ((ISupportInitialize)throttleMaxVibrationTrackBar).EndInit(); + ((ISupportInitialize)throttleMinVibrationTrackBar).EndInit(); + ((ISupportInitialize)throttleVibrationModeStartTrackBar).EndInit(); + ((ISupportInitialize)throttleAccelLimitTrackBar).EndInit(); + ((ISupportInitialize)throttleForwardAccelScaleTrackBar).EndInit(); + ((ISupportInitialize)throttleTurnAccelScaleTrackBar).EndInit(); + ((ISupportInitialize)throttleGripLossTrackBar).EndInit(); + ((ISupportInitialize)throttleIntensityTrackBar).EndInit(); + outputTabPage.ResumeLayout(false); + raceGroupBox.ResumeLayout(false); + tableLayoutPanel1.ResumeLayout(false); + tableLayoutPanel1.PerformLayout(); + noRaceGroupBox.ResumeLayout(false); + noRaceGroupBox.PerformLayout(); + statusStrip1.ResumeLayout(false); + statusStrip1.PerformLayout(); + ProfilesContextMenu.ResumeLayout(false); + ResumeLayout(false); + PerformLayout(); + } - #endregion - //private System.ComponentModel.BackgroundWorker mainWorker; - //private System.ComponentModel.BackgroundWorker connectionWorker; - private System.Windows.Forms.Panel mainPanel; + #endregion + //private System.ComponentModel.BackgroundWorker mainWorker; + //private System.ComponentModel.BackgroundWorker connectionWorker; + private System.Windows.Forms.Panel mainPanel; private System.Windows.Forms.TabControl mainTabControl; private System.Windows.Forms.TabPage brakeConfigTabPage; private System.Windows.Forms.TabPage outputTabPage; @@ -2029,12 +2361,8 @@ private void InitializeComponent() private System.Windows.Forms.TableLayoutPanel miscTableLayoutPanel; private System.Windows.Forms.NumericUpDown forzaPortNumericUpDown; private System.Windows.Forms.Label forzaPortLabel; - private System.Windows.Forms.Label dsxPortLabel; - private System.Windows.Forms.Label appCheckLabel; private System.Windows.Forms.Label rpmLabel; private System.Windows.Forms.TrackBar rpmTrackBar; - private System.Windows.Forms.CheckBox appCheckBox; - private System.Windows.Forms.NumericUpDown dsxNumericUpDown; private System.Windows.Forms.Label gripLossLabel; private System.Windows.Forms.ToolTip toolTip; private System.Windows.Forms.TrackBar gripLossTrackBar; @@ -2122,15 +2450,39 @@ private void InitializeComponent() private System.Windows.Forms.Label brakeVibrationMsg; private System.Windows.Forms.Label throttleMsg; private System.Windows.Forms.Label throttleVibrationMsg; - private System.Windows.Forms.Button buttonApplyMisc; private System.Windows.Forms.Button buttonApply_Brake; private System.Windows.Forms.Button buttonApply_Throttle; - private System.Windows.Forms.Button miscDefaultsButton; private System.Windows.Forms.Button brakeDefaultsButton; private System.Windows.Forms.Button throttleDefaultsButton; private System.Windows.Forms.Label brakeTriggerMode; private System.Windows.Forms.ComboBox brakeTriggerModeComboBox; private System.Windows.Forms.Label throttleTriggerMode; private System.Windows.Forms.ComboBox throttleTriggerModeComboBox; - } + private System.Windows.Forms.SplitContainer mainSplitContainer; + private System.Windows.Forms.ListView profilesListView; + private System.Windows.Forms.GroupBox profilesGroupBox; + private System.Windows.Forms.ToolStripDropDownButton toolStripDSXPortButton; + private System.Windows.Forms.ToolStripTextBox toolStripDSXPortTextBox; + private System.Windows.Forms.ToolStripDropDownButton toolStripAppCheckButton; + private System.Windows.Forms.ToolStripMenuItem toolStripAppCheckOffItem; + private System.Windows.Forms.ToolStripMenuItem toolStripAppCheckOnItem; + private System.Windows.Forms.ContextMenuStrip ProfilesContextMenu; + private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem renameToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem disableToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem defaultToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem setActiveToolStripMenuItem; + private System.Windows.Forms.Button buttonApplyMisc; + private System.Windows.Forms.Button miscDefaultsButton; + private System.Windows.Forms.Label ExecutableListLabel; + private System.Windows.Forms.ListBox ExecutableListBox; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Button AddExecutableButton; + private System.Windows.Forms.Button EditExecutableButton; + private System.Windows.Forms.Button RemoveExecutableButton; + private System.Windows.Forms.Label GameModeLabel; + private System.Windows.Forms.ComboBox GameModeComboBox; + } } \ No newline at end of file diff --git a/UI.cs b/UI.cs index c07d7a6..6ddfb8f 100644 --- a/UI.cs +++ b/UI.cs @@ -1,825 +1,1464 @@ -using ForzaDSX.Properties; +using ForzaDSX.Config; +using ForzaDSX.GameParsers; +using ForzaDSX.Properties; using System; +using System.ComponentModel; +using System.Linq; + //using System.Configuration; using System.Threading; using System.Windows.Forms; using static ForzaDSX.ForzaDSXWorker; +using static System.Windows.Forms.VisualStyles.VisualStyleElement; namespace ForzaDSX { - public partial class UI : Form - { - protected ForzaDSXWorker forzaDSXWorker; - protected ForzaDSX.Properties.Settings currentSettings; - //protected Configuration config; - public ForzaDSX.Properties.Settings CurrentSettings { get => currentSettings; set => currentSettings = value; } + public partial class UI : Form + { + protected ForzaDSXWorker forzaDSXWorker; + AppCheckThread appCheckWorker; + protected ForzaDSX.Config.Config currentSettings; + protected ForzaDSX.Config.Profile selectedProfile; + BindingList executables = new BindingList(); + int selectedIndex = 0; + //protected Configuration config; + public ForzaDSX.Config.Config CurrentSettings { get => currentSettings; set => currentSettings = value; } + + bool bForzaConnected = false; + bool bDsxConnected = false; + + Thread appCheckThread; + Thread forzaDsxThread; + + CancellationTokenSource appCheckThreadCancellationToken; + CancellationToken appCheckThreadToken; + + CancellationTokenSource forzaThreadCancellationToken; + CancellationToken forzaThreadToken; + + String clickedProfileName = null; + + public UI() + { + InitializeComponent(); + + //forzaDSXWorker = new ForzaDSXWorker(this); + } + + void UpdateDSXConnectionStatus(bool bConnected) + { + toolStripStatusDSX.Image = bConnected ? Resources.greenBtn : Resources.redBtn; + bDsxConnected = bConnected; + } + + void UpdateForzaConnectionStatus(bool bConnected) + { + toolStripStatusForza.Image = bConnected ? Resources.greenBtn : Resources.redBtn; + bForzaConnected = bConnected; + } + + public void Output(string Text, bool bShowMessageBox = false) + { + outputListBox.Items.Insert(0, Text); + + if (outputListBox.Items.Count > 50) + { + outputListBox.Items.RemoveAt(50); + } + + if (bShowMessageBox) + { + MessageBox.Show(Text); + } + } + + private void UI_Load(object sender, EventArgs e) + { + this.Text = "ForzaDSX version: " + Program.VERSION; + + LoadSettings(); + + noRaceText.Text = String.Empty; + throttleVibrationMsg.Text = String.Empty; + throttleMsg.Text = String.Empty; + brakeVibrationMsg.Text = String.Empty; + brakeMsg.Text = String.Empty; + + noRaceGroupBox.Visible = currentSettings.VerboseLevel > Config.VerboseLevel.Off; + raceGroupBox.Visible = currentSettings.VerboseLevel > Config.VerboseLevel.Off; + + // Starts the background Worker + //this.connectionWorker.RunWorkerAsync(); + + + + + + var forzaProgressHandler = new Progress(WorkerThreadReporter); + + forzaDSXWorker = new ForzaDSXWorker(currentSettings, forzaProgressHandler); + + forzaThreadCancellationToken = new CancellationTokenSource(); + forzaThreadToken = forzaThreadCancellationToken.Token; + + forzaThreadToken.Register(() => forzaDSXWorker.Stop()); + var progressHandler = new Progress(AppCheckReporter); + appCheckWorker = new AppCheckThread(ref currentSettings, progressHandler); + appCheckThreadCancellationToken = new CancellationTokenSource(); + appCheckThreadToken = appCheckThreadCancellationToken.Token; + + appCheckThreadToken.Register(() => appCheckWorker.Stop()); + if (!currentSettings.DisableAppCheck) + { + startAppCheckThread(); + + } + else + { + UpdateDSXConnectionStatus(true); + UpdateForzaConnectionStatus(true); + StartForzaDSXThread(); + } + } + + protected void startAppCheckThread() + { + + + appCheckThread = new Thread(new ThreadStart(appCheckWorker.Run)); + appCheckThread.IsBackground = true; + + appCheckThread.Start(); + } + + protected void AppCheckReporter(AppCheckReportStruct value) + { + if (value.type == AppCheckReportStruct.AppType.NONE) + { + Output(value.message); + } + else if (value.type == AppCheckReportStruct.AppType.DSX) + { + UpdateDSXConnectionStatus(value.value); + } + else + { + UpdateForzaConnectionStatus(value.value); + if (value.value) + { + SwitchActiveProfile(value.message); + } + else + { + SwitchActiveProfile(null); + } + } + + if (forzaDsxThread == null) + { + if (bForzaConnected && bDsxConnected) + { + StartForzaDSXThread(); + } + } + else + { + if (!bForzaConnected || !bDsxConnected) + { + StopForzaDSXThread(); + } + } + } + + protected void SwitchActiveProfile(String profileName) + { + Profile profile = null; + + if (profileName == "") + { + // profileName = selectedProfile.Name; + return; + } + if (currentSettings.ActiveProfile != null && currentSettings.ActiveProfile.Name == profileName) + return; + + if (profileName != null && currentSettings.Profiles.ContainsKey(profileName)) + { + profile = currentSettings.Profiles[profileName]; + + } + currentSettings.ActiveProfile = profile; + ConfigHandler.SaveConfig(); + loadProfilesIntoList(); + SwitchDisplayedProfile(profileName); + StopForzaDSXThread(); + StartForzaDSXThread(); + + } + + protected void RestartAppCheckThread() + { + StopAppCheckThread(); + System.Threading.Thread.Sleep(1100); + startAppCheckThread(); + } + + protected void StartForzaDSXThread() + { + if (forzaDsxThread != null + || forzaDSXWorker == null) + return; + if (currentSettings.ActiveProfile == null) + return; + forzaDsxThread = new Thread(new ThreadStart(forzaDSXWorker.Run)); + forzaDsxThread.IsBackground = true; + + forzaDsxThread.Start(); + } + + protected void StopForzaDSXThread() + { + try + { + if (forzaDsxThread != null + && forzaThreadCancellationToken != null) + { + forzaThreadCancellationToken.Cancel(); + } + } + catch (Exception) + { + + throw; + } + + forzaDsxThread = null; + } + private void disableAppCheck() + { + currentSettings.DisableAppCheck = true; + toolStripAppCheckOnItem.Checked = false; + toolStripAppCheckOffItem.Checked = true; + toolStripAppCheckButton.Text = "App Check Disabled"; + StopAppCheckThread(); + SwitchActiveProfile(currentSettings.DefaultProfile); + UpdateDSXConnectionStatus(true); + UpdateForzaConnectionStatus(true); + StartForzaDSXThread(); + ConfigHandler.SaveConfig(); + } + protected void StopAppCheckThread() + { + try + { + if (appCheckThread != null + && appCheckThreadCancellationToken != null) + { + appCheckThreadCancellationToken.Cancel(); + } + } + catch (Exception) + { + + throw; + } + + appCheckThread = null; + } + + protected void WorkerThreadReporter(ForzaDSXReportStruct value) + { + switch (value.type) + { + case ForzaDSXReportStruct.ReportType.VERBOSEMESSAGE: + Output(value.message); + break; + case ForzaDSXReportStruct.ReportType.NORACE: + if (currentSettings.VerboseLevel > Config.VerboseLevel.Off) + { + noRaceGroupBox.Visible = true; + raceGroupBox.Visible = false; + } + + noRaceText.Text = value.message; + break; + case ForzaDSXReportStruct.ReportType.RACING: + if (currentSettings.VerboseLevel > Config.VerboseLevel.Off) + { + noRaceGroupBox.Visible = false; + raceGroupBox.Visible = true; + } + + switch (value.racingType) + { + case ForzaDSXReportStruct.RacingReportType.THROTTLE_VIBRATION: + throttleVibrationMsg.Text = value.message; + break; + case ForzaDSXReportStruct.RacingReportType.THROTTLE: + throttleMsg.Text = value.message; + break; + case ForzaDSXReportStruct.RacingReportType.BRAKE_VIBRATION: + brakeVibrationMsg.Text = value.message; + break; + case ForzaDSXReportStruct.RacingReportType.BRAKE: + brakeMsg.Text = value.message; + break; + } + break; + } + } + + private void UI_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e) + { + appCheckThreadCancellationToken.Cancel(); + appCheckThreadCancellationToken.Dispose(); + + forzaThreadCancellationToken.Cancel(); + forzaThreadCancellationToken.Dispose(); + } + + + + public void LoadSettings() + { + //// Build a config object, using env vars and JSON providers. + //config = new ConfigurationBuilder() + // .AddIniFile("appsettings.ini") + // .Build(); + + try + { + + // Get values from the config given their key and their target type. + currentSettings = ConfigHandler.GetConfig(); + selectedProfile = currentSettings.Profiles.Values.First(); + + if (currentSettings.DisableAppCheck && currentSettings.DefaultProfile != null) + { + if (currentSettings.Profiles.ContainsKey(currentSettings.DefaultProfile)) + { + currentSettings.ActiveProfile = currentSettings.Profiles[currentSettings.DefaultProfile]; + } + } + + verboseModeOffToolStripMenuItem.Checked = currentSettings.VerboseLevel == VerboseLevel.Off; + verboseModeLowToolStripMenuItem.Checked = currentSettings.VerboseLevel == VerboseLevel.Limited; + verboseModeFullToolStripMenuItem.Checked = currentSettings.VerboseLevel == VerboseLevel.Full; + toolStripDSXPortButton.Text = "DSX Port: " + currentSettings.DSXPort.ToString(); + toolStripVerboseMode.Text = "Verbose Mode: " + currentSettings.VerboseLevel.ToString(); + } + catch (Exception e) + { + Output("Invalid Configuration File!\n" + e.Message, true); + } + + SetupUI(); + } + + #region UI Forms control + void SetupUI() + { + // Misc panel + + + if (currentSettings.DisableAppCheck) + { + toolStripAppCheckOnItem.Checked = false; + toolStripAppCheckOffItem.Checked = true; + toolStripAppCheckButton.Text = "App Check Disabled"; + } + else + { + toolStripAppCheckOnItem.Checked = true; + toolStripAppCheckOffItem.Checked = false; + toolStripAppCheckButton.Text = "App Check Enabled"; + } + + toolStripDSXPortButton.Text = "DSX Port: " + currentSettings.DSXPort.ToString(); + toolStripDSXPortTextBox.Text = currentSettings.DSXPort.ToString(); + + + loadProfilesIntoList(); + SwitchDisplayedProfile(); + + } + + void loadProfilesIntoList() + { + profilesListView.Items.Clear(); + //Load Profiles into list + foreach (Profile profile in currentSettings.Profiles.Values) + { + String name = profile.Name; + ListViewItem item = new ListViewItem(name); + + if (!profile.IsEnabled) + { + name += " (Disabled)"; + } + if (profile == currentSettings.ActiveProfile) + { + name += " (Active)"; + item.Selected = true; + } + if (profile.Name == currentSettings.DefaultProfile) + { + name += " (Default)"; + } + item.Text = name; + item.Name = profile.Name; + profilesListView.Items.Add(item); + } + } + + void SwitchDisplayedProfile(String profileName = "") + { + + if (profileName == null || profileName == "") + { + if (selectedProfile == null) + { + selectedProfile = currentSettings.Profiles.Values.First(); + } + profileName = selectedProfile.Name; + } + if (currentSettings.Profiles.ContainsKey(profileName)) + { + selectedProfile = currentSettings.Profiles[profileName]; + } + executables = new BindingList(selectedProfile.executableNames); + ExecutableListBox.DataSource = executables; + + + BrakeSettings brakeSettings = selectedProfile.brakeSettings; + ThrottleSettings throttleSettings = selectedProfile.throttleSettings; + + brakeSettings.EffectIntensity = Math.Clamp(brakeSettings.EffectIntensity, 0.0f, 1.0f); + throttleSettings.EffectIntensity = Math.Clamp(throttleSettings.EffectIntensity, 0.0f, 1.0f); + this.rpmTrackBar.Value = DenormalizeValue(selectedProfile.RPMRedlineRatio); + rpmValueNumericUpDown.Value = rpmTrackBar.Value; + this.forzaPortNumericUpDown.Value = selectedProfile.gameUDPPort; + this.GameModeComboBox.SelectedIndex = (int)selectedProfile.GameType; + + // Brake Panel + this.brakeTriggerModeComboBox.SelectedIndex = (int)brakeSettings.TriggerMode; + this.brakeEffectIntensityTrackBar.Value = DenormalizeValue(brakeSettings.EffectIntensity); + this.gripLossTrackBar.Value = DenormalizeValue(brakeSettings.GripLossValue); + this.brakeVibrationStartTrackBar.Value = brakeSettings.VibrationStart; + this.brakeVibrationModeTrackBar.Value = brakeSettings.VibrationModeStart; + this.minBrakeVibrationTrackBar.Value = brakeSettings.MinVibration; + this.maxBrakeVibrationTrackBar.Value = brakeSettings.MaxVibration; + this.vibrationSmoothingTrackBar.Value = DenormalizeValue(brakeSettings.VibrationSmoothing, 500.0f); + this.minBrakeStiffnessTrackBar.Value = brakeSettings.MinStiffness; + this.maxBrakeStiffnessTrackBar.Value = brakeSettings.MaxStiffness; + this.minBrakeResistanceTrackBar.Value = brakeSettings.MinResistance; + this.maxBrakeResistanceTrackBar.Value = brakeSettings.MaxResistance; + this.brakeResistanceSmoothingTrackBar.Value = DenormalizeValue(brakeSettings.ResistanceSmoothing, 500.0f); + + this.brakeEffectNumericUpDown.Value = this.brakeEffectIntensityTrackBar.Value; + this.gripLossNumericUpDown.Value = this.gripLossTrackBar.Value; + this.brakeVibrationStartNumericUpDown.Value = this.brakeVibrationStartTrackBar.Value; + this.brakeVibrationModeNumericUpDown.Value = this.brakeVibrationModeTrackBar.Value; + this.minBrakeVibrationNumericUpDown.Value = this.minBrakeVibrationTrackBar.Value; + this.maxBrakeVibrationNumericUpDown.Value = this.maxBrakeVibrationTrackBar.Value; + this.brakeVibrationSmoothNumericUpDown.Value = this.vibrationSmoothingTrackBar.Value; + this.minBrakeStifnessNumericUpDown.Value = this.minBrakeStiffnessTrackBar.Value; + this.maxBrakeStifnessNumericUpDown.Value = this.maxBrakeStiffnessTrackBar.Value; + this.minBrakeResistanceNumericUpDown.Value = this.minBrakeResistanceTrackBar.Value; + this.maxBrakeResistanceNumericUpDown.Value = this.maxBrakeResistanceTrackBar.Value; + this.brakeResistanceSmoothNumericUpDown.Value = this.brakeResistanceSmoothingTrackBar.Value; + + // Throttle Panel + this.throttleTriggerModeComboBox.SelectedIndex = (int)throttleSettings.TriggerMode; + this.throttleIntensityTrackBar.Value = DenormalizeValue(throttleSettings.EffectIntensity); + this.throttleGripLossTrackBar.Value = DenormalizeValue(throttleSettings.GripLossValue); + this.throttleTurnAccelScaleTrackBar.Value = DenormalizeValue(throttleSettings.TurnAccelerationScale); + this.throttleForwardAccelScaleTrackBar.Value = DenormalizeValue(throttleSettings.ForwardAccelerationScale); + this.throttleAccelLimitTrackBar.Value = throttleSettings.AccelerationLimit; + this.throttleVibrationModeStartTrackBar.Value = throttleSettings.VibrationModeStart; + this.throttleMinVibrationTrackBar.Value = throttleSettings.MinVibration; + this.throttleMaxVibrationTrackBar.Value = throttleSettings.MaxVibration; + this.throttleVibrationSmoothTrackBar.Value = DenormalizeValue(throttleSettings.VibrationSmoothing); + this.throttleMinStiffnessTrackBar.Value = throttleSettings.MinStiffness; + this.throttleMaxStiffnessTrackBar.Value = throttleSettings.MaxStiffness; + this.throttleMinResistanceTrackBar.Value = throttleSettings.MinResistance; + this.throttleMaxResistanceTrackBar.Value = throttleSettings.MaxResistance; + this.throttleResistanceSmoothTrackBar.Value = DenormalizeValue(throttleSettings.ResistanceSmoothing); + + this.throttleIntensityNumericUpDown.Value = this.throttleIntensityTrackBar.Value; + this.throttleGripLossNumericUpDown.Value = this.throttleGripLossTrackBar.Value; + this.throttleTurnAccelScaleNumericUpDown.Value = this.throttleTurnAccelScaleTrackBar.Value; + this.throttleForwardAccelScaleNumericUpDown.Value = this.throttleForwardAccelScaleTrackBar.Value; + this.throttleAccelLimitNumericUpDown.Value = this.throttleAccelLimitTrackBar.Value; + this.throttleVibrationStartNumericUpDown.Value = this.throttleVibrationModeStartTrackBar.Value; + this.throttleMinVibrationNumericUpDown.Value = this.throttleMinVibrationTrackBar.Value; + this.throttleMaxVibrationNumericUpDown.Value = this.throttleMaxVibrationTrackBar.Value; + this.throttleVibrationSmoothNumericUpDown.Value = this.throttleVibrationSmoothTrackBar.Value; + this.throttleMinStiffnessNumericUpDown.Value = this.throttleMinStiffnessTrackBar.Value; + this.throttleMaxStiffnessNumericUpDown.Value = this.throttleMaxStiffnessTrackBar.Value; + this.throttleMinResistanceNumericUpDown.Value = this.throttleMinResistanceTrackBar.Value; + this.throttleMaxResistanceNumericUpDown.Value = this.throttleMaxResistanceTrackBar.Value; + this.throttleResistanceSmoothNumericUpDown.Value = this.throttleResistanceSmoothTrackBar.Value; + } + + static int DenormalizeValue(float normalizedValue, float scale = 100.0f) + { + return (int)Math.Floor(normalizedValue * scale); + } + + static float NormalizeValue(float value, float scale = 100.0f) + { + if (scale == 0) + return value; + + return value / scale; + } + + private void verboseModeFullToolStripMenuItem_Click(object sender, EventArgs e) + { + currentSettings.VerboseLevel = VerboseLevel.Full; + verboseModeOffToolStripMenuItem.Checked = false; + verboseModeLowToolStripMenuItem.Checked = false; + verboseModeFullToolStripMenuItem.Checked = true; + toolStripVerboseMode.Text = "Verbose Mode: " + currentSettings.VerboseLevel.ToString(); + ConfigHandler.SaveConfig(); + + } + + private void verboseModeLowToolStripMenuItem_Click(object sender, EventArgs e) + { + currentSettings.VerboseLevel = VerboseLevel.Limited; + verboseModeOffToolStripMenuItem.Checked = false; + verboseModeLowToolStripMenuItem.Checked = true; + verboseModeFullToolStripMenuItem.Checked = false; + toolStripVerboseMode.Text = "Verbose Mode: " + currentSettings.VerboseLevel.ToString(); + ConfigHandler.SaveConfig(); + + + } + + private void verboseModeOffToolStripMenuItem_Click(object sender, EventArgs e) + { + currentSettings.VerboseLevel = VerboseLevel.Off; + verboseModeOffToolStripMenuItem.Checked = true; + verboseModeLowToolStripMenuItem.Checked = false; + verboseModeFullToolStripMenuItem.Checked = false; + toolStripVerboseMode.Text = "Verbose Mode: " + currentSettings.VerboseLevel.ToString(); + + noRaceGroupBox.Visible = false; + raceGroupBox.Visible = false; + ConfigHandler.SaveConfig(); + + } + + #region Misc + + + + + + private void rpmTrackBar_Scroll(object sender, EventArgs e) + { + selectedProfile.RPMRedlineRatio = NormalizeValue(this.rpmTrackBar.Value); + rpmValueNumericUpDown.Value = rpmTrackBar.Value; + + + } + + private void rpmValueNumericUpDown_ValueChanged(object sender, EventArgs e) + { + selectedProfile.RPMRedlineRatio = NormalizeValue((float)this.rpmValueNumericUpDown.Value); + rpmTrackBar.Value = (int)Math.Floor(rpmValueNumericUpDown.Value); + + + } + + private void forzaPortNumericUpDown_ValueChanged(object sender, EventArgs e) + { + selectedProfile.gameUDPPort = (int)Math.Floor(this.forzaPortNumericUpDown.Value); + + + } + #endregion + + #region Brake + private void brakeEffectIntensityTrackBar_Scroll(object sender, EventArgs e) + { + selectedProfile.brakeSettings.EffectIntensity = NormalizeValue(brakeEffectIntensityTrackBar.Value); + this.brakeEffectNumericUpDown.Value = brakeEffectIntensityTrackBar.Value; + + + } + + private void brakeEffectNumericUpDown_ValueChanged(object sender, EventArgs e) + { + selectedProfile.brakeSettings.EffectIntensity = NormalizeValue((float)brakeEffectNumericUpDown.Value); + brakeEffectIntensityTrackBar.Value = (int)Math.Floor(brakeEffectNumericUpDown.Value); + + + } + + private void gripLossTrackBar_Scroll(object sender, EventArgs e) + { + selectedProfile.brakeSettings.GripLossValue = NormalizeValue(gripLossTrackBar.Value); + gripLossNumericUpDown.Value = gripLossTrackBar.Value; + + + } + + private void gripLossNumericUpDown_ValueChanged(object sender, EventArgs e) + { + selectedProfile.brakeSettings.GripLossValue = NormalizeValue((float)gripLossNumericUpDown.Value); + gripLossTrackBar.Value = (int)Math.Floor(gripLossNumericUpDown.Value); + + + } + + private void brakeVibrationStartTrackBar_Scroll(object sender, EventArgs e) + { + selectedProfile.brakeSettings.VibrationStart = brakeVibrationStartTrackBar.Value; + brakeVibrationStartNumericUpDown.Value = brakeVibrationStartTrackBar.Value; + + + } + + private void brakeVibrationStartNumericUpDown_ValueChanged(object sender, EventArgs e) + { + selectedProfile.brakeSettings.VibrationStart = (int)Math.Floor(brakeVibrationStartNumericUpDown.Value); + brakeVibrationStartTrackBar.Value = selectedProfile.brakeSettings.VibrationStart; + + + } + + private void brakeVibrationModeTrackBar_Scroll(object sender, EventArgs e) + { + selectedProfile.brakeSettings.VibrationModeStart = brakeVibrationModeTrackBar.Value; + brakeVibrationModeNumericUpDown.Value = brakeVibrationModeTrackBar.Value; + + + } + + private void brakeVibrationModeNumericUpDown_ValueChanged(object sender, EventArgs e) + { + selectedProfile.brakeSettings.VibrationModeStart = (int)Math.Floor(brakeVibrationModeNumericUpDown.Value); + brakeVibrationModeTrackBar.Value = selectedProfile.brakeSettings.VibrationModeStart; + + + } + + private void minBrakeVibrationTrackBar_Scroll(object sender, EventArgs e) + { + selectedProfile.brakeSettings.MinVibration = minBrakeVibrationTrackBar.Value; + minBrakeVibrationNumericUpDown.Value = minBrakeVibrationTrackBar.Value; + + + } + + private void minBrakeVibrationNumericUpDown_ValueChanged(object sender, EventArgs e) + { + selectedProfile.brakeSettings.MinVibration = (int)Math.Floor(minBrakeVibrationNumericUpDown.Value); + minBrakeVibrationTrackBar.Value = selectedProfile.brakeSettings.MinVibration; + + + } + + private void maxBrakeVibrationTrackBar_Scroll(object sender, EventArgs e) + { + selectedProfile.brakeSettings.MaxVibration = maxBrakeVibrationTrackBar.Value; + maxBrakeVibrationNumericUpDown.Value = maxBrakeVibrationTrackBar.Value; + + + } + + private void maxBrakeVibrationNumericUpDown_ValueChanged(object sender, EventArgs e) + { + selectedProfile.brakeSettings.MaxVibration = (int)Math.Floor(maxBrakeVibrationNumericUpDown.Value); + maxBrakeVibrationTrackBar.Value = selectedProfile.brakeSettings.MaxVibration; + + + } + + private void vibrationSmoothingTrackBar_Scroll(object sender, EventArgs e) + { + selectedProfile.brakeSettings.VibrationSmoothing = NormalizeValue(vibrationSmoothingTrackBar.Value, 500); + brakeVibrationSmoothNumericUpDown.Value = vibrationSmoothingTrackBar.Value; + + + } + + private void brakeVibrationSmoothNumericUpDown_ValueChanged(object sender, EventArgs e) + { + selectedProfile.brakeSettings.VibrationSmoothing = NormalizeValue((float)brakeVibrationSmoothNumericUpDown.Value, 500); + vibrationSmoothingTrackBar.Value = (int)Math.Floor(brakeVibrationSmoothNumericUpDown.Value); + + + } + + private void minBrakeStiffnessTrackBar_Scroll(object sender, EventArgs e) + { + selectedProfile.brakeSettings.MinStiffness = minBrakeStiffnessTrackBar.Value; + minBrakeStifnessNumericUpDown.Value = minBrakeStiffnessTrackBar.Value; + + + } + + private void minBrakeStifnessNumericUpDown_ValueChanged(object sender, EventArgs e) + { + selectedProfile.brakeSettings.MinStiffness = (int)Math.Floor(minBrakeVibrationNumericUpDown.Value); + minBrakeVibrationTrackBar.Value = selectedProfile.brakeSettings.MinStiffness; + + + } + + private void maxBrakeStiffnessTrackBar_Scroll(object sender, EventArgs e) + { + selectedProfile.brakeSettings.MaxStiffness = maxBrakeStiffnessTrackBar.Value; + maxBrakeStifnessNumericUpDown.Value = maxBrakeStiffnessTrackBar.Value; + + + } + + private void maxBrakeStifnessNumericUpDown_ValueChanged(object sender, EventArgs e) + { + selectedProfile.brakeSettings.MaxStiffness = (int)Math.Floor(maxBrakeVibrationNumericUpDown.Value); + maxBrakeVibrationTrackBar.Value = selectedProfile.brakeSettings.MaxStiffness; + + + } + + private void minBrakeResistanceTrackBar_Scroll(object sender, EventArgs e) + { + + int value = minBrakeResistanceTrackBar.Value; + if (value > selectedProfile.brakeSettings.MaxResistance) + value = selectedProfile.brakeSettings.MaxResistance; + + selectedProfile.brakeSettings.MinResistance = value; + + minBrakeResistanceTrackBar.Value = value; + minBrakeResistanceNumericUpDown.Value = value; + + + } + + private void minBrakeResistanceNumericUpDown_ValueChanged(object sender, EventArgs e) + { + int value = (int)Math.Floor(minBrakeResistanceNumericUpDown.Value); + if (value > selectedProfile.brakeSettings.MaxResistance) + value = selectedProfile.brakeSettings.MaxResistance; + + selectedProfile.brakeSettings.MinResistance = value; + + minBrakeResistanceTrackBar.Value = value; + minBrakeResistanceNumericUpDown.Value = value; + + + } + + private void maxBrakeResistanceTrackBar_Scroll(object sender, EventArgs e) + { + int value = maxBrakeResistanceTrackBar.Value; + + if (value > selectedProfile.brakeSettings.MinResistance) + value = selectedProfile.brakeSettings.MinResistance; + + selectedProfile.brakeSettings.MaxResistance = value; + maxBrakeResistanceTrackBar.Value = value; + maxBrakeResistanceNumericUpDown.Value = value; + + + } + + private void maxBrakeResistanceNumericUpDown_ValueChanged(object sender, EventArgs e) + { + int value = (int)Math.Floor(maxBrakeResistanceNumericUpDown.Value); + if (value > selectedProfile.brakeSettings.MinResistance) + value = selectedProfile.brakeSettings.MinResistance; + + selectedProfile.brakeSettings.MaxResistance = value; + + maxBrakeResistanceTrackBar.Value = value; + maxBrakeResistanceNumericUpDown.Value = value; + + + } + + private void brakeResistanceSmoothingTrackBar_Scroll(object sender, EventArgs e) + { + selectedProfile.brakeSettings.ResistanceSmoothing = NormalizeValue(brakeResistanceSmoothingTrackBar.Value, 500); + brakeResistanceSmoothNumericUpDown.Value = brakeResistanceSmoothingTrackBar.Value; + + + } + + private void brakeResistanceSmoothNumericUpDown_ValueChanged(object sender, EventArgs e) + { + selectedProfile.brakeSettings.ResistanceSmoothing = NormalizeValue((float)brakeResistanceSmoothNumericUpDown.Value, 500); + brakeResistanceSmoothingTrackBar.Value = (int)Math.Floor(brakeResistanceSmoothNumericUpDown.Value); + + + } + #endregion + + #region Throttle + private void throttleIntensityTrackBar_Scroll(object sender, EventArgs e) + { + selectedProfile.throttleSettings.EffectIntensity = NormalizeValue(throttleIntensityTrackBar.Value); + throttleIntensityNumericUpDown.Value = throttleIntensityTrackBar.Value; + + + } + + private void throttleIntensityNumericUpDown_ValueChanged(object sender, EventArgs e) + { + selectedProfile.throttleSettings.EffectIntensity = NormalizeValue((float)throttleIntensityNumericUpDown.Value); + throttleIntensityTrackBar.Value = (int)Math.Floor(throttleIntensityNumericUpDown.Value); + + + } + + private void throttleGripLossTrackBar_Scroll(object sender, EventArgs e) + { + + int value = throttleGripLossTrackBar.Value; + selectedProfile.throttleSettings.GripLossValue = NormalizeValue(value); + throttleGripLossNumericUpDown.Value = value; + + + } + + private void throttleGripLossNumericUpDown_ValueChanged(object sender, EventArgs e) + { + float value = (float)throttleGripLossNumericUpDown.Value; + selectedProfile.throttleSettings.GripLossValue = NormalizeValue(value); + throttleGripLossTrackBar.Value = (int)Math.Floor(value); + + + } + + private void throttleTurnAccelScaleTrackBar_Scroll(object sender, EventArgs e) + { + int value = throttleTurnAccelScaleTrackBar.Value; + selectedProfile.throttleSettings.TurnAccelerationScale = NormalizeValue(value); + throttleTurnAccelScaleNumericUpDown.Value = value; + + + } + + private void throttleTurnAccelScaleNumericUpDown_ValueChanged(object sender, EventArgs e) + { + float value = (float)throttleTurnAccelScaleNumericUpDown.Value; + selectedProfile.throttleSettings.TurnAccelerationScale = NormalizeValue(value); + throttleTurnAccelScaleTrackBar.Value = (int)Math.Floor(value); + + + } + + private void throttleForwardAccelScaleTrackBar_Scroll(object sender, EventArgs e) + { + int value = throttleForwardAccelScaleTrackBar.Value; + selectedProfile.throttleSettings.ForwardAccelerationScale = NormalizeValue(value); + throttleForwardAccelScaleNumericUpDown.Value = value; + + + } + + private void throttleForwardAccelScaleNumericUpDown_ValueChanged(object sender, EventArgs e) + { + float value = (float)throttleForwardAccelScaleNumericUpDown.Value; + selectedProfile.throttleSettings.ForwardAccelerationScale = NormalizeValue(value); + throttleForwardAccelScaleTrackBar.Value = (int)Math.Floor(value); + + + } + + private void throttleAccelLimitTrackBar_Scroll(object sender, EventArgs e) + { + int value = throttleAccelLimitTrackBar.Value; + selectedProfile.throttleSettings.AccelerationLimit = value; + throttleAccelLimitNumericUpDown.Value = value; + + + } + + private void throttleAccelLimitNumericUpDown_ValueChanged(object sender, EventArgs e) + { + int value = (int)Math.Floor(throttleAccelLimitNumericUpDown.Value); + selectedProfile.throttleSettings.AccelerationLimit = value; + throttleAccelLimitTrackBar.Value = value; + + + } + + private void throttleVibrationModeStartTrackBar_Scroll(object sender, EventArgs e) + { + int value = throttleVibrationModeStartTrackBar.Value; + selectedProfile.throttleSettings.VibrationModeStart = value; + throttleVibrationStartNumericUpDown.Value = value; + + + } + + private void throttleVibrationStartNumericUpDown_ValueChanged(object sender, EventArgs e) + { + int value = (int)Math.Floor(throttleVibrationStartNumericUpDown.Value); + selectedProfile.throttleSettings.VibrationModeStart = value; + throttleVibrationModeStartTrackBar.Value = value; + + + } + + private void throttleMinVibrationTrackBar_Scroll(object sender, EventArgs e) + { + int value = throttleMinVibrationTrackBar.Value; + selectedProfile.throttleSettings.MinVibration = value; + throttleMinVibrationNumericUpDown.Value = value; + + + } + + private void throttleMinVibrationNumericUpDown_ValueChanged(object sender, EventArgs e) + { + int value = (int)Math.Floor(throttleMinVibrationNumericUpDown.Value); + selectedProfile.throttleSettings.MinVibration = value; + throttleMinVibrationTrackBar.Value = value; + + + } + + private void throttleMaxVibrationTrackBar_Scroll(object sender, EventArgs e) + { + int value = throttleMaxVibrationTrackBar.Value; + selectedProfile.throttleSettings.MaxVibration = value; + throttleMaxVibrationNumericUpDown.Value = value; + + + } + + private void throttleMaxVibrationNumericUpDown_ValueChanged(object sender, EventArgs e) + { + int value = (int)Math.Floor(throttleMaxVibrationNumericUpDown.Value); + selectedProfile.throttleSettings.MaxVibration = value; + throttleMaxVibrationTrackBar.Value = value; + + + } + + private void throttleVibrationSmoothTrackBar_Scroll(object sender, EventArgs e) + { + int value = throttleVibrationSmoothTrackBar.Value; + selectedProfile.throttleSettings.VibrationSmoothing = NormalizeValue(value); + throttleVibrationSmoothNumericUpDown.Value = value; + + + } + + private void throttleVibrationSmoothNumericUpDown_ValueChanged(object sender, EventArgs e) + { + float value = (float)throttleVibrationSmoothNumericUpDown.Value; + selectedProfile.throttleSettings.VibrationSmoothing = NormalizeValue(value); + throttleVibrationSmoothTrackBar.Value = (int)Math.Floor(value); + + + } + + private void throttleMinStiffnessTrackBar_Scroll(object sender, EventArgs e) + { + int value = throttleMinStiffnessTrackBar.Value; + selectedProfile.throttleSettings.MinStiffness = value; + throttleMinStiffnessNumericUpDown.Value = value; + + + } + + private void throttleMinStiffnessNumericUpDown_ValueChanged(object sender, EventArgs e) + { + int value = (int)Math.Floor(throttleMinStiffnessNumericUpDown.Value); + selectedProfile.throttleSettings.MinStiffness = value; + throttleMinStiffnessTrackBar.Value = value; + + + } + + private void throttleMaxStiffnessTrackBar_Scroll(object sender, EventArgs e) + { + int value = throttleMaxStiffnessTrackBar.Value; + selectedProfile.throttleSettings.MaxStiffness = value; + throttleMaxStiffnessNumericUpDown.Value = value; + + + } + + private void throttleMaxStiffnessNumericUpDown_ValueChanged(object sender, EventArgs e) + { + int value = (int)Math.Floor(throttleMaxStiffnessNumericUpDown.Value); + selectedProfile.throttleSettings.MaxStiffness = value; + throttleMaxStiffnessTrackBar.Value = value; + + + } + + private void throttleMinResistanceTrackBar_Scroll(object sender, EventArgs e) + { + int value = throttleMinResistanceTrackBar.Value; + selectedProfile.throttleSettings.MinResistance = value; + throttleMinResistanceNumericUpDown.Value = value; + + + } + + private void throttleMinResistanceNumericUpDown_ValueChanged(object sender, EventArgs e) + { + int value = (int)Math.Floor(throttleMinResistanceNumericUpDown.Value); + selectedProfile.throttleSettings.MinResistance = value; + throttleMinResistanceTrackBar.Value = value; + + + } + + private void throttleMaxResistanceTrackBar_Scroll(object sender, EventArgs e) + { + int value = throttleMaxResistanceTrackBar.Value; + selectedProfile.throttleSettings.MaxResistance = value; + throttleMaxResistanceNumericUpDown.Value = value; + + + } + + private void throttleMaxResistanceNumericUpDown_ValueChanged(object sender, EventArgs e) + { + int value = (int)Math.Floor(throttleMaxResistanceNumericUpDown.Value); + selectedProfile.throttleSettings.MaxResistance = value; + throttleMaxResistanceTrackBar.Value = value; + + + } + + private void throttleResistanceSmoothTrackBar_Scroll(object sender, EventArgs e) + { + int value = throttleResistanceSmoothTrackBar.Value; + selectedProfile.throttleSettings.ResistanceSmoothing = NormalizeValue(value); + throttleResistanceSmoothNumericUpDown.Value = value; + + + } + + private void throttleResistanceSmoothNumericUpDown_ValueChanged(object sender, EventArgs e) + { + float value = (float)throttleResistanceSmoothNumericUpDown.Value; + selectedProfile.throttleSettings.ResistanceSmoothing = NormalizeValue(value); + throttleResistanceSmoothTrackBar.Value = (int)Math.Floor(value); + + + } + #endregion + + #endregion + + private void buttonApplyMisc_Click(object sender, EventArgs e) + { + if (forzaDSXWorker != null) + { + selectedProfile.executableNames = executables.ToList(); + + forzaDSXWorker.SetSettings(CurrentSettings); + ConfigHandler.SaveConfig(); + appCheckWorker.updateExecutables(); + //RestartAppCheckThread(); + + } + } + + private void buttonApply_Brake_Click(object sender, EventArgs e) + { + if (forzaDSXWorker != null) + { + + forzaDSXWorker.SetSettings(CurrentSettings); + ConfigHandler.SaveConfig(); + + } + } + + private void buttonApply_Throttle_Click(object sender, EventArgs e) + { + if (forzaDSXWorker != null) + { + + forzaDSXWorker.SetSettings(CurrentSettings); + ConfigHandler.SaveConfig(); + + } + } + + private void miscDefaultsButton_Click(object sender, EventArgs e) + { + + selectedProfile.RPMRedlineRatio = 0.9f; + selectedProfile.gameUDPPort = 9999; + FullResetValues(); + } + + private void brakeDefaultsButton_Click(object sender, EventArgs e) + { + selectedProfile.brakeSettings = new BrakeSettings(); + FullResetValues(); + } + + private void throttleDefaultsButton_Click(object sender, EventArgs e) + { + selectedProfile.throttleSettings = new ThrottleSettings(); + FullResetValues(); + } + + protected void FullResetValues() + { + // CurrentSettings.Reset(); + + SetupUI(); + + if (forzaDSXWorker != null) + { + // CurrentSettings.Save(); + ConfigHandler.SaveConfig(); + forzaDSXWorker.SetSettings(CurrentSettings); + + StartForzaDSXThread(); + } + } - bool bForzaConnected = false; - bool bDsxConnected = false; + private void brakeTriggerModeComboBox_SelectedIndexChanged(object sender, EventArgs e) + { + selectedProfile.brakeSettings.TriggerMode = (Config.TriggerMode)(sbyte)brakeTriggerModeComboBox.SelectedIndex; + } - Thread appCheckThread; - Thread forzaDsxThread; - - CancellationTokenSource appCheckThreadCancellationToken; - CancellationToken appCheckThreadToken; - - CancellationTokenSource forzaThreadCancellationToken; - CancellationToken forzaThreadToken; - - public UI() - { - InitializeComponent(); - - //forzaDSXWorker = new ForzaDSXWorker(this); - } - - void UpdateDSXConnectionStatus(bool bConnected) - { - toolStripStatusDSX.Image = bConnected ? Resources.greenBtn : Resources.redBtn; - bDsxConnected = bConnected; - } - - void UpdateForzaConnectionStatus(bool bConnected) - { - toolStripStatusForza.Image = bConnected ? Resources.greenBtn : Resources.redBtn; - bForzaConnected = bConnected; - } - - public void Output(string Text, bool bShowMessageBox = false) - { - outputListBox.Items.Insert(0, Text); - - if (outputListBox.Items.Count > 50) - { - outputListBox.Items.RemoveAt(50); - } - - if (bShowMessageBox) - { - MessageBox.Show(Text); - } - } - - private void UI_Load(object sender, EventArgs e) - { - this.Text = "ForzaDSX version: " + Program.VERSION; - - LoadSettings(); - - noRaceText.Text = String.Empty; - throttleVibrationMsg.Text = String.Empty; - throttleMsg.Text = String.Empty; - brakeVibrationMsg.Text = String.Empty; - brakeMsg.Text = String.Empty; - - noRaceGroupBox.Visible = currentSettings._verbose > 0; - raceGroupBox.Visible = currentSettings._verbose > 0; - - // Starts the background Worker - //this.connectionWorker.RunWorkerAsync(); - - var progressHandler = new Progress(AppCheckReporter); - - AppCheckThread act = new AppCheckThread(ref currentSettings, progressHandler); - appCheckThreadCancellationToken = new CancellationTokenSource(); - appCheckThreadToken = appCheckThreadCancellationToken.Token; - - appCheckThreadToken.Register(() => act.Stop()); - - appCheckThread = new Thread(new ThreadStart(act.Run)); - appCheckThread.IsBackground = true; - - appCheckThread.Start(); - - var forzaProgressHandler = new Progress(WorkerThreadReporter); - - forzaDSXWorker = new ForzaDSXWorker(currentSettings, forzaProgressHandler); - - forzaThreadCancellationToken = new CancellationTokenSource(); - forzaThreadToken = forzaThreadCancellationToken.Token; - - forzaThreadToken.Register(() => forzaDSXWorker.Stop()); - } - - protected void AppCheckReporter(AppCheckReportStruct value) - { - if (value.type == AppCheckReportStruct.AppType.NONE) - { - Output(value.message); - } - else if (value.type == AppCheckReportStruct.AppType.DSX) - { - UpdateDSXConnectionStatus(value.value); - } - else - { - UpdateForzaConnectionStatus(value.value); - } - - if (forzaDsxThread == null) - { - if (bForzaConnected && bDsxConnected) - { - StartForzaDSXThread(); - } - } - else - { - if (!bForzaConnected || !bDsxConnected) - { - StopForzaDSXThread(); - } - } - } - - protected void StartForzaDSXThread() - { - if (forzaDsxThread != null - || forzaDSXWorker == null) - return; - - forzaDsxThread = new Thread(new ThreadStart(forzaDSXWorker.Run)); - forzaDsxThread.IsBackground = true; - - forzaDsxThread.Start(); - } - - protected void StopForzaDSXThread() - { - try - { - if (forzaDsxThread != null - && forzaThreadCancellationToken != null) - { - forzaThreadCancellationToken.Cancel(); - } - } - catch (Exception) - { - - throw; - } - - forzaDsxThread = null; - } - - protected void WorkerThreadReporter(ForzaDSXReportStruct value) - { - switch (value.type) - { - case ForzaDSXReportStruct.ReportType.VERBOSEMESSAGE: - Output(value.message); - break; - case ForzaDSXReportStruct.ReportType.NORACE: - if (currentSettings._verbose > 0) - { - noRaceGroupBox.Visible = true; - raceGroupBox.Visible = false; - } - - noRaceText.Text = value.message; - break; - case ForzaDSXReportStruct.ReportType.RACING: - if (currentSettings._verbose > 0) - { - noRaceGroupBox.Visible = false; - raceGroupBox.Visible = true; - } - - switch (value.racingType) - { - case ForzaDSXReportStruct.RacingReportType.THROTTLE_VIBRATION: - throttleVibrationMsg.Text = value.message; - break; - case ForzaDSXReportStruct.RacingReportType.THROTTLE: - throttleMsg.Text = value.message; - break; - case ForzaDSXReportStruct.RacingReportType.BRAKE_VIBRATION: - brakeVibrationMsg.Text = value.message; - break; - case ForzaDSXReportStruct.RacingReportType.BRAKE: - brakeMsg.Text = value.message; - break; - } - break; - } - } - - private void UI_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e) - { - appCheckThreadCancellationToken.Cancel(); - appCheckThreadCancellationToken.Dispose(); - - forzaThreadCancellationToken.Cancel(); - forzaThreadCancellationToken.Dispose(); - } - - public void LoadSettings() - { - //// Build a config object, using env vars and JSON providers. - //config = new ConfigurationBuilder() - // .AddIniFile("appsettings.ini") - // .Build(); - - try - { - - // Get values from the config given their key and their target type. - currentSettings = Properties.Settings.Default; - - currentSettings._left_Trigger_Effect_Intensity = Math.Clamp(currentSettings._left_Trigger_Effect_Intensity, 0.0f, 1.0f); - currentSettings._right_Trigger_Effect_Intensity = Math.Clamp(currentSettings._right_Trigger_Effect_Intensity, 0.0f, 1.0f); - - verboseModeOffToolStripMenuItem.Checked = currentSettings._verbose == 0; - verboseModeLowToolStripMenuItem.Checked = currentSettings._verbose == 1; - verboseModeFullToolStripMenuItem.Checked = currentSettings._verbose == 2; - } - catch (Exception e) - { - Output("Invalid Configuration File!\n" + e.Message, true); - } - - SetupUI(); - } - - #region UI Forms control - void SetupUI() - { - // Misc panel - this.rpmTrackBar.Value = DenormalizeValue(currentSettings._rpm_Redline_Ratio); - rpmValueNumericUpDown.Value = rpmTrackBar.Value; - - this.appCheckBox.Checked = currentSettings._disable_App_Check; - this.dsxNumericUpDown.Value = currentSettings._dsx_PORT; - this.forzaPortNumericUpDown.Value = currentSettings._forza_PORT; - - // Brake Panel - this.brakeTriggerModeComboBox.SelectedIndex = currentSettings.BrakeTriggerMode; - this.brakeEffectIntensityTrackBar.Value = DenormalizeValue(currentSettings._left_Trigger_Effect_Intensity); - this.gripLossTrackBar.Value = DenormalizeValue(currentSettings._grip_Loss_Val); - this.brakeVibrationStartTrackBar.Value = currentSettings._brake_Vibration_Start; - this.brakeVibrationModeTrackBar.Value = currentSettings._brake_Vibration_Mode_Start; - this.minBrakeVibrationTrackBar.Value = currentSettings._min_Brake_Vibration; - this.maxBrakeVibrationTrackBar.Value = currentSettings._max_Brake_Vibration; - this.vibrationSmoothingTrackBar.Value = DenormalizeValue(currentSettings._ewma_Alpha_Brake_Freq, 500.0f); - this.minBrakeStiffnessTrackBar.Value = currentSettings._min_Brake_Stiffness; - this.maxBrakeStiffnessTrackBar.Value = currentSettings._max_Brake_Stiffness; - this.minBrakeResistanceTrackBar.Value = currentSettings._min_Brake_Resistance; - this.maxBrakeResistanceTrackBar.Value = currentSettings._max_Brake_Resistance; - this.brakeResistanceSmoothingTrackBar.Value = DenormalizeValue(currentSettings._ewma_Alpha_Brake, 500.0f); - - this.brakeEffectNumericUpDown.Value = this.brakeEffectIntensityTrackBar.Value; - this.gripLossNumericUpDown.Value = this.gripLossTrackBar.Value; - this.brakeVibrationStartNumericUpDown.Value = this.brakeVibrationStartTrackBar.Value; - this.brakeVibrationModeNumericUpDown.Value = this.brakeVibrationModeTrackBar.Value; - this.minBrakeVibrationNumericUpDown.Value = this.minBrakeVibrationTrackBar.Value; - this.maxBrakeVibrationNumericUpDown.Value = this.maxBrakeVibrationTrackBar.Value; - this.brakeVibrationSmoothNumericUpDown.Value = this.vibrationSmoothingTrackBar.Value; - this.minBrakeStifnessNumericUpDown.Value = this.minBrakeStiffnessTrackBar.Value; - this.maxBrakeStifnessNumericUpDown.Value = this.maxBrakeStiffnessTrackBar.Value; - this.minBrakeResistanceNumericUpDown.Value = this.minBrakeResistanceTrackBar.Value; - this.maxBrakeResistanceNumericUpDown.Value = this.maxBrakeResistanceTrackBar.Value; - this.brakeResistanceSmoothNumericUpDown.Value = this.brakeResistanceSmoothingTrackBar.Value; - - // Throttle Panel - this.throttleTriggerModeComboBox.SelectedIndex = currentSettings.ThrottleTriggerMode; - this.throttleIntensityTrackBar.Value = DenormalizeValue(currentSettings._right_Trigger_Effect_Intensity); - this.throttleGripLossTrackBar.Value = DenormalizeValue(currentSettings._throttle_Grip_Loss_Val); - this.throttleTurnAccelScaleTrackBar.Value = DenormalizeValue(currentSettings._turn_Accel_Mod); - this.throttleForwardAccelScaleTrackBar.Value = DenormalizeValue(currentSettings._forward_Accel_Mod); - this.throttleAccelLimitTrackBar.Value = currentSettings._acceleration_Limit; - this.throttleVibrationModeStartTrackBar.Value = currentSettings._throttle_Vibration_Mode_Start; - this.throttleMinVibrationTrackBar.Value = currentSettings._min_Accel_Griploss_Vibration; - this.throttleMaxVibrationTrackBar.Value = currentSettings._max_Accel_Griploss_Vibration; - this.throttleVibrationSmoothTrackBar.Value = DenormalizeValue(currentSettings._ewma_Alpha_Throttle_Freq); - this.throttleMinStiffnessTrackBar.Value = currentSettings._min_Accel_Griploss_Stiffness; - this.throttleMaxStiffnessTrackBar.Value = currentSettings._max_Accel_Griploss_Stiffness; - this.throttleMinResistanceTrackBar.Value = currentSettings._min_Throttle_Resistance; - this.throttleMaxResistanceTrackBar.Value = currentSettings._max_Throttle_Resistance; - this.throttleResistanceSmoothTrackBar.Value = DenormalizeValue(currentSettings._ewma_Alpha_Throttle); - - this.throttleIntensityNumericUpDown.Value = this.throttleIntensityTrackBar.Value; - this.throttleGripLossNumericUpDown.Value = this.throttleGripLossTrackBar.Value; - this.throttleTurnAccelScaleNumericUpDown.Value = this.throttleTurnAccelScaleTrackBar.Value; - this.throttleForwardAccelScaleNumericUpDown.Value = this.throttleForwardAccelScaleTrackBar.Value; - this.throttleAccelLimitNumericUpDown.Value = this.throttleAccelLimitTrackBar.Value; - this.throttleVibrationStartNumericUpDown.Value = this.throttleVibrationModeStartTrackBar.Value; - this.throttleMinVibrationNumericUpDown.Value = this.throttleMinVibrationTrackBar.Value; - this.throttleMaxVibrationNumericUpDown.Value = this.throttleMaxVibrationTrackBar.Value; - this.throttleVibrationSmoothNumericUpDown.Value = this.throttleVibrationSmoothTrackBar.Value; - this.throttleMinStiffnessNumericUpDown.Value = this.throttleMinStiffnessTrackBar.Value; - this.throttleMaxStiffnessNumericUpDown.Value = this.throttleMaxStiffnessTrackBar.Value; - this.throttleMinResistanceNumericUpDown.Value = this.throttleMinResistanceTrackBar.Value; - this.throttleMaxResistanceNumericUpDown.Value = this.throttleMaxResistanceTrackBar.Value; - this.throttleResistanceSmoothNumericUpDown.Value = this.throttleResistanceSmoothTrackBar.Value; - } - - static int DenormalizeValue(float normalizedValue, float scale = 100.0f) - { - return (int)Math.Floor(normalizedValue * scale); - } - - static float NormalizeValue(float value, float scale = 100.0f) - { - if (scale == 0) - return value; - - return value / scale; - } - - private void verboseModeFullToolStripMenuItem_Click(object sender, EventArgs e) - { - currentSettings._verbose = 2; - verboseModeOffToolStripMenuItem.Checked = false; - verboseModeLowToolStripMenuItem.Checked = false; - verboseModeFullToolStripMenuItem.Checked = true; - } - - private void verboseModeLowToolStripMenuItem_Click(object sender, EventArgs e) - { - currentSettings._verbose = 1; - verboseModeOffToolStripMenuItem.Checked = false; - verboseModeLowToolStripMenuItem.Checked = true; - verboseModeFullToolStripMenuItem.Checked = false; - } - - private void verboseModeOffToolStripMenuItem_Click(object sender, EventArgs e) - { - currentSettings._verbose = 0; - verboseModeOffToolStripMenuItem.Checked = true; - verboseModeLowToolStripMenuItem.Checked = false; - verboseModeFullToolStripMenuItem.Checked = false; - - noRaceGroupBox.Visible = false; - raceGroupBox.Visible = false; - } - - #region Misc - private void rpmTrackBar_Scroll(object sender, EventArgs e) - { - currentSettings._rpm_Redline_Ratio = NormalizeValue(this.rpmTrackBar.Value); - rpmValueNumericUpDown.Value = rpmTrackBar.Value; - } - - private void rpmValueNumericUpDown_ValueChanged(object sender, EventArgs e) - { - currentSettings._rpm_Redline_Ratio = NormalizeValue((float)this.rpmValueNumericUpDown.Value); - rpmTrackBar.Value = (int)Math.Floor(rpmValueNumericUpDown.Value); - } - - private void appCheckBox_CheckedChanged(object sender, EventArgs e) - { - currentSettings._disable_App_Check = this.appCheckBox.Checked; - } - - private void dsxNumericUpDown_ValueChanged(object sender, EventArgs e) - { - currentSettings._dsx_PORT = (int)Math.Floor(this.dsxNumericUpDown.Value); - } - - private void forzaPortNumericUpDown_ValueChanged(object sender, EventArgs e) - { - currentSettings._forza_PORT = (int)Math.Floor(this.forzaPortNumericUpDown.Value); - } - #endregion - - #region Brake - private void brakeEffectIntensityTrackBar_Scroll(object sender, EventArgs e) - { - currentSettings._left_Trigger_Effect_Intensity = NormalizeValue(brakeEffectIntensityTrackBar.Value); - this.brakeEffectNumericUpDown.Value = brakeEffectIntensityTrackBar.Value; - } - - private void brakeEffectNumericUpDown_ValueChanged(object sender, EventArgs e) - { - currentSettings._left_Trigger_Effect_Intensity = NormalizeValue((float)brakeEffectNumericUpDown.Value); - brakeEffectIntensityTrackBar.Value = (int)Math.Floor(brakeEffectNumericUpDown.Value); - } - - private void gripLossTrackBar_Scroll(object sender, EventArgs e) - { - currentSettings._grip_Loss_Val = NormalizeValue(this.gripLossTrackBar.Value); - gripLossNumericUpDown.Value = gripLossTrackBar.Value; - } - - private void gripLossNumericUpDown_ValueChanged(object sender, EventArgs e) - { - currentSettings._grip_Loss_Val = NormalizeValue((float)gripLossNumericUpDown.Value); - gripLossTrackBar.Value = (int)Math.Floor(gripLossNumericUpDown.Value); - } - - private void brakeVibrationStartTrackBar_Scroll(object sender, EventArgs e) - { - currentSettings._brake_Vibration_Start = this.brakeVibrationStartTrackBar.Value; - brakeVibrationStartNumericUpDown.Value = brakeVibrationStartTrackBar.Value; - } - - private void brakeVibrationStartNumericUpDown_ValueChanged(object sender, EventArgs e) - { - currentSettings._brake_Vibration_Start = (int)Math.Floor(brakeVibrationStartNumericUpDown.Value); - brakeVibrationStartTrackBar.Value = currentSettings._brake_Vibration_Start; - } - - private void brakeVibrationModeTrackBar_Scroll(object sender, EventArgs e) - { - currentSettings._brake_Vibration_Mode_Start = this.brakeVibrationModeTrackBar.Value; - brakeVibrationModeNumericUpDown.Value = brakeVibrationModeTrackBar.Value; - } - - private void brakeVibrationModeNumericUpDown_ValueChanged(object sender, EventArgs e) - { - currentSettings._brake_Vibration_Mode_Start = (int)Math.Floor(brakeVibrationModeNumericUpDown.Value); - brakeVibrationModeTrackBar.Value = currentSettings._brake_Vibration_Mode_Start; - } - - private void minBrakeVibrationTrackBar_Scroll(object sender, EventArgs e) - { - currentSettings._min_Brake_Vibration = minBrakeVibrationTrackBar.Value; - minBrakeVibrationNumericUpDown.Value = minBrakeVibrationTrackBar.Value; - } - - private void minBrakeVibrationNumericUpDown_ValueChanged(object sender, EventArgs e) - { - currentSettings._min_Brake_Vibration = (int)Math.Floor(minBrakeVibrationNumericUpDown.Value); - minBrakeVibrationTrackBar.Value = currentSettings._min_Brake_Vibration; - } - - private void maxBrakeVibrationTrackBar_Scroll(object sender, EventArgs e) - { - currentSettings._max_Brake_Vibration = maxBrakeVibrationTrackBar.Value; - maxBrakeVibrationNumericUpDown.Value = maxBrakeVibrationTrackBar.Value; - } - - private void maxBrakeVibrationNumericUpDown_ValueChanged(object sender, EventArgs e) - { - currentSettings._max_Brake_Vibration = (int)Math.Floor(maxBrakeVibrationNumericUpDown.Value); - maxBrakeVibrationTrackBar.Value = currentSettings._max_Brake_Vibration; - } - - private void vibrationSmoothingTrackBar_Scroll(object sender, EventArgs e) - { - currentSettings._ewma_Alpha_Brake_Freq = NormalizeValue(vibrationSmoothingTrackBar.Value, 500); - brakeVibrationSmoothNumericUpDown.Value = vibrationSmoothingTrackBar.Value; - } - - private void brakeVibrationSmoothNumericUpDown_ValueChanged(object sender, EventArgs e) - { - currentSettings._ewma_Alpha_Brake_Freq = NormalizeValue((float)brakeVibrationSmoothNumericUpDown.Value, 500); - vibrationSmoothingTrackBar.Value = (int)Math.Floor(brakeVibrationSmoothNumericUpDown.Value); - } - - private void minBrakeStiffnessTrackBar_Scroll(object sender, EventArgs e) - { - currentSettings._min_Brake_Stiffness = minBrakeStiffnessTrackBar.Value; - minBrakeStifnessNumericUpDown.Value = minBrakeStiffnessTrackBar.Value; - } - - private void minBrakeStifnessNumericUpDown_ValueChanged(object sender, EventArgs e) - { - currentSettings._min_Brake_Stiffness = (int)Math.Floor(minBrakeVibrationNumericUpDown.Value); - minBrakeVibrationTrackBar.Value = currentSettings._min_Brake_Stiffness; - } - - private void maxBrakeStiffnessTrackBar_Scroll(object sender, EventArgs e) - { - currentSettings._max_Brake_Stiffness = maxBrakeStiffnessTrackBar.Value; - maxBrakeStifnessNumericUpDown.Value = maxBrakeStiffnessTrackBar.Value; - } - - private void maxBrakeStifnessNumericUpDown_ValueChanged(object sender, EventArgs e) - { - currentSettings._max_Brake_Stiffness = (int)Math.Floor(maxBrakeVibrationNumericUpDown.Value); - maxBrakeVibrationTrackBar.Value = currentSettings._max_Brake_Stiffness; - } - - private void minBrakeResistanceTrackBar_Scroll(object sender, EventArgs e) - { - int value = minBrakeResistanceTrackBar.Value; - if (value > currentSettings._max_Brake_Resistance) - value = currentSettings._max_Brake_Resistance; - - currentSettings._min_Brake_Resistance = value; - - minBrakeResistanceTrackBar.Value = value; - minBrakeResistanceNumericUpDown.Value = value; - } - - private void minBrakeResistanceNumericUpDown_ValueChanged(object sender, EventArgs e) - { - int value = (int)Math.Floor(minBrakeResistanceNumericUpDown.Value); - if (value > currentSettings._max_Brake_Resistance) - value = currentSettings._max_Brake_Resistance; - - currentSettings._min_Brake_Resistance = value; - - minBrakeResistanceTrackBar.Value = value; - minBrakeResistanceNumericUpDown.Value = value; - } - - private void maxBrakeResistanceTrackBar_Scroll(object sender, EventArgs e) - { - int value = maxBrakeResistanceTrackBar.Value; - if (value < currentSettings._min_Brake_Resistance) - value = currentSettings._min_Brake_Resistance; - - currentSettings._max_Brake_Resistance = value; - - maxBrakeResistanceTrackBar.Value = value; - maxBrakeResistanceNumericUpDown.Value = value; - } - - private void maxBrakeResistanceNumericUpDown_ValueChanged(object sender, EventArgs e) - { - int value = (int)Math.Floor(maxBrakeResistanceNumericUpDown.Value); - if (value < currentSettings._min_Brake_Resistance) - value = currentSettings._min_Brake_Resistance; - - currentSettings._max_Brake_Resistance = value; - - maxBrakeResistanceTrackBar.Value = value; - maxBrakeResistanceNumericUpDown.Value = value; - } - - private void brakeResistanceSmoothingTrackBar_Scroll(object sender, EventArgs e) - { - currentSettings._ewma_Alpha_Brake = NormalizeValue(brakeResistanceSmoothingTrackBar.Value, 500); - brakeResistanceSmoothNumericUpDown.Value = brakeResistanceSmoothingTrackBar.Value; - } - - private void brakeResistanceSmoothNumericUpDown_ValueChanged(object sender, EventArgs e) - { - currentSettings._ewma_Alpha_Brake = NormalizeValue((float)brakeResistanceSmoothNumericUpDown.Value, 500); - brakeResistanceSmoothingTrackBar.Value = (int)Math.Floor(brakeResistanceSmoothNumericUpDown.Value); - } - #endregion - - #region Throttle - private void throttleIntensityTrackBar_Scroll(object sender, EventArgs e) - { - currentSettings._right_Trigger_Effect_Intensity = NormalizeValue(throttleIntensityTrackBar.Value); - throttleIntensityNumericUpDown.Value = throttleIntensityTrackBar.Value; - } - - private void throttleIntensityNumericUpDown_ValueChanged(object sender, EventArgs e) - { - currentSettings._right_Trigger_Effect_Intensity = NormalizeValue((float)throttleIntensityNumericUpDown.Value); - throttleIntensityTrackBar.Value = (int)Math.Floor(throttleIntensityNumericUpDown.Value); - } - - private void throttleGripLossTrackBar_Scroll(object sender, EventArgs e) - { - int value = throttleGripLossTrackBar.Value; - currentSettings._throttle_Grip_Loss_Val = NormalizeValue(value); - throttleGripLossNumericUpDown.Value = value; - } - - private void throttleGripLossNumericUpDown_ValueChanged(object sender, EventArgs e) - { - float value = (float)throttleGripLossNumericUpDown.Value; - currentSettings._throttle_Grip_Loss_Val = NormalizeValue(value); - throttleGripLossTrackBar.Value = (int)Math.Floor(value); - } - - private void throttleTurnAccelScaleTrackBar_Scroll(object sender, EventArgs e) - { - int value = throttleTurnAccelScaleTrackBar.Value; - currentSettings._turn_Accel_Mod = NormalizeValue(value); - throttleTurnAccelScaleNumericUpDown.Value = value; - } - - private void throttleTurnAccelScaleNumericUpDown_ValueChanged(object sender, EventArgs e) - { - float value = (float)throttleTurnAccelScaleNumericUpDown.Value; - currentSettings._turn_Accel_Mod = NormalizeValue(value); - throttleTurnAccelScaleTrackBar.Value = (int)Math.Floor(value); - } - - private void throttleForwardAccelScaleTrackBar_Scroll(object sender, EventArgs e) - { - int value = throttleForwardAccelScaleTrackBar.Value; - currentSettings._forward_Accel_Mod = NormalizeValue(value); - throttleForwardAccelScaleNumericUpDown.Value = value; - } - - private void throttleForwardAccelScaleNumericUpDown_ValueChanged(object sender, EventArgs e) - { - float value = (float)throttleForwardAccelScaleNumericUpDown.Value; - currentSettings._forward_Accel_Mod = NormalizeValue(value); - throttleForwardAccelScaleTrackBar.Value = (int)Math.Floor(value); - } - - private void throttleAccelLimitTrackBar_Scroll(object sender, EventArgs e) - { - int value = throttleAccelLimitTrackBar.Value; - currentSettings._acceleration_Limit = value; - throttleAccelLimitNumericUpDown.Value = value; - } - - private void throttleAccelLimitNumericUpDown_ValueChanged(object sender, EventArgs e) - { - int value = (int)Math.Floor(throttleAccelLimitNumericUpDown.Value); - currentSettings._acceleration_Limit = value; - throttleAccelLimitTrackBar.Value = value; - } - - private void throttleVibrationModeStartTrackBar_Scroll(object sender, EventArgs e) - { - int value = throttleVibrationModeStartTrackBar.Value; - currentSettings._throttle_Vibration_Mode_Start = value; - throttleVibrationStartNumericUpDown.Value = value; - } - - private void throttleVibrationStartNumericUpDown_ValueChanged(object sender, EventArgs e) - { - int value = (int)Math.Floor(throttleVibrationStartNumericUpDown.Value); - currentSettings._throttle_Vibration_Mode_Start = value; - throttleVibrationModeStartTrackBar.Value = value; - } - - private void throttleMinVibrationTrackBar_Scroll(object sender, EventArgs e) - { - int value = throttleMinVibrationTrackBar.Value; - currentSettings._min_Accel_Griploss_Vibration = value; - throttleMinVibrationNumericUpDown.Value = value; - } - - private void throttleMinVibrationNumericUpDown_ValueChanged(object sender, EventArgs e) - { - int value = (int)Math.Floor(throttleMinVibrationNumericUpDown.Value); - currentSettings._min_Accel_Griploss_Vibration = value; - throttleMinVibrationTrackBar.Value = value; - } - - private void throttleMaxVibrationTrackBar_Scroll(object sender, EventArgs e) - { - int value = throttleMaxVibrationTrackBar.Value; - currentSettings._max_Accel_Griploss_Vibration = value; - throttleMaxVibrationNumericUpDown.Value = value; - } - - private void throttleMaxVibrationNumericUpDown_ValueChanged(object sender, EventArgs e) - { - int value = (int)Math.Floor(throttleMaxVibrationNumericUpDown.Value); - currentSettings._max_Accel_Griploss_Vibration = value; - throttleMaxVibrationTrackBar.Value = value; - } - - private void throttleVibrationSmoothTrackBar_Scroll(object sender, EventArgs e) - { - int value = throttleVibrationSmoothTrackBar.Value; - currentSettings._ewma_Alpha_Throttle_Freq = NormalizeValue(value); - throttleVibrationSmoothNumericUpDown.Value = value; - } - - private void throttleVibrationSmoothNumericUpDown_ValueChanged(object sender, EventArgs e) - { - float value = (float)throttleVibrationSmoothNumericUpDown.Value; - currentSettings._ewma_Alpha_Throttle_Freq = NormalizeValue(value); - throttleVibrationSmoothTrackBar.Value = (int)Math.Floor(value); - } - - private void throttleMinStiffnessTrackBar_Scroll(object sender, EventArgs e) - { - int value = throttleMinStiffnessTrackBar.Value; - currentSettings._min_Accel_Griploss_Stiffness = value; - throttleMinStiffnessNumericUpDown.Value = value; - } - - private void throttleMinStiffnessNumericUpDown_ValueChanged(object sender, EventArgs e) - { - int value = (int)Math.Floor(throttleMinStiffnessNumericUpDown.Value); - currentSettings._min_Accel_Griploss_Stiffness = value; - throttleMinStiffnessTrackBar.Value = value; - } - - private void throttleMaxStiffnessTrackBar_Scroll(object sender, EventArgs e) - { - int value = throttleMaxStiffnessTrackBar.Value; - currentSettings._max_Accel_Griploss_Stiffness = value; - throttleMaxStiffnessNumericUpDown.Value = value; - } - - private void throttleMaxStiffnessNumericUpDown_ValueChanged(object sender, EventArgs e) - { - int value = (int)Math.Floor(throttleMaxStiffnessNumericUpDown.Value); - currentSettings._max_Accel_Griploss_Stiffness = value; - throttleMaxStiffnessTrackBar.Value = value; - } - - private void throttleMinResistanceTrackBar_Scroll(object sender, EventArgs e) - { - int value = throttleMinResistanceTrackBar.Value; - currentSettings._min_Throttle_Resistance = value; - throttleMinResistanceNumericUpDown.Value = value; - } - - private void throttleMinResistanceNumericUpDown_ValueChanged(object sender, EventArgs e) - { - int value = (int)Math.Floor(throttleMinResistanceNumericUpDown.Value); - currentSettings._min_Throttle_Resistance = value; - throttleMinResistanceTrackBar.Value = value; - } - - private void throttleMaxResistanceTrackBar_Scroll(object sender, EventArgs e) - { - int value = throttleMaxResistanceTrackBar.Value; - currentSettings._max_Throttle_Resistance = value; - throttleMaxResistanceNumericUpDown.Value = value; - } - - private void throttleMaxResistanceNumericUpDown_ValueChanged(object sender, EventArgs e) - { - int value = (int)Math.Floor(throttleMaxResistanceNumericUpDown.Value); - currentSettings._max_Throttle_Resistance = value; - throttleMaxResistanceTrackBar.Value = value; - } - - private void throttleResistanceSmoothTrackBar_Scroll(object sender, EventArgs e) - { - int value = throttleResistanceSmoothTrackBar.Value; - currentSettings._ewma_Alpha_Throttle = NormalizeValue(value); - throttleResistanceSmoothNumericUpDown.Value = value; - } - - private void throttleResistanceSmoothNumericUpDown_ValueChanged(object sender, EventArgs e) - { - float value = (float)throttleResistanceSmoothNumericUpDown.Value; - currentSettings._ewma_Alpha_Throttle = NormalizeValue(value); - throttleResistanceSmoothTrackBar.Value = (int)Math.Floor(value); - } - #endregion - - #endregion - - private void buttonApplyMisc_Click(object sender, EventArgs e) - { - if (forzaDSXWorker != null) - { - CurrentSettings.Save(); - - forzaDSXWorker.SetSettings(CurrentSettings); - } - } - - private void buttonApply_Brake_Click(object sender, EventArgs e) - { - if (forzaDSXWorker != null) - { - CurrentSettings.Save(); - - forzaDSXWorker.SetSettings(CurrentSettings); - } - } - - private void buttonApply_Throttle_Click(object sender, EventArgs e) - { - if (forzaDSXWorker != null) - { - CurrentSettings.Save(); - - forzaDSXWorker.SetSettings(CurrentSettings); - } - } - - private void miscDefaultsButton_Click(object sender, EventArgs e) - { - FullResetValues(); - } - - private void brakeDefaultsButton_Click(object sender, EventArgs e) - { - FullResetValues(); - } - - private void throttleDefaultsButton_Click(object sender, EventArgs e) - { - FullResetValues(); - } - - protected void FullResetValues() - { - CurrentSettings.Reset(); - - SetupUI(); - - if (forzaDSXWorker != null) - { - CurrentSettings.Save(); - - forzaDSXWorker.SetSettings(CurrentSettings); - - StartForzaDSXThread(); - } - } - - private void brakeTriggerModeComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - CurrentSettings.BrakeTriggerMode = (sbyte)brakeTriggerModeComboBox.SelectedIndex; - } - - private void throttleTriggerModeComboBox_SelectedIndexChanged(object sender, EventArgs e) - { - CurrentSettings.ThrottleTriggerMode = (sbyte)throttleTriggerModeComboBox.SelectedIndex; - } - } -} + private void throttleTriggerModeComboBox_SelectedIndexChanged(object sender, EventArgs e) + { + selectedProfile.throttleSettings.TriggerMode = (Config.TriggerMode)(sbyte)throttleTriggerModeComboBox.SelectedIndex; + } + + + + private void toolStripAppCheckOnItem_Click(object sender, EventArgs e) + { + currentSettings.DisableAppCheck = false; + toolStripAppCheckOnItem.Checked = true; + toolStripAppCheckOffItem.Checked = false; + toolStripAppCheckButton.Text = "App Check Enabled"; + ConfigHandler.SaveConfig(); + RestartAppCheckThread(); + } + + + + + + + private void toolStripAppCheckOffItem_Click(object sender, EventArgs e) + { + disableAppCheck(); + + } + + private void toolStripDSXPortButton_Click(object sender, EventArgs e) + { + try + { + currentSettings.DSXPort = Int32.Parse(toolStripDSXPortTextBox.Text); + ConfigHandler.SaveConfig(); + + } + catch (Exception) + { + toolStripDSXPortTextBox.Text = currentSettings.DSXPort.ToString(); + } + toolStripDSXPortButton.Text = "DSX Port: " + currentSettings.DSXPort.ToString(); + } + + private void toolStripDSXPortTextBox_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyValue == (char)Keys.Enter) + { + try + { + currentSettings.DSXPort = Int32.Parse(toolStripDSXPortTextBox.Text); + ConfigHandler.SaveConfig(); + } + catch (Exception) + { + toolStripDSXPortTextBox.Text = currentSettings.DSXPort.ToString(); + } + toolStripDSXPortButton.Text = "DSX Port: " + currentSettings.DSXPort.ToString(); + } + } + + private void profilesListView_SelectedIndexChanged(object sender, EventArgs e) + { + if (profilesListView.SelectedItems.Count == 0) + { + profilesListView.Items[selectedIndex].Selected = true; + return; + + } + + } + + + + private void profilesListView_MouseDown(object sender, MouseEventArgs e) + { + ListViewHitTestInfo HI = profilesListView.HitTest(e.Location); + + + if (e.Button == MouseButtons.Right) + { + if (HI.Item != null) + { + clickedProfileName = HI.Item.Name; + newToolStripMenuItem.Enabled = true; + renameToolStripMenuItem.Enabled = true; + disableToolStripMenuItem.Enabled = true; + deleteToolStripMenuItem.Enabled = true; + copyToolStripMenuItem.Enabled = false; + defaultToolStripMenuItem.Enabled = true; + setActiveToolStripMenuItem.Enabled = true; + + + if (currentSettings.Profiles[HI.Item.Name].IsEnabled) + { + disableToolStripMenuItem.Text = "Disable"; + } + else + { + disableToolStripMenuItem.Text = "Enable"; + } + if (currentSettings.Profiles[HI.Item.Name] == currentSettings.ActiveProfile) + { + setActiveToolStripMenuItem.CheckState = CheckState.Checked; + } + else + { + setActiveToolStripMenuItem.CheckState = CheckState.Unchecked; + } + if (HI.Item.Name == currentSettings.DefaultProfile) + { + defaultToolStripMenuItem.CheckState = CheckState.Checked; + } + else + { + defaultToolStripMenuItem.CheckState = CheckState.Unchecked; + } + ProfilesContextMenu.Show(Cursor.Position); + } + else + { + ProfilesContextMenu.Items[1].Enabled = false; + ProfilesContextMenu.Items[2].Enabled = false; + ProfilesContextMenu.Items[3].Enabled = false; + ProfilesContextMenu.Items[4].Enabled = false; + ProfilesContextMenu.Items[5].Enabled = false; + ProfilesContextMenu.Items[6].Enabled = false; + ProfilesContextMenu.Show(Cursor.Position); + + } + } + else if (e.Button == MouseButtons.Left) + { + if (HI.Item == null) + { + return; + } + selectedIndex = HI.Item.Index; + String profileName = HI.Item.Name; + // HI.Item.Selected = true; + SwitchDisplayedProfile(profileName); + } + } + + private void newToolStripMenuItem_Click(object sender, EventArgs e) + { + String newProfileName = NameForm.ShowDialog("", "Please enter the Profile Name"); + if (newProfileName != "") + { + if (currentSettings.Profiles.ContainsKey(newProfileName)) + { + string message = "You cannot have a duplicate Profile Name!"; + MessageBox.Show(message); + return; + + } + Profile newProfile = new Profile(); + newProfile.Name = newProfileName; + currentSettings.Profiles.Add(newProfileName, newProfile); + ConfigHandler.SaveConfig(); + loadProfilesIntoList(); + } + + } + + private void renameToolStripMenuItem_Click(object sender, EventArgs e) + { + String oldProfileName = clickedProfileName; + String newProfileName = NameForm.ShowDialog(oldProfileName, "Please enter the Profile Name"); + if (newProfileName != "" && oldProfileName != newProfileName) + { + if (currentSettings.Profiles.ContainsKey(newProfileName)) + { + string message = "You cannot have a duplicate Profile Name!"; + MessageBox.Show(message); + return; + + } + Profile newProfile = currentSettings.Profiles[oldProfileName]; + currentSettings.Profiles.Remove(oldProfileName); + newProfile.Name = newProfileName; + currentSettings.Profiles.Add(newProfileName, newProfile); + ConfigHandler.SaveConfig(); + loadProfilesIntoList(); + } + + } + + private void disableToolStripMenuItem_Click(object sender, EventArgs e) + { + String profileName = clickedProfileName; + if (currentSettings.Profiles.ContainsKey(profileName)) + { + Profile profile = currentSettings.Profiles[profileName]; + profile.IsEnabled = !profile.IsEnabled; + //profile.IsEnabled = false; + ConfigHandler.SaveConfig(); + loadProfilesIntoList(); + appCheckWorker.updateExecutables(); + } + + } + + private void deleteToolStripMenuItem_Click(object sender, EventArgs e) + { + String profileName = clickedProfileName; + if (currentSettings.Profiles.ContainsKey(profileName)) + { + currentSettings.Profiles.Remove(profileName); + ConfigHandler.SaveConfig(); + loadProfilesIntoList(); + } + + } + + private void copyToolStripMenuItem_Click(object sender, EventArgs e) + { + + } + + private void defaultToolStripMenuItem_Click(object sender, EventArgs e) + { + String profileName = clickedProfileName; + if (currentSettings.Profiles.ContainsKey(profileName)) + { + currentSettings.DefaultProfile = profileName; + ConfigHandler.SaveConfig(); + loadProfilesIntoList(); + } + } + + private void setActiveToolStripMenuItem_Click(object sender, EventArgs e) + { + String profileName = clickedProfileName; + if (currentSettings.Profiles.ContainsKey(profileName)) + { + //currentSettings.ActiveProfile = currentSettings.Profiles[profileName]; + disableAppCheck(); + SwitchActiveProfile(profileName); + + } + } + + private void AddExecutableButton_Click(object sender, EventArgs e) + { + String newExecutableName = NameForm.ShowDialog("", "Please enter the Executable Name"); ; + if (newExecutableName != "") + { + var prof = currentSettings.Profiles.Values.Where(x => x.executableNames.Contains(newExecutableName)); + if (prof.Count() > 0) + { + string message = "You cannot have a duplicate Executable Name! Executable already part of Profile " + prof.First().Name; + MessageBox.Show(message); + return; + + } + executables.Add(newExecutableName); + // ExecutableListBox.Items.Add(newExecutableName); + + } + } + + private void EditExecutableButton_Click(object sender, EventArgs e) + { + String oldExecutableName = ExecutableListBox.SelectedItems[0].ToString(); + String newExecutableName = NameForm.ShowDialog(oldExecutableName, "Please enter the Executable Name"); ; + if (newExecutableName != "") + { + var prof = currentSettings.Profiles.Values.Where(x => x.executableNames.Contains(newExecutableName)); + if (prof.Count() > 0) + { + string message = "You cannot have a duplicate Executable Name! Executable already part of Profile " + prof.First().Name; + MessageBox.Show(message); + return; + } + int index = selectedProfile.executableNames.IndexOf(oldExecutableName); + executables[index] = newExecutableName; + // ExecutableListBox.SelectedIndex = -1; + // ExecutableListBox.Items.Add(newExecutableName); + + } + } + + private void RemoveExecutableButton_Click(object sender, EventArgs e) + { + String oldExecutableName = ExecutableListBox.SelectedItems[0].ToString(); + + executables.Remove(oldExecutableName); + + } + + private void ExecutableListBox_SelectedIndexChanged(object sender, EventArgs e) + { + + if (ExecutableListBox.SelectedItems.Count > 1) + { + EditExecutableButton.Enabled = false; + RemoveExecutableButton.Enabled = true; + return; + + } + else if (ExecutableListBox.SelectedItems.Count == 0) + { + EditExecutableButton.Enabled = false; + RemoveExecutableButton.Enabled = false; + } + else if (ExecutableListBox.SelectedItems.Count == 1) + { + EditExecutableButton.Enabled = true; + RemoveExecutableButton.Enabled = true; + } + } + + private void GameModeComboBox_SelectedIndexChanged(object sender, EventArgs e) + { + switch (GameModeComboBox.SelectedItem) + { + case "Forza": + selectedProfile.GameType = GameTypes.Forza; + break; + case "Dirt": + selectedProfile.GameType = GameTypes.Dirt; + break; + case "(None)": + selectedProfile.GameType = GameTypes.None; + break; + } + + } + } +} \ No newline at end of file diff --git a/UI.resx b/UI.resx index e65af6d..a88e6e7 100644 --- a/UI.resx +++ b/UI.resx @@ -1,4 +1,64 @@ - + + + @@ -63,4 +123,30 @@ 258, 17 + + + + iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAEKSURBVEhL3ZG9DsFQHMXvczDZvIOtXsHObuhqkViI3Quw + 6CYmNoMYJJ0NBiFFIoIytOuf0+TeXP3yde+iyS+3OcP53Z4y3/dJJ4HAsiwyTVMp6BQCBIZhKAWdEcHV + vSlBmeB82NFy1KLluEWOPRC5MoHdMWhazwi4RJlALgf4EuT6BI+5kCsTrGddUY658E+QvyXYHq9UnRyC + U87f4aUApcXhnrI9Jzg/laQKFntXlHM+lSQK5psL5fvbp/JvJLGCQqmSWM5JkiCT84igXGtSrruKLQ0T + luAdmZxHBG37FFuWBC/j5XKOmX8WAH7rcI6ZMffPgjQwN2bXJgDo/COBTpjneQ2dML0PY3cISreGe8HM + qgAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAEKSURBVEhL3ZG9DsFQHMXvczDZvIOtXsHObuhqkViI3Quw + 6CYmNoMYJJ0NBiFFIoIytOuf0+TeXP3yde+iyS+3OcP53Z4y3/dJJ4HAsiwyTVMp6BQCBIZhKAWdEcHV + vSlBmeB82NFy1KLluEWOPRC5MoHdMWhazwi4RJlALgf4EuT6BI+5kCsTrGddUY658E+QvyXYHq9UnRyC + U87f4aUApcXhnrI9Jzg/laQKFntXlHM+lSQK5psL5fvbp/JvJLGCQqmSWM5JkiCT84igXGtSrruKLQ0T + luAdmZxHBG37FFuWBC/j5XKOmX8WAH7rcI6ZMffPgjQwN2bXJgDo/COBTpjneQ2dML0PY3cISreGe8HM + qgAAAABJRU5ErkJggg== + + + + 427, 28 + \ No newline at end of file diff --git a/appsettings.ini b/appsettings.ini index c2581eb..a8986b8 100644 --- a/appsettings.ini +++ b/appsettings.ini @@ -24,7 +24,7 @@ _min_Throttle_Resistance=0 _min_Brake_Resistance=0 ;The upper end acceleration when calculating the throttle resistance. Any acceleration above this will be counted as this value when determining the throttle resistance. _acceleration_Limit=10 -DISABLE_APP_CHECK=false +DISABLE_APP_CHECK=true _dsx_PORT=6969 FORZA_PORT=5300 ;Smoothing for Throttle Resistance output. Lower = smoother. Must be greater than 0 { 0.01 - 0.99 } diff --git a/obj/ForzaDSX.csproj.nuget.dgspec.json b/obj/ForzaDSX.csproj.nuget.dgspec.json index ffcff4e..0d38648 100644 --- a/obj/ForzaDSX.csproj.nuget.dgspec.json +++ b/obj/ForzaDSX.csproj.nuget.dgspec.json @@ -1,24 +1,20 @@ { "format": 1, "restore": { - "E:\\Development\\Projects\\ForzaDSX\\ForzaDSX.csproj": {} + "C:\\Users\\patma\\source\\repos\\RacingDSX\\ForzaDSX.csproj": {} }, "projects": { - "E:\\Development\\Projects\\ForzaDSX\\ForzaDSX.csproj": { + "C:\\Users\\patma\\source\\repos\\RacingDSX\\ForzaDSX.csproj": { "version": "1.0.0", "restore": { - "projectUniqueName": "E:\\Development\\Projects\\ForzaDSX\\ForzaDSX.csproj", + "projectUniqueName": "C:\\Users\\patma\\source\\repos\\RacingDSX\\ForzaDSX.csproj", "projectName": "ForzaDSX", - "projectPath": "E:\\Development\\Projects\\ForzaDSX\\ForzaDSX.csproj", - "packagesPath": "C:\\Users\\Guilherme\\.nuget\\packages\\", - "outputPath": "E:\\Development\\Projects\\ForzaDSX\\obj\\", + "projectPath": "C:\\Users\\patma\\source\\repos\\RacingDSX\\ForzaDSX.csproj", + "packagesPath": "C:\\Users\\patma\\.nuget\\packages\\", + "outputPath": "C:\\Users\\patma\\source\\repos\\RacingDSX\\obj\\", "projectStyle": "PackageReference", - "fallbackFolders": [ - "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" - ], "configFilePaths": [ - "C:\\Users\\Guilherme\\AppData\\Roaming\\NuGet\\NuGet.Config", - "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Users\\patma\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], "originalTargetFrameworks": [ @@ -77,21 +73,33 @@ "assetTargetFallback": true, "warn": true, "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Ref", + "version": "[7.0.14, 7.0.14]" + }, { "name": "Microsoft.AspNetCore.App.Runtime.win-x64", - "version": "[7.0.5, 7.0.5]" + "version": "[7.0.14, 7.0.14]" }, { - "name": "Microsoft.NETCore.App.Crossgen2.win-x64", - "version": "[7.0.5, 7.0.5]" + "name": "Microsoft.NETCore.App.Host.win-x64", + "version": "[7.0.14, 7.0.14]" + }, + { + "name": "Microsoft.NETCore.App.Ref", + "version": "[7.0.14, 7.0.14]" }, { "name": "Microsoft.NETCore.App.Runtime.win-x64", - "version": "[7.0.5, 7.0.5]" + "version": "[7.0.14, 7.0.14]" + }, + { + "name": "Microsoft.WindowsDesktop.App.Ref", + "version": "[7.0.14, 7.0.14]" }, { "name": "Microsoft.WindowsDesktop.App.Runtime.win-x64", - "version": "[7.0.5, 7.0.5]" + "version": "[7.0.14, 7.0.14]" } ], "frameworkReferences": { @@ -102,7 +110,7 @@ "privateAssets": "none" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.203\\RuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.100\\RuntimeIdentifierGraph.json" } }, "runtimes": { diff --git a/obj/ForzaDSX.csproj.nuget.g.props b/obj/ForzaDSX.csproj.nuget.g.props index 017086d..67cf1ed 100644 --- a/obj/ForzaDSX.csproj.nuget.g.props +++ b/obj/ForzaDSX.csproj.nuget.g.props @@ -5,12 +5,11 @@ NuGet $(MSBuildThisFileDirectory)project.assets.json $(UserProfile)\.nuget\packages\ - C:\Users\Guilherme\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages + C:\Users\patma\.nuget\packages\ PackageReference - 6.5.0 + 6.8.0 - - + \ No newline at end of file diff --git a/obj/project.assets.json b/obj/project.assets.json index ada8f7a..a4e9ee3 100644 --- a/obj/project.assets.json +++ b/obj/project.assets.json @@ -746,24 +746,19 @@ ] }, "packageFolders": { - "C:\\Users\\Guilherme\\.nuget\\packages\\": {}, - "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {} + "C:\\Users\\patma\\.nuget\\packages\\": {} }, "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "E:\\Development\\Projects\\ForzaDSX\\ForzaDSX.csproj", + "projectUniqueName": "C:\\Users\\patma\\source\\repos\\RacingDSX\\ForzaDSX.csproj", "projectName": "ForzaDSX", - "projectPath": "E:\\Development\\Projects\\ForzaDSX\\ForzaDSX.csproj", - "packagesPath": "C:\\Users\\Guilherme\\.nuget\\packages\\", - "outputPath": "E:\\Development\\Projects\\ForzaDSX\\obj\\", + "projectPath": "C:\\Users\\patma\\source\\repos\\RacingDSX\\ForzaDSX.csproj", + "packagesPath": "C:\\Users\\patma\\.nuget\\packages\\", + "outputPath": "C:\\Users\\patma\\source\\repos\\RacingDSX\\obj\\", "projectStyle": "PackageReference", - "fallbackFolders": [ - "C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages" - ], "configFilePaths": [ - "C:\\Users\\Guilherme\\AppData\\Roaming\\NuGet\\NuGet.Config", - "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config", + "C:\\Users\\patma\\AppData\\Roaming\\NuGet\\NuGet.Config", "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" ], "originalTargetFrameworks": [ @@ -822,21 +817,33 @@ "assetTargetFallback": true, "warn": true, "downloadDependencies": [ + { + "name": "Microsoft.AspNetCore.App.Ref", + "version": "[7.0.14, 7.0.14]" + }, { "name": "Microsoft.AspNetCore.App.Runtime.win-x64", - "version": "[7.0.5, 7.0.5]" + "version": "[7.0.14, 7.0.14]" }, { - "name": "Microsoft.NETCore.App.Crossgen2.win-x64", - "version": "[7.0.5, 7.0.5]" + "name": "Microsoft.NETCore.App.Host.win-x64", + "version": "[7.0.14, 7.0.14]" + }, + { + "name": "Microsoft.NETCore.App.Ref", + "version": "[7.0.14, 7.0.14]" }, { "name": "Microsoft.NETCore.App.Runtime.win-x64", - "version": "[7.0.5, 7.0.5]" + "version": "[7.0.14, 7.0.14]" + }, + { + "name": "Microsoft.WindowsDesktop.App.Ref", + "version": "[7.0.14, 7.0.14]" }, { "name": "Microsoft.WindowsDesktop.App.Runtime.win-x64", - "version": "[7.0.5, 7.0.5]" + "version": "[7.0.14, 7.0.14]" } ], "frameworkReferences": { @@ -847,7 +854,7 @@ "privateAssets": "none" } }, - "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.203\\RuntimeIdentifierGraph.json" + "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.100\\RuntimeIdentifierGraph.json" } }, "runtimes": { diff --git a/obj/project.nuget.cache b/obj/project.nuget.cache index 799539e..414c9f1 100644 --- a/obj/project.nuget.cache +++ b/obj/project.nuget.cache @@ -1,26 +1,29 @@ { "version": 2, - "dgSpecHash": "WxsBahOvKHjPbYG8UO2BsuWvzkm36M/v95iyfaR/c7TCVe4W36b8Y7xdwnf4LwmSUktAgIP9t4AeSG2VTrrhaA==", + "dgSpecHash": "5R7nlSmDq/Kmf9d6HCtVHgLNXiUx9qdKGIET79tdlKI8A0duMgtbstkg1IlysJkqR5Gx4y2peZylY30cKSRPUg==", "success": true, - "projectFilePath": "E:\\Development\\Projects\\ForzaDSX\\ForzaDSX.csproj", + "projectFilePath": "C:\\Users\\patma\\source\\repos\\RacingDSX\\ForzaDSX.csproj", "expectedPackageFiles": [ - "C:\\Users\\Guilherme\\.nuget\\packages\\csvhelper\\27.2.1\\csvhelper.27.2.1.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\microsoft.extensions.configuration\\6.0.0\\microsoft.extensions.configuration.6.0.0.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\6.0.0\\microsoft.extensions.configuration.abstractions.6.0.0.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\microsoft.extensions.configuration.binder\\6.0.0\\microsoft.extensions.configuration.binder.6.0.0.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\microsoft.extensions.configuration.environmentvariables\\6.0.0\\microsoft.extensions.configuration.environmentvariables.6.0.0.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\microsoft.extensions.configuration.fileextensions\\6.0.0\\microsoft.extensions.configuration.fileextensions.6.0.0.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\microsoft.extensions.configuration.ini\\6.0.0\\microsoft.extensions.configuration.ini.6.0.0.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\microsoft.extensions.fileproviders.abstractions\\6.0.0\\microsoft.extensions.fileproviders.abstractions.6.0.0.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\microsoft.extensions.fileproviders.physical\\6.0.0\\microsoft.extensions.fileproviders.physical.6.0.0.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\microsoft.extensions.filesystemglobbing\\6.0.0\\microsoft.extensions.filesystemglobbing.6.0.0.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\microsoft.extensions.primitives\\6.0.0\\microsoft.extensions.primitives.6.0.0.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\newtonsoft.json\\13.0.1\\newtonsoft.json.13.0.1.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\6.0.0\\system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\microsoft.netcore.app.crossgen2.win-x64\\7.0.5\\microsoft.netcore.app.crossgen2.win-x64.7.0.5.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\microsoft.aspnetcore.app.runtime.win-x64\\7.0.5\\microsoft.aspnetcore.app.runtime.win-x64.7.0.5.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\microsoft.windowsdesktop.app.runtime.win-x64\\7.0.5\\microsoft.windowsdesktop.app.runtime.win-x64.7.0.5.nupkg.sha512", - "C:\\Users\\Guilherme\\.nuget\\packages\\microsoft.netcore.app.runtime.win-x64\\7.0.5\\microsoft.netcore.app.runtime.win-x64.7.0.5.nupkg.sha512" + "C:\\Users\\patma\\.nuget\\packages\\csvhelper\\27.2.1\\csvhelper.27.2.1.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.extensions.configuration\\6.0.0\\microsoft.extensions.configuration.6.0.0.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\6.0.0\\microsoft.extensions.configuration.abstractions.6.0.0.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.extensions.configuration.binder\\6.0.0\\microsoft.extensions.configuration.binder.6.0.0.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.extensions.configuration.environmentvariables\\6.0.0\\microsoft.extensions.configuration.environmentvariables.6.0.0.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.extensions.configuration.fileextensions\\6.0.0\\microsoft.extensions.configuration.fileextensions.6.0.0.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.extensions.configuration.ini\\6.0.0\\microsoft.extensions.configuration.ini.6.0.0.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.extensions.fileproviders.abstractions\\6.0.0\\microsoft.extensions.fileproviders.abstractions.6.0.0.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.extensions.fileproviders.physical\\6.0.0\\microsoft.extensions.fileproviders.physical.6.0.0.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.extensions.filesystemglobbing\\6.0.0\\microsoft.extensions.filesystemglobbing.6.0.0.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.extensions.primitives\\6.0.0\\microsoft.extensions.primitives.6.0.0.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\newtonsoft.json\\13.0.1\\newtonsoft.json.13.0.1.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\6.0.0\\system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.windowsdesktop.app.ref\\7.0.14\\microsoft.windowsdesktop.app.ref.7.0.14.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.netcore.app.ref\\7.0.14\\microsoft.netcore.app.ref.7.0.14.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.aspnetcore.app.runtime.win-x64\\7.0.14\\microsoft.aspnetcore.app.runtime.win-x64.7.0.14.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.windowsdesktop.app.runtime.win-x64\\7.0.14\\microsoft.windowsdesktop.app.runtime.win-x64.7.0.14.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.aspnetcore.app.ref\\7.0.14\\microsoft.aspnetcore.app.ref.7.0.14.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.netcore.app.host.win-x64\\7.0.14\\microsoft.netcore.app.host.win-x64.7.0.14.nupkg.sha512", + "C:\\Users\\patma\\.nuget\\packages\\microsoft.netcore.app.runtime.win-x64\\7.0.14\\microsoft.netcore.app.runtime.win-x64.7.0.14.nupkg.sha512" ], "logs": [] } \ No newline at end of file