From 06e60ed5100d79c6cd325f7fa13f7048b4c18ae9 Mon Sep 17 00:00:00 2001 From: Kuhaku369 Date: Wed, 31 Dec 2025 15:22:58 +0900 Subject: [PATCH 1/4] Use sound settings Dictionary --- .../UI/Components/EventType.cs | 43 +++ .../UI/Components/SoundComponent.cs | 129 ++++---- .../UI/Components/SoundData.cs | 12 + .../UI/Components/SoundSettings.Designer.cs | 28 +- .../UI/Components/SoundSettings.cs | 303 +++++------------- 5 files changed, 220 insertions(+), 295 deletions(-) create mode 100644 src/LiveSplit.Sound/UI/Components/EventType.cs create mode 100644 src/LiveSplit.Sound/UI/Components/SoundData.cs diff --git a/src/LiveSplit.Sound/UI/Components/EventType.cs b/src/LiveSplit.Sound/UI/Components/EventType.cs new file mode 100644 index 0000000..f6dce7a --- /dev/null +++ b/src/LiveSplit.Sound/UI/Components/EventType.cs @@ -0,0 +1,43 @@ +namespace LiveSplit.UI.Components; +public enum EventType +{ + Split, + SplitAheadGaining, + SplitAheadLosing, + SplitBehindGaining, + SplitBehindLosing, + BestSegment, + UndoSplit, + SkipSplit, + PersonalBest, + NotAPersonalBest, + Reset, + Pause, + Resume, + StartTimer, +} + +public static class EventTypeEx +{ + public static string GetName(this EventType type) + { + return type switch + { + EventType.Split => "Split", + EventType.SplitAheadGaining => "Split(Ahead, Gaining):", + EventType.SplitAheadLosing => "Split(Ahead, Losing):", + EventType.SplitBehindGaining => "Split(Behind, Gaining):", + EventType.SplitBehindLosing => "Split(Behind, Losing):", + EventType.BestSegment => "Split(Best Segment):", + EventType.UndoSplit => "Undo Split:", + EventType.SkipSplit => "Skip Split:", + EventType.PersonalBest => "Personal Best:", + EventType.NotAPersonalBest => "Not a Personal Best:", + EventType.Reset => "Reset:", + EventType.Pause => "Pause:", + EventType.Resume => "Resume:", + EventType.StartTimer => "Start:", + _ => "no name", + }; + } +} diff --git a/src/LiveSplit.Sound/UI/Components/SoundComponent.cs b/src/LiveSplit.Sound/UI/Components/SoundComponent.cs index cff71c9..2293ced 100644 --- a/src/LiveSplit.Sound/UI/Components/SoundComponent.cs +++ b/src/LiveSplit.Sound/UI/Components/SoundComponent.cs @@ -71,7 +71,7 @@ public override void SetSettings(XmlNode settings) private void State_OnStart(object sender, EventArgs e) { - PlaySound(Settings.StartTimer, Settings.StartTimerVolume); + PlaySound(EventType.StartTimer); } private void State_OnSplit(object sender, EventArgs e) @@ -80,121 +80,120 @@ private void State_OnSplit(object sender, EventArgs e) { if (State.Run.Last().PersonalBestSplitTime[State.CurrentTimingMethod] == null || State.Run.Last().SplitTime[State.CurrentTimingMethod] < State.Run.Last().PersonalBestSplitTime[State.CurrentTimingMethod]) { - PlaySound(Settings.PersonalBest, Settings.PersonalBestVolume); + PlaySound(EventType.PersonalBest); } else { - PlaySound(Settings.NotAPersonalBest, Settings.NotAPersonalBestVolume); + PlaySound(EventType.NotAPersonalBest); } + + return; } - else - { - string path = string.Empty; - int volume = Settings.SplitVolume; - int splitIndex = State.CurrentSplitIndex - 1; - TimeSpan? timeDifference = State.Run[splitIndex].SplitTime[State.CurrentTimingMethod] - State.Run[splitIndex].Comparisons[State.CurrentComparison][State.CurrentTimingMethod]; + EventType type = EventType.Split; - if (timeDifference != null) + int splitIndex = State.CurrentSplitIndex - 1; + TimeSpan? timeDifference = State.Run[splitIndex].SplitTime[State.CurrentTimingMethod] - State.Run[splitIndex].Comparisons[State.CurrentComparison][State.CurrentTimingMethod]; + + if (timeDifference != null) + { + if (timeDifference < TimeSpan.Zero) { - if (timeDifference < TimeSpan.Zero) - { - path = Settings.SplitAheadGaining; - volume = Settings.SplitAheadGainingVolume; - - if (LiveSplitStateHelper.GetPreviousSegmentDelta(State, splitIndex, State.CurrentComparison, State.CurrentTimingMethod) > TimeSpan.Zero) - { - path = Settings.SplitAheadLosing; - volume = Settings.SplitAheadLosingVolume; - } - } - else + type = EventType.SplitAheadGaining; + + if (LiveSplitStateHelper.GetPreviousSegmentDelta(State, splitIndex, State.CurrentComparison, State.CurrentTimingMethod) > TimeSpan.Zero) { - path = Settings.SplitBehindLosing; - volume = Settings.SplitBehindLosingVolume; - - if (LiveSplitStateHelper.GetPreviousSegmentDelta(State, splitIndex, State.CurrentComparison, State.CurrentTimingMethod) < TimeSpan.Zero) - { - path = Settings.SplitBehindGaining; - volume = Settings.SplitBehindGainingVolume; - } + type = EventType.SplitAheadLosing; } } - - //Check for best segment - TimeSpan? curSegment = LiveSplitStateHelper.GetPreviousSegmentTime(State, splitIndex, State.CurrentTimingMethod); - - if (curSegment != null) + else { - if (State.Run[splitIndex].BestSegmentTime[State.CurrentTimingMethod] == null || curSegment < State.Run[splitIndex].BestSegmentTime[State.CurrentTimingMethod]) + type = EventType.SplitBehindLosing; + + if (LiveSplitStateHelper.GetPreviousSegmentDelta(State, splitIndex, State.CurrentComparison, State.CurrentTimingMethod) < TimeSpan.Zero) { - path = Settings.BestSegment; - volume = Settings.BestSegmentVolume; + type = EventType.SplitBehindGaining; } } + } - if (string.IsNullOrEmpty(path)) + //Check for best segment + TimeSpan? curSegment = LiveSplitStateHelper.GetPreviousSegmentTime(State, splitIndex, State.CurrentTimingMethod); + + if (curSegment != null) + { + if (State.Run[splitIndex].BestSegmentTime[State.CurrentTimingMethod] == null || curSegment < State.Run[splitIndex].BestSegmentTime[State.CurrentTimingMethod]) { - path = Settings.Split; + type = EventType.BestSegment; } + } - PlaySound(path, volume); + if (string.IsNullOrEmpty(Settings.SoundDataDictionary[type].FilePath)) + { + type = EventType.Split; } + + PlaySound(type); } private void State_OnSkipSplit(object sender, EventArgs e) { - PlaySound(Settings.SkipSplit, Settings.SkipSplitVolume); + PlaySound(EventType.SkipSplit); } private void State_OnUndoSplit(object sender, EventArgs e) { - PlaySound(Settings.UndoSplit, Settings.UndoSplitVolume); + PlaySound(EventType.UndoSplit); } private void State_OnPause(object sender, EventArgs e) { - PlaySound(Settings.Pause, Settings.PauseVolume); + PlaySound(EventType.Pause); } private void State_OnResume(object sender, EventArgs e) { - PlaySound(Settings.Resume, Settings.ResumeVolume); + PlaySound(EventType.Resume); } private void State_OnReset(object sender, TimerPhase e) { if (e != TimerPhase.Ended) { - PlaySound(Settings.Reset, Settings.ResetVolume); + PlaySound(EventType.Reset); } } - private void PlaySound(string location, int volume) + private void PlaySound(EventType type) { Player.Stop(); - if (Activated && File.Exists(location)) + string location = Settings.SoundDataDictionary[type].FilePath; + int volume = Settings.SoundDataDictionary[type].Volume; + + if (!Activated || !File.Exists(location)) { - Task.Factory.StartNew(() => + return; + } + + Task.Factory.StartNew(() => + { + try { - try - { - var audioFileReader = new AudioFileReader(location) - { - Volume = volume / 100f * (Settings.GeneralVolume / 100f) - }; - - Player.DeviceNumber = Settings.OutputDevice; - Player.Init(audioFileReader); - Player.Play(); - } - catch (Exception e) + var audioFileReader = new AudioFileReader(location) { - Log.Error(e); - } - }); - } + Volume = volume / 100f * (Settings.GeneralVolume / 100f) + }; + + Player.DeviceNumber = Settings.OutputDevice; + Player.Init(audioFileReader); + Player.Play(); + } + catch (Exception e) + { + Log.Error(e); + } + }); } public int GetSettingsHashCode() diff --git a/src/LiveSplit.Sound/UI/Components/SoundData.cs b/src/LiveSplit.Sound/UI/Components/SoundData.cs new file mode 100644 index 0000000..a1411ca --- /dev/null +++ b/src/LiveSplit.Sound/UI/Components/SoundData.cs @@ -0,0 +1,12 @@ +namespace LiveSplit.UI.Components; +public class SoundData +{ + public string FilePath { get; set; } + public int Volume { get; set; } + + public SoundData(string filePath, int volume) + { + FilePath = filePath; + Volume = volume; + } +} diff --git a/src/LiveSplit.Sound/UI/Components/SoundSettings.Designer.cs b/src/LiveSplit.Sound/UI/Components/SoundSettings.Designer.cs index 142e3ed..4c6f2dc 100644 --- a/src/LiveSplit.Sound/UI/Components/SoundSettings.Designer.cs +++ b/src/LiveSplit.Sound/UI/Components/SoundSettings.Designer.cs @@ -484,7 +484,7 @@ private void InitializeComponent() this.btnResume.TabIndex = 38; this.btnResume.Text = "Browse..."; this.btnResume.UseVisualStyleBackColor = true; - this.btnResume.Click += new System.EventHandler(this.btnResume_Click); + this.btnResume.Click += new System.EventHandler(this.btnBrowse_Click); // // btnPause // @@ -494,7 +494,7 @@ private void InitializeComponent() this.btnPause.TabIndex = 35; this.btnPause.Text = "Browse..."; this.btnPause.UseVisualStyleBackColor = true; - this.btnPause.Click += new System.EventHandler(this.btnPause_Click); + this.btnPause.Click += new System.EventHandler(this.btnBrowse_Click); // // btnReset // @@ -504,7 +504,7 @@ private void InitializeComponent() this.btnReset.TabIndex = 32; this.btnReset.Text = "Browse..."; this.btnReset.UseVisualStyleBackColor = true; - this.btnReset.Click += new System.EventHandler(this.btnReset_Click); + this.btnReset.Click += new System.EventHandler(this.btnBrowse_Click); // // btnNotAPersonalBest // @@ -514,7 +514,7 @@ private void InitializeComponent() this.btnNotAPersonalBest.TabIndex = 29; this.btnNotAPersonalBest.Text = "Browse..."; this.btnNotAPersonalBest.UseVisualStyleBackColor = true; - this.btnNotAPersonalBest.Click += new System.EventHandler(this.btnNotAPersonalBest_Click); + this.btnNotAPersonalBest.Click += new System.EventHandler(this.btnBrowse_Click); // // btnPersonalBest // @@ -524,7 +524,7 @@ private void InitializeComponent() this.btnPersonalBest.TabIndex = 26; this.btnPersonalBest.Text = "Browse..."; this.btnPersonalBest.UseVisualStyleBackColor = true; - this.btnPersonalBest.Click += new System.EventHandler(this.btnPersonalBest_Click); + this.btnPersonalBest.Click += new System.EventHandler(this.btnBrowse_Click); // // btnSkipSplit // @@ -534,7 +534,7 @@ private void InitializeComponent() this.btnSkipSplit.TabIndex = 23; this.btnSkipSplit.Text = "Browse..."; this.btnSkipSplit.UseVisualStyleBackColor = true; - this.btnSkipSplit.Click += new System.EventHandler(this.btnSkipSplit_Click); + this.btnSkipSplit.Click += new System.EventHandler(this.btnBrowse_Click); // // btnUndo // @@ -544,7 +544,7 @@ private void InitializeComponent() this.btnUndo.TabIndex = 20; this.btnUndo.Text = "Browse..."; this.btnUndo.UseVisualStyleBackColor = true; - this.btnUndo.Click += new System.EventHandler(this.btnUndo_Click); + this.btnUndo.Click += new System.EventHandler(this.btnBrowse_Click); // // btnBestSegment // @@ -554,7 +554,7 @@ private void InitializeComponent() this.btnBestSegment.TabIndex = 17; this.btnBestSegment.Text = "Browse..."; this.btnBestSegment.UseVisualStyleBackColor = true; - this.btnBestSegment.Click += new System.EventHandler(this.btnBestSegment_Click); + this.btnBestSegment.Click += new System.EventHandler(this.btnBrowse_Click); // // btnBehindLosing // @@ -564,7 +564,7 @@ private void InitializeComponent() this.btnBehindLosing.TabIndex = 14; this.btnBehindLosing.Text = "Browse..."; this.btnBehindLosing.UseVisualStyleBackColor = true; - this.btnBehindLosing.Click += new System.EventHandler(this.btnBehindLosing_Click); + this.btnBehindLosing.Click += new System.EventHandler(this.btnBrowse_Click); // // btnBehindGaining // @@ -574,7 +574,7 @@ private void InitializeComponent() this.btnBehindGaining.TabIndex = 11; this.btnBehindGaining.Text = "Browse..."; this.btnBehindGaining.UseVisualStyleBackColor = true; - this.btnBehindGaining.Click += new System.EventHandler(this.btnBehindGaining_Click); + this.btnBehindGaining.Click += new System.EventHandler(this.btnBrowse_Click); // // btnAheadLosing // @@ -584,7 +584,7 @@ private void InitializeComponent() this.btnAheadLosing.TabIndex = 8; this.btnAheadLosing.Text = "Browse..."; this.btnAheadLosing.UseVisualStyleBackColor = true; - this.btnAheadLosing.Click += new System.EventHandler(this.btnAheadLosing_Click); + this.btnAheadLosing.Click += new System.EventHandler(this.btnBrowse_Click); // // btnAheadGaining // @@ -594,7 +594,7 @@ private void InitializeComponent() this.btnAheadGaining.TabIndex = 5; this.btnAheadGaining.Text = "Browse..."; this.btnAheadGaining.UseVisualStyleBackColor = true; - this.btnAheadGaining.Click += new System.EventHandler(this.btnAheadGaining_Click); + this.btnAheadGaining.Click += new System.EventHandler(this.btnBrowse_Click); // // btnSplit // @@ -604,7 +604,7 @@ private void InitializeComponent() this.btnSplit.TabIndex = 2; this.btnSplit.Text = "Browse..."; this.btnSplit.UseVisualStyleBackColor = true; - this.btnSplit.Click += new System.EventHandler(this.btnSplit_Click); + this.btnSplit.Click += new System.EventHandler(this.btnBrowse_Click); // // btnStartTimer // @@ -614,7 +614,7 @@ private void InitializeComponent() this.btnStartTimer.TabIndex = 41; this.btnStartTimer.Text = "Browse..."; this.btnStartTimer.UseVisualStyleBackColor = true; - this.btnStartTimer.Click += new System.EventHandler(this.btnStartTimer_Click); + this.btnStartTimer.Click += new System.EventHandler(this.btnBrowse_Click); // // tpVolumeMixer // diff --git a/src/LiveSplit.Sound/UI/Components/SoundSettings.cs b/src/LiveSplit.Sound/UI/Components/SoundSettings.cs index d38c25c..c61ae96 100644 --- a/src/LiveSplit.Sound/UI/Components/SoundSettings.cs +++ b/src/LiveSplit.Sound/UI/Components/SoundSettings.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Windows.Forms; using System.Xml; @@ -8,150 +9,104 @@ namespace LiveSplit.UI.Components; public partial class SoundSettings : UserControl { - public string Split { get; set; } - public string SplitAheadGaining { get; set; } - public string SplitAheadLosing { get; set; } - public string SplitBehindGaining { get; set; } - public string SplitBehindLosing { get; set; } - public string BestSegment { get; set; } - public string UndoSplit { get; set; } - public string SkipSplit { get; set; } - public string PersonalBest { get; set; } - public string NotAPersonalBest { get; set; } - public string Reset { get; set; } - public string Pause { get; set; } - public string Resume { get; set; } - public string StartTimer { get; set; } - public int OutputDevice { get; set; } public int GeneralVolume { get; set; } - public int SplitVolume { get; set; } - public int SplitAheadGainingVolume { get; set; } - public int SplitAheadLosingVolume { get; set; } - public int SplitBehindGainingVolume { get; set; } - public int SplitBehindLosingVolume { get; set; } - public int BestSegmentVolume { get; set; } - public int UndoSplitVolume { get; set; } - public int SkipSplitVolume { get; set; } - public int PersonalBestVolume { get; set; } - public int NotAPersonalBestVolume { get; set; } - public int ResetVolume { get; set; } - public int PauseVolume { get; set; } - public int ResumeVolume { get; set; } - public int StartTimerVolume { get; set; } + + public Dictionary SoundDataDictionary { get; set; } + public Dictionary TextBoxDictionary { get; set; } + public Dictionary TrackBarDictionary { get; set; } + public Dictionary ButtonToTypeDictionary { get; set; } public SoundSettings() { InitializeComponent(); - Split = - SplitAheadGaining = - SplitAheadLosing = - SplitBehindGaining = - SplitBehindLosing = - BestSegment = - UndoSplit = - SkipSplit = - PersonalBest = - NotAPersonalBest = - Reset = - Pause = - Resume = - StartTimer = ""; - OutputDevice = 0; + GeneralVolume = 100; - GeneralVolume = - SplitVolume = - SplitAheadGainingVolume = - SplitAheadLosingVolume = - SplitBehindGainingVolume = - SplitBehindLosingVolume = - BestSegmentVolume = - UndoSplitVolume = - SkipSplitVolume = - PersonalBestVolume = - NotAPersonalBestVolume = - ResetVolume = - PauseVolume = - ResumeVolume = - StartTimerVolume = 100; + SoundDataDictionary = []; + foreach (EventType type in Enum.GetValues(typeof(EventType))) + { + SoundData data = new("", 0); + SoundDataDictionary.Add(type, data); + } + + TextBoxDictionary = []; + TextBoxDictionary.Add(EventType.Split, txtSplitPath); + TextBoxDictionary.Add(EventType.SplitAheadGaining, txtSplitAheadGaining); + TextBoxDictionary.Add(EventType.SplitAheadLosing, txtSplitAheadLosing); + TextBoxDictionary.Add(EventType.SplitBehindGaining, txtSplitBehindGaining); + TextBoxDictionary.Add(EventType.SplitBehindLosing, txtSplitBehindLosing); + TextBoxDictionary.Add(EventType.BestSegment, txtBestSegment); + TextBoxDictionary.Add(EventType.UndoSplit, txtUndo); + TextBoxDictionary.Add(EventType.SkipSplit, txtSkip); + TextBoxDictionary.Add(EventType.PersonalBest, txtPersonalBest); + TextBoxDictionary.Add(EventType.NotAPersonalBest, txtNotAPersonalBest); + TextBoxDictionary.Add(EventType.Reset, txtReset); + TextBoxDictionary.Add(EventType.Pause, txtPause); + TextBoxDictionary.Add(EventType.Resume, txtResume); + TextBoxDictionary.Add(EventType.StartTimer, txtStartTimer); + + TrackBarDictionary = []; + TrackBarDictionary.Add(EventType.Split, tbSplitVolume); + TrackBarDictionary.Add(EventType.SplitAheadGaining, tbSplitAheadGainingVolume); + TrackBarDictionary.Add(EventType.SplitAheadLosing, tbSplitAheadLosingVolume); + TrackBarDictionary.Add(EventType.SplitBehindGaining, tbSplitBehindGainingVolume); + TrackBarDictionary.Add(EventType.SplitBehindLosing, tbSplitBehindLosingVolume); + TrackBarDictionary.Add(EventType.BestSegment, tbBestSegmentVolume); + TrackBarDictionary.Add(EventType.UndoSplit, tbUndoVolume); + TrackBarDictionary.Add(EventType.SkipSplit, tbSkipVolume); + TrackBarDictionary.Add(EventType.PersonalBest, tbPersonalBestVolume); + TrackBarDictionary.Add(EventType.NotAPersonalBest, tbNotAPersonalBestVolume); + TrackBarDictionary.Add(EventType.Reset, tbResetVolume); + TrackBarDictionary.Add(EventType.Pause, tbPauseVolume); + TrackBarDictionary.Add(EventType.Resume, tbResumeVolume); + TrackBarDictionary.Add(EventType.StartTimer, tbStartTimerVolume); + + ButtonToTypeDictionary = []; + ButtonToTypeDictionary.Add(btnSplit, EventType.Split); + ButtonToTypeDictionary.Add(btnAheadGaining, EventType.SplitAheadGaining); + ButtonToTypeDictionary.Add(btnAheadLosing, EventType.SplitAheadLosing); + ButtonToTypeDictionary.Add(btnBehindGaining, EventType.SplitBehindGaining); + ButtonToTypeDictionary.Add(btnBehindLosing, EventType.SplitBehindLosing); + ButtonToTypeDictionary.Add(btnBestSegment, EventType.BestSegment); + ButtonToTypeDictionary.Add(btnUndo, EventType.UndoSplit); + ButtonToTypeDictionary.Add(btnSkipSplit, EventType.SkipSplit); + ButtonToTypeDictionary.Add(btnPersonalBest, EventType.PersonalBest); + ButtonToTypeDictionary.Add(btnNotAPersonalBest, EventType.NotAPersonalBest); + ButtonToTypeDictionary.Add(btnReset, EventType.Reset); + ButtonToTypeDictionary.Add(btnPause, EventType.Pause); + ButtonToTypeDictionary.Add(btnResume, EventType.Resume); + ButtonToTypeDictionary.Add(btnStartTimer, EventType.StartTimer); for (int i = 0; i < WaveOut.DeviceCount; ++i) { cbOutputDevice.Items.Add(WaveOut.GetCapabilities(i)); } - txtSplitPath.DataBindings.Add("Text", this, "Split"); - txtSplitAheadGaining.DataBindings.Add("Text", this, "SplitAheadGaining"); - txtSplitAheadLosing.DataBindings.Add("Text", this, "SplitAheadLosing"); - txtSplitBehindGaining.DataBindings.Add("Text", this, "SplitBehindGaining"); - txtSplitBehindLosing.DataBindings.Add("Text", this, "SplitBehindLosing"); - txtBestSegment.DataBindings.Add("Text", this, "BestSegment"); - txtUndo.DataBindings.Add("Text", this, "UndoSplit"); - txtSkip.DataBindings.Add("Text", this, "SkipSplit"); - txtPersonalBest.DataBindings.Add("Text", this, "PersonalBest"); - txtNotAPersonalBest.DataBindings.Add("Text", this, "NotAPersonalBest"); - txtReset.DataBindings.Add("Text", this, "Reset"); - txtPause.DataBindings.Add("Text", this, "Pause"); - txtResume.DataBindings.Add("Text", this, "Resume"); - txtStartTimer.DataBindings.Add("Text", this, "StartTimer"); + foreach (EventType type in Enum.GetValues(typeof(EventType))) + { + TextBoxDictionary[type].DataBindings.Add("Text", SoundDataDictionary[type], nameof(SoundData.FilePath)); + TrackBarDictionary[type].DataBindings.Add("Value", SoundDataDictionary[type], nameof(SoundData.Volume)); - cbOutputDevice.DataBindings.Add("SelectedIndex", this, "OutputDevice"); + } - tbGeneralVolume.DataBindings.Add("Value", this, "GeneralVolume"); - tbSplitVolume.DataBindings.Add("Value", this, "SplitVolume"); - tbSplitAheadGainingVolume.DataBindings.Add("Value", this, "SplitAheadGainingVolume"); - tbSplitAheadLosingVolume.DataBindings.Add("Value", this, "SplitAheadLosingVolume"); - tbSplitBehindGainingVolume.DataBindings.Add("Value", this, "SplitBehindGainingVolume"); - tbSplitBehindLosingVolume.DataBindings.Add("Value", this, "SplitBehindLosingVolume"); - tbBestSegmentVolume.DataBindings.Add("Value", this, "BestSegmentVolume"); - tbUndoVolume.DataBindings.Add("Value", this, "UndoSplitVolume"); - tbSkipVolume.DataBindings.Add("Value", this, "SkipSplitVolume"); - tbPersonalBestVolume.DataBindings.Add("Value", this, "PersonalBestVolume"); - tbNotAPersonalBestVolume.DataBindings.Add("Value", this, "NotAPersonalBestVolume"); - tbResetVolume.DataBindings.Add("Value", this, "ResetVolume"); - tbPauseVolume.DataBindings.Add("Value", this, "PauseVolume"); - tbResumeVolume.DataBindings.Add("Value", this, "ResumeVolume"); - tbStartTimerVolume.DataBindings.Add("Value", this, "StartTimerVolume"); + cbOutputDevice.DataBindings.Add("SelectedIndex", this, nameof(OutputDevice)); + tbGeneralVolume.DataBindings.Add("Value", this, nameof(GeneralVolume)); } public void SetSettings(XmlNode node) { var element = (XmlElement)node; - Split = SettingsHelper.ParseString(element["Split"]); - SplitAheadGaining = SettingsHelper.ParseString(element["SplitAheadGaining"]); - SplitAheadLosing = SettingsHelper.ParseString(element["SplitAheadLosing"]); - SplitBehindGaining = SettingsHelper.ParseString(element["SplitBehindGaining"]); - SplitBehindLosing = SettingsHelper.ParseString(element["SplitBehindLosing"]); - BestSegment = SettingsHelper.ParseString(element["BestSegment"]); - UndoSplit = SettingsHelper.ParseString(element["UndoSplit"]); - SkipSplit = SettingsHelper.ParseString(element["SkipSplit"]); - PersonalBest = SettingsHelper.ParseString(element["PersonalBest"]); - NotAPersonalBest = SettingsHelper.ParseString(element["NotAPersonalBest"]); - Reset = SettingsHelper.ParseString(element["Reset"]); - Pause = SettingsHelper.ParseString(element["Pause"]); - Resume = SettingsHelper.ParseString(element["Resume"]); - StartTimer = SettingsHelper.ParseString(element["StartTimer"]); + foreach (EventType type in Enum.GetValues(typeof(EventType))) + { + SoundDataDictionary[type].FilePath = SettingsHelper.ParseString(element[nameof(type)]); + SoundDataDictionary[type].Volume = SettingsHelper.ParseInt(element[$"{nameof(type)}Volume"]); + } OutputDevice = SettingsHelper.ParseInt(element["OutputDevice"]); - - SplitVolume = SettingsHelper.ParseInt(element["SplitVolume"], 100); - SplitAheadGainingVolume = SettingsHelper.ParseInt(element["SplitAheadGainingVolume"], 100); - SplitAheadLosingVolume = SettingsHelper.ParseInt(element["SplitAheadLosingVolume"], 100); - SplitBehindGainingVolume = SettingsHelper.ParseInt(element["SplitBehindGainingVolume"], 100); - SplitBehindLosingVolume = SettingsHelper.ParseInt(element["SplitBehindLosingVolume"], 100); - BestSegmentVolume = SettingsHelper.ParseInt(element["BestSegmentVolume"], 100); - UndoSplitVolume = SettingsHelper.ParseInt(element["UndoSplitVolume"], 100); - SkipSplitVolume = SettingsHelper.ParseInt(element["SkipSplitVolume"], 100); - PersonalBestVolume = SettingsHelper.ParseInt(element["PersonalBestVolume"], 100); - NotAPersonalBestVolume = SettingsHelper.ParseInt(element["NotAPersonalBestVolume"], 100); - ResetVolume = SettingsHelper.ParseInt(element["ResetVolume"], 100); - PauseVolume = SettingsHelper.ParseInt(element["PauseVolume"], 100); - ResumeVolume = SettingsHelper.ParseInt(element["ResumeVolume"], 100); - StartTimerVolume = SettingsHelper.ParseInt(element["StartTimerVolume"], 100); GeneralVolume = SettingsHelper.ParseInt(element["GeneralVolume"], 100); } @@ -169,37 +124,17 @@ public int GetSettingsHashCode() private int CreateSettingsNode(XmlDocument document, XmlElement parent) { - return SettingsHelper.CreateSetting(document, parent, "Version", "1.6") ^ - SettingsHelper.CreateSetting(document, parent, "Split", Split) ^ - SettingsHelper.CreateSetting(document, parent, "SplitAheadGaining", SplitAheadGaining) ^ - SettingsHelper.CreateSetting(document, parent, "SplitAheadLosing", SplitAheadLosing) ^ - SettingsHelper.CreateSetting(document, parent, "SplitBehindGaining", SplitBehindGaining) ^ - SettingsHelper.CreateSetting(document, parent, "SplitBehindLosing", SplitBehindLosing) ^ - SettingsHelper.CreateSetting(document, parent, "BestSegment", BestSegment) ^ - SettingsHelper.CreateSetting(document, parent, "UndoSplit", UndoSplit) ^ - SettingsHelper.CreateSetting(document, parent, "SkipSplit", SkipSplit) ^ - SettingsHelper.CreateSetting(document, parent, "PersonalBest", PersonalBest) ^ - SettingsHelper.CreateSetting(document, parent, "NotAPersonalBest", NotAPersonalBest) ^ - SettingsHelper.CreateSetting(document, parent, "Reset", Reset) ^ - SettingsHelper.CreateSetting(document, parent, "Pause", Pause) ^ - SettingsHelper.CreateSetting(document, parent, "Resume", Resume) ^ - SettingsHelper.CreateSetting(document, parent, "StartTimer", StartTimer) ^ - SettingsHelper.CreateSetting(document, parent, "OutputDevice", OutputDevice) ^ - SettingsHelper.CreateSetting(document, parent, "SplitVolume", SplitVolume) ^ - SettingsHelper.CreateSetting(document, parent, "SplitAheadGainingVolume", SplitAheadGainingVolume) ^ - SettingsHelper.CreateSetting(document, parent, "SplitAheadLosingVolume", SplitAheadLosingVolume) ^ - SettingsHelper.CreateSetting(document, parent, "SplitBehindGainingVolume", SplitBehindGainingVolume) ^ - SettingsHelper.CreateSetting(document, parent, "SplitBehindLosingVolume", SplitBehindLosingVolume) ^ - SettingsHelper.CreateSetting(document, parent, "BestSegmentVolume", BestSegmentVolume) ^ - SettingsHelper.CreateSetting(document, parent, "UndoSplitVolume", UndoSplitVolume) ^ - SettingsHelper.CreateSetting(document, parent, "SkipSplitVolume", SkipSplitVolume) ^ - SettingsHelper.CreateSetting(document, parent, "PersonalBestVolume", PersonalBestVolume) ^ - SettingsHelper.CreateSetting(document, parent, "NotAPersonalBestVolume", NotAPersonalBestVolume) ^ - SettingsHelper.CreateSetting(document, parent, "ResetVolume", ResetVolume) ^ - SettingsHelper.CreateSetting(document, parent, "PauseVolume", PauseVolume) ^ - SettingsHelper.CreateSetting(document, parent, "ResumeVolume", ResumeVolume) ^ - SettingsHelper.CreateSetting(document, parent, "StartTimerVolume", StartTimerVolume) ^ - SettingsHelper.CreateSetting(document, parent, "GeneralVolume", GeneralVolume); + int hash = SettingsHelper.CreateSetting(document, parent, "Version", "1.6") ^ + SettingsHelper.CreateSetting(document, parent, nameof(OutputDevice), OutputDevice) ^ + SettingsHelper.CreateSetting(document, parent, nameof(GeneralVolume), GeneralVolume); + + foreach (EventType type in Enum.GetValues(typeof(EventType))) + { + hash ^= SettingsHelper.CreateSetting(document, parent, type.ToString(), SoundDataDictionary[type].FilePath) ^ + SettingsHelper.CreateSetting(document, parent, $"{type}Volume", SoundDataDictionary[type].Volume); + } + + return hash; } protected string BrowseForPath(TextBox textBox, Action callback) @@ -224,74 +159,10 @@ protected string BrowseForPath(TextBox textBox, Action callback) return path; } - private void btnSplit_Click(object sender, EventArgs e) - { - BrowseForPath(txtSplitPath, (x) => Split = x); - } - - private void btnAheadGaining_Click(object sender, EventArgs e) - { - BrowseForPath(txtSplitAheadGaining, (x) => SplitAheadGaining = x); - } - - private void btnAheadLosing_Click(object sender, EventArgs e) - { - BrowseForPath(txtSplitAheadLosing, (x) => SplitAheadLosing = x); - } - - private void btnBehindGaining_Click(object sender, EventArgs e) - { - BrowseForPath(txtSplitBehindGaining, (x) => SplitBehindGaining = x); - } - - private void btnBehindLosing_Click(object sender, EventArgs e) - { - BrowseForPath(txtSplitBehindLosing, (x) => SplitBehindLosing = x); - } - - private void btnBestSegment_Click(object sender, EventArgs e) - { - BrowseForPath(txtBestSegment, (x) => BestSegment = x); - } - - private void btnUndo_Click(object sender, EventArgs e) - { - BrowseForPath(txtUndo, (x) => UndoSplit = x); - } - - private void btnSkipSplit_Click(object sender, EventArgs e) - { - BrowseForPath(txtSkip, (x) => SkipSplit = x); - } - - private void btnPersonalBest_Click(object sender, EventArgs e) - { - BrowseForPath(txtPersonalBest, (x) => PersonalBest = x); - } - - private void btnNotAPersonalBest_Click(object sender, EventArgs e) - { - BrowseForPath(txtNotAPersonalBest, (x) => NotAPersonalBest = x); - } - - private void btnReset_Click(object sender, EventArgs e) - { - BrowseForPath(txtReset, (x) => Reset = x); - } - - private void btnPause_Click(object sender, EventArgs e) - { - BrowseForPath(txtPause, (x) => Pause = x); - } - - private void btnResume_Click(object sender, EventArgs e) - { - BrowseForPath(txtResume, (x) => Resume = x); - } - - private void btnStartTimer_Click(object sender, EventArgs e) + private void btnBrowse_Click(object sender, EventArgs e) { - BrowseForPath(txtStartTimer, (x) => StartTimer = x); + EventType type = ButtonToTypeDictionary[(Button)sender]; + BrowseForPath(TextBoxDictionary[type], (x) => SoundDataDictionary[type].FilePath = x); } private void VolumeTrackBarScrollHandler(object sender, EventArgs e) From 7fe39cf3bc3aff27c7c4784c788b05942fb68e32 Mon Sep 17 00:00:00 2001 From: Kuhaku369 Date: Wed, 31 Dec 2025 16:08:27 +0900 Subject: [PATCH 2/4] D&D sound file --- .../UI/Components/SoundSettings.Designer.cs | 412 ++++++++++-------- .../UI/Components/SoundSettings.cs | 43 +- 2 files changed, 268 insertions(+), 187 deletions(-) diff --git a/src/LiveSplit.Sound/UI/Components/SoundSettings.Designer.cs b/src/LiveSplit.Sound/UI/Components/SoundSettings.Designer.cs index 4c6f2dc..f8ee084 100644 --- a/src/LiveSplit.Sound/UI/Components/SoundSettings.Designer.cs +++ b/src/LiveSplit.Sound/UI/Components/SoundSettings.Designer.cs @@ -136,10 +136,10 @@ private void InitializeComponent() this.tabControl1.Controls.Add(this.tpSoundFiles); this.tabControl1.Controls.Add(this.tpVolumeMixer); this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControl1.Location = new System.Drawing.Point(7, 7); + this.tabControl1.Location = new System.Drawing.Point(7, 6); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(462, 439); + this.tabControl1.Size = new System.Drawing.Size(462, 406); this.tabControl1.TabIndex = 0; // // tpSoundFiles @@ -148,7 +148,7 @@ private void InitializeComponent() this.tpSoundFiles.Location = new System.Drawing.Point(4, 22); this.tpSoundFiles.Name = "tpSoundFiles"; this.tpSoundFiles.Padding = new System.Windows.Forms.Padding(3); - this.tpSoundFiles.Size = new System.Drawing.Size(454, 413); + this.tpSoundFiles.Size = new System.Drawing.Size(454, 380); this.tpSoundFiles.TabIndex = 0; this.tpSoundFiles.Text = "Sound Files"; this.tpSoundFiles.UseVisualStyleBackColor = true; @@ -206,39 +206,42 @@ private void InitializeComponent() this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 15; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.Size = new System.Drawing.Size(448, 407); + this.tableLayoutPanel1.Size = new System.Drawing.Size(448, 374); this.tableLayoutPanel1.TabIndex = 0; // // txtStartTimer // + this.txtStartTimer.AllowDrop = true; this.txtStartTimer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtStartTimer.Location = new System.Drawing.Point(149, 381); + this.txtStartTimer.Location = new System.Drawing.Point(149, 355); this.txtStartTimer.Name = "txtStartTimer"; - this.txtStartTimer.Size = new System.Drawing.Size(215, 20); + this.txtStartTimer.Size = new System.Drawing.Size(215, 19); this.txtStartTimer.TabIndex = 40; + this.txtStartTimer.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); + this.txtStartTimer.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); // // label14 // this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(3, 385); + this.label14.Location = new System.Drawing.Point(3, 358); this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(140, 13); + this.label14.Size = new System.Drawing.Size(140, 12); this.label14.TabIndex = 39; this.label14.Text = "Start Timer:"; // @@ -246,9 +249,9 @@ private void InitializeComponent() // this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(3, 356); + this.label13.Location = new System.Drawing.Point(3, 331); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(140, 13); + this.label13.Size = new System.Drawing.Size(140, 12); this.label13.TabIndex = 36; this.label13.Text = "Resume:"; // @@ -256,9 +259,9 @@ private void InitializeComponent() // this.label12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(3, 327); + this.label12.Location = new System.Drawing.Point(3, 304); this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(140, 13); + this.label12.Size = new System.Drawing.Size(140, 12); this.label12.TabIndex = 33; this.label12.Text = "Pause:"; // @@ -266,9 +269,9 @@ private void InitializeComponent() // this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(3, 298); + this.label11.Location = new System.Drawing.Point(3, 277); this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(140, 13); + this.label11.Size = new System.Drawing.Size(140, 12); this.label11.TabIndex = 30; this.label11.Text = "Reset:"; // @@ -276,9 +279,9 @@ private void InitializeComponent() // this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(3, 269); + this.label10.Location = new System.Drawing.Point(3, 250); this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(140, 13); + this.label10.Size = new System.Drawing.Size(140, 12); this.label10.TabIndex = 27; this.label10.Text = "Not a Personal Best:"; // @@ -286,9 +289,9 @@ private void InitializeComponent() // this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(3, 240); + this.label9.Location = new System.Drawing.Point(3, 223); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(140, 13); + this.label9.Size = new System.Drawing.Size(140, 12); this.label9.TabIndex = 24; this.label9.Text = "Personal Best:"; // @@ -296,9 +299,9 @@ private void InitializeComponent() // this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(3, 211); + this.label8.Location = new System.Drawing.Point(3, 196); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(140, 13); + this.label8.Size = new System.Drawing.Size(140, 12); this.label8.TabIndex = 21; this.label8.Text = "Skip Split:"; // @@ -306,9 +309,9 @@ private void InitializeComponent() // this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(3, 182); + this.label7.Location = new System.Drawing.Point(3, 169); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(140, 13); + this.label7.Size = new System.Drawing.Size(140, 12); this.label7.TabIndex = 18; this.label7.Text = "Undo Split:"; // @@ -316,9 +319,9 @@ private void InitializeComponent() // this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(3, 153); + this.label5.Location = new System.Drawing.Point(3, 142); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(140, 13); + this.label5.Size = new System.Drawing.Size(140, 12); this.label5.TabIndex = 15; this.label5.Text = "Split (Best Segment):"; // @@ -326,9 +329,9 @@ private void InitializeComponent() // this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(3, 124); + this.label6.Location = new System.Drawing.Point(3, 109); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(140, 13); + this.label6.Size = new System.Drawing.Size(140, 24); this.label6.TabIndex = 12; this.label6.Text = "Split (Behind, Losing Time):"; // @@ -336,9 +339,9 @@ private void InitializeComponent() // this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(3, 95); + this.label4.Location = new System.Drawing.Point(3, 82); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(140, 13); + this.label4.Size = new System.Drawing.Size(140, 24); this.label4.TabIndex = 9; this.label4.Text = "Split (Behind, Gaining Time):"; // @@ -346,9 +349,9 @@ private void InitializeComponent() // this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(3, 66); + this.label3.Location = new System.Drawing.Point(3, 55); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(140, 13); + this.label3.Size = new System.Drawing.Size(140, 24); this.label3.TabIndex = 6; this.label3.Text = "Split (Ahead, Losing Time):"; // @@ -356,9 +359,9 @@ private void InitializeComponent() // this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(3, 37); + this.label2.Location = new System.Drawing.Point(3, 28); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(140, 13); + this.label2.Size = new System.Drawing.Size(140, 24); this.label2.TabIndex = 3; this.label2.Text = "Split (Ahead, Gaining Time):"; // @@ -366,121 +369,160 @@ private void InitializeComponent() // this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(3, 8); + this.label1.Location = new System.Drawing.Point(3, 7); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(140, 13); + this.label1.Size = new System.Drawing.Size(140, 12); this.label1.TabIndex = 0; this.label1.Text = "Split:"; // // txtResume // + this.txtResume.AllowDrop = true; this.txtResume.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtResume.Location = new System.Drawing.Point(149, 352); + this.txtResume.Location = new System.Drawing.Point(149, 328); this.txtResume.Name = "txtResume"; - this.txtResume.Size = new System.Drawing.Size(215, 20); + this.txtResume.Size = new System.Drawing.Size(215, 19); this.txtResume.TabIndex = 37; + this.txtResume.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); + this.txtResume.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); // // txtPause // + this.txtPause.AllowDrop = true; this.txtPause.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtPause.Location = new System.Drawing.Point(149, 323); + this.txtPause.Location = new System.Drawing.Point(149, 301); this.txtPause.Name = "txtPause"; - this.txtPause.Size = new System.Drawing.Size(215, 20); + this.txtPause.Size = new System.Drawing.Size(215, 19); this.txtPause.TabIndex = 34; + this.txtPause.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); + this.txtPause.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); // // txtReset // + this.txtReset.AllowDrop = true; this.txtReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtReset.Location = new System.Drawing.Point(149, 294); + this.txtReset.Location = new System.Drawing.Point(149, 274); this.txtReset.Name = "txtReset"; - this.txtReset.Size = new System.Drawing.Size(215, 20); + this.txtReset.Size = new System.Drawing.Size(215, 19); this.txtReset.TabIndex = 31; + this.txtReset.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); + this.txtReset.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); // // txtNotAPersonalBest // + this.txtNotAPersonalBest.AllowDrop = true; this.txtNotAPersonalBest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtNotAPersonalBest.Location = new System.Drawing.Point(149, 265); + this.txtNotAPersonalBest.Location = new System.Drawing.Point(149, 247); this.txtNotAPersonalBest.Name = "txtNotAPersonalBest"; - this.txtNotAPersonalBest.Size = new System.Drawing.Size(215, 20); + this.txtNotAPersonalBest.Size = new System.Drawing.Size(215, 19); this.txtNotAPersonalBest.TabIndex = 28; + this.txtNotAPersonalBest.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); + this.txtNotAPersonalBest.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); // // txtPersonalBest // + this.txtPersonalBest.AllowDrop = true; this.txtPersonalBest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtPersonalBest.Location = new System.Drawing.Point(149, 236); + this.txtPersonalBest.Location = new System.Drawing.Point(149, 220); this.txtPersonalBest.Name = "txtPersonalBest"; - this.txtPersonalBest.Size = new System.Drawing.Size(215, 20); + this.txtPersonalBest.Size = new System.Drawing.Size(215, 19); this.txtPersonalBest.TabIndex = 25; + this.txtPersonalBest.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); + this.txtPersonalBest.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); // // txtSkip // + this.txtSkip.AllowDrop = true; this.txtSkip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSkip.Location = new System.Drawing.Point(149, 207); + this.txtSkip.Location = new System.Drawing.Point(149, 193); this.txtSkip.Name = "txtSkip"; - this.txtSkip.Size = new System.Drawing.Size(215, 20); + this.txtSkip.Size = new System.Drawing.Size(215, 19); this.txtSkip.TabIndex = 22; + this.txtSkip.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); + this.txtSkip.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); // // txtUndo // + this.txtUndo.AllowDrop = true; this.txtUndo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtUndo.Location = new System.Drawing.Point(149, 178); + this.txtUndo.Location = new System.Drawing.Point(149, 166); this.txtUndo.Name = "txtUndo"; - this.txtUndo.Size = new System.Drawing.Size(215, 20); + this.txtUndo.Size = new System.Drawing.Size(215, 19); this.txtUndo.TabIndex = 19; + this.txtUndo.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); + this.txtUndo.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); // // txtBestSegment // + this.txtBestSegment.AllowDrop = true; this.txtBestSegment.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtBestSegment.Location = new System.Drawing.Point(149, 149); + this.txtBestSegment.Location = new System.Drawing.Point(149, 139); this.txtBestSegment.Name = "txtBestSegment"; - this.txtBestSegment.Size = new System.Drawing.Size(215, 20); + this.txtBestSegment.Size = new System.Drawing.Size(215, 19); this.txtBestSegment.TabIndex = 16; + this.txtBestSegment.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); + this.txtBestSegment.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); // // txtSplitBehindLosing // + this.txtSplitBehindLosing.AllowDrop = true; this.txtSplitBehindLosing.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSplitBehindLosing.Location = new System.Drawing.Point(149, 120); + this.txtSplitBehindLosing.Location = new System.Drawing.Point(149, 112); this.txtSplitBehindLosing.Name = "txtSplitBehindLosing"; - this.txtSplitBehindLosing.Size = new System.Drawing.Size(215, 20); + this.txtSplitBehindLosing.Size = new System.Drawing.Size(215, 19); this.txtSplitBehindLosing.TabIndex = 13; + this.txtSplitBehindLosing.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); + this.txtSplitBehindLosing.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); // // txtSplitBehindGaining // + this.txtSplitBehindGaining.AllowDrop = true; this.txtSplitBehindGaining.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSplitBehindGaining.Location = new System.Drawing.Point(149, 91); + this.txtSplitBehindGaining.Location = new System.Drawing.Point(149, 85); this.txtSplitBehindGaining.Name = "txtSplitBehindGaining"; - this.txtSplitBehindGaining.Size = new System.Drawing.Size(215, 20); + this.txtSplitBehindGaining.Size = new System.Drawing.Size(215, 19); this.txtSplitBehindGaining.TabIndex = 10; + this.txtSplitBehindGaining.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); + this.txtSplitBehindGaining.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); // // txtSplitAheadLosing // + this.txtSplitAheadLosing.AllowDrop = true; this.txtSplitAheadLosing.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSplitAheadLosing.Location = new System.Drawing.Point(149, 62); + this.txtSplitAheadLosing.Location = new System.Drawing.Point(149, 58); this.txtSplitAheadLosing.Name = "txtSplitAheadLosing"; - this.txtSplitAheadLosing.Size = new System.Drawing.Size(215, 20); + this.txtSplitAheadLosing.Size = new System.Drawing.Size(215, 19); this.txtSplitAheadLosing.TabIndex = 7; + this.txtSplitAheadLosing.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); + this.txtSplitAheadLosing.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); // // txtSplitAheadGaining // + this.txtSplitAheadGaining.AllowDrop = true; this.txtSplitAheadGaining.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSplitAheadGaining.Location = new System.Drawing.Point(149, 33); + this.txtSplitAheadGaining.Location = new System.Drawing.Point(149, 31); this.txtSplitAheadGaining.Name = "txtSplitAheadGaining"; - this.txtSplitAheadGaining.Size = new System.Drawing.Size(215, 20); + this.txtSplitAheadGaining.Size = new System.Drawing.Size(215, 19); this.txtSplitAheadGaining.TabIndex = 4; + this.txtSplitAheadGaining.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); + this.txtSplitAheadGaining.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); // // txtSplitPath // + this.txtSplitPath.AllowDrop = true; this.txtSplitPath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.txtSplitPath.Location = new System.Drawing.Point(149, 4); this.txtSplitPath.Name = "txtSplitPath"; - this.txtSplitPath.Size = new System.Drawing.Size(215, 20); + this.txtSplitPath.Size = new System.Drawing.Size(215, 19); this.txtSplitPath.TabIndex = 1; + this.txtSplitPath.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); + this.txtSplitPath.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); // // btnResume // - this.btnResume.Location = new System.Drawing.Point(370, 351); + this.btnResume.Location = new System.Drawing.Point(370, 327); this.btnResume.Name = "btnResume"; - this.btnResume.Size = new System.Drawing.Size(75, 23); + this.btnResume.Size = new System.Drawing.Size(75, 21); this.btnResume.TabIndex = 38; this.btnResume.Text = "Browse..."; this.btnResume.UseVisualStyleBackColor = true; @@ -488,9 +530,9 @@ private void InitializeComponent() // // btnPause // - this.btnPause.Location = new System.Drawing.Point(370, 322); + this.btnPause.Location = new System.Drawing.Point(370, 300); this.btnPause.Name = "btnPause"; - this.btnPause.Size = new System.Drawing.Size(75, 23); + this.btnPause.Size = new System.Drawing.Size(75, 21); this.btnPause.TabIndex = 35; this.btnPause.Text = "Browse..."; this.btnPause.UseVisualStyleBackColor = true; @@ -498,9 +540,9 @@ private void InitializeComponent() // // btnReset // - this.btnReset.Location = new System.Drawing.Point(370, 293); + this.btnReset.Location = new System.Drawing.Point(370, 273); this.btnReset.Name = "btnReset"; - this.btnReset.Size = new System.Drawing.Size(75, 23); + this.btnReset.Size = new System.Drawing.Size(75, 21); this.btnReset.TabIndex = 32; this.btnReset.Text = "Browse..."; this.btnReset.UseVisualStyleBackColor = true; @@ -508,9 +550,9 @@ private void InitializeComponent() // // btnNotAPersonalBest // - this.btnNotAPersonalBest.Location = new System.Drawing.Point(370, 264); + this.btnNotAPersonalBest.Location = new System.Drawing.Point(370, 246); this.btnNotAPersonalBest.Name = "btnNotAPersonalBest"; - this.btnNotAPersonalBest.Size = new System.Drawing.Size(75, 23); + this.btnNotAPersonalBest.Size = new System.Drawing.Size(75, 21); this.btnNotAPersonalBest.TabIndex = 29; this.btnNotAPersonalBest.Text = "Browse..."; this.btnNotAPersonalBest.UseVisualStyleBackColor = true; @@ -518,9 +560,9 @@ private void InitializeComponent() // // btnPersonalBest // - this.btnPersonalBest.Location = new System.Drawing.Point(370, 235); + this.btnPersonalBest.Location = new System.Drawing.Point(370, 219); this.btnPersonalBest.Name = "btnPersonalBest"; - this.btnPersonalBest.Size = new System.Drawing.Size(75, 23); + this.btnPersonalBest.Size = new System.Drawing.Size(75, 21); this.btnPersonalBest.TabIndex = 26; this.btnPersonalBest.Text = "Browse..."; this.btnPersonalBest.UseVisualStyleBackColor = true; @@ -528,9 +570,9 @@ private void InitializeComponent() // // btnSkipSplit // - this.btnSkipSplit.Location = new System.Drawing.Point(370, 206); + this.btnSkipSplit.Location = new System.Drawing.Point(370, 192); this.btnSkipSplit.Name = "btnSkipSplit"; - this.btnSkipSplit.Size = new System.Drawing.Size(75, 23); + this.btnSkipSplit.Size = new System.Drawing.Size(75, 21); this.btnSkipSplit.TabIndex = 23; this.btnSkipSplit.Text = "Browse..."; this.btnSkipSplit.UseVisualStyleBackColor = true; @@ -538,9 +580,9 @@ private void InitializeComponent() // // btnUndo // - this.btnUndo.Location = new System.Drawing.Point(370, 177); + this.btnUndo.Location = new System.Drawing.Point(370, 165); this.btnUndo.Name = "btnUndo"; - this.btnUndo.Size = new System.Drawing.Size(75, 23); + this.btnUndo.Size = new System.Drawing.Size(75, 21); this.btnUndo.TabIndex = 20; this.btnUndo.Text = "Browse..."; this.btnUndo.UseVisualStyleBackColor = true; @@ -548,9 +590,9 @@ private void InitializeComponent() // // btnBestSegment // - this.btnBestSegment.Location = new System.Drawing.Point(370, 148); + this.btnBestSegment.Location = new System.Drawing.Point(370, 138); this.btnBestSegment.Name = "btnBestSegment"; - this.btnBestSegment.Size = new System.Drawing.Size(75, 23); + this.btnBestSegment.Size = new System.Drawing.Size(75, 21); this.btnBestSegment.TabIndex = 17; this.btnBestSegment.Text = "Browse..."; this.btnBestSegment.UseVisualStyleBackColor = true; @@ -558,9 +600,9 @@ private void InitializeComponent() // // btnBehindLosing // - this.btnBehindLosing.Location = new System.Drawing.Point(370, 119); + this.btnBehindLosing.Location = new System.Drawing.Point(370, 111); this.btnBehindLosing.Name = "btnBehindLosing"; - this.btnBehindLosing.Size = new System.Drawing.Size(75, 23); + this.btnBehindLosing.Size = new System.Drawing.Size(75, 21); this.btnBehindLosing.TabIndex = 14; this.btnBehindLosing.Text = "Browse..."; this.btnBehindLosing.UseVisualStyleBackColor = true; @@ -568,9 +610,9 @@ private void InitializeComponent() // // btnBehindGaining // - this.btnBehindGaining.Location = new System.Drawing.Point(370, 90); + this.btnBehindGaining.Location = new System.Drawing.Point(370, 84); this.btnBehindGaining.Name = "btnBehindGaining"; - this.btnBehindGaining.Size = new System.Drawing.Size(75, 23); + this.btnBehindGaining.Size = new System.Drawing.Size(75, 21); this.btnBehindGaining.TabIndex = 11; this.btnBehindGaining.Text = "Browse..."; this.btnBehindGaining.UseVisualStyleBackColor = true; @@ -578,9 +620,9 @@ private void InitializeComponent() // // btnAheadLosing // - this.btnAheadLosing.Location = new System.Drawing.Point(370, 61); + this.btnAheadLosing.Location = new System.Drawing.Point(370, 57); this.btnAheadLosing.Name = "btnAheadLosing"; - this.btnAheadLosing.Size = new System.Drawing.Size(75, 23); + this.btnAheadLosing.Size = new System.Drawing.Size(75, 21); this.btnAheadLosing.TabIndex = 8; this.btnAheadLosing.Text = "Browse..."; this.btnAheadLosing.UseVisualStyleBackColor = true; @@ -588,9 +630,9 @@ private void InitializeComponent() // // btnAheadGaining // - this.btnAheadGaining.Location = new System.Drawing.Point(370, 32); + this.btnAheadGaining.Location = new System.Drawing.Point(370, 30); this.btnAheadGaining.Name = "btnAheadGaining"; - this.btnAheadGaining.Size = new System.Drawing.Size(75, 23); + this.btnAheadGaining.Size = new System.Drawing.Size(75, 21); this.btnAheadGaining.TabIndex = 5; this.btnAheadGaining.Text = "Browse..."; this.btnAheadGaining.UseVisualStyleBackColor = true; @@ -600,7 +642,7 @@ private void InitializeComponent() // this.btnSplit.Location = new System.Drawing.Point(370, 3); this.btnSplit.Name = "btnSplit"; - this.btnSplit.Size = new System.Drawing.Size(75, 23); + this.btnSplit.Size = new System.Drawing.Size(75, 21); this.btnSplit.TabIndex = 2; this.btnSplit.Text = "Browse..."; this.btnSplit.UseVisualStyleBackColor = true; @@ -608,9 +650,9 @@ private void InitializeComponent() // // btnStartTimer // - this.btnStartTimer.Location = new System.Drawing.Point(370, 380); + this.btnStartTimer.Location = new System.Drawing.Point(370, 354); this.btnStartTimer.Name = "btnStartTimer"; - this.btnStartTimer.Size = new System.Drawing.Size(75, 23); + this.btnStartTimer.Size = new System.Drawing.Size(75, 21); this.btnStartTimer.TabIndex = 41; this.btnStartTimer.Text = "Browse..."; this.btnStartTimer.UseVisualStyleBackColor = true; @@ -623,7 +665,7 @@ private void InitializeComponent() this.tpVolumeMixer.Location = new System.Drawing.Point(4, 22); this.tpVolumeMixer.Name = "tpVolumeMixer"; this.tpVolumeMixer.Padding = new System.Windows.Forms.Padding(3); - this.tpVolumeMixer.Size = new System.Drawing.Size(454, 413); + this.tpVolumeMixer.Size = new System.Drawing.Size(454, 380); this.tpVolumeMixer.TabIndex = 1; this.tpVolumeMixer.Text = "Volume Mixer"; this.tpVolumeMixer.UseVisualStyleBackColor = true; @@ -671,33 +713,33 @@ private void InitializeComponent() this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanel2.Name = "tableLayoutPanel2"; this.tableLayoutPanel2.RowCount = 16; - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); - this.tableLayoutPanel2.Size = new System.Drawing.Size(431, 464); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 27F)); + this.tableLayoutPanel2.Size = new System.Drawing.Size(431, 432); this.tableLayoutPanel2.TabIndex = 3; // // tbStartTimerVolume // this.tbStartTimerVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; this.tbStartTimerVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbStartTimerVolume.Location = new System.Drawing.Point(149, 438); + this.tbStartTimerVolume.Location = new System.Drawing.Point(149, 408); this.tbStartTimerVolume.Maximum = 100; this.tbStartTimerVolume.Name = "tbStartTimerVolume"; - this.tbStartTimerVolume.Size = new System.Drawing.Size(279, 23); + this.tbStartTimerVolume.Size = new System.Drawing.Size(279, 21); this.tbStartTimerVolume.TabIndex = 74; this.tbStartTimerVolume.TickFrequency = 10; this.tbStartTimerVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -706,10 +748,10 @@ private void InitializeComponent() // this.tbResumeVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; this.tbResumeVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbResumeVolume.Location = new System.Drawing.Point(149, 409); + this.tbResumeVolume.Location = new System.Drawing.Point(149, 381); this.tbResumeVolume.Maximum = 100; this.tbResumeVolume.Name = "tbResumeVolume"; - this.tbResumeVolume.Size = new System.Drawing.Size(279, 23); + this.tbResumeVolume.Size = new System.Drawing.Size(279, 21); this.tbResumeVolume.TabIndex = 29; this.tbResumeVolume.TickFrequency = 10; this.tbResumeVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -718,10 +760,10 @@ private void InitializeComponent() // this.tbPauseVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; this.tbPauseVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbPauseVolume.Location = new System.Drawing.Point(149, 380); + this.tbPauseVolume.Location = new System.Drawing.Point(149, 354); this.tbPauseVolume.Maximum = 100; this.tbPauseVolume.Name = "tbPauseVolume"; - this.tbPauseVolume.Size = new System.Drawing.Size(279, 23); + this.tbPauseVolume.Size = new System.Drawing.Size(279, 21); this.tbPauseVolume.TabIndex = 27; this.tbPauseVolume.TickFrequency = 10; this.tbPauseVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -730,10 +772,10 @@ private void InitializeComponent() // this.tbResetVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; this.tbResetVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbResetVolume.Location = new System.Drawing.Point(149, 351); + this.tbResetVolume.Location = new System.Drawing.Point(149, 327); this.tbResetVolume.Maximum = 100; this.tbResetVolume.Name = "tbResetVolume"; - this.tbResetVolume.Size = new System.Drawing.Size(279, 23); + this.tbResetVolume.Size = new System.Drawing.Size(279, 21); this.tbResetVolume.TabIndex = 25; this.tbResetVolume.TickFrequency = 10; this.tbResetVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -742,10 +784,10 @@ private void InitializeComponent() // this.tbNotAPersonalBestVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; this.tbNotAPersonalBestVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbNotAPersonalBestVolume.Location = new System.Drawing.Point(149, 322); + this.tbNotAPersonalBestVolume.Location = new System.Drawing.Point(149, 300); this.tbNotAPersonalBestVolume.Maximum = 100; this.tbNotAPersonalBestVolume.Name = "tbNotAPersonalBestVolume"; - this.tbNotAPersonalBestVolume.Size = new System.Drawing.Size(279, 23); + this.tbNotAPersonalBestVolume.Size = new System.Drawing.Size(279, 21); this.tbNotAPersonalBestVolume.TabIndex = 23; this.tbNotAPersonalBestVolume.TickFrequency = 10; this.tbNotAPersonalBestVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -754,10 +796,10 @@ private void InitializeComponent() // this.tbPersonalBestVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; this.tbPersonalBestVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbPersonalBestVolume.Location = new System.Drawing.Point(149, 293); + this.tbPersonalBestVolume.Location = new System.Drawing.Point(149, 273); this.tbPersonalBestVolume.Maximum = 100; this.tbPersonalBestVolume.Name = "tbPersonalBestVolume"; - this.tbPersonalBestVolume.Size = new System.Drawing.Size(279, 23); + this.tbPersonalBestVolume.Size = new System.Drawing.Size(279, 21); this.tbPersonalBestVolume.TabIndex = 21; this.tbPersonalBestVolume.TickFrequency = 10; this.tbPersonalBestVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -766,10 +808,10 @@ private void InitializeComponent() // this.tbSkipVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; this.tbSkipVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbSkipVolume.Location = new System.Drawing.Point(149, 264); + this.tbSkipVolume.Location = new System.Drawing.Point(149, 246); this.tbSkipVolume.Maximum = 100; this.tbSkipVolume.Name = "tbSkipVolume"; - this.tbSkipVolume.Size = new System.Drawing.Size(279, 23); + this.tbSkipVolume.Size = new System.Drawing.Size(279, 21); this.tbSkipVolume.TabIndex = 19; this.tbSkipVolume.TickFrequency = 10; this.tbSkipVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -778,10 +820,10 @@ private void InitializeComponent() // this.tbUndoVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; this.tbUndoVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbUndoVolume.Location = new System.Drawing.Point(149, 235); + this.tbUndoVolume.Location = new System.Drawing.Point(149, 219); this.tbUndoVolume.Maximum = 100; this.tbUndoVolume.Name = "tbUndoVolume"; - this.tbUndoVolume.Size = new System.Drawing.Size(279, 23); + this.tbUndoVolume.Size = new System.Drawing.Size(279, 21); this.tbUndoVolume.TabIndex = 17; this.tbUndoVolume.TickFrequency = 10; this.tbUndoVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -790,10 +832,10 @@ private void InitializeComponent() // this.tbBestSegmentVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; this.tbBestSegmentVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbBestSegmentVolume.Location = new System.Drawing.Point(149, 206); + this.tbBestSegmentVolume.Location = new System.Drawing.Point(149, 192); this.tbBestSegmentVolume.Maximum = 100; this.tbBestSegmentVolume.Name = "tbBestSegmentVolume"; - this.tbBestSegmentVolume.Size = new System.Drawing.Size(279, 23); + this.tbBestSegmentVolume.Size = new System.Drawing.Size(279, 21); this.tbBestSegmentVolume.TabIndex = 15; this.tbBestSegmentVolume.TickFrequency = 10; this.tbBestSegmentVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -802,10 +844,10 @@ private void InitializeComponent() // this.tbSplitBehindLosingVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; this.tbSplitBehindLosingVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbSplitBehindLosingVolume.Location = new System.Drawing.Point(149, 177); + this.tbSplitBehindLosingVolume.Location = new System.Drawing.Point(149, 165); this.tbSplitBehindLosingVolume.Maximum = 100; this.tbSplitBehindLosingVolume.Name = "tbSplitBehindLosingVolume"; - this.tbSplitBehindLosingVolume.Size = new System.Drawing.Size(279, 23); + this.tbSplitBehindLosingVolume.Size = new System.Drawing.Size(279, 21); this.tbSplitBehindLosingVolume.TabIndex = 13; this.tbSplitBehindLosingVolume.TickFrequency = 10; this.tbSplitBehindLosingVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -814,10 +856,10 @@ private void InitializeComponent() // this.tbSplitBehindGainingVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; this.tbSplitBehindGainingVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbSplitBehindGainingVolume.Location = new System.Drawing.Point(149, 148); + this.tbSplitBehindGainingVolume.Location = new System.Drawing.Point(149, 138); this.tbSplitBehindGainingVolume.Maximum = 100; this.tbSplitBehindGainingVolume.Name = "tbSplitBehindGainingVolume"; - this.tbSplitBehindGainingVolume.Size = new System.Drawing.Size(279, 23); + this.tbSplitBehindGainingVolume.Size = new System.Drawing.Size(279, 21); this.tbSplitBehindGainingVolume.TabIndex = 11; this.tbSplitBehindGainingVolume.TickFrequency = 10; this.tbSplitBehindGainingVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -826,10 +868,10 @@ private void InitializeComponent() // this.tbSplitAheadLosingVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; this.tbSplitAheadLosingVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbSplitAheadLosingVolume.Location = new System.Drawing.Point(149, 119); + this.tbSplitAheadLosingVolume.Location = new System.Drawing.Point(149, 111); this.tbSplitAheadLosingVolume.Maximum = 100; this.tbSplitAheadLosingVolume.Name = "tbSplitAheadLosingVolume"; - this.tbSplitAheadLosingVolume.Size = new System.Drawing.Size(279, 23); + this.tbSplitAheadLosingVolume.Size = new System.Drawing.Size(279, 21); this.tbSplitAheadLosingVolume.TabIndex = 9; this.tbSplitAheadLosingVolume.TickFrequency = 10; this.tbSplitAheadLosingVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -838,10 +880,10 @@ private void InitializeComponent() // this.tbSplitAheadGainingVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; this.tbSplitAheadGainingVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbSplitAheadGainingVolume.Location = new System.Drawing.Point(149, 90); + this.tbSplitAheadGainingVolume.Location = new System.Drawing.Point(149, 84); this.tbSplitAheadGainingVolume.Maximum = 100; this.tbSplitAheadGainingVolume.Name = "tbSplitAheadGainingVolume"; - this.tbSplitAheadGainingVolume.Size = new System.Drawing.Size(279, 23); + this.tbSplitAheadGainingVolume.Size = new System.Drawing.Size(279, 21); this.tbSplitAheadGainingVolume.TabIndex = 7; this.tbSplitAheadGainingVolume.TickFrequency = 10; this.tbSplitAheadGainingVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -850,10 +892,10 @@ private void InitializeComponent() // this.tbSplitVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; this.tbSplitVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbSplitVolume.Location = new System.Drawing.Point(149, 61); + this.tbSplitVolume.Location = new System.Drawing.Point(149, 57); this.tbSplitVolume.Maximum = 100; this.tbSplitVolume.Name = "tbSplitVolume"; - this.tbSplitVolume.Size = new System.Drawing.Size(279, 23); + this.tbSplitVolume.Size = new System.Drawing.Size(279, 21); this.tbSplitVolume.TabIndex = 5; this.tbSplitVolume.TickFrequency = 10; this.tbSplitVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -862,9 +904,9 @@ private void InitializeComponent() // this.label16.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(3, 443); + this.label16.Location = new System.Drawing.Point(3, 412); this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(140, 13); + this.label16.Size = new System.Drawing.Size(140, 12); this.label16.TabIndex = 41; this.label16.Text = "Start Timer:"; // @@ -872,9 +914,9 @@ private void InitializeComponent() // this.label17.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(3, 414); + this.label17.Location = new System.Drawing.Point(3, 385); this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(140, 13); + this.label17.Size = new System.Drawing.Size(140, 12); this.label17.TabIndex = 28; this.label17.Text = "Resume:"; // @@ -882,9 +924,9 @@ private void InitializeComponent() // this.label18.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(3, 385); + this.label18.Location = new System.Drawing.Point(3, 358); this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(140, 13); + this.label18.Size = new System.Drawing.Size(140, 12); this.label18.TabIndex = 26; this.label18.Text = "Pause:"; // @@ -892,9 +934,9 @@ private void InitializeComponent() // this.label19.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(3, 356); + this.label19.Location = new System.Drawing.Point(3, 331); this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(140, 13); + this.label19.Size = new System.Drawing.Size(140, 12); this.label19.TabIndex = 24; this.label19.Text = "Reset:"; // @@ -902,9 +944,9 @@ private void InitializeComponent() // this.label20.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(3, 327); + this.label20.Location = new System.Drawing.Point(3, 304); this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(140, 13); + this.label20.Size = new System.Drawing.Size(140, 12); this.label20.TabIndex = 22; this.label20.Text = "Not a Personal Best:"; // @@ -912,9 +954,9 @@ private void InitializeComponent() // this.label21.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(3, 298); + this.label21.Location = new System.Drawing.Point(3, 277); this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(140, 13); + this.label21.Size = new System.Drawing.Size(140, 12); this.label21.TabIndex = 20; this.label21.Text = "Personal Best:"; // @@ -922,9 +964,9 @@ private void InitializeComponent() // this.label22.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label22.AutoSize = true; - this.label22.Location = new System.Drawing.Point(3, 269); + this.label22.Location = new System.Drawing.Point(3, 250); this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(140, 13); + this.label22.Size = new System.Drawing.Size(140, 12); this.label22.TabIndex = 18; this.label22.Text = "Skip Split:"; // @@ -932,9 +974,9 @@ private void InitializeComponent() // this.label23.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(3, 240); + this.label23.Location = new System.Drawing.Point(3, 223); this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(140, 13); + this.label23.Size = new System.Drawing.Size(140, 12); this.label23.TabIndex = 16; this.label23.Text = "Undo Split:"; // @@ -942,9 +984,9 @@ private void InitializeComponent() // this.label24.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label24.AutoSize = true; - this.label24.Location = new System.Drawing.Point(3, 211); + this.label24.Location = new System.Drawing.Point(3, 196); this.label24.Name = "label24"; - this.label24.Size = new System.Drawing.Size(140, 13); + this.label24.Size = new System.Drawing.Size(140, 12); this.label24.TabIndex = 14; this.label24.Text = "Split (Best Segment):"; // @@ -952,9 +994,9 @@ private void InitializeComponent() // this.label25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label25.AutoSize = true; - this.label25.Location = new System.Drawing.Point(3, 182); + this.label25.Location = new System.Drawing.Point(3, 163); this.label25.Name = "label25"; - this.label25.Size = new System.Drawing.Size(140, 13); + this.label25.Size = new System.Drawing.Size(140, 24); this.label25.TabIndex = 12; this.label25.Text = "Split (Behind, Losing Time):"; // @@ -962,9 +1004,9 @@ private void InitializeComponent() // this.label26.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label26.AutoSize = true; - this.label26.Location = new System.Drawing.Point(3, 153); + this.label26.Location = new System.Drawing.Point(3, 136); this.label26.Name = "label26"; - this.label26.Size = new System.Drawing.Size(140, 13); + this.label26.Size = new System.Drawing.Size(140, 24); this.label26.TabIndex = 10; this.label26.Text = "Split (Behind, Gaining Time):"; // @@ -972,9 +1014,9 @@ private void InitializeComponent() // this.label27.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label27.AutoSize = true; - this.label27.Location = new System.Drawing.Point(3, 124); + this.label27.Location = new System.Drawing.Point(3, 109); this.label27.Name = "label27"; - this.label27.Size = new System.Drawing.Size(140, 13); + this.label27.Size = new System.Drawing.Size(140, 24); this.label27.TabIndex = 8; this.label27.Text = "Split (Ahead, Losing Time):"; // @@ -982,9 +1024,9 @@ private void InitializeComponent() // this.label28.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label28.AutoSize = true; - this.label28.Location = new System.Drawing.Point(3, 95); + this.label28.Location = new System.Drawing.Point(3, 82); this.label28.Name = "label28"; - this.label28.Size = new System.Drawing.Size(140, 13); + this.label28.Size = new System.Drawing.Size(140, 24); this.label28.TabIndex = 6; this.label28.Text = "Split (Ahead, Gaining Time):"; // @@ -992,9 +1034,9 @@ private void InitializeComponent() // this.label29.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label29.AutoSize = true; - this.label29.Location = new System.Drawing.Point(3, 66); + this.label29.Location = new System.Drawing.Point(3, 61); this.label29.Name = "label29"; - this.label29.Size = new System.Drawing.Size(140, 13); + this.label29.Size = new System.Drawing.Size(140, 12); this.label29.TabIndex = 4; this.label29.Text = "Split:"; // @@ -1002,9 +1044,9 @@ private void InitializeComponent() // this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(3, 37); + this.label15.Location = new System.Drawing.Point(3, 34); this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(140, 13); + this.label15.Size = new System.Drawing.Size(140, 12); this.label15.TabIndex = 2; this.label15.Text = "General Volume:"; // @@ -1012,10 +1054,10 @@ private void InitializeComponent() // this.tbGeneralVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; this.tbGeneralVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbGeneralVolume.Location = new System.Drawing.Point(149, 32); + this.tbGeneralVolume.Location = new System.Drawing.Point(149, 30); this.tbGeneralVolume.Maximum = 100; this.tbGeneralVolume.Name = "tbGeneralVolume"; - this.tbGeneralVolume.Size = new System.Drawing.Size(279, 23); + this.tbGeneralVolume.Size = new System.Drawing.Size(279, 21); this.tbGeneralVolume.TabIndex = 3; this.tbGeneralVolume.TickFrequency = 10; this.tbGeneralVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -1024,9 +1066,9 @@ private void InitializeComponent() // this.label30.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); this.label30.AutoSize = true; - this.label30.Location = new System.Drawing.Point(3, 8); + this.label30.Location = new System.Drawing.Point(3, 7); this.label30.Name = "label30"; - this.label30.Size = new System.Drawing.Size(140, 13); + this.label30.Size = new System.Drawing.Size(140, 12); this.label30.TabIndex = 0; this.label30.Text = "Output Device:"; // @@ -1036,9 +1078,9 @@ private void InitializeComponent() this.cbOutputDevice.DisplayMember = "ProductName"; this.cbOutputDevice.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbOutputDevice.FormattingEnabled = true; - this.cbOutputDevice.Location = new System.Drawing.Point(149, 4); + this.cbOutputDevice.Location = new System.Drawing.Point(149, 3); this.cbOutputDevice.Name = "cbOutputDevice"; - this.cbOutputDevice.Size = new System.Drawing.Size(279, 21); + this.cbOutputDevice.Size = new System.Drawing.Size(279, 20); this.cbOutputDevice.TabIndex = 1; this.cbOutputDevice.ValueMember = "ProductName"; // @@ -1051,12 +1093,12 @@ private void InitializeComponent() // // SoundSettings // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.tabControl1); this.Name = "SoundSettings"; - this.Padding = new System.Windows.Forms.Padding(7); - this.Size = new System.Drawing.Size(476, 453); + this.Padding = new System.Windows.Forms.Padding(7, 6, 7, 6); + this.Size = new System.Drawing.Size(476, 418); this.tabControl1.ResumeLayout(false); this.tpSoundFiles.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); diff --git a/src/LiveSplit.Sound/UI/Components/SoundSettings.cs b/src/LiveSplit.Sound/UI/Components/SoundSettings.cs index c61ae96..4f0fb6e 100644 --- a/src/LiveSplit.Sound/UI/Components/SoundSettings.cs +++ b/src/LiveSplit.Sound/UI/Components/SoundSettings.cs @@ -15,6 +15,7 @@ public partial class SoundSettings : UserControl public Dictionary SoundDataDictionary { get; set; } public Dictionary TextBoxDictionary { get; set; } + public Dictionary TextBoxToTypeDictionary { get; set; } public Dictionary TrackBarDictionary { get; set; } public Dictionary ButtonToTypeDictionary { get; set; } @@ -48,6 +49,22 @@ public SoundSettings() TextBoxDictionary.Add(EventType.Resume, txtResume); TextBoxDictionary.Add(EventType.StartTimer, txtStartTimer); + TextBoxToTypeDictionary = []; + TextBoxToTypeDictionary.Add(txtSplitPath, EventType.Split); + TextBoxToTypeDictionary.Add(txtSplitAheadGaining, EventType.SplitAheadGaining); + TextBoxToTypeDictionary.Add(txtSplitAheadLosing, EventType.SplitAheadLosing); + TextBoxToTypeDictionary.Add(txtSplitBehindGaining, EventType.SplitBehindGaining); + TextBoxToTypeDictionary.Add(txtSplitBehindLosing, EventType.SplitBehindLosing); + TextBoxToTypeDictionary.Add(txtBestSegment, EventType.BestSegment); + TextBoxToTypeDictionary.Add(txtUndo, EventType.UndoSplit); + TextBoxToTypeDictionary.Add(txtSkip, EventType.SkipSplit); + TextBoxToTypeDictionary.Add(txtPersonalBest, EventType.PersonalBest); + TextBoxToTypeDictionary.Add(txtNotAPersonalBest, EventType.NotAPersonalBest); + TextBoxToTypeDictionary.Add(txtReset, EventType.Reset); + TextBoxToTypeDictionary.Add(txtPause, EventType.Pause); + TextBoxToTypeDictionary.Add(txtResume, EventType.Resume); + TextBoxToTypeDictionary.Add(txtStartTimer, EventType.StartTimer); + TrackBarDictionary = []; TrackBarDictionary.Add(EventType.Split, tbSplitVolume); TrackBarDictionary.Add(EventType.SplitAheadGaining, tbSplitAheadGainingVolume); @@ -102,8 +119,8 @@ public void SetSettings(XmlNode node) foreach (EventType type in Enum.GetValues(typeof(EventType))) { - SoundDataDictionary[type].FilePath = SettingsHelper.ParseString(element[nameof(type)]); - SoundDataDictionary[type].Volume = SettingsHelper.ParseInt(element[$"{nameof(type)}Volume"]); + SoundDataDictionary[type].FilePath = SettingsHelper.ParseString(element[type.ToString()]); + SoundDataDictionary[type].Volume = SettingsHelper.ParseInt(element[$"{type}Volume"]); } OutputDevice = SettingsHelper.ParseInt(element["OutputDevice"]); @@ -171,4 +188,26 @@ private void VolumeTrackBarScrollHandler(object sender, EventArgs e) ttVolume.SetToolTip(trackBar, trackBar.Value.ToString()); } + + private void txtFilePath_DragDrop(object sender, DragEventArgs e) + { + string[] files = (string[])e.Data.GetData(DataFormats.FileDrop, false); + var textBox = (TextBox)sender; + EventType type = TextBoxToTypeDictionary[textBox]; + + SoundDataDictionary[type].FilePath = files[0]; + textBox.Text = files[0]; + } + + private void txtFilePath_DragEnter(object sender, DragEventArgs e) + { + if (e.Data.GetDataPresent(DataFormats.FileDrop)) + { + e.Effect = DragDropEffects.Copy; + } + else + { + e.Effect = DragDropEffects.None; + } + } } From 9358d755f2f12a2a531efc06e0d3a263aca849c7 Mon Sep 17 00:00:00 2001 From: Kuhaku369 Date: Thu, 1 Jan 2026 11:43:24 +0900 Subject: [PATCH 3/4] consolidated repetitive controls into a user control --- .../UI/Components/EventType.cs | 8 +- .../UI/Components/SoundComponent.cs | 6 +- .../Components/SoundFileSettings.Designer.cs | 99 ++ .../UI/Components/SoundFileSettings.cs | 68 ++ .../UI/Components/SoundFileSettings.resx | 123 +++ .../UI/Components/SoundSettings.Designer.cs | 989 +----------------- .../UI/Components/SoundSettings.cs | 158 +-- .../SoundVolumeSettings.Designer.cs | 88 ++ .../UI/Components/SoundVolumeSettings.cs | 29 + .../UI/Components/SoundVolumeSettings.resx | 123 +++ 10 files changed, 572 insertions(+), 1119 deletions(-) create mode 100644 src/LiveSplit.Sound/UI/Components/SoundFileSettings.Designer.cs create mode 100644 src/LiveSplit.Sound/UI/Components/SoundFileSettings.cs create mode 100644 src/LiveSplit.Sound/UI/Components/SoundFileSettings.resx create mode 100644 src/LiveSplit.Sound/UI/Components/SoundVolumeSettings.Designer.cs create mode 100644 src/LiveSplit.Sound/UI/Components/SoundVolumeSettings.cs create mode 100644 src/LiveSplit.Sound/UI/Components/SoundVolumeSettings.resx diff --git a/src/LiveSplit.Sound/UI/Components/EventType.cs b/src/LiveSplit.Sound/UI/Components/EventType.cs index f6dce7a..55677d5 100644 --- a/src/LiveSplit.Sound/UI/Components/EventType.cs +++ b/src/LiveSplit.Sound/UI/Components/EventType.cs @@ -24,10 +24,10 @@ public static string GetName(this EventType type) return type switch { EventType.Split => "Split", - EventType.SplitAheadGaining => "Split(Ahead, Gaining):", - EventType.SplitAheadLosing => "Split(Ahead, Losing):", - EventType.SplitBehindGaining => "Split(Behind, Gaining):", - EventType.SplitBehindLosing => "Split(Behind, Losing):", + EventType.SplitAheadGaining => "Split(Ahead, Gaining Time):", + EventType.SplitAheadLosing => "Split(Ahead, Losing Time):", + EventType.SplitBehindGaining => "Split(Behind, Gaining Time):", + EventType.SplitBehindLosing => "Split(Behind, Losing Time):", EventType.BestSegment => "Split(Best Segment):", EventType.UndoSplit => "Undo Split:", EventType.SkipSplit => "Skip Split:", diff --git a/src/LiveSplit.Sound/UI/Components/SoundComponent.cs b/src/LiveSplit.Sound/UI/Components/SoundComponent.cs index 2293ced..e0cfb3d 100644 --- a/src/LiveSplit.Sound/UI/Components/SoundComponent.cs +++ b/src/LiveSplit.Sound/UI/Components/SoundComponent.cs @@ -128,7 +128,7 @@ private void State_OnSplit(object sender, EventArgs e) } } - if (string.IsNullOrEmpty(Settings.SoundDataDictionary[type].FilePath)) + if (string.IsNullOrEmpty(Settings.DataSettingsDictionary[type].Data.FilePath)) { type = EventType.Split; } @@ -168,8 +168,8 @@ private void PlaySound(EventType type) { Player.Stop(); - string location = Settings.SoundDataDictionary[type].FilePath; - int volume = Settings.SoundDataDictionary[type].Volume; + string location = Settings.DataSettingsDictionary[type].Data.FilePath; + int volume = Settings.DataSettingsDictionary[type].Data.Volume; if (!Activated || !File.Exists(location)) { diff --git a/src/LiveSplit.Sound/UI/Components/SoundFileSettings.Designer.cs b/src/LiveSplit.Sound/UI/Components/SoundFileSettings.Designer.cs new file mode 100644 index 0000000..2bd60d3 --- /dev/null +++ b/src/LiveSplit.Sound/UI/Components/SoundFileSettings.Designer.cs @@ -0,0 +1,99 @@ +namespace LiveSplit.UI.Components +{ + partial class SoundFileSettings + { + /// + /// 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 Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.lblName = new System.Windows.Forms.Label(); + this.txtFilePath = new System.Windows.Forms.TextBox(); + this.btnBrowse = new System.Windows.Forms.Button(); + this.ttVolume = new System.Windows.Forms.ToolTip(this.components); + this.SuspendLayout(); + // + // lblName + // + this.lblName.Location = new System.Drawing.Point(3, 7); + this.lblName.Name = "lblName"; + this.lblName.Size = new System.Drawing.Size(140, 12); + this.lblName.TabIndex = 0; + this.lblName.Text = "Split:"; + this.lblName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // txtFilePath + // + this.txtFilePath.AllowDrop = true; + this.txtFilePath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtFilePath.Location = new System.Drawing.Point(149, 4); + this.txtFilePath.Name = "txtFilePath"; + this.txtFilePath.Size = new System.Drawing.Size(215, 19); + this.txtFilePath.TabIndex = 1; + this.txtFilePath.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); + this.txtFilePath.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); + // + // btnBrowse + // + this.btnBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnBrowse.Location = new System.Drawing.Point(370, 3); + this.btnBrowse.Name = "btnBrowse"; + this.btnBrowse.Size = new System.Drawing.Size(75, 21); + this.btnBrowse.TabIndex = 2; + this.btnBrowse.Text = "Browse..."; + this.btnBrowse.UseVisualStyleBackColor = true; + this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click); + // + // ttVolume + // + this.ttVolume.AutoPopDelay = 5000; + this.ttVolume.InitialDelay = 1000; + this.ttVolume.ReshowDelay = 500; + this.ttVolume.ShowAlways = true; + // + // SoundFileSettings + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lblName); + this.Controls.Add(this.txtFilePath); + this.Controls.Add(this.btnBrowse); + this.Margin = new System.Windows.Forms.Padding(0); + this.Name = "SoundFileSettings"; + this.Size = new System.Drawing.Size(448, 27); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Label lblName; + private System.Windows.Forms.TextBox txtFilePath; + private System.Windows.Forms.Button btnBrowse; + private System.Windows.Forms.ToolTip ttVolume; + + } +} diff --git a/src/LiveSplit.Sound/UI/Components/SoundFileSettings.cs b/src/LiveSplit.Sound/UI/Components/SoundFileSettings.cs new file mode 100644 index 0000000..563aa86 --- /dev/null +++ b/src/LiveSplit.Sound/UI/Components/SoundFileSettings.cs @@ -0,0 +1,68 @@ +using System; +using System.Windows.Forms; + +namespace LiveSplit.UI.Components; + +public partial class SoundFileSettings : UserControl +{ + public EventType EventType { get; set; } + public SoundData Data { get; set; } + public string FilePath { get => Data.FilePath; set => Data.FilePath = value; } + + public SoundFileSettings(EventType eventType, SoundData data) + { + InitializeComponent(); + + EventType = eventType; + Data = data; + + lblName.Text = eventType.GetName(); + txtFilePath.DataBindings.Add("Text", this, nameof(FilePath)); + } + + protected string BrowseForPath(TextBox textBox, Action callback) + { + string path = textBox.Text; + var fileDialog = new OpenFileDialog() + { + FileName = path, + Filter = "Audio Files|*.mp3;*.wav;*.aiff;*.wma|All Files|*.*" + }; + + DialogResult result = fileDialog.ShowDialog(); + + if (result == DialogResult.OK) + { + path = fileDialog.FileName; + } + + textBox.Text = path; + callback(path); + + return path; + } + + private void btnBrowse_Click(object sender, EventArgs e) + { + BrowseForPath(txtFilePath, (x) => FilePath = x); + } + + private void txtFilePath_DragDrop(object sender, DragEventArgs e) + { + string[] files = (string[])e.Data.GetData(DataFormats.FileDrop, false); + txtFilePath.Text = files[0]; + FilePath = files[0]; + } + + private void txtFilePath_DragEnter(object sender, DragEventArgs e) + { + if (e.Data.GetDataPresent(DataFormats.FileDrop)) + { + e.Effect = DragDropEffects.Copy; + } + else + { + e.Effect = DragDropEffects.None; + } + } +} diff --git a/src/LiveSplit.Sound/UI/Components/SoundFileSettings.resx b/src/LiveSplit.Sound/UI/Components/SoundFileSettings.resx new file mode 100644 index 0000000..788fb00 --- /dev/null +++ b/src/LiveSplit.Sound/UI/Components/SoundFileSettings.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 17, 17 + + \ No newline at end of file diff --git a/src/LiveSplit.Sound/UI/Components/SoundSettings.Designer.cs b/src/LiveSplit.Sound/UI/Components/SoundSettings.Designer.cs index f8ee084..ee135a9 100644 --- a/src/LiveSplit.Sound/UI/Components/SoundSettings.Designer.cs +++ b/src/LiveSplit.Sound/UI/Components/SoundSettings.Designer.cs @@ -32,78 +32,8 @@ private void InitializeComponent() this.tabControl1 = new System.Windows.Forms.TabControl(); this.tpSoundFiles = new System.Windows.Forms.TabPage(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.txtStartTimer = new System.Windows.Forms.TextBox(); - this.label14 = new System.Windows.Forms.Label(); - this.label13 = new System.Windows.Forms.Label(); - this.label12 = new System.Windows.Forms.Label(); - this.label11 = new System.Windows.Forms.Label(); - this.label10 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); - this.label7 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.txtResume = new System.Windows.Forms.TextBox(); - this.txtPause = new System.Windows.Forms.TextBox(); - this.txtReset = new System.Windows.Forms.TextBox(); - this.txtNotAPersonalBest = new System.Windows.Forms.TextBox(); - this.txtPersonalBest = new System.Windows.Forms.TextBox(); - this.txtSkip = new System.Windows.Forms.TextBox(); - this.txtUndo = new System.Windows.Forms.TextBox(); - this.txtBestSegment = new System.Windows.Forms.TextBox(); - this.txtSplitBehindLosing = new System.Windows.Forms.TextBox(); - this.txtSplitBehindGaining = new System.Windows.Forms.TextBox(); - this.txtSplitAheadLosing = new System.Windows.Forms.TextBox(); - this.txtSplitAheadGaining = new System.Windows.Forms.TextBox(); - this.txtSplitPath = new System.Windows.Forms.TextBox(); - this.btnResume = new System.Windows.Forms.Button(); - this.btnPause = new System.Windows.Forms.Button(); - this.btnReset = new System.Windows.Forms.Button(); - this.btnNotAPersonalBest = new System.Windows.Forms.Button(); - this.btnPersonalBest = new System.Windows.Forms.Button(); - this.btnSkipSplit = new System.Windows.Forms.Button(); - this.btnUndo = new System.Windows.Forms.Button(); - this.btnBestSegment = new System.Windows.Forms.Button(); - this.btnBehindLosing = new System.Windows.Forms.Button(); - this.btnBehindGaining = new System.Windows.Forms.Button(); - this.btnAheadLosing = new System.Windows.Forms.Button(); - this.btnAheadGaining = new System.Windows.Forms.Button(); - this.btnSplit = new System.Windows.Forms.Button(); - this.btnStartTimer = new System.Windows.Forms.Button(); this.tpVolumeMixer = new System.Windows.Forms.TabPage(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); - this.tbStartTimerVolume = new System.Windows.Forms.TrackBar(); - this.tbResumeVolume = new System.Windows.Forms.TrackBar(); - this.tbPauseVolume = new System.Windows.Forms.TrackBar(); - this.tbResetVolume = new System.Windows.Forms.TrackBar(); - this.tbNotAPersonalBestVolume = new System.Windows.Forms.TrackBar(); - this.tbPersonalBestVolume = new System.Windows.Forms.TrackBar(); - this.tbSkipVolume = new System.Windows.Forms.TrackBar(); - this.tbUndoVolume = new System.Windows.Forms.TrackBar(); - this.tbBestSegmentVolume = new System.Windows.Forms.TrackBar(); - this.tbSplitBehindLosingVolume = new System.Windows.Forms.TrackBar(); - this.tbSplitBehindGainingVolume = new System.Windows.Forms.TrackBar(); - this.tbSplitAheadLosingVolume = new System.Windows.Forms.TrackBar(); - this.tbSplitAheadGainingVolume = new System.Windows.Forms.TrackBar(); - this.tbSplitVolume = new System.Windows.Forms.TrackBar(); - this.label16 = new System.Windows.Forms.Label(); - this.label17 = new System.Windows.Forms.Label(); - this.label18 = new System.Windows.Forms.Label(); - this.label19 = new System.Windows.Forms.Label(); - this.label20 = new System.Windows.Forms.Label(); - this.label21 = new System.Windows.Forms.Label(); - this.label22 = new System.Windows.Forms.Label(); - this.label23 = new System.Windows.Forms.Label(); - this.label24 = new System.Windows.Forms.Label(); - this.label25 = new System.Windows.Forms.Label(); - this.label26 = new System.Windows.Forms.Label(); - this.label27 = new System.Windows.Forms.Label(); - this.label28 = new System.Windows.Forms.Label(); - this.label29 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label(); this.tbGeneralVolume = new System.Windows.Forms.TrackBar(); this.label30 = new System.Windows.Forms.Label(); @@ -111,23 +41,8 @@ private void InitializeComponent() this.ttVolume = new System.Windows.Forms.ToolTip(this.components); this.tabControl1.SuspendLayout(); this.tpSoundFiles.SuspendLayout(); - this.tableLayoutPanel1.SuspendLayout(); this.tpVolumeMixer.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tbStartTimerVolume)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbResumeVolume)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbPauseVolume)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbResetVolume)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbNotAPersonalBestVolume)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbPersonalBestVolume)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbSkipVolume)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbUndoVolume)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbBestSegmentVolume)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbSplitBehindLosingVolume)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbSplitBehindGainingVolume)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbSplitAheadLosingVolume)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbSplitAheadGainingVolume)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbSplitVolume)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.tbGeneralVolume)).BeginInit(); this.SuspendLayout(); // @@ -155,53 +70,10 @@ private void InitializeComponent() // // tableLayoutPanel1 // - this.tableLayoutPanel1.ColumnCount = 3; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 146F)); + this.tableLayoutPanel1.ColumnCount = 1; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.Controls.Add(this.txtStartTimer, 1, 13); - this.tableLayoutPanel1.Controls.Add(this.label14, 0, 13); - this.tableLayoutPanel1.Controls.Add(this.label13, 0, 12); - this.tableLayoutPanel1.Controls.Add(this.label12, 0, 11); - this.tableLayoutPanel1.Controls.Add(this.label11, 0, 10); - this.tableLayoutPanel1.Controls.Add(this.label10, 0, 9); - this.tableLayoutPanel1.Controls.Add(this.label9, 0, 8); - this.tableLayoutPanel1.Controls.Add(this.label8, 0, 7); - this.tableLayoutPanel1.Controls.Add(this.label7, 0, 6); - this.tableLayoutPanel1.Controls.Add(this.label5, 0, 5); - this.tableLayoutPanel1.Controls.Add(this.label6, 0, 4); - this.tableLayoutPanel1.Controls.Add(this.label4, 0, 3); - this.tableLayoutPanel1.Controls.Add(this.label3, 0, 2); - this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.label1, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.txtResume, 1, 12); - this.tableLayoutPanel1.Controls.Add(this.txtPause, 1, 11); - this.tableLayoutPanel1.Controls.Add(this.txtReset, 1, 10); - this.tableLayoutPanel1.Controls.Add(this.txtNotAPersonalBest, 1, 9); - this.tableLayoutPanel1.Controls.Add(this.txtPersonalBest, 1, 8); - this.tableLayoutPanel1.Controls.Add(this.txtSkip, 1, 7); - this.tableLayoutPanel1.Controls.Add(this.txtUndo, 1, 6); - this.tableLayoutPanel1.Controls.Add(this.txtBestSegment, 1, 5); - this.tableLayoutPanel1.Controls.Add(this.txtSplitBehindLosing, 1, 4); - this.tableLayoutPanel1.Controls.Add(this.txtSplitBehindGaining, 1, 3); - this.tableLayoutPanel1.Controls.Add(this.txtSplitAheadLosing, 1, 2); - this.tableLayoutPanel1.Controls.Add(this.txtSplitAheadGaining, 1, 1); - this.tableLayoutPanel1.Controls.Add(this.txtSplitPath, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.btnResume, 2, 12); - this.tableLayoutPanel1.Controls.Add(this.btnPause, 2, 11); - this.tableLayoutPanel1.Controls.Add(this.btnReset, 2, 10); - this.tableLayoutPanel1.Controls.Add(this.btnNotAPersonalBest, 2, 9); - this.tableLayoutPanel1.Controls.Add(this.btnPersonalBest, 2, 8); - this.tableLayoutPanel1.Controls.Add(this.btnSkipSplit, 2, 7); - this.tableLayoutPanel1.Controls.Add(this.btnUndo, 2, 6); - this.tableLayoutPanel1.Controls.Add(this.btnBestSegment, 2, 5); - this.tableLayoutPanel1.Controls.Add(this.btnBehindLosing, 2, 4); - this.tableLayoutPanel1.Controls.Add(this.btnBehindGaining, 2, 3); - this.tableLayoutPanel1.Controls.Add(this.btnAheadLosing, 2, 2); - this.tableLayoutPanel1.Controls.Add(this.btnAheadGaining, 2, 1); - this.tableLayoutPanel1.Controls.Add(this.btnSplit, 2, 0); - this.tableLayoutPanel1.Controls.Add(this.btnStartTimer, 2, 13); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; @@ -224,440 +96,6 @@ private void InitializeComponent() this.tableLayoutPanel1.Size = new System.Drawing.Size(448, 374); this.tableLayoutPanel1.TabIndex = 0; // - // txtStartTimer - // - this.txtStartTimer.AllowDrop = true; - this.txtStartTimer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtStartTimer.Location = new System.Drawing.Point(149, 355); - this.txtStartTimer.Name = "txtStartTimer"; - this.txtStartTimer.Size = new System.Drawing.Size(215, 19); - this.txtStartTimer.TabIndex = 40; - this.txtStartTimer.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); - this.txtStartTimer.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); - // - // label14 - // - this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(3, 358); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(140, 12); - this.label14.TabIndex = 39; - this.label14.Text = "Start Timer:"; - // - // label13 - // - this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(3, 331); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(140, 12); - this.label13.TabIndex = 36; - this.label13.Text = "Resume:"; - // - // label12 - // - this.label12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(3, 304); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(140, 12); - this.label12.TabIndex = 33; - this.label12.Text = "Pause:"; - // - // label11 - // - this.label11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(3, 277); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(140, 12); - this.label11.TabIndex = 30; - this.label11.Text = "Reset:"; - // - // label10 - // - this.label10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(3, 250); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(140, 12); - this.label10.TabIndex = 27; - this.label10.Text = "Not a Personal Best:"; - // - // label9 - // - this.label9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(3, 223); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(140, 12); - this.label9.TabIndex = 24; - this.label9.Text = "Personal Best:"; - // - // label8 - // - this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(3, 196); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(140, 12); - this.label8.TabIndex = 21; - this.label8.Text = "Skip Split:"; - // - // label7 - // - this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(3, 169); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(140, 12); - this.label7.TabIndex = 18; - this.label7.Text = "Undo Split:"; - // - // label5 - // - this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(3, 142); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(140, 12); - this.label5.TabIndex = 15; - this.label5.Text = "Split (Best Segment):"; - // - // label6 - // - this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(3, 109); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(140, 24); - this.label6.TabIndex = 12; - this.label6.Text = "Split (Behind, Losing Time):"; - // - // label4 - // - this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(3, 82); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(140, 24); - this.label4.TabIndex = 9; - this.label4.Text = "Split (Behind, Gaining Time):"; - // - // label3 - // - this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(3, 55); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(140, 24); - this.label3.TabIndex = 6; - this.label3.Text = "Split (Ahead, Losing Time):"; - // - // label2 - // - this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(3, 28); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(140, 24); - this.label2.TabIndex = 3; - this.label2.Text = "Split (Ahead, Gaining Time):"; - // - // label1 - // - this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(3, 7); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(140, 12); - this.label1.TabIndex = 0; - this.label1.Text = "Split:"; - // - // txtResume - // - this.txtResume.AllowDrop = true; - this.txtResume.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtResume.Location = new System.Drawing.Point(149, 328); - this.txtResume.Name = "txtResume"; - this.txtResume.Size = new System.Drawing.Size(215, 19); - this.txtResume.TabIndex = 37; - this.txtResume.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); - this.txtResume.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); - // - // txtPause - // - this.txtPause.AllowDrop = true; - this.txtPause.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtPause.Location = new System.Drawing.Point(149, 301); - this.txtPause.Name = "txtPause"; - this.txtPause.Size = new System.Drawing.Size(215, 19); - this.txtPause.TabIndex = 34; - this.txtPause.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); - this.txtPause.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); - // - // txtReset - // - this.txtReset.AllowDrop = true; - this.txtReset.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtReset.Location = new System.Drawing.Point(149, 274); - this.txtReset.Name = "txtReset"; - this.txtReset.Size = new System.Drawing.Size(215, 19); - this.txtReset.TabIndex = 31; - this.txtReset.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); - this.txtReset.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); - // - // txtNotAPersonalBest - // - this.txtNotAPersonalBest.AllowDrop = true; - this.txtNotAPersonalBest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtNotAPersonalBest.Location = new System.Drawing.Point(149, 247); - this.txtNotAPersonalBest.Name = "txtNotAPersonalBest"; - this.txtNotAPersonalBest.Size = new System.Drawing.Size(215, 19); - this.txtNotAPersonalBest.TabIndex = 28; - this.txtNotAPersonalBest.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); - this.txtNotAPersonalBest.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); - // - // txtPersonalBest - // - this.txtPersonalBest.AllowDrop = true; - this.txtPersonalBest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtPersonalBest.Location = new System.Drawing.Point(149, 220); - this.txtPersonalBest.Name = "txtPersonalBest"; - this.txtPersonalBest.Size = new System.Drawing.Size(215, 19); - this.txtPersonalBest.TabIndex = 25; - this.txtPersonalBest.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); - this.txtPersonalBest.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); - // - // txtSkip - // - this.txtSkip.AllowDrop = true; - this.txtSkip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSkip.Location = new System.Drawing.Point(149, 193); - this.txtSkip.Name = "txtSkip"; - this.txtSkip.Size = new System.Drawing.Size(215, 19); - this.txtSkip.TabIndex = 22; - this.txtSkip.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); - this.txtSkip.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); - // - // txtUndo - // - this.txtUndo.AllowDrop = true; - this.txtUndo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtUndo.Location = new System.Drawing.Point(149, 166); - this.txtUndo.Name = "txtUndo"; - this.txtUndo.Size = new System.Drawing.Size(215, 19); - this.txtUndo.TabIndex = 19; - this.txtUndo.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); - this.txtUndo.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); - // - // txtBestSegment - // - this.txtBestSegment.AllowDrop = true; - this.txtBestSegment.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtBestSegment.Location = new System.Drawing.Point(149, 139); - this.txtBestSegment.Name = "txtBestSegment"; - this.txtBestSegment.Size = new System.Drawing.Size(215, 19); - this.txtBestSegment.TabIndex = 16; - this.txtBestSegment.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); - this.txtBestSegment.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); - // - // txtSplitBehindLosing - // - this.txtSplitBehindLosing.AllowDrop = true; - this.txtSplitBehindLosing.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSplitBehindLosing.Location = new System.Drawing.Point(149, 112); - this.txtSplitBehindLosing.Name = "txtSplitBehindLosing"; - this.txtSplitBehindLosing.Size = new System.Drawing.Size(215, 19); - this.txtSplitBehindLosing.TabIndex = 13; - this.txtSplitBehindLosing.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); - this.txtSplitBehindLosing.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); - // - // txtSplitBehindGaining - // - this.txtSplitBehindGaining.AllowDrop = true; - this.txtSplitBehindGaining.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSplitBehindGaining.Location = new System.Drawing.Point(149, 85); - this.txtSplitBehindGaining.Name = "txtSplitBehindGaining"; - this.txtSplitBehindGaining.Size = new System.Drawing.Size(215, 19); - this.txtSplitBehindGaining.TabIndex = 10; - this.txtSplitBehindGaining.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); - this.txtSplitBehindGaining.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); - // - // txtSplitAheadLosing - // - this.txtSplitAheadLosing.AllowDrop = true; - this.txtSplitAheadLosing.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSplitAheadLosing.Location = new System.Drawing.Point(149, 58); - this.txtSplitAheadLosing.Name = "txtSplitAheadLosing"; - this.txtSplitAheadLosing.Size = new System.Drawing.Size(215, 19); - this.txtSplitAheadLosing.TabIndex = 7; - this.txtSplitAheadLosing.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); - this.txtSplitAheadLosing.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); - // - // txtSplitAheadGaining - // - this.txtSplitAheadGaining.AllowDrop = true; - this.txtSplitAheadGaining.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSplitAheadGaining.Location = new System.Drawing.Point(149, 31); - this.txtSplitAheadGaining.Name = "txtSplitAheadGaining"; - this.txtSplitAheadGaining.Size = new System.Drawing.Size(215, 19); - this.txtSplitAheadGaining.TabIndex = 4; - this.txtSplitAheadGaining.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); - this.txtSplitAheadGaining.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); - // - // txtSplitPath - // - this.txtSplitPath.AllowDrop = true; - this.txtSplitPath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.txtSplitPath.Location = new System.Drawing.Point(149, 4); - this.txtSplitPath.Name = "txtSplitPath"; - this.txtSplitPath.Size = new System.Drawing.Size(215, 19); - this.txtSplitPath.TabIndex = 1; - this.txtSplitPath.DragDrop += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragDrop); - this.txtSplitPath.DragEnter += new System.Windows.Forms.DragEventHandler(this.txtFilePath_DragEnter); - // - // btnResume - // - this.btnResume.Location = new System.Drawing.Point(370, 327); - this.btnResume.Name = "btnResume"; - this.btnResume.Size = new System.Drawing.Size(75, 21); - this.btnResume.TabIndex = 38; - this.btnResume.Text = "Browse..."; - this.btnResume.UseVisualStyleBackColor = true; - this.btnResume.Click += new System.EventHandler(this.btnBrowse_Click); - // - // btnPause - // - this.btnPause.Location = new System.Drawing.Point(370, 300); - this.btnPause.Name = "btnPause"; - this.btnPause.Size = new System.Drawing.Size(75, 21); - this.btnPause.TabIndex = 35; - this.btnPause.Text = "Browse..."; - this.btnPause.UseVisualStyleBackColor = true; - this.btnPause.Click += new System.EventHandler(this.btnBrowse_Click); - // - // btnReset - // - this.btnReset.Location = new System.Drawing.Point(370, 273); - this.btnReset.Name = "btnReset"; - this.btnReset.Size = new System.Drawing.Size(75, 21); - this.btnReset.TabIndex = 32; - this.btnReset.Text = "Browse..."; - this.btnReset.UseVisualStyleBackColor = true; - this.btnReset.Click += new System.EventHandler(this.btnBrowse_Click); - // - // btnNotAPersonalBest - // - this.btnNotAPersonalBest.Location = new System.Drawing.Point(370, 246); - this.btnNotAPersonalBest.Name = "btnNotAPersonalBest"; - this.btnNotAPersonalBest.Size = new System.Drawing.Size(75, 21); - this.btnNotAPersonalBest.TabIndex = 29; - this.btnNotAPersonalBest.Text = "Browse..."; - this.btnNotAPersonalBest.UseVisualStyleBackColor = true; - this.btnNotAPersonalBest.Click += new System.EventHandler(this.btnBrowse_Click); - // - // btnPersonalBest - // - this.btnPersonalBest.Location = new System.Drawing.Point(370, 219); - this.btnPersonalBest.Name = "btnPersonalBest"; - this.btnPersonalBest.Size = new System.Drawing.Size(75, 21); - this.btnPersonalBest.TabIndex = 26; - this.btnPersonalBest.Text = "Browse..."; - this.btnPersonalBest.UseVisualStyleBackColor = true; - this.btnPersonalBest.Click += new System.EventHandler(this.btnBrowse_Click); - // - // btnSkipSplit - // - this.btnSkipSplit.Location = new System.Drawing.Point(370, 192); - this.btnSkipSplit.Name = "btnSkipSplit"; - this.btnSkipSplit.Size = new System.Drawing.Size(75, 21); - this.btnSkipSplit.TabIndex = 23; - this.btnSkipSplit.Text = "Browse..."; - this.btnSkipSplit.UseVisualStyleBackColor = true; - this.btnSkipSplit.Click += new System.EventHandler(this.btnBrowse_Click); - // - // btnUndo - // - this.btnUndo.Location = new System.Drawing.Point(370, 165); - this.btnUndo.Name = "btnUndo"; - this.btnUndo.Size = new System.Drawing.Size(75, 21); - this.btnUndo.TabIndex = 20; - this.btnUndo.Text = "Browse..."; - this.btnUndo.UseVisualStyleBackColor = true; - this.btnUndo.Click += new System.EventHandler(this.btnBrowse_Click); - // - // btnBestSegment - // - this.btnBestSegment.Location = new System.Drawing.Point(370, 138); - this.btnBestSegment.Name = "btnBestSegment"; - this.btnBestSegment.Size = new System.Drawing.Size(75, 21); - this.btnBestSegment.TabIndex = 17; - this.btnBestSegment.Text = "Browse..."; - this.btnBestSegment.UseVisualStyleBackColor = true; - this.btnBestSegment.Click += new System.EventHandler(this.btnBrowse_Click); - // - // btnBehindLosing - // - this.btnBehindLosing.Location = new System.Drawing.Point(370, 111); - this.btnBehindLosing.Name = "btnBehindLosing"; - this.btnBehindLosing.Size = new System.Drawing.Size(75, 21); - this.btnBehindLosing.TabIndex = 14; - this.btnBehindLosing.Text = "Browse..."; - this.btnBehindLosing.UseVisualStyleBackColor = true; - this.btnBehindLosing.Click += new System.EventHandler(this.btnBrowse_Click); - // - // btnBehindGaining - // - this.btnBehindGaining.Location = new System.Drawing.Point(370, 84); - this.btnBehindGaining.Name = "btnBehindGaining"; - this.btnBehindGaining.Size = new System.Drawing.Size(75, 21); - this.btnBehindGaining.TabIndex = 11; - this.btnBehindGaining.Text = "Browse..."; - this.btnBehindGaining.UseVisualStyleBackColor = true; - this.btnBehindGaining.Click += new System.EventHandler(this.btnBrowse_Click); - // - // btnAheadLosing - // - this.btnAheadLosing.Location = new System.Drawing.Point(370, 57); - this.btnAheadLosing.Name = "btnAheadLosing"; - this.btnAheadLosing.Size = new System.Drawing.Size(75, 21); - this.btnAheadLosing.TabIndex = 8; - this.btnAheadLosing.Text = "Browse..."; - this.btnAheadLosing.UseVisualStyleBackColor = true; - this.btnAheadLosing.Click += new System.EventHandler(this.btnBrowse_Click); - // - // btnAheadGaining - // - this.btnAheadGaining.Location = new System.Drawing.Point(370, 30); - this.btnAheadGaining.Name = "btnAheadGaining"; - this.btnAheadGaining.Size = new System.Drawing.Size(75, 21); - this.btnAheadGaining.TabIndex = 5; - this.btnAheadGaining.Text = "Browse..."; - this.btnAheadGaining.UseVisualStyleBackColor = true; - this.btnAheadGaining.Click += new System.EventHandler(this.btnBrowse_Click); - // - // btnSplit - // - this.btnSplit.Location = new System.Drawing.Point(370, 3); - this.btnSplit.Name = "btnSplit"; - this.btnSplit.Size = new System.Drawing.Size(75, 21); - this.btnSplit.TabIndex = 2; - this.btnSplit.Text = "Browse..."; - this.btnSplit.UseVisualStyleBackColor = true; - this.btnSplit.Click += new System.EventHandler(this.btnBrowse_Click); - // - // btnStartTimer - // - this.btnStartTimer.Location = new System.Drawing.Point(370, 354); - this.btnStartTimer.Name = "btnStartTimer"; - this.btnStartTimer.Size = new System.Drawing.Size(75, 21); - this.btnStartTimer.TabIndex = 41; - this.btnStartTimer.Text = "Browse..."; - this.btnStartTimer.UseVisualStyleBackColor = true; - this.btnStartTimer.Click += new System.EventHandler(this.btnBrowse_Click); - // // tpVolumeMixer // this.tpVolumeMixer.AutoScroll = true; @@ -677,34 +115,6 @@ private void InitializeComponent() this.tableLayoutPanel2.ColumnCount = 2; this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 146F)); this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel2.Controls.Add(this.tbStartTimerVolume, 1, 15); - this.tableLayoutPanel2.Controls.Add(this.tbResumeVolume, 1, 14); - this.tableLayoutPanel2.Controls.Add(this.tbPauseVolume, 1, 13); - this.tableLayoutPanel2.Controls.Add(this.tbResetVolume, 1, 12); - this.tableLayoutPanel2.Controls.Add(this.tbNotAPersonalBestVolume, 1, 11); - this.tableLayoutPanel2.Controls.Add(this.tbPersonalBestVolume, 1, 10); - this.tableLayoutPanel2.Controls.Add(this.tbSkipVolume, 1, 9); - this.tableLayoutPanel2.Controls.Add(this.tbUndoVolume, 1, 8); - this.tableLayoutPanel2.Controls.Add(this.tbBestSegmentVolume, 1, 7); - this.tableLayoutPanel2.Controls.Add(this.tbSplitBehindLosingVolume, 1, 6); - this.tableLayoutPanel2.Controls.Add(this.tbSplitBehindGainingVolume, 1, 5); - this.tableLayoutPanel2.Controls.Add(this.tbSplitAheadLosingVolume, 1, 4); - this.tableLayoutPanel2.Controls.Add(this.tbSplitAheadGainingVolume, 1, 3); - this.tableLayoutPanel2.Controls.Add(this.tbSplitVolume, 1, 2); - this.tableLayoutPanel2.Controls.Add(this.label16, 0, 15); - this.tableLayoutPanel2.Controls.Add(this.label17, 0, 14); - this.tableLayoutPanel2.Controls.Add(this.label18, 0, 13); - this.tableLayoutPanel2.Controls.Add(this.label19, 0, 12); - this.tableLayoutPanel2.Controls.Add(this.label20, 0, 11); - this.tableLayoutPanel2.Controls.Add(this.label21, 0, 10); - this.tableLayoutPanel2.Controls.Add(this.label22, 0, 9); - this.tableLayoutPanel2.Controls.Add(this.label23, 0, 8); - this.tableLayoutPanel2.Controls.Add(this.label24, 0, 7); - this.tableLayoutPanel2.Controls.Add(this.label25, 0, 6); - this.tableLayoutPanel2.Controls.Add(this.label26, 0, 5); - this.tableLayoutPanel2.Controls.Add(this.label27, 0, 4); - this.tableLayoutPanel2.Controls.Add(this.label28, 0, 3); - this.tableLayoutPanel2.Controls.Add(this.label29, 0, 2); this.tableLayoutPanel2.Controls.Add(this.label15, 0, 1); this.tableLayoutPanel2.Controls.Add(this.tbGeneralVolume, 1, 1); this.tableLayoutPanel2.Controls.Add(this.label30, 0, 0); @@ -732,314 +142,6 @@ private void InitializeComponent() this.tableLayoutPanel2.Size = new System.Drawing.Size(431, 432); this.tableLayoutPanel2.TabIndex = 3; // - // tbStartTimerVolume - // - this.tbStartTimerVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.tbStartTimerVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbStartTimerVolume.Location = new System.Drawing.Point(149, 408); - this.tbStartTimerVolume.Maximum = 100; - this.tbStartTimerVolume.Name = "tbStartTimerVolume"; - this.tbStartTimerVolume.Size = new System.Drawing.Size(279, 21); - this.tbStartTimerVolume.TabIndex = 74; - this.tbStartTimerVolume.TickFrequency = 10; - this.tbStartTimerVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); - // - // tbResumeVolume - // - this.tbResumeVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.tbResumeVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbResumeVolume.Location = new System.Drawing.Point(149, 381); - this.tbResumeVolume.Maximum = 100; - this.tbResumeVolume.Name = "tbResumeVolume"; - this.tbResumeVolume.Size = new System.Drawing.Size(279, 21); - this.tbResumeVolume.TabIndex = 29; - this.tbResumeVolume.TickFrequency = 10; - this.tbResumeVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); - // - // tbPauseVolume - // - this.tbPauseVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.tbPauseVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbPauseVolume.Location = new System.Drawing.Point(149, 354); - this.tbPauseVolume.Maximum = 100; - this.tbPauseVolume.Name = "tbPauseVolume"; - this.tbPauseVolume.Size = new System.Drawing.Size(279, 21); - this.tbPauseVolume.TabIndex = 27; - this.tbPauseVolume.TickFrequency = 10; - this.tbPauseVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); - // - // tbResetVolume - // - this.tbResetVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.tbResetVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbResetVolume.Location = new System.Drawing.Point(149, 327); - this.tbResetVolume.Maximum = 100; - this.tbResetVolume.Name = "tbResetVolume"; - this.tbResetVolume.Size = new System.Drawing.Size(279, 21); - this.tbResetVolume.TabIndex = 25; - this.tbResetVolume.TickFrequency = 10; - this.tbResetVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); - // - // tbNotAPersonalBestVolume - // - this.tbNotAPersonalBestVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.tbNotAPersonalBestVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbNotAPersonalBestVolume.Location = new System.Drawing.Point(149, 300); - this.tbNotAPersonalBestVolume.Maximum = 100; - this.tbNotAPersonalBestVolume.Name = "tbNotAPersonalBestVolume"; - this.tbNotAPersonalBestVolume.Size = new System.Drawing.Size(279, 21); - this.tbNotAPersonalBestVolume.TabIndex = 23; - this.tbNotAPersonalBestVolume.TickFrequency = 10; - this.tbNotAPersonalBestVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); - // - // tbPersonalBestVolume - // - this.tbPersonalBestVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.tbPersonalBestVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbPersonalBestVolume.Location = new System.Drawing.Point(149, 273); - this.tbPersonalBestVolume.Maximum = 100; - this.tbPersonalBestVolume.Name = "tbPersonalBestVolume"; - this.tbPersonalBestVolume.Size = new System.Drawing.Size(279, 21); - this.tbPersonalBestVolume.TabIndex = 21; - this.tbPersonalBestVolume.TickFrequency = 10; - this.tbPersonalBestVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); - // - // tbSkipVolume - // - this.tbSkipVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.tbSkipVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbSkipVolume.Location = new System.Drawing.Point(149, 246); - this.tbSkipVolume.Maximum = 100; - this.tbSkipVolume.Name = "tbSkipVolume"; - this.tbSkipVolume.Size = new System.Drawing.Size(279, 21); - this.tbSkipVolume.TabIndex = 19; - this.tbSkipVolume.TickFrequency = 10; - this.tbSkipVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); - // - // tbUndoVolume - // - this.tbUndoVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.tbUndoVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbUndoVolume.Location = new System.Drawing.Point(149, 219); - this.tbUndoVolume.Maximum = 100; - this.tbUndoVolume.Name = "tbUndoVolume"; - this.tbUndoVolume.Size = new System.Drawing.Size(279, 21); - this.tbUndoVolume.TabIndex = 17; - this.tbUndoVolume.TickFrequency = 10; - this.tbUndoVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); - // - // tbBestSegmentVolume - // - this.tbBestSegmentVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.tbBestSegmentVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbBestSegmentVolume.Location = new System.Drawing.Point(149, 192); - this.tbBestSegmentVolume.Maximum = 100; - this.tbBestSegmentVolume.Name = "tbBestSegmentVolume"; - this.tbBestSegmentVolume.Size = new System.Drawing.Size(279, 21); - this.tbBestSegmentVolume.TabIndex = 15; - this.tbBestSegmentVolume.TickFrequency = 10; - this.tbBestSegmentVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); - // - // tbSplitBehindLosingVolume - // - this.tbSplitBehindLosingVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.tbSplitBehindLosingVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbSplitBehindLosingVolume.Location = new System.Drawing.Point(149, 165); - this.tbSplitBehindLosingVolume.Maximum = 100; - this.tbSplitBehindLosingVolume.Name = "tbSplitBehindLosingVolume"; - this.tbSplitBehindLosingVolume.Size = new System.Drawing.Size(279, 21); - this.tbSplitBehindLosingVolume.TabIndex = 13; - this.tbSplitBehindLosingVolume.TickFrequency = 10; - this.tbSplitBehindLosingVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); - // - // tbSplitBehindGainingVolume - // - this.tbSplitBehindGainingVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.tbSplitBehindGainingVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbSplitBehindGainingVolume.Location = new System.Drawing.Point(149, 138); - this.tbSplitBehindGainingVolume.Maximum = 100; - this.tbSplitBehindGainingVolume.Name = "tbSplitBehindGainingVolume"; - this.tbSplitBehindGainingVolume.Size = new System.Drawing.Size(279, 21); - this.tbSplitBehindGainingVolume.TabIndex = 11; - this.tbSplitBehindGainingVolume.TickFrequency = 10; - this.tbSplitBehindGainingVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); - // - // tbSplitAheadLosingVolume - // - this.tbSplitAheadLosingVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.tbSplitAheadLosingVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbSplitAheadLosingVolume.Location = new System.Drawing.Point(149, 111); - this.tbSplitAheadLosingVolume.Maximum = 100; - this.tbSplitAheadLosingVolume.Name = "tbSplitAheadLosingVolume"; - this.tbSplitAheadLosingVolume.Size = new System.Drawing.Size(279, 21); - this.tbSplitAheadLosingVolume.TabIndex = 9; - this.tbSplitAheadLosingVolume.TickFrequency = 10; - this.tbSplitAheadLosingVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); - // - // tbSplitAheadGainingVolume - // - this.tbSplitAheadGainingVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.tbSplitAheadGainingVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbSplitAheadGainingVolume.Location = new System.Drawing.Point(149, 84); - this.tbSplitAheadGainingVolume.Maximum = 100; - this.tbSplitAheadGainingVolume.Name = "tbSplitAheadGainingVolume"; - this.tbSplitAheadGainingVolume.Size = new System.Drawing.Size(279, 21); - this.tbSplitAheadGainingVolume.TabIndex = 7; - this.tbSplitAheadGainingVolume.TickFrequency = 10; - this.tbSplitAheadGainingVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); - // - // tbSplitVolume - // - this.tbSplitVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; - this.tbSplitVolume.Dock = System.Windows.Forms.DockStyle.Fill; - this.tbSplitVolume.Location = new System.Drawing.Point(149, 57); - this.tbSplitVolume.Maximum = 100; - this.tbSplitVolume.Name = "tbSplitVolume"; - this.tbSplitVolume.Size = new System.Drawing.Size(279, 21); - this.tbSplitVolume.TabIndex = 5; - this.tbSplitVolume.TickFrequency = 10; - this.tbSplitVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); - // - // label16 - // - this.label16.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(3, 412); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(140, 12); - this.label16.TabIndex = 41; - this.label16.Text = "Start Timer:"; - // - // label17 - // - this.label17.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(3, 385); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(140, 12); - this.label17.TabIndex = 28; - this.label17.Text = "Resume:"; - // - // label18 - // - this.label18.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label18.AutoSize = true; - this.label18.Location = new System.Drawing.Point(3, 358); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(140, 12); - this.label18.TabIndex = 26; - this.label18.Text = "Pause:"; - // - // label19 - // - this.label19.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label19.AutoSize = true; - this.label19.Location = new System.Drawing.Point(3, 331); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(140, 12); - this.label19.TabIndex = 24; - this.label19.Text = "Reset:"; - // - // label20 - // - this.label20.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label20.AutoSize = true; - this.label20.Location = new System.Drawing.Point(3, 304); - this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(140, 12); - this.label20.TabIndex = 22; - this.label20.Text = "Not a Personal Best:"; - // - // label21 - // - this.label21.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label21.AutoSize = true; - this.label21.Location = new System.Drawing.Point(3, 277); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(140, 12); - this.label21.TabIndex = 20; - this.label21.Text = "Personal Best:"; - // - // label22 - // - this.label22.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label22.AutoSize = true; - this.label22.Location = new System.Drawing.Point(3, 250); - this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(140, 12); - this.label22.TabIndex = 18; - this.label22.Text = "Skip Split:"; - // - // label23 - // - this.label23.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label23.AutoSize = true; - this.label23.Location = new System.Drawing.Point(3, 223); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(140, 12); - this.label23.TabIndex = 16; - this.label23.Text = "Undo Split:"; - // - // label24 - // - this.label24.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label24.AutoSize = true; - this.label24.Location = new System.Drawing.Point(3, 196); - this.label24.Name = "label24"; - this.label24.Size = new System.Drawing.Size(140, 12); - this.label24.TabIndex = 14; - this.label24.Text = "Split (Best Segment):"; - // - // label25 - // - this.label25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label25.AutoSize = true; - this.label25.Location = new System.Drawing.Point(3, 163); - this.label25.Name = "label25"; - this.label25.Size = new System.Drawing.Size(140, 24); - this.label25.TabIndex = 12; - this.label25.Text = "Split (Behind, Losing Time):"; - // - // label26 - // - this.label26.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label26.AutoSize = true; - this.label26.Location = new System.Drawing.Point(3, 136); - this.label26.Name = "label26"; - this.label26.Size = new System.Drawing.Size(140, 24); - this.label26.TabIndex = 10; - this.label26.Text = "Split (Behind, Gaining Time):"; - // - // label27 - // - this.label27.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label27.AutoSize = true; - this.label27.Location = new System.Drawing.Point(3, 109); - this.label27.Name = "label27"; - this.label27.Size = new System.Drawing.Size(140, 24); - this.label27.TabIndex = 8; - this.label27.Text = "Split (Ahead, Losing Time):"; - // - // label28 - // - this.label28.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label28.AutoSize = true; - this.label28.Location = new System.Drawing.Point(3, 82); - this.label28.Name = "label28"; - this.label28.Size = new System.Drawing.Size(140, 24); - this.label28.TabIndex = 6; - this.label28.Text = "Split (Ahead, Gaining Time):"; - // - // label29 - // - this.label29.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.label29.AutoSize = true; - this.label29.Location = new System.Drawing.Point(3, 61); - this.label29.Name = "label29"; - this.label29.Size = new System.Drawing.Size(140, 12); - this.label29.TabIndex = 4; - this.label29.Text = "Split:"; - // // label15 // this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); @@ -1099,28 +201,13 @@ private void InitializeComponent() this.Name = "SoundSettings"; this.Padding = new System.Windows.Forms.Padding(7, 6, 7, 6); this.Size = new System.Drawing.Size(476, 418); + this.Load += new System.EventHandler(this.SoundSettings_Load); this.tabControl1.ResumeLayout(false); this.tpSoundFiles.ResumeLayout(false); - this.tableLayoutPanel1.ResumeLayout(false); - this.tableLayoutPanel1.PerformLayout(); this.tpVolumeMixer.ResumeLayout(false); this.tpVolumeMixer.PerformLayout(); this.tableLayoutPanel2.ResumeLayout(false); this.tableLayoutPanel2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tbStartTimerVolume)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbResumeVolume)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbPauseVolume)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbResetVolume)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbNotAPersonalBestVolume)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbPersonalBestVolume)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbSkipVolume)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbUndoVolume)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbBestSegmentVolume)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbSplitBehindLosingVolume)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbSplitBehindGainingVolume)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbSplitAheadLosingVolume)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbSplitAheadGainingVolume)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.tbSplitVolume)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.tbGeneralVolume)).EndInit(); this.ResumeLayout(false); @@ -1131,78 +218,8 @@ private void InitializeComponent() private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tpSoundFiles; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.TextBox txtStartTimer; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.Label label12; - private System.Windows.Forms.Label label11; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.TextBox txtResume; - private System.Windows.Forms.TextBox txtPause; - private System.Windows.Forms.TextBox txtReset; - private System.Windows.Forms.TextBox txtNotAPersonalBest; - private System.Windows.Forms.TextBox txtPersonalBest; - private System.Windows.Forms.TextBox txtSkip; - private System.Windows.Forms.TextBox txtUndo; - private System.Windows.Forms.TextBox txtBestSegment; - private System.Windows.Forms.TextBox txtSplitBehindLosing; - private System.Windows.Forms.TextBox txtSplitBehindGaining; - private System.Windows.Forms.TextBox txtSplitAheadLosing; - private System.Windows.Forms.TextBox txtSplitAheadGaining; - private System.Windows.Forms.TextBox txtSplitPath; - private System.Windows.Forms.Button btnResume; - private System.Windows.Forms.Button btnPause; - private System.Windows.Forms.Button btnReset; - private System.Windows.Forms.Button btnNotAPersonalBest; - private System.Windows.Forms.Button btnPersonalBest; - private System.Windows.Forms.Button btnSkipSplit; - private System.Windows.Forms.Button btnUndo; - private System.Windows.Forms.Button btnBestSegment; - private System.Windows.Forms.Button btnBehindLosing; - private System.Windows.Forms.Button btnBehindGaining; - private System.Windows.Forms.Button btnAheadLosing; - private System.Windows.Forms.Button btnAheadGaining; - private System.Windows.Forms.Button btnSplit; - private System.Windows.Forms.Button btnStartTimer; private System.Windows.Forms.TabPage tpVolumeMixer; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; - private System.Windows.Forms.TrackBar tbStartTimerVolume; - private System.Windows.Forms.TrackBar tbResumeVolume; - private System.Windows.Forms.TrackBar tbPauseVolume; - private System.Windows.Forms.TrackBar tbResetVolume; - private System.Windows.Forms.TrackBar tbNotAPersonalBestVolume; - private System.Windows.Forms.TrackBar tbPersonalBestVolume; - private System.Windows.Forms.TrackBar tbSkipVolume; - private System.Windows.Forms.TrackBar tbUndoVolume; - private System.Windows.Forms.TrackBar tbBestSegmentVolume; - private System.Windows.Forms.TrackBar tbSplitBehindLosingVolume; - private System.Windows.Forms.TrackBar tbSplitBehindGainingVolume; - private System.Windows.Forms.TrackBar tbSplitAheadLosingVolume; - private System.Windows.Forms.TrackBar tbSplitAheadGainingVolume; - private System.Windows.Forms.TrackBar tbSplitVolume; - private System.Windows.Forms.Label label16; - private System.Windows.Forms.Label label17; - private System.Windows.Forms.Label label18; - private System.Windows.Forms.Label label19; - private System.Windows.Forms.Label label20; - private System.Windows.Forms.Label label21; - private System.Windows.Forms.Label label22; - private System.Windows.Forms.Label label23; - private System.Windows.Forms.Label label24; - private System.Windows.Forms.Label label25; - private System.Windows.Forms.Label label26; - private System.Windows.Forms.Label label27; - private System.Windows.Forms.Label label28; - private System.Windows.Forms.Label label29; private System.Windows.Forms.Label label15; private System.Windows.Forms.TrackBar tbGeneralVolume; private System.Windows.Forms.Label label30; diff --git a/src/LiveSplit.Sound/UI/Components/SoundSettings.cs b/src/LiveSplit.Sound/UI/Components/SoundSettings.cs index 4f0fb6e..a73c5eb 100644 --- a/src/LiveSplit.Sound/UI/Components/SoundSettings.cs +++ b/src/LiveSplit.Sound/UI/Components/SoundSettings.cs @@ -13,11 +13,7 @@ public partial class SoundSettings : UserControl public int GeneralVolume { get; set; } - public Dictionary SoundDataDictionary { get; set; } - public Dictionary TextBoxDictionary { get; set; } - public Dictionary TextBoxToTypeDictionary { get; set; } - public Dictionary TrackBarDictionary { get; set; } - public Dictionary ButtonToTypeDictionary { get; set; } + public Dictionary DataSettingsDictionary { get; set; } public SoundSettings() { @@ -26,89 +22,22 @@ public SoundSettings() OutputDevice = 0; GeneralVolume = 100; - SoundDataDictionary = []; + DataSettingsDictionary = []; foreach (EventType type in Enum.GetValues(typeof(EventType))) { - SoundData data = new("", 0); - SoundDataDictionary.Add(type, data); - } + SoundData data = new("", 100); + SoundFileSettings sfs = new(type, data); + SoundVolumeSettings svs = new(type, data); - TextBoxDictionary = []; - TextBoxDictionary.Add(EventType.Split, txtSplitPath); - TextBoxDictionary.Add(EventType.SplitAheadGaining, txtSplitAheadGaining); - TextBoxDictionary.Add(EventType.SplitAheadLosing, txtSplitAheadLosing); - TextBoxDictionary.Add(EventType.SplitBehindGaining, txtSplitBehindGaining); - TextBoxDictionary.Add(EventType.SplitBehindLosing, txtSplitBehindLosing); - TextBoxDictionary.Add(EventType.BestSegment, txtBestSegment); - TextBoxDictionary.Add(EventType.UndoSplit, txtUndo); - TextBoxDictionary.Add(EventType.SkipSplit, txtSkip); - TextBoxDictionary.Add(EventType.PersonalBest, txtPersonalBest); - TextBoxDictionary.Add(EventType.NotAPersonalBest, txtNotAPersonalBest); - TextBoxDictionary.Add(EventType.Reset, txtReset); - TextBoxDictionary.Add(EventType.Pause, txtPause); - TextBoxDictionary.Add(EventType.Resume, txtResume); - TextBoxDictionary.Add(EventType.StartTimer, txtStartTimer); - - TextBoxToTypeDictionary = []; - TextBoxToTypeDictionary.Add(txtSplitPath, EventType.Split); - TextBoxToTypeDictionary.Add(txtSplitAheadGaining, EventType.SplitAheadGaining); - TextBoxToTypeDictionary.Add(txtSplitAheadLosing, EventType.SplitAheadLosing); - TextBoxToTypeDictionary.Add(txtSplitBehindGaining, EventType.SplitBehindGaining); - TextBoxToTypeDictionary.Add(txtSplitBehindLosing, EventType.SplitBehindLosing); - TextBoxToTypeDictionary.Add(txtBestSegment, EventType.BestSegment); - TextBoxToTypeDictionary.Add(txtUndo, EventType.UndoSplit); - TextBoxToTypeDictionary.Add(txtSkip, EventType.SkipSplit); - TextBoxToTypeDictionary.Add(txtPersonalBest, EventType.PersonalBest); - TextBoxToTypeDictionary.Add(txtNotAPersonalBest, EventType.NotAPersonalBest); - TextBoxToTypeDictionary.Add(txtReset, EventType.Reset); - TextBoxToTypeDictionary.Add(txtPause, EventType.Pause); - TextBoxToTypeDictionary.Add(txtResume, EventType.Resume); - TextBoxToTypeDictionary.Add(txtStartTimer, EventType.StartTimer); - - TrackBarDictionary = []; - TrackBarDictionary.Add(EventType.Split, tbSplitVolume); - TrackBarDictionary.Add(EventType.SplitAheadGaining, tbSplitAheadGainingVolume); - TrackBarDictionary.Add(EventType.SplitAheadLosing, tbSplitAheadLosingVolume); - TrackBarDictionary.Add(EventType.SplitBehindGaining, tbSplitBehindGainingVolume); - TrackBarDictionary.Add(EventType.SplitBehindLosing, tbSplitBehindLosingVolume); - TrackBarDictionary.Add(EventType.BestSegment, tbBestSegmentVolume); - TrackBarDictionary.Add(EventType.UndoSplit, tbUndoVolume); - TrackBarDictionary.Add(EventType.SkipSplit, tbSkipVolume); - TrackBarDictionary.Add(EventType.PersonalBest, tbPersonalBestVolume); - TrackBarDictionary.Add(EventType.NotAPersonalBest, tbNotAPersonalBestVolume); - TrackBarDictionary.Add(EventType.Reset, tbResetVolume); - TrackBarDictionary.Add(EventType.Pause, tbPauseVolume); - TrackBarDictionary.Add(EventType.Resume, tbResumeVolume); - TrackBarDictionary.Add(EventType.StartTimer, tbStartTimerVolume); - - ButtonToTypeDictionary = []; - ButtonToTypeDictionary.Add(btnSplit, EventType.Split); - ButtonToTypeDictionary.Add(btnAheadGaining, EventType.SplitAheadGaining); - ButtonToTypeDictionary.Add(btnAheadLosing, EventType.SplitAheadLosing); - ButtonToTypeDictionary.Add(btnBehindGaining, EventType.SplitBehindGaining); - ButtonToTypeDictionary.Add(btnBehindLosing, EventType.SplitBehindLosing); - ButtonToTypeDictionary.Add(btnBestSegment, EventType.BestSegment); - ButtonToTypeDictionary.Add(btnUndo, EventType.UndoSplit); - ButtonToTypeDictionary.Add(btnSkipSplit, EventType.SkipSplit); - ButtonToTypeDictionary.Add(btnPersonalBest, EventType.PersonalBest); - ButtonToTypeDictionary.Add(btnNotAPersonalBest, EventType.NotAPersonalBest); - ButtonToTypeDictionary.Add(btnReset, EventType.Reset); - ButtonToTypeDictionary.Add(btnPause, EventType.Pause); - ButtonToTypeDictionary.Add(btnResume, EventType.Resume); - ButtonToTypeDictionary.Add(btnStartTimer, EventType.StartTimer); + SoundDataSettingsSet settingsSet = new(data, sfs, svs); + DataSettingsDictionary.Add(type, settingsSet); + } for (int i = 0; i < WaveOut.DeviceCount; ++i) { cbOutputDevice.Items.Add(WaveOut.GetCapabilities(i)); } - foreach (EventType type in Enum.GetValues(typeof(EventType))) - { - TextBoxDictionary[type].DataBindings.Add("Text", SoundDataDictionary[type], nameof(SoundData.FilePath)); - TrackBarDictionary[type].DataBindings.Add("Value", SoundDataDictionary[type], nameof(SoundData.Volume)); - - } - cbOutputDevice.DataBindings.Add("SelectedIndex", this, nameof(OutputDevice)); tbGeneralVolume.DataBindings.Add("Value", this, nameof(GeneralVolume)); } @@ -119,8 +48,8 @@ public void SetSettings(XmlNode node) foreach (EventType type in Enum.GetValues(typeof(EventType))) { - SoundDataDictionary[type].FilePath = SettingsHelper.ParseString(element[type.ToString()]); - SoundDataDictionary[type].Volume = SettingsHelper.ParseInt(element[$"{type}Volume"]); + DataSettingsDictionary[type].Data.FilePath = SettingsHelper.ParseString(element[type.ToString()]); + DataSettingsDictionary[type].Data.Volume = SettingsHelper.ParseInt(element[$"{type}Volume"]); } OutputDevice = SettingsHelper.ParseInt(element["OutputDevice"]); @@ -147,41 +76,13 @@ private int CreateSettingsNode(XmlDocument document, XmlElement parent) foreach (EventType type in Enum.GetValues(typeof(EventType))) { - hash ^= SettingsHelper.CreateSetting(document, parent, type.ToString(), SoundDataDictionary[type].FilePath) ^ - SettingsHelper.CreateSetting(document, parent, $"{type}Volume", SoundDataDictionary[type].Volume); + hash ^= SettingsHelper.CreateSetting(document, parent, type.ToString(), DataSettingsDictionary[type].Data.FilePath) ^ + SettingsHelper.CreateSetting(document, parent, $"{type}Volume", DataSettingsDictionary[type].Data.Volume); } return hash; } - protected string BrowseForPath(TextBox textBox, Action callback) - { - string path = textBox.Text; - var fileDialog = new OpenFileDialog() - { - FileName = path, - Filter = "Audio Files|*.mp3;*.wav;*.aiff;*.wma|All Files|*.*" - }; - - DialogResult result = fileDialog.ShowDialog(); - - if (result == DialogResult.OK) - { - path = fileDialog.FileName; - } - - textBox.Text = path; - callback(path); - - return path; - } - - private void btnBrowse_Click(object sender, EventArgs e) - { - EventType type = ButtonToTypeDictionary[(Button)sender]; - BrowseForPath(TextBoxDictionary[type], (x) => SoundDataDictionary[type].FilePath = x); - } - private void VolumeTrackBarScrollHandler(object sender, EventArgs e) { var trackBar = (TrackBar)sender; @@ -189,25 +90,30 @@ private void VolumeTrackBarScrollHandler(object sender, EventArgs e) ttVolume.SetToolTip(trackBar, trackBar.Value.ToString()); } - private void txtFilePath_DragDrop(object sender, DragEventArgs e) + private void SoundSettings_Load(object sender, EventArgs e) { - string[] files = (string[])e.Data.GetData(DataFormats.FileDrop, false); - var textBox = (TextBox)sender; - EventType type = TextBoxToTypeDictionary[textBox]; + int index = 0; + foreach (EventType type in Enum.GetValues(typeof(EventType))) + { + tableLayoutPanel1.Controls.Add(DataSettingsDictionary[type].FileSettings, 0, index); + tableLayoutPanel2.Controls.Add(DataSettingsDictionary[type].VolumeSettings, 0, index + 2); + tableLayoutPanel2.SetColumnSpan(DataSettingsDictionary[type].VolumeSettings, 2); - SoundDataDictionary[type].FilePath = files[0]; - textBox.Text = files[0]; + index++; + } } +} + +public class SoundDataSettingsSet +{ + public SoundData Data { get; set; } + public SoundFileSettings FileSettings { get; set; } + public SoundVolumeSettings VolumeSettings { get; set; } - private void txtFilePath_DragEnter(object sender, DragEventArgs e) + public SoundDataSettingsSet(SoundData data, SoundFileSettings sfs, SoundVolumeSettings svs) { - if (e.Data.GetDataPresent(DataFormats.FileDrop)) - { - e.Effect = DragDropEffects.Copy; - } - else - { - e.Effect = DragDropEffects.None; - } + Data = data; + FileSettings = sfs; + VolumeSettings = svs; } } diff --git a/src/LiveSplit.Sound/UI/Components/SoundVolumeSettings.Designer.cs b/src/LiveSplit.Sound/UI/Components/SoundVolumeSettings.Designer.cs new file mode 100644 index 0000000..aaf4519 --- /dev/null +++ b/src/LiveSplit.Sound/UI/Components/SoundVolumeSettings.Designer.cs @@ -0,0 +1,88 @@ +namespace LiveSplit.UI.Components +{ + partial class SoundVolumeSettings + { + /// + /// 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 Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.tbVolume = new System.Windows.Forms.TrackBar(); + this.lblName = new System.Windows.Forms.Label(); + this.ttVolume = new System.Windows.Forms.ToolTip(this.components); + ((System.ComponentModel.ISupportInitialize)(this.tbVolume)).BeginInit(); + this.SuspendLayout(); + // + // tbVolume + // + this.tbVolume.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tbVolume.AutoSize = false; + this.tbVolume.BackColor = System.Drawing.SystemColors.ControlLightLight; + this.tbVolume.Location = new System.Drawing.Point(149, 3); + this.tbVolume.Maximum = 100; + this.tbVolume.Name = "tbVolume"; + this.tbVolume.Size = new System.Drawing.Size(296, 21); + this.tbVolume.TabIndex = 5; + this.tbVolume.TickFrequency = 10; + this.tbVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); + // + // lblName + // + this.lblName.Location = new System.Drawing.Point(3, 7); + this.lblName.Name = "lblName"; + this.lblName.Size = new System.Drawing.Size(140, 12); + this.lblName.TabIndex = 4; + this.lblName.Text = "Split:"; + this.lblName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ttVolume + // + this.ttVolume.AutoPopDelay = 5000; + this.ttVolume.InitialDelay = 1000; + this.ttVolume.ReshowDelay = 500; + this.ttVolume.ShowAlways = true; + // + // SoundVolumeSettings + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lblName); + this.Controls.Add(this.tbVolume); + this.Margin = new System.Windows.Forms.Padding(0); + this.Name = "SoundVolumeSettings"; + this.Size = new System.Drawing.Size(448, 27); + ((System.ComponentModel.ISupportInitialize)(this.tbVolume)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.TrackBar tbVolume; + private System.Windows.Forms.Label lblName; + private System.Windows.Forms.ToolTip ttVolume; + + } +} diff --git a/src/LiveSplit.Sound/UI/Components/SoundVolumeSettings.cs b/src/LiveSplit.Sound/UI/Components/SoundVolumeSettings.cs new file mode 100644 index 0000000..f44e1c4 --- /dev/null +++ b/src/LiveSplit.Sound/UI/Components/SoundVolumeSettings.cs @@ -0,0 +1,29 @@ +using System; +using System.Windows.Forms; + +namespace LiveSplit.UI.Components; + +public partial class SoundVolumeSettings : UserControl +{ + public EventType EventType { get; set; } + public SoundData Data { get; set; } + public int Volume { get => Data.Volume; set => Data.Volume = value; } + + public SoundVolumeSettings(EventType eventType, SoundData data) + { + InitializeComponent(); + + EventType = eventType; + Data = data; + + lblName.Text = eventType.GetName(); + tbVolume.DataBindings.Add("Value", this, nameof(Volume)); + } + + private void VolumeTrackBarScrollHandler(object sender, EventArgs e) + { + var trackBar = (TrackBar)sender; + + ttVolume.SetToolTip(trackBar, trackBar.Value.ToString()); + } +} diff --git a/src/LiveSplit.Sound/UI/Components/SoundVolumeSettings.resx b/src/LiveSplit.Sound/UI/Components/SoundVolumeSettings.resx new file mode 100644 index 0000000..788fb00 --- /dev/null +++ b/src/LiveSplit.Sound/UI/Components/SoundVolumeSettings.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 17, 17 + + \ No newline at end of file From 34a87002fa056b5512de030798ffef46e3750c83 Mon Sep 17 00:00:00 2001 From: Kuhaku369 Date: Thu, 1 Jan 2026 22:24:03 +0900 Subject: [PATCH 4/4] Modified to make user controls accessibility private --- .../UI/Components/SoundComponent.cs | 8 +++--- .../UI/Components/SoundSettings.cs | 26 ++++++++++--------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/LiveSplit.Sound/UI/Components/SoundComponent.cs b/src/LiveSplit.Sound/UI/Components/SoundComponent.cs index e0cfb3d..88f5aab 100644 --- a/src/LiveSplit.Sound/UI/Components/SoundComponent.cs +++ b/src/LiveSplit.Sound/UI/Components/SoundComponent.cs @@ -128,11 +128,11 @@ private void State_OnSplit(object sender, EventArgs e) } } - if (string.IsNullOrEmpty(Settings.DataSettingsDictionary[type].Data.FilePath)) + if (string.IsNullOrEmpty(Settings.SoundDataDictionary[type].FilePath)) { type = EventType.Split; } - + PlaySound(type); } @@ -168,8 +168,8 @@ private void PlaySound(EventType type) { Player.Stop(); - string location = Settings.DataSettingsDictionary[type].Data.FilePath; - int volume = Settings.DataSettingsDictionary[type].Data.Volume; + string location = Settings.SoundDataDictionary[type].FilePath; + int volume = Settings.SoundDataDictionary[type].Volume; if (!Activated || !File.Exists(location)) { diff --git a/src/LiveSplit.Sound/UI/Components/SoundSettings.cs b/src/LiveSplit.Sound/UI/Components/SoundSettings.cs index a73c5eb..e28f725 100644 --- a/src/LiveSplit.Sound/UI/Components/SoundSettings.cs +++ b/src/LiveSplit.Sound/UI/Components/SoundSettings.cs @@ -13,7 +13,8 @@ public partial class SoundSettings : UserControl public int GeneralVolume { get; set; } - public Dictionary DataSettingsDictionary { get; set; } + public Dictionary SoundDataDictionary { get; set; } + private Dictionary DataSettingsDictionary { get; set; } public SoundSettings() { @@ -22,14 +23,17 @@ public SoundSettings() OutputDevice = 0; GeneralVolume = 100; + SoundDataDictionary = []; DataSettingsDictionary = []; foreach (EventType type in Enum.GetValues(typeof(EventType))) { SoundData data = new("", 100); + SoundDataDictionary.Add(type, data); + SoundFileSettings sfs = new(type, data); SoundVolumeSettings svs = new(type, data); - SoundDataSettingsSet settingsSet = new(data, sfs, svs); + SoundDataSettingsSet settingsSet = new(sfs, svs); DataSettingsDictionary.Add(type, settingsSet); } @@ -48,8 +52,8 @@ public void SetSettings(XmlNode node) foreach (EventType type in Enum.GetValues(typeof(EventType))) { - DataSettingsDictionary[type].Data.FilePath = SettingsHelper.ParseString(element[type.ToString()]); - DataSettingsDictionary[type].Data.Volume = SettingsHelper.ParseInt(element[$"{type}Volume"]); + SoundDataDictionary[type].FilePath = SettingsHelper.ParseString(element[type.ToString()]); + SoundDataDictionary[type].Volume = SettingsHelper.ParseInt(element[$"{type}Volume"]); } OutputDevice = SettingsHelper.ParseInt(element["OutputDevice"]); @@ -76,8 +80,8 @@ private int CreateSettingsNode(XmlDocument document, XmlElement parent) foreach (EventType type in Enum.GetValues(typeof(EventType))) { - hash ^= SettingsHelper.CreateSetting(document, parent, type.ToString(), DataSettingsDictionary[type].Data.FilePath) ^ - SettingsHelper.CreateSetting(document, parent, $"{type}Volume", DataSettingsDictionary[type].Data.Volume); + hash ^= SettingsHelper.CreateSetting(document, parent, type.ToString(), SoundDataDictionary[type].FilePath) ^ + SettingsHelper.CreateSetting(document, parent, $"{type}Volume", SoundDataDictionary[type].Volume); } return hash; @@ -104,15 +108,13 @@ private void SoundSettings_Load(object sender, EventArgs e) } } -public class SoundDataSettingsSet +internal class SoundDataSettingsSet { - public SoundData Data { get; set; } - public SoundFileSettings FileSettings { get; set; } - public SoundVolumeSettings VolumeSettings { get; set; } + internal SoundFileSettings FileSettings { get; set; } + internal SoundVolumeSettings VolumeSettings { get; set; } - public SoundDataSettingsSet(SoundData data, SoundFileSettings sfs, SoundVolumeSettings svs) + internal SoundDataSettingsSet(SoundFileSettings sfs, SoundVolumeSettings svs) { - Data = data; FileSettings = sfs; VolumeSettings = svs; }