diff --git a/src/LiveSplit.Sound/UI/Components/EventType.cs b/src/LiveSplit.Sound/UI/Components/EventType.cs new file mode 100644 index 0000000..0521ba2 --- /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 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:", + EventType.PersonalBest => "Personal Best:", + EventType.NotAPersonalBest => "Not a Personal Best:", + EventType.Reset => "Reset:", + EventType.Pause => "Pause:", + EventType.Resume => "Resume:", + EventType.StartTimer => "Start Timer:", + _ => "no name", + }; + } +} diff --git a/src/LiveSplit.Sound/UI/Components/SoundComponent.cs b/src/LiveSplit.Sound/UI/Components/SoundComponent.cs index a4d7cd7..e40ad1f 100644 --- a/src/LiveSplit.Sound/UI/Components/SoundComponent.cs +++ b/src/LiveSplit.Sound/UI/Components/SoundComponent.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; @@ -75,7 +74,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) @@ -84,129 +83,128 @@ 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 - { - IList paths = []; - 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; + + 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 != null) + { + if (timeDifference < TimeSpan.Zero) { - if (timeDifference < TimeSpan.Zero) - { - paths = Settings.SplitAheadGaining; - volume = Settings.SplitAheadGainingVolume; - - if (LiveSplitStateHelper.GetPreviousSegmentDelta(State, splitIndex, State.CurrentComparison, State.CurrentTimingMethod) > TimeSpan.Zero) - { - paths = Settings.SplitAheadLosing; - volume = Settings.SplitAheadLosingVolume; - } - } - else + type = EventType.SplitAheadGaining; + + if (LiveSplitStateHelper.GetPreviousSegmentDelta(State, splitIndex, State.CurrentComparison, State.CurrentTimingMethod) > TimeSpan.Zero) { - paths = Settings.SplitBehindLosing; - volume = Settings.SplitBehindLosingVolume; - - if (LiveSplitStateHelper.GetPreviousSegmentDelta(State, splitIndex, State.CurrentComparison, State.CurrentTimingMethod) < TimeSpan.Zero) - { - paths = 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) { - paths = Settings.BestSegment; - volume = Settings.BestSegmentVolume; + type = EventType.SplitBehindGaining; } } + } + + //Check for best segment + TimeSpan? curSegment = LiveSplitStateHelper.GetPreviousSegmentTime(State, splitIndex, State.CurrentTimingMethod); - if (paths.Count == 0) + if (curSegment != null) + { + if (State.Run[splitIndex].BestSegmentTime[State.CurrentTimingMethod] == null || curSegment < State.Run[splitIndex].BestSegmentTime[State.CurrentTimingMethod]) { - paths = Settings.Split; + type = EventType.BestSegment; } + } - PlaySound(paths, volume); + if (Settings.SoundDataDictionary[type].FilePaths.Count == 0) + { + 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(IList paths, int volume) + private void PlaySound(EventType type) { Player.Stop(); - if (Activated) + if (!Activated) { - string[] existingPaths = [.. paths.Where(File.Exists)]; - if (existingPaths.Length == 0) - { - return; - } + return; + } - int index = Rnd.Next(0, existingPaths.Length); - string path = existingPaths[index]; - Task.Factory.StartNew(() => + string[] existingPaths = [.. Settings.SoundDataDictionary[type].FilePaths.Where(File.Exists)]; + if (existingPaths.Length == 0) + { + return; + } + + int index = Rnd.Next(0, existingPaths.Length); + string path = existingPaths[index]; + + int volume = Settings.SoundDataDictionary[type].Volume; + + Task.Factory.StartNew(() => + { + try { - try + var audioFileReader = new AudioFileReader(path) { - var audioFileReader = new AudioFileReader(path) - { - Volume = volume / 100f * (Settings.GeneralVolume / 100f) - }; - - Player.DeviceNumber = Settings.OutputDevice; - Player.Init(audioFileReader); - Player.Play(); - } - catch (Exception e) - { - 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..4817869 --- /dev/null +++ b/src/LiveSplit.Sound/UI/Components/SoundData.cs @@ -0,0 +1,14 @@ +using System.Collections.Generic; + +namespace LiveSplit.UI.Components; +public class SoundData +{ + public IList FilePaths { get; set; } + public int Volume { get; set; } + + public SoundData(IList filePaths, int volume) + { + FilePaths = filePaths; + Volume = volume; + } +} 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..718cd74 --- /dev/null +++ b/src/LiveSplit.Sound/UI/Components/SoundFileSettings.Designer.cs @@ -0,0 +1,107 @@ +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.btnClear = new System.Windows.Forms.Button(); + this.ttPaths = new System.Windows.Forms.ToolTip(this.components); + this.btnBrowse = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // lblName + // + this.lblName.Location = new System.Drawing.Point(3, 1); + this.lblName.Name = "lblName"; + this.lblName.Size = new System.Drawing.Size(140, 27); + 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(134, 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); + this.txtFilePath.Enter += new System.EventHandler(this.txtFilePath_Enter); + this.txtFilePath.Leave += new System.EventHandler(this.txtFilePath_Leave); + // + // btnClear + // + this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnClear.Location = new System.Drawing.Point(370, 3); + this.btnClear.Name = "btnClear"; + this.btnClear.Size = new System.Drawing.Size(75, 21); + this.btnClear.TabIndex = 2; + this.btnClear.Text = "Clear"; + this.btnClear.UseVisualStyleBackColor = true; + this.btnClear.Click += new System.EventHandler(this.btnClear_Click); + // + // 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(289, 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); + // + // SoundFileSettings + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.lblName); + this.Controls.Add(this.txtFilePath); + this.Controls.Add(this.btnBrowse); + this.Controls.Add(this.btnClear); + 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 btnClear; + private System.Windows.Forms.ToolTip ttPaths; + private System.Windows.Forms.Button btnBrowse; + } +} diff --git a/src/LiveSplit.Sound/UI/Components/SoundFileSettings.cs b/src/LiveSplit.Sound/UI/Components/SoundFileSettings.cs new file mode 100644 index 0000000..9312cfb --- /dev/null +++ b/src/LiveSplit.Sound/UI/Components/SoundFileSettings.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace LiveSplit.UI.Components; + +public partial class SoundFileSettings : UserControl +{ + public SoundData Data { get; set; } + public IList FilePaths { get => Data.FilePaths; set => Data.FilePaths = value; } + private const string PathSeparator = ", "; + + public bool IsClearAddDragDrop { get; set; } + + public SoundFileSettings(EventType eventType, SoundData data) + { + InitializeComponent(); + + Data = data; + + lblName.Text = eventType.GetName(); + AddPathListBinding(txtFilePath.DataBindings, "Text", this, nameof(FilePaths)); + } + + private void AddPathListBinding(ControlBindingsCollection bindings, string propertyName, object dataSource, string dataMember) + { + Binding b = new(propertyName, dataSource, dataMember, true, DataSourceUpdateMode.Never); + b.Format += new ConvertEventHandler((sender, convertEvent) => + { + if (convertEvent.DesiredType != typeof(string)) + { + return; + } + + convertEvent.Value = string.Join(PathSeparator, (IList)convertEvent.Value); + }); + + bindings.Add(b); + } + + private void btnBrowse_Click(object sender, EventArgs e) + { + string path = FilePaths.FirstOrDefault() ?? string.Empty; + var fileDialog = new OpenFileDialog() + { + Multiselect = true, + FileName = path, + Filter = "Audio Files|*.mp3;*.wav;*.aiff;*.wma|All Files|*.*" + }; + + DialogResult result = fileDialog.ShowDialog(); + if (result == DialogResult.OK) + { + FilePaths = fileDialog.FileNames; + } + + txtFilePath.Text = string.Join(PathSeparator, FilePaths); + } + + private void txtFilePath_DragDrop(object sender, DragEventArgs e) + { + string[] files = (string[])e.Data.GetData(DataFormats.FileDrop, false); + if (IsClearAddDragDrop) + { + FilePaths = files; + } + else + { + FilePaths = [.. FilePaths.Concat(files).Distinct()]; + } + + txtFilePath.Text = string.Join(PathSeparator, FilePaths); + } + + private void txtFilePath_DragEnter(object sender, DragEventArgs e) + { + if (e.Data.GetDataPresent(DataFormats.FileDrop)) + { + e.Effect = DragDropEffects.Copy; + } + else + { + e.Effect = DragDropEffects.None; + } + } + + private void btnClear_Click(object sender, EventArgs e) + { + FilePaths = []; + txtFilePath.Clear(); + } + + private void txtFilePath_Enter(object sender, EventArgs e) + { + var textBox = (TextBox)sender; + + // Display below the text box + ttPaths.Show(textBox.Text.Replace(PathSeparator, "\n"), textBox, 0, textBox.Height); + } + + private void txtFilePath_Leave(object sender, EventArgs e) + { + var textBox = (TextBox)sender; + + ttPaths.Hide(textBox); + } +} diff --git a/src/LiveSplit.Sound/UI/Components/SoundFileSettings.resx b/src/LiveSplit.Sound/UI/Components/SoundFileSettings.resx new file mode 100644 index 0000000..7c22047 --- /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 b226dbd..2951aff 100644 --- a/src/LiveSplit.Sound/UI/Components/SoundSettings.Designer.cs +++ b/src/LiveSplit.Sound/UI/Components/SoundSettings.Designer.cs @@ -32,117 +32,21 @@ 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.btnClearStartTimer = new System.Windows.Forms.Button(); - this.btnClearResume = new System.Windows.Forms.Button(); - this.btnClearPause = new System.Windows.Forms.Button(); - this.btnClearReset = new System.Windows.Forms.Button(); - this.btnClearNotAPersonalBest = new System.Windows.Forms.Button(); - this.btnClearPersonalBest = new System.Windows.Forms.Button(); - this.btnClearSkip = new System.Windows.Forms.Button(); - this.btnClearUndo = new System.Windows.Forms.Button(); - this.btnClearBestSegment = new System.Windows.Forms.Button(); - this.btnClearSplitBehindLosing = new System.Windows.Forms.Button(); - this.btnClearSplitBehindGaining = new System.Windows.Forms.Button(); - this.btnClearSplitAheadLosing = new System.Windows.Forms.Button(); - this.btnClearSplitAheadGaining = new System.Windows.Forms.Button(); - this.btnClearSplit = new System.Windows.Forms.Button(); - 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.rdoClearAddDragDrop = new System.Windows.Forms.RadioButton(); + this.rdoAppendDragDrop = new System.Windows.Forms.RadioButton(); 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(); this.cbOutputDevice = new System.Windows.Forms.ComboBox(); this.ttVolume = new System.Windows.Forms.ToolTip(this.components); - this.ttPaths = 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(); // @@ -154,7 +58,7 @@ private void InitializeComponent() this.tabControl1.Location = new System.Drawing.Point(7, 7); 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, 502); this.tabControl1.TabIndex = 0; // // tpSoundFiles @@ -163,75 +67,22 @@ 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, 475); this.tpSoundFiles.TabIndex = 0; this.tpSoundFiles.Text = "Sound Files"; this.tpSoundFiles.UseVisualStyleBackColor = true; // // tableLayoutPanel1 // - this.tableLayoutPanel1.ColumnCount = 4; + this.tableLayoutPanel1.ColumnCount = 3; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 146F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 140F)); 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()); - this.tableLayoutPanel1.Controls.Add(this.btnClearStartTimer, 3, 13); - this.tableLayoutPanel1.Controls.Add(this.btnClearResume, 3, 12); - this.tableLayoutPanel1.Controls.Add(this.btnClearPause, 3, 11); - this.tableLayoutPanel1.Controls.Add(this.btnClearReset, 3, 10); - this.tableLayoutPanel1.Controls.Add(this.btnClearNotAPersonalBest, 3, 9); - this.tableLayoutPanel1.Controls.Add(this.btnClearPersonalBest, 3, 8); - this.tableLayoutPanel1.Controls.Add(this.btnClearSkip, 3, 7); - this.tableLayoutPanel1.Controls.Add(this.btnClearUndo, 3, 6); - this.tableLayoutPanel1.Controls.Add(this.btnClearBestSegment, 3, 5); - this.tableLayoutPanel1.Controls.Add(this.btnClearSplitBehindLosing, 3, 4); - this.tableLayoutPanel1.Controls.Add(this.btnClearSplitBehindGaining, 3, 3); - this.tableLayoutPanel1.Controls.Add(this.btnClearSplitAheadLosing, 3, 2); - this.tableLayoutPanel1.Controls.Add(this.btnClearSplitAheadGaining, 3, 1); - this.tableLayoutPanel1.Controls.Add(this.btnClearSplit, 3, 0); - 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.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); 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.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Controls.Add(this.rdoClearAddDragDrop, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.rdoAppendDragDrop, 2, 0); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top; this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 15; @@ -249,291 +100,10 @@ private void InitializeComponent() 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()); - this.tableLayoutPanel1.Size = new System.Drawing.Size(448, 407); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 29F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(448, 435); this.tableLayoutPanel1.TabIndex = 0; // - // btnClearStartTimer - // - this.btnClearStartTimer.Location = new System.Drawing.Point(370, 380); - this.btnClearStartTimer.Name = "btnClearStartTimer"; - this.btnClearStartTimer.Size = new System.Drawing.Size(75, 23); - this.btnClearStartTimer.TabIndex = 55; - this.btnClearStartTimer.Text = "Clear"; - this.btnClearStartTimer.UseVisualStyleBackColor = true; - this.btnClearStartTimer.Click += new System.EventHandler(this.btnClearStartTimer_Click); - // - // btnClearResume - // - this.btnClearResume.Location = new System.Drawing.Point(370, 351); - this.btnClearResume.Name = "btnClearResume"; - this.btnClearResume.Size = new System.Drawing.Size(75, 23); - this.btnClearResume.TabIndex = 54; - this.btnClearResume.Text = "Clear"; - this.btnClearResume.UseVisualStyleBackColor = true; - this.btnClearResume.Click += new System.EventHandler(this.btnClearResume_Click); - // - // btnClearPause - // - this.btnClearPause.Location = new System.Drawing.Point(370, 322); - this.btnClearPause.Name = "btnClearPause"; - this.btnClearPause.Size = new System.Drawing.Size(75, 23); - this.btnClearPause.TabIndex = 53; - this.btnClearPause.Text = "Clear"; - this.btnClearPause.UseVisualStyleBackColor = true; - this.btnClearPause.Click += new System.EventHandler(this.btnClearPause_Click); - // - // btnClearReset - // - this.btnClearReset.Location = new System.Drawing.Point(370, 293); - this.btnClearReset.Name = "btnClearReset"; - this.btnClearReset.Size = new System.Drawing.Size(75, 23); - this.btnClearReset.TabIndex = 52; - this.btnClearReset.Text = "Clear"; - this.btnClearReset.UseVisualStyleBackColor = true; - this.btnClearReset.Click += new System.EventHandler(this.btnClearReset_Click); - // - // btnClearNotAPersonalBest - // - this.btnClearNotAPersonalBest.Location = new System.Drawing.Point(370, 264); - this.btnClearNotAPersonalBest.Name = "btnClearNotAPersonalBest"; - this.btnClearNotAPersonalBest.Size = new System.Drawing.Size(75, 23); - this.btnClearNotAPersonalBest.TabIndex = 51; - this.btnClearNotAPersonalBest.Text = "Clear"; - this.btnClearNotAPersonalBest.UseVisualStyleBackColor = true; - this.btnClearNotAPersonalBest.Click += new System.EventHandler(this.btnClearNotAPersonalBest_Click); - // - // btnClearPersonalBest - // - this.btnClearPersonalBest.Location = new System.Drawing.Point(370, 235); - this.btnClearPersonalBest.Name = "btnClearPersonalBest"; - this.btnClearPersonalBest.Size = new System.Drawing.Size(75, 23); - this.btnClearPersonalBest.TabIndex = 50; - this.btnClearPersonalBest.Text = "Clear"; - this.btnClearPersonalBest.UseVisualStyleBackColor = true; - this.btnClearPersonalBest.Click += new System.EventHandler(this.btnClearPersonalBest_Click); - // - // btnClearSkip - // - this.btnClearSkip.Location = new System.Drawing.Point(370, 206); - this.btnClearSkip.Name = "btnClearSkip"; - this.btnClearSkip.Size = new System.Drawing.Size(75, 23); - this.btnClearSkip.TabIndex = 49; - this.btnClearSkip.Text = "Clear"; - this.btnClearSkip.UseVisualStyleBackColor = true; - this.btnClearSkip.Click += new System.EventHandler(this.btnClearSkipSplit_Click); - // - // btnClearUndo - // - this.btnClearUndo.Location = new System.Drawing.Point(370, 177); - this.btnClearUndo.Name = "btnClearUndo"; - this.btnClearUndo.Size = new System.Drawing.Size(75, 23); - this.btnClearUndo.TabIndex = 48; - this.btnClearUndo.Text = "Clear"; - this.btnClearUndo.UseVisualStyleBackColor = true; - this.btnClearUndo.Click += new System.EventHandler(this.btnClearUndo_Click); - // - // btnClearBestSegment - // - this.btnClearBestSegment.Location = new System.Drawing.Point(370, 148); - this.btnClearBestSegment.Name = "btnClearBestSegment"; - this.btnClearBestSegment.Size = new System.Drawing.Size(75, 23); - this.btnClearBestSegment.TabIndex = 47; - this.btnClearBestSegment.Text = "Clear"; - this.btnClearBestSegment.UseVisualStyleBackColor = true; - this.btnClearBestSegment.Click += new System.EventHandler(this.btnClearBestSegment_Click); - // - // btnClearSplitBehindLosing - // - this.btnClearSplitBehindLosing.Location = new System.Drawing.Point(370, 119); - this.btnClearSplitBehindLosing.Name = "btnClearSplitBehindLosing"; - this.btnClearSplitBehindLosing.Size = new System.Drawing.Size(75, 23); - this.btnClearSplitBehindLosing.TabIndex = 46; - this.btnClearSplitBehindLosing.Text = "Clear"; - this.btnClearSplitBehindLosing.UseVisualStyleBackColor = true; - this.btnClearSplitBehindLosing.Click += new System.EventHandler(this.btnClearBehindLosing_Click); - // - // btnClearSplitBehindGaining - // - this.btnClearSplitBehindGaining.Location = new System.Drawing.Point(370, 90); - this.btnClearSplitBehindGaining.Name = "btnClearSplitBehindGaining"; - this.btnClearSplitBehindGaining.Size = new System.Drawing.Size(75, 23); - this.btnClearSplitBehindGaining.TabIndex = 45; - this.btnClearSplitBehindGaining.Text = "Clear"; - this.btnClearSplitBehindGaining.UseVisualStyleBackColor = true; - this.btnClearSplitBehindGaining.Click += new System.EventHandler(this.btnClearBehindGaining_Click); - // - // btnClearSplitAheadLosing - // - this.btnClearSplitAheadLosing.Location = new System.Drawing.Point(370, 61); - this.btnClearSplitAheadLosing.Name = "btnClearSplitAheadLosing"; - this.btnClearSplitAheadLosing.Size = new System.Drawing.Size(75, 23); - this.btnClearSplitAheadLosing.TabIndex = 44; - this.btnClearSplitAheadLosing.Text = "Clear"; - this.btnClearSplitAheadLosing.UseVisualStyleBackColor = true; - this.btnClearSplitAheadLosing.Click += new System.EventHandler(this.btnClearAheadLosing_Click); - // - // btnClearSplitAheadGaining - // - this.btnClearSplitAheadGaining.Location = new System.Drawing.Point(370, 32); - this.btnClearSplitAheadGaining.Name = "btnClearSplitAheadGaining"; - this.btnClearSplitAheadGaining.Size = new System.Drawing.Size(75, 23); - this.btnClearSplitAheadGaining.TabIndex = 43; - this.btnClearSplitAheadGaining.Text = "Clear"; - this.btnClearSplitAheadGaining.UseVisualStyleBackColor = true; - this.btnClearSplitAheadGaining.Click += new System.EventHandler(this.btnClearAheadGaining_Click); - // - // btnClearSplit - // - this.btnClearSplit.Location = new System.Drawing.Point(370, 3); - this.btnClearSplit.Name = "btnClearSplit"; - this.btnClearSplit.Size = new System.Drawing.Size(75, 23); - this.btnClearSplit.TabIndex = 42; - this.btnClearSplit.Text = "Clear"; - this.btnClearSplit.UseVisualStyleBackColor = true; - this.btnClearSplit.Click += new System.EventHandler(this.btnClearSplit_Click); - // - // txtStartTimer - // - 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.Name = "txtStartTimer"; - this.txtStartTimer.ReadOnly = true; - this.txtStartTimer.Size = new System.Drawing.Size(134, 20); - this.txtStartTimer.TabIndex = 40; - this.txtStartTimer.Enter += new System.EventHandler(this.PathsTextBoxEnterHandler); - this.txtStartTimer.Leave += new System.EventHandler(this.PathsTextBoxLeaveHandler); - // - // 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.Name = "label14"; - this.label14.Size = new System.Drawing.Size(140, 13); - 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, 356); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(140, 13); - 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, 327); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(140, 13); - 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, 298); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(140, 13); - 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, 269); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(140, 13); - 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, 240); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(140, 13); - 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, 211); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(140, 13); - 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, 182); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(140, 13); - 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, 153); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(140, 13); - 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, 124); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(140, 13); - 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, 95); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(140, 13); - 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, 66); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(140, 13); - 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, 37); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(140, 13); - 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))); @@ -542,290 +112,32 @@ private void InitializeComponent() this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(140, 13); this.label1.TabIndex = 0; - this.label1.Text = "Split:"; - // - // txtResume - // - 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.Name = "txtResume"; - this.txtResume.ReadOnly = true; - this.txtResume.Size = new System.Drawing.Size(134, 20); - this.txtResume.TabIndex = 37; - this.txtResume.Enter += new System.EventHandler(this.PathsTextBoxEnterHandler); - this.txtResume.Leave += new System.EventHandler(this.PathsTextBoxLeaveHandler); - // - // txtPause - // - 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.Name = "txtPause"; - this.txtPause.ReadOnly = true; - this.txtPause.Size = new System.Drawing.Size(134, 20); - this.txtPause.TabIndex = 34; - this.txtPause.Enter += new System.EventHandler(this.PathsTextBoxEnterHandler); - this.txtPause.Leave += new System.EventHandler(this.PathsTextBoxLeaveHandler); - // - // txtReset - // - 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.Name = "txtReset"; - this.txtReset.ReadOnly = true; - this.txtReset.Size = new System.Drawing.Size(134, 20); - this.txtReset.TabIndex = 31; - this.txtReset.Enter += new System.EventHandler(this.PathsTextBoxEnterHandler); - this.txtReset.Leave += new System.EventHandler(this.PathsTextBoxLeaveHandler); - // - // txtNotAPersonalBest - // - 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.Name = "txtNotAPersonalBest"; - this.txtNotAPersonalBest.ReadOnly = true; - this.txtNotAPersonalBest.Size = new System.Drawing.Size(134, 20); - this.txtNotAPersonalBest.TabIndex = 28; - this.txtNotAPersonalBest.Enter += new System.EventHandler(this.PathsTextBoxEnterHandler); - this.txtNotAPersonalBest.Leave += new System.EventHandler(this.PathsTextBoxLeaveHandler); - // - // txtPersonalBest - // - 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.Name = "txtPersonalBest"; - this.txtPersonalBest.ReadOnly = true; - this.txtPersonalBest.Size = new System.Drawing.Size(134, 20); - this.txtPersonalBest.TabIndex = 25; - this.txtPersonalBest.Enter += new System.EventHandler(this.PathsTextBoxEnterHandler); - this.txtPersonalBest.Leave += new System.EventHandler(this.PathsTextBoxLeaveHandler); - // - // txtSkip - // - 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.Name = "txtSkip"; - this.txtSkip.ReadOnly = true; - this.txtSkip.Size = new System.Drawing.Size(134, 20); - this.txtSkip.TabIndex = 22; - this.txtSkip.Enter += new System.EventHandler(this.PathsTextBoxEnterHandler); - this.txtSkip.Leave += new System.EventHandler(this.PathsTextBoxLeaveHandler); - // - // txtUndo - // - 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.Name = "txtUndo"; - this.txtUndo.ReadOnly = true; - this.txtUndo.Size = new System.Drawing.Size(134, 20); - this.txtUndo.TabIndex = 19; - this.txtUndo.Enter += new System.EventHandler(this.PathsTextBoxEnterHandler); - this.txtUndo.Leave += new System.EventHandler(this.PathsTextBoxLeaveHandler); - // - // txtBestSegment - // - 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.Name = "txtBestSegment"; - this.txtBestSegment.ReadOnly = true; - this.txtBestSegment.Size = new System.Drawing.Size(134, 20); - this.txtBestSegment.TabIndex = 16; - this.txtBestSegment.Enter += new System.EventHandler(this.PathsTextBoxEnterHandler); - this.txtBestSegment.Leave += new System.EventHandler(this.PathsTextBoxLeaveHandler); - // - // txtSplitBehindLosing - // - 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.Name = "txtSplitBehindLosing"; - this.txtSplitBehindLosing.ReadOnly = true; - this.txtSplitBehindLosing.Size = new System.Drawing.Size(134, 20); - this.txtSplitBehindLosing.TabIndex = 13; - this.txtSplitBehindLosing.Enter += new System.EventHandler(this.PathsTextBoxEnterHandler); - this.txtSplitBehindLosing.Leave += new System.EventHandler(this.PathsTextBoxLeaveHandler); - // - // txtSplitBehindGaining - // - 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.Name = "txtSplitBehindGaining"; - this.txtSplitBehindGaining.ReadOnly = true; - this.txtSplitBehindGaining.Size = new System.Drawing.Size(134, 20); - this.txtSplitBehindGaining.TabIndex = 10; - this.txtSplitBehindGaining.Enter += new System.EventHandler(this.PathsTextBoxEnterHandler); - this.txtSplitBehindGaining.Leave += new System.EventHandler(this.PathsTextBoxLeaveHandler); - // - // txtSplitAheadLosing - // - 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.Name = "txtSplitAheadLosing"; - this.txtSplitAheadLosing.ReadOnly = true; - this.txtSplitAheadLosing.Size = new System.Drawing.Size(134, 20); - this.txtSplitAheadLosing.TabIndex = 7; - this.txtSplitAheadLosing.Enter += new System.EventHandler(this.PathsTextBoxEnterHandler); - this.txtSplitAheadLosing.Leave += new System.EventHandler(this.PathsTextBoxLeaveHandler); - // - // txtSplitAheadGaining - // - 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.Name = "txtSplitAheadGaining"; - this.txtSplitAheadGaining.ReadOnly = true; - this.txtSplitAheadGaining.Size = new System.Drawing.Size(134, 20); - this.txtSplitAheadGaining.TabIndex = 4; - this.txtSplitAheadGaining.Enter += new System.EventHandler(this.PathsTextBoxEnterHandler); - this.txtSplitAheadGaining.Leave += new System.EventHandler(this.PathsTextBoxLeaveHandler); - // - // txtSplitPath - // - 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.ReadOnly = true; - this.txtSplitPath.Size = new System.Drawing.Size(134, 20); - this.txtSplitPath.TabIndex = 1; - this.txtSplitPath.Enter += new System.EventHandler(this.PathsTextBoxEnterHandler); - this.txtSplitPath.Leave += new System.EventHandler(this.PathsTextBoxLeaveHandler); - // - // btnResume - // - this.btnResume.Location = new System.Drawing.Point(289, 351); - this.btnResume.Name = "btnResume"; - this.btnResume.Size = new System.Drawing.Size(75, 23); - this.btnResume.TabIndex = 38; - this.btnResume.Text = "Browse..."; - this.btnResume.UseVisualStyleBackColor = true; - this.btnResume.Click += new System.EventHandler(this.btnResume_Click); - // - // btnPause - // - this.btnPause.Location = new System.Drawing.Point(289, 322); - this.btnPause.Name = "btnPause"; - this.btnPause.Size = new System.Drawing.Size(75, 23); - this.btnPause.TabIndex = 35; - this.btnPause.Text = "Browse..."; - this.btnPause.UseVisualStyleBackColor = true; - this.btnPause.Click += new System.EventHandler(this.btnPause_Click); - // - // btnReset - // - this.btnReset.Location = new System.Drawing.Point(289, 293); - this.btnReset.Name = "btnReset"; - this.btnReset.Size = new System.Drawing.Size(75, 23); - this.btnReset.TabIndex = 32; - this.btnReset.Text = "Browse..."; - this.btnReset.UseVisualStyleBackColor = true; - this.btnReset.Click += new System.EventHandler(this.btnReset_Click); - // - // btnNotAPersonalBest - // - this.btnNotAPersonalBest.Location = new System.Drawing.Point(289, 264); - this.btnNotAPersonalBest.Name = "btnNotAPersonalBest"; - this.btnNotAPersonalBest.Size = new System.Drawing.Size(75, 23); - this.btnNotAPersonalBest.TabIndex = 29; - this.btnNotAPersonalBest.Text = "Browse..."; - this.btnNotAPersonalBest.UseVisualStyleBackColor = true; - this.btnNotAPersonalBest.Click += new System.EventHandler(this.btnNotAPersonalBest_Click); - // - // btnPersonalBest - // - this.btnPersonalBest.Location = new System.Drawing.Point(289, 235); - this.btnPersonalBest.Name = "btnPersonalBest"; - this.btnPersonalBest.Size = new System.Drawing.Size(75, 23); - this.btnPersonalBest.TabIndex = 26; - this.btnPersonalBest.Text = "Browse..."; - this.btnPersonalBest.UseVisualStyleBackColor = true; - this.btnPersonalBest.Click += new System.EventHandler(this.btnPersonalBest_Click); - // - // btnSkipSplit - // - this.btnSkipSplit.Location = new System.Drawing.Point(289, 206); - this.btnSkipSplit.Name = "btnSkipSplit"; - this.btnSkipSplit.Size = new System.Drawing.Size(75, 23); - this.btnSkipSplit.TabIndex = 23; - this.btnSkipSplit.Text = "Browse..."; - this.btnSkipSplit.UseVisualStyleBackColor = true; - this.btnSkipSplit.Click += new System.EventHandler(this.btnSkipSplit_Click); - // - // btnUndo - // - this.btnUndo.Location = new System.Drawing.Point(289, 177); - this.btnUndo.Name = "btnUndo"; - this.btnUndo.Size = new System.Drawing.Size(75, 23); - this.btnUndo.TabIndex = 20; - this.btnUndo.Text = "Browse..."; - this.btnUndo.UseVisualStyleBackColor = true; - this.btnUndo.Click += new System.EventHandler(this.btnUndo_Click); - // - // btnBestSegment - // - this.btnBestSegment.Location = new System.Drawing.Point(289, 148); - this.btnBestSegment.Name = "btnBestSegment"; - this.btnBestSegment.Size = new System.Drawing.Size(75, 23); - this.btnBestSegment.TabIndex = 17; - this.btnBestSegment.Text = "Browse..."; - this.btnBestSegment.UseVisualStyleBackColor = true; - this.btnBestSegment.Click += new System.EventHandler(this.btnBestSegment_Click); - // - // btnBehindLosing - // - this.btnBehindLosing.Location = new System.Drawing.Point(289, 119); - this.btnBehindLosing.Name = "btnBehindLosing"; - this.btnBehindLosing.Size = new System.Drawing.Size(75, 23); - this.btnBehindLosing.TabIndex = 14; - this.btnBehindLosing.Text = "Browse..."; - this.btnBehindLosing.UseVisualStyleBackColor = true; - this.btnBehindLosing.Click += new System.EventHandler(this.btnBehindLosing_Click); - // - // btnBehindGaining - // - this.btnBehindGaining.Location = new System.Drawing.Point(289, 90); - this.btnBehindGaining.Name = "btnBehindGaining"; - this.btnBehindGaining.Size = new System.Drawing.Size(75, 23); - this.btnBehindGaining.TabIndex = 11; - this.btnBehindGaining.Text = "Browse..."; - this.btnBehindGaining.UseVisualStyleBackColor = true; - this.btnBehindGaining.Click += new System.EventHandler(this.btnBehindGaining_Click); - // - // btnAheadLosing - // - this.btnAheadLosing.Location = new System.Drawing.Point(289, 61); - this.btnAheadLosing.Name = "btnAheadLosing"; - this.btnAheadLosing.Size = new System.Drawing.Size(75, 23); - this.btnAheadLosing.TabIndex = 8; - this.btnAheadLosing.Text = "Browse..."; - this.btnAheadLosing.UseVisualStyleBackColor = true; - this.btnAheadLosing.Click += new System.EventHandler(this.btnAheadLosing_Click); - // - // btnAheadGaining - // - this.btnAheadGaining.Location = new System.Drawing.Point(289, 32); - this.btnAheadGaining.Name = "btnAheadGaining"; - this.btnAheadGaining.Size = new System.Drawing.Size(75, 23); - this.btnAheadGaining.TabIndex = 5; - this.btnAheadGaining.Text = "Browse..."; - this.btnAheadGaining.UseVisualStyleBackColor = true; - this.btnAheadGaining.Click += new System.EventHandler(this.btnAheadGaining_Click); - // - // btnSplit - // - this.btnSplit.Location = new System.Drawing.Point(289, 3); - this.btnSplit.Name = "btnSplit"; - this.btnSplit.Size = new System.Drawing.Size(75, 23); - this.btnSplit.TabIndex = 2; - this.btnSplit.Text = "Browse..."; - this.btnSplit.UseVisualStyleBackColor = true; - this.btnSplit.Click += new System.EventHandler(this.btnSplit_Click); - // - // btnStartTimer - // - this.btnStartTimer.Location = new System.Drawing.Point(289, 380); - this.btnStartTimer.Name = "btnStartTimer"; - this.btnStartTimer.Size = new System.Drawing.Size(75, 23); - this.btnStartTimer.TabIndex = 41; - this.btnStartTimer.Text = "Browse..."; - this.btnStartTimer.UseVisualStyleBackColor = true; - this.btnStartTimer.Click += new System.EventHandler(this.btnStartTimer_Click); + this.label1.Text = "Drag and Drop Mode:"; + // + // rdoClearAddDragDrop + // + this.rdoClearAddDragDrop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.rdoClearAddDragDrop.AutoSize = true; + this.rdoClearAddDragDrop.Location = new System.Drawing.Point(149, 6); + this.rdoClearAddDragDrop.Name = "rdoClearAddDragDrop"; + this.rdoClearAddDragDrop.Size = new System.Drawing.Size(134, 16); + this.rdoClearAddDragDrop.TabIndex = 1; + this.rdoClearAddDragDrop.TabStop = true; + this.rdoClearAddDragDrop.Text = "Clear and Add Files"; + this.rdoClearAddDragDrop.UseVisualStyleBackColor = true; + // + // rdoAppendDragDrop + // + this.rdoAppendDragDrop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); + this.rdoAppendDragDrop.AutoSize = true; + this.rdoAppendDragDrop.Location = new System.Drawing.Point(289, 6); + this.rdoAppendDragDrop.Name = "rdoAppendDragDrop"; + this.rdoAppendDragDrop.Size = new System.Drawing.Size(156, 16); + this.rdoAppendDragDrop.TabIndex = 1; + this.rdoAppendDragDrop.TabStop = true; + this.rdoAppendDragDrop.Text = "Append Files"; + this.rdoAppendDragDrop.UseVisualStyleBackColor = true; + this.rdoAppendDragDrop.CheckedChanged += new System.EventHandler(this.rdoAddDragDrop_CheckedChanged); // // tpVolumeMixer // @@ -834,7 +146,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, 475); this.tpVolumeMixer.TabIndex = 1; this.tpVolumeMixer.Text = "Volume Mixer"; this.tpVolumeMixer.UseVisualStyleBackColor = true; @@ -846,34 +158,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); @@ -898,317 +182,9 @@ private void InitializeComponent() 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.Size = new System.Drawing.Size(448, 464); 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.Maximum = 100; - this.tbStartTimerVolume.Name = "tbStartTimerVolume"; - this.tbStartTimerVolume.Size = new System.Drawing.Size(279, 23); - 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, 409); - this.tbResumeVolume.Maximum = 100; - this.tbResumeVolume.Name = "tbResumeVolume"; - this.tbResumeVolume.Size = new System.Drawing.Size(279, 23); - 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, 380); - this.tbPauseVolume.Maximum = 100; - this.tbPauseVolume.Name = "tbPauseVolume"; - this.tbPauseVolume.Size = new System.Drawing.Size(279, 23); - 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, 351); - this.tbResetVolume.Maximum = 100; - this.tbResetVolume.Name = "tbResetVolume"; - this.tbResetVolume.Size = new System.Drawing.Size(279, 23); - 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, 322); - this.tbNotAPersonalBestVolume.Maximum = 100; - this.tbNotAPersonalBestVolume.Name = "tbNotAPersonalBestVolume"; - this.tbNotAPersonalBestVolume.Size = new System.Drawing.Size(279, 23); - 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, 293); - this.tbPersonalBestVolume.Maximum = 100; - this.tbPersonalBestVolume.Name = "tbPersonalBestVolume"; - this.tbPersonalBestVolume.Size = new System.Drawing.Size(279, 23); - 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, 264); - this.tbSkipVolume.Maximum = 100; - this.tbSkipVolume.Name = "tbSkipVolume"; - this.tbSkipVolume.Size = new System.Drawing.Size(279, 23); - 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, 235); - this.tbUndoVolume.Maximum = 100; - this.tbUndoVolume.Name = "tbUndoVolume"; - this.tbUndoVolume.Size = new System.Drawing.Size(279, 23); - 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, 206); - this.tbBestSegmentVolume.Maximum = 100; - this.tbBestSegmentVolume.Name = "tbBestSegmentVolume"; - this.tbBestSegmentVolume.Size = new System.Drawing.Size(279, 23); - 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, 177); - this.tbSplitBehindLosingVolume.Maximum = 100; - this.tbSplitBehindLosingVolume.Name = "tbSplitBehindLosingVolume"; - this.tbSplitBehindLosingVolume.Size = new System.Drawing.Size(279, 23); - 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, 148); - this.tbSplitBehindGainingVolume.Maximum = 100; - this.tbSplitBehindGainingVolume.Name = "tbSplitBehindGainingVolume"; - this.tbSplitBehindGainingVolume.Size = new System.Drawing.Size(279, 23); - 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, 119); - this.tbSplitAheadLosingVolume.Maximum = 100; - this.tbSplitAheadLosingVolume.Name = "tbSplitAheadLosingVolume"; - this.tbSplitAheadLosingVolume.Size = new System.Drawing.Size(279, 23); - 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, 90); - this.tbSplitAheadGainingVolume.Maximum = 100; - this.tbSplitAheadGainingVolume.Name = "tbSplitAheadGainingVolume"; - this.tbSplitAheadGainingVolume.Size = new System.Drawing.Size(279, 23); - 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, 61); - this.tbSplitVolume.Maximum = 100; - this.tbSplitVolume.Name = "tbSplitVolume"; - this.tbSplitVolume.Size = new System.Drawing.Size(279, 23); - 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, 443); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(140, 13); - 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, 414); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(140, 13); - 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, 385); - this.label18.Name = "label18"; - this.label18.Size = new System.Drawing.Size(140, 13); - 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, 356); - this.label19.Name = "label19"; - this.label19.Size = new System.Drawing.Size(140, 13); - 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, 327); - this.label20.Name = "label20"; - this.label20.Size = new System.Drawing.Size(140, 13); - 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, 298); - this.label21.Name = "label21"; - this.label21.Size = new System.Drawing.Size(140, 13); - 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, 269); - this.label22.Name = "label22"; - this.label22.Size = new System.Drawing.Size(140, 13); - 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, 240); - this.label23.Name = "label23"; - this.label23.Size = new System.Drawing.Size(140, 13); - 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, 211); - this.label24.Name = "label24"; - this.label24.Size = new System.Drawing.Size(140, 13); - 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, 182); - this.label25.Name = "label25"; - this.label25.Size = new System.Drawing.Size(140, 13); - 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, 153); - this.label26.Name = "label26"; - this.label26.Size = new System.Drawing.Size(140, 13); - 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, 124); - this.label27.Name = "label27"; - this.label27.Size = new System.Drawing.Size(140, 13); - 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, 95); - this.label28.Name = "label28"; - this.label28.Size = new System.Drawing.Size(140, 13); - 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, 66); - this.label29.Name = "label29"; - this.label29.Size = new System.Drawing.Size(140, 13); - 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))); @@ -1226,7 +202,7 @@ private void InitializeComponent() this.tbGeneralVolume.Location = new System.Drawing.Point(149, 32); this.tbGeneralVolume.Maximum = 100; this.tbGeneralVolume.Name = "tbGeneralVolume"; - this.tbGeneralVolume.Size = new System.Drawing.Size(279, 23); + this.tbGeneralVolume.Size = new System.Drawing.Size(296, 23); this.tbGeneralVolume.TabIndex = 3; this.tbGeneralVolume.TickFrequency = 10; this.tbGeneralVolume.Scroll += new System.EventHandler(this.VolumeTrackBarScrollHandler); @@ -1249,7 +225,7 @@ private void InitializeComponent() this.cbOutputDevice.FormattingEnabled = true; this.cbOutputDevice.Location = new System.Drawing.Point(149, 4); this.cbOutputDevice.Name = "cbOutputDevice"; - this.cbOutputDevice.Size = new System.Drawing.Size(279, 21); + this.cbOutputDevice.Size = new System.Drawing.Size(296, 21); this.cbOutputDevice.TabIndex = 1; this.cbOutputDevice.ValueMember = "ProductName"; // @@ -1267,7 +243,8 @@ private void InitializeComponent() 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.Size = new System.Drawing.Size(476, 516); + this.Load += new System.EventHandler(this.SoundSettings_Load); this.tabControl1.ResumeLayout(false); this.tpSoundFiles.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); @@ -1276,20 +253,6 @@ private void InitializeComponent() 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); @@ -1299,98 +262,16 @@ 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; private System.Windows.Forms.ComboBox cbOutputDevice; private System.Windows.Forms.ToolTip ttVolume; - private System.Windows.Forms.ToolTip ttPaths; - private System.Windows.Forms.Button btnClearStartTimer; - private System.Windows.Forms.Button btnClearResume; - private System.Windows.Forms.Button btnClearPause; - private System.Windows.Forms.Button btnClearReset; - private System.Windows.Forms.Button btnClearNotAPersonalBest; - private System.Windows.Forms.Button btnClearPersonalBest; - private System.Windows.Forms.Button btnClearSkip; - private System.Windows.Forms.Button btnClearUndo; - private System.Windows.Forms.Button btnClearBestSegment; - private System.Windows.Forms.Button btnClearSplitBehindLosing; - private System.Windows.Forms.Button btnClearSplitBehindGaining; - private System.Windows.Forms.Button btnClearSplitAheadLosing; - private System.Windows.Forms.Button btnClearSplitAheadGaining; - private System.Windows.Forms.Button btnClearSplit; + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.TrackBar tbGeneralVolume; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.RadioButton rdoClearAddDragDrop; + private System.Windows.Forms.RadioButton rdoAppendDragDrop; } } diff --git a/src/LiveSplit.Sound/UI/Components/SoundSettings.cs b/src/LiveSplit.Sound/UI/Components/SoundSettings.cs index 8588d54..c7edd34 100644 --- a/src/LiveSplit.Sound/UI/Components/SoundSettings.cs +++ b/src/LiveSplit.Sound/UI/Components/SoundSettings.cs @@ -10,169 +10,103 @@ namespace LiveSplit.UI.Components; public partial class SoundSettings : UserControl { - private const string PathSeparator = ", "; - - public IList Split { get; set; } - public IList SplitAheadGaining { get; set; } - public IList SplitAheadLosing { get; set; } - public IList SplitBehindGaining { get; set; } - public IList SplitBehindLosing { get; set; } - public IList BestSegment { get; set; } - public IList UndoSplit { get; set; } - public IList SkipSplit { get; set; } - public IList PersonalBest { get; set; } - public IList NotAPersonalBest { get; set; } - public IList Reset { get; set; } - public IList Pause { get; set; } - public IList Resume { get; set; } - public IList 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; } + private Dictionary DataSettingsDictionary { get; set; } + + private bool IsClearAddDragDrop { get; set; } public SoundSettings() { InitializeComponent(); - Split = []; - SplitAheadGaining = []; - SplitAheadLosing = []; - SplitBehindGaining = []; - SplitBehindLosing = []; - BestSegment = []; - UndoSplit = []; - SkipSplit = []; - PersonalBest = []; - NotAPersonalBest = []; - Reset = []; - Pause = []; - Resume = []; - StartTimer = []; - OutputDevice = 0; + GeneralVolume = 100; + + SoundDataDictionary = []; + DataSettingsDictionary = []; + + IsClearAddDragDrop = true; + + foreach (EventType type in Enum.GetValues(typeof(EventType))) + { + SoundData data = new([], 100); + SoundDataDictionary.Add(type, data); - GeneralVolume = - SplitVolume = - SplitAheadGainingVolume = - SplitAheadLosingVolume = - SplitBehindGainingVolume = - SplitBehindLosingVolume = - BestSegmentVolume = - UndoSplitVolume = - SkipSplitVolume = - PersonalBestVolume = - NotAPersonalBestVolume = - ResetVolume = - PauseVolume = - ResumeVolume = - StartTimerVolume = 100; + SoundFileSettings sfs = new(type, data) + { + IsClearAddDragDrop = IsClearAddDragDrop, + }; + SoundVolumeSettings svs = new(type, data); + + SoundDataSettingsSet settingsSet = new(sfs, svs); + DataSettingsDictionary.Add(type, settingsSet); + } + + int index = 0; + foreach (EventType type in Enum.GetValues(typeof(EventType))) + { + AddControl(tableLayoutPanel1, DataSettingsDictionary[type].FileSettings, index + 1, 3); + AddControl(tableLayoutPanel2, DataSettingsDictionary[type].VolumeSettings, index + 2, 2); + + index++; + } for (int i = 0; i < WaveOut.DeviceCount; ++i) { cbOutputDevice.Items.Add(WaveOut.GetCapabilities(i)); } - AddPathListBinding(txtSplitPath.DataBindings, "Text", this, "Split"); - AddPathListBinding(txtSplitAheadGaining.DataBindings, "Text", this, "SplitAheadGaining"); - AddPathListBinding(txtSplitAheadLosing.DataBindings, "Text", this, "SplitAheadLosing"); - AddPathListBinding(txtSplitBehindGaining.DataBindings, "Text", this, "SplitBehindGaining"); - AddPathListBinding(txtSplitBehindLosing.DataBindings, "Text", this, "SplitBehindLosing"); - AddPathListBinding(txtBestSegment.DataBindings, "Text", this, "BestSegment"); - AddPathListBinding(txtUndo.DataBindings, "Text", this, "UndoSplit"); - AddPathListBinding(txtSkip.DataBindings, "Text", this, "SkipSplit"); - AddPathListBinding(txtPersonalBest.DataBindings, "Text", this, "PersonalBest"); - AddPathListBinding(txtNotAPersonalBest.DataBindings, "Text", this, "NotAPersonalBest"); - AddPathListBinding(txtReset.DataBindings, "Text", this, "Reset"); - AddPathListBinding(txtPause.DataBindings, "Text", this, "Pause"); - AddPathListBinding(txtResume.DataBindings, "Text", this, "Resume"); - AddPathListBinding(txtStartTimer.DataBindings, "Text", this, "StartTimer"); - - 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)); } - private void AddPathListBinding(ControlBindingsCollection bindings, string propertyName, object dataSource, string dataMember) + private void AddControl(TableLayoutPanel tableLayoutPanel, UserControl soundDataControl, int rowIndex, int columnSpan) { - Binding b = new(propertyName, dataSource, dataMember, true, DataSourceUpdateMode.Never); - b.Format += new ConvertEventHandler((sender, convertEvent) => - { - if (convertEvent.DesiredType != typeof(string)) - { - return; - } + // tableLayoutPanel.Size = new(tableLayoutPanel.Size.Width, tableLayoutPanel.Size.Height + 29); + // tableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 29F)); + tableLayoutPanel.Controls.Add(soundDataControl, 0, rowIndex); + tableLayoutPanel.SetColumnSpan(soundDataControl, columnSpan); + } + + private void SoundSettings_Load(object sender, EventArgs e) + { + rdoClearAddDragDrop.Checked = IsClearAddDragDrop; + rdoAppendDragDrop.Checked = !IsClearAddDragDrop; + } - convertEvent.Value = string.Join(PathSeparator, (IList)convertEvent.Value); - }); + private void rdoAddDragDrop_CheckedChanged(object sender, EventArgs e) + { + if (rdoClearAddDragDrop.Checked) + { + IsClearAddDragDrop = true; + } + else + { + IsClearAddDragDrop = false; + } - bindings.Add(b); + foreach (EventType type in Enum.GetValues(typeof(EventType))) + { + DataSettingsDictionary[type].FileSettings.IsClearAddDragDrop = IsClearAddDragDrop; + } } public void SetSettings(XmlNode node) { var element = (XmlElement)node; - Split = ParsePathListSetting(element, "Split"); - SplitAheadGaining = ParsePathListSetting(element, "SplitAheadGaining"); - SplitAheadLosing = ParsePathListSetting(element, "SplitAheadLosing"); - SplitBehindGaining = ParsePathListSetting(element, "SplitBehindGaining"); - SplitBehindLosing = ParsePathListSetting(element, "SplitBehindLosing"); - BestSegment = ParsePathListSetting(element, "BestSegment"); - UndoSplit = ParsePathListSetting(element, "UndoSplit"); - SkipSplit = ParsePathListSetting(element, "SkipSplit"); - PersonalBest = ParsePathListSetting(element, "PersonalBest"); - NotAPersonalBest = ParsePathListSetting(element, "NotAPersonalBest"); - Reset = ParsePathListSetting(element, "Reset"); - Pause = ParsePathListSetting(element, "Pause"); - Resume = ParsePathListSetting(element, "Resume"); - StartTimer = ParsePathListSetting(element, "StartTimer"); - - 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); + foreach (EventType type in Enum.GetValues(typeof(EventType))) + { + SoundDataDictionary[type].FilePaths = ParsePathListSetting(element, type.ToString()); + SoundDataDictionary[type].Volume = SettingsHelper.ParseInt(element[$"{type}Volume"]); + } + + OutputDevice = SettingsHelper.ParseInt(element[nameof(OutputDevice)]); + GeneralVolume = SettingsHelper.ParseInt(element[nameof(GeneralVolume)], 100); + IsClearAddDragDrop = SettingsHelper.ParseBool(element[nameof(IsClearAddDragDrop)], true); } private IList ParsePathListSetting(XmlElement element, string settingName) @@ -220,37 +154,18 @@ public int GetSettingsHashCode() private int CreateSettingsNode(XmlDocument document, XmlElement parent) { - return SettingsHelper.CreateSetting(document, parent, "Version", "1.6") ^ - CreatePathListSetting(document, parent, "Split", Split) ^ - CreatePathListSetting(document, parent, "SplitAheadGaining", SplitAheadGaining) ^ - CreatePathListSetting(document, parent, "SplitAheadLosing", SplitAheadLosing) ^ - CreatePathListSetting(document, parent, "SplitBehindGaining", SplitBehindGaining) ^ - CreatePathListSetting(document, parent, "SplitBehindLosing", SplitBehindLosing) ^ - CreatePathListSetting(document, parent, "BestSegment", BestSegment) ^ - CreatePathListSetting(document, parent, "UndoSplit", UndoSplit) ^ - CreatePathListSetting(document, parent, "SkipSplit", SkipSplit) ^ - CreatePathListSetting(document, parent, "PersonalBest", PersonalBest) ^ - CreatePathListSetting(document, parent, "NotAPersonalBest", NotAPersonalBest) ^ - CreatePathListSetting(document, parent, "Reset", Reset) ^ - CreatePathListSetting(document, parent, "Pause", Pause) ^ - CreatePathListSetting(document, parent, "Resume", Resume) ^ - CreatePathListSetting(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) ^ + SettingsHelper.CreateSetting(document, parent, nameof(IsClearAddDragDrop), IsClearAddDragDrop); + + foreach (EventType type in Enum.GetValues(typeof(EventType))) + { + hash ^= CreatePathListSetting(document, parent, type.ToString(), SoundDataDictionary[type].FilePaths) ^ + SettingsHelper.CreateSetting(document, parent, $"{type}Volume", SoundDataDictionary[type].Volume); + } + + return hash; } private static int CreatePathListSetting(XmlDocument document, XmlElement parent, string name, IList paths) @@ -269,199 +184,22 @@ private static int CreatePathListSetting(XmlDocument document, XmlElement parent return paths.Aggregate(0, (hash, next) => hash ^= next.GetHashCode()); } - private void BrowseForPaths(TextBox textBox, IList paths, Action> callback) - { - string path = paths.FirstOrDefault() ?? string.Empty; - var fileDialog = new OpenFileDialog() - { - Multiselect = true, - FileName = path, - Filter = "Audio Files|*.mp3;*.wav;*.aiff;*.wma|All Files|*.*" - }; - - DialogResult result = fileDialog.ShowDialog(); - if (result == DialogResult.OK) - { - paths = fileDialog.FileNames; - } - - textBox.Text = string.Join(PathSeparator, paths); - callback(paths); - } - - private void btnSplit_Click(object sender, EventArgs e) - { - BrowseForPaths(txtSplitPath, Split, paths => Split = paths); - } - - private void btnAheadGaining_Click(object sender, EventArgs e) - { - BrowseForPaths(txtSplitAheadGaining, SplitAheadGaining, paths => SplitAheadGaining = paths); - } - - private void btnAheadLosing_Click(object sender, EventArgs e) - { - BrowseForPaths(txtSplitAheadLosing, SplitAheadLosing, paths => SplitAheadLosing = paths); - } - - private void btnBehindGaining_Click(object sender, EventArgs e) - { - BrowseForPaths(txtSplitBehindGaining, SplitBehindGaining, paths => SplitBehindGaining = paths); - } - - private void btnBehindLosing_Click(object sender, EventArgs e) - { - BrowseForPaths(txtSplitBehindLosing, SplitBehindLosing, paths => SplitBehindLosing = paths); - } - - private void btnBestSegment_Click(object sender, EventArgs e) - { - BrowseForPaths(txtBestSegment, BestSegment, paths => BestSegment = paths); - } - - private void btnUndo_Click(object sender, EventArgs e) - { - BrowseForPaths(txtUndo, UndoSplit, paths => UndoSplit = paths); - } - - private void btnSkipSplit_Click(object sender, EventArgs e) - { - BrowseForPaths(txtSkip, SkipSplit, paths => SkipSplit = paths); - } - - private void btnPersonalBest_Click(object sender, EventArgs e) - { - BrowseForPaths(txtPersonalBest, PersonalBest, paths => PersonalBest = paths); - } - - private void btnNotAPersonalBest_Click(object sender, EventArgs e) - { - BrowseForPaths(txtNotAPersonalBest, NotAPersonalBest, paths => NotAPersonalBest = paths); - } - - private void btnReset_Click(object sender, EventArgs e) - { - BrowseForPaths(txtReset, Reset, paths => Reset = paths); - } - - private void btnPause_Click(object sender, EventArgs e) - { - BrowseForPaths(txtPause, Pause, paths => Pause = paths); - } - - private void btnResume_Click(object sender, EventArgs e) - { - BrowseForPaths(txtResume, Resume, paths => Resume = paths); - } - - private void btnStartTimer_Click(object sender, EventArgs e) - { - BrowseForPaths(txtStartTimer, StartTimer, paths => StartTimer = paths); - } - - private void btnClearSplit_Click(object sender, EventArgs e) - { - Split = []; - txtSplitPath.Clear(); - } - - private void btnClearAheadGaining_Click(object sender, EventArgs e) - { - SplitAheadGaining = []; - txtSplitAheadGaining.Clear(); - } - - private void btnClearAheadLosing_Click(object sender, EventArgs e) - { - SplitAheadLosing = []; - txtSplitAheadLosing.Clear(); - } - - private void btnClearBehindGaining_Click(object sender, EventArgs e) - { - SplitBehindGaining = []; - txtSplitBehindGaining.Clear(); - } - - private void btnClearBehindLosing_Click(object sender, EventArgs e) - { - SplitBehindLosing = []; - txtSplitBehindLosing.Clear(); - } - - private void btnClearBestSegment_Click(object sender, EventArgs e) - { - BestSegment = []; - txtBestSegment.Clear(); - } - - private void btnClearUndo_Click(object sender, EventArgs e) - { - UndoSplit = []; - txtUndo.Clear(); - } - - private void btnClearSkipSplit_Click(object sender, EventArgs e) - { - SkipSplit = []; - txtSkip.Clear(); - } - - private void btnClearPersonalBest_Click(object sender, EventArgs e) - { - PersonalBest = []; - txtPersonalBest.Clear(); - } - - private void btnClearNotAPersonalBest_Click(object sender, EventArgs e) - { - NotAPersonalBest = []; - txtNotAPersonalBest.Clear(); - } - - private void btnClearReset_Click(object sender, EventArgs e) - { - Reset = []; - txtReset.Clear(); - } - - private void btnClearPause_Click(object sender, EventArgs e) - { - Pause = []; - txtPause.Clear(); - } - - private void btnClearResume_Click(object sender, EventArgs e) - { - Resume = []; - txtResume.Clear(); - } - - private void btnClearStartTimer_Click(object sender, EventArgs e) - { - StartTimer = []; - txtStartTimer.Clear(); - } - - private void PathsTextBoxEnterHandler(object sender, EventArgs e) + private void VolumeTrackBarScrollHandler(object sender, EventArgs e) { - var textBox = (TextBox)sender; + var trackBar = (TrackBar)sender; - // Display below the text box - ttPaths.Show(textBox.Text.Replace(PathSeparator, "\n"), textBox, 0, textBox.Height); + ttVolume.SetToolTip(trackBar, trackBar.Value.ToString()); } +} - private void PathsTextBoxLeaveHandler(object sender, EventArgs e) - { - var textBox = (TextBox)sender; - - ttPaths.Hide(textBox); - } +internal class SoundDataSettingsSet +{ + internal SoundFileSettings FileSettings { get; set; } + internal SoundVolumeSettings VolumeSettings { get; set; } - private void VolumeTrackBarScrollHandler(object sender, EventArgs e) + internal SoundDataSettingsSet(SoundFileSettings sfs, SoundVolumeSettings svs) { - var trackBar = (TrackBar)sender; - - ttVolume.SetToolTip(trackBar, trackBar.Value.ToString()); + FileSettings = sfs; + VolumeSettings = svs; } } diff --git a/src/LiveSplit.Sound/UI/Components/SoundSettings.resx b/src/LiveSplit.Sound/UI/Components/SoundSettings.resx index 8570b98..788fb00 100644 --- a/src/LiveSplit.Sound/UI/Components/SoundSettings.resx +++ b/src/LiveSplit.Sound/UI/Components/SoundSettings.resx @@ -120,7 +120,4 @@ 17, 17 - - 119, 17 - \ No newline at end of file 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..880cb86 --- /dev/null +++ b/src/LiveSplit.Sound/UI/Components/SoundVolumeSettings.Designer.cs @@ -0,0 +1,89 @@ +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.Bottom) + | 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, 23); + 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, 1); + this.lblName.Name = "lblName"; + this.lblName.Size = new System.Drawing.Size(140, 27); + 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, 13F); + 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..0f04708 --- /dev/null +++ b/src/LiveSplit.Sound/UI/Components/SoundVolumeSettings.cs @@ -0,0 +1,27 @@ +using System; +using System.Windows.Forms; + +namespace LiveSplit.UI.Components; + +public partial class SoundVolumeSettings : UserControl +{ + public SoundData Data { get; set; } + public int Volume { get => Data.Volume; set => Data.Volume = value; } + + public SoundVolumeSettings(EventType eventType, SoundData data) + { + InitializeComponent(); + + 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