diff --git a/CUETools.Processor/CUEConfig.cs b/CUETools.Processor/CUEConfig.cs index ed9d86b..5cf4178 100644 --- a/CUETools.Processor/CUEConfig.cs +++ b/CUETools.Processor/CUEConfig.cs @@ -148,62 +148,16 @@ namespace CUETools.Processor language = Thread.CurrentThread.CurrentUICulture.Name; scripts = new Dictionary(); - scripts.Add("default", new CUEToolsScript("default", true, - new CUEAction[] { CUEAction.Verify, CUEAction.Encode }, - "return processor.Go();")); - scripts.Add("only if found", new CUEToolsScript("only if found", true, - new CUEAction[] { CUEAction.Verify }, -@"if (processor.ArVerify.AccResult != HttpStatusCode.OK) - return processor.WriteReport(); -return processor.Go();")); - scripts.Add("fix offset", new CUEToolsScript("fix offset", true, - new CUEAction[] { CUEAction.Encode }, -@"if (processor.ArVerify.AccResult != HttpStatusCode.OK) - return processor.WriteReport(); -processor.WriteOffset = 0; -processor.Action = CUEAction.Verify; -string status = processor.Go(); -uint tracksMatch; -int bestOffset; -processor.FindBestOffset(processor.Config.fixOffsetMinimumConfidence, !processor.Config.fixOffsetToNearest, out tracksMatch, out bestOffset); -if (tracksMatch * 100 < processor.Config.fixOffsetMinimumTracksPercent * processor.TrackCount) - return status; -processor.WriteOffset = bestOffset; -processor.Action = CUEAction.Encode; -//MessageBox.Show(null, processor.AccurateRipLog, " + "\"Done\"" + @"MessageBoxButtons.OK, MessageBoxIcon.Information); -return processor.Go(); -")); - scripts.Add("encode if verified", new CUEToolsScript("encode if verified", true, - new CUEAction[] { CUEAction.Encode }, -@"if (processor.ArVerify.AccResult != HttpStatusCode.OK) - return processor.WriteReport(); -processor.Action = CUEAction.Verify; -string status = processor.Go(); -uint tracksMatch; -int bestOffset; -processor.FindBestOffset(processor.Config.encodeWhenConfidence, false, out tracksMatch, out bestOffset); -if (tracksMatch * 100 < processor.Config.encodeWhenPercent * processor.TrackCount || (processor.Config.encodeWhenZeroOffset && bestOffset != 0)) - return status; -processor.Action = CUEAction.Encode; -return processor.Go(); -")); - scripts.Add("repair", new CUEToolsScript("repair", true, - new CUEAction[] { CUEAction.Encode }, -@" -processor.UseCUEToolsDB(); -processor.Action = CUEAction.Verify; -if (processor.CTDB.DBStatus != null) - return CTDB.DBStatus; -processor.Go(); -processor.CTDB.DoVerify(); -if (!processor.CTDB.Verify.HasErrors) - return ""nothing to fix""; -if (!processor.CTDB.Verify.CanRecover) - return ""cannot fix""; -processor._useCUEToolsDBFix = true; -processor.Action = CUEAction.Encode; -return processor.Go(); -")); + scripts.Add("default", new CUEToolsScript("default", + new CUEAction[] { CUEAction.Verify, CUEAction.Encode })); + scripts.Add("only if found", new CUEToolsScript("only if found", + new CUEAction[] { CUEAction.Verify })); + scripts.Add("fix offset", new CUEToolsScript("fix offset", + new CUEAction[] { CUEAction.Encode })); + scripts.Add("encode if verified", new CUEToolsScript("encode if verified", + new CUEAction[] { CUEAction.Encode })); + scripts.Add("repair", new CUEToolsScript("repair", + new CUEAction[] { CUEAction.Encode })); defaultVerifyScript = "default"; defaultEncodeScript = "default"; } @@ -322,7 +276,6 @@ return processor.Go(); foreach (KeyValuePair script in scripts) { sw.Save(string.Format("CustomScript{0}Name", nScripts), script.Key); - sw.SaveText(string.Format("CustomScript{0}Code", nScripts), script.Value.code); int nCondition = 0; foreach (CUEAction action in script.Value.conditions) sw.Save(string.Format("CustomScript{0}Condition{1}", nScripts, nCondition++), (int)action); @@ -495,31 +448,6 @@ return processor.Go(); } } - int totalScripts = sr.LoadInt32("CustomScripts", 0, null) ?? 0; - for (int nScripts = 0; nScripts < totalScripts; nScripts++) - { - string name = sr.Load(string.Format("CustomScript{0}Name", nScripts)); - string code = sr.Load(string.Format("CustomScript{0}Code", nScripts)); - List conditions = new List(); - int totalConditions = sr.LoadInt32(string.Format("CustomScript{0}Conditions", nScripts), 0, null) ?? 0; - for (int nCondition = 0; nCondition < totalConditions; nCondition++) - conditions.Add((CUEAction)sr.LoadInt32(string.Format("CustomScript{0}Condition{1}", nScripts, nCondition), 0, null)); - CUEToolsScript script; - if (!scripts.TryGetValue(name, out script)) - { - if (name != "submit") - scripts.Add(name, new CUEToolsScript(name, false, conditions, code)); - } - else - { - if (!script.builtin) - { - script.code = code; - script.conditions = conditions; - } - } - } - defaultVerifyScript = sr.Load("DefaultVerifyScript") ?? "default"; defaultEncodeScript = sr.Load("DefaultVerifyAndConvertScript") ?? "default"; diff --git a/CUETools.Processor/CUESheet.cs b/CUETools.Processor/CUESheet.cs index f340520..196014a 100644 --- a/CUETools.Processor/CUESheet.cs +++ b/CUETools.Processor/CUESheet.cs @@ -8,7 +8,6 @@ using System.IO; using System.Net; using System.Text; using System.Threading; -using CSScriptLibrary; using CUETools.AccurateRip; using CUETools.CDImage; using CUETools.CTDB; @@ -4274,9 +4273,6 @@ namespace CUETools.Processor public string ExecuteScript(CUEToolsScript script) { - if (!script.builtin) - return ExecuteScript(script.code); - switch (script.name) { case "default": @@ -4363,30 +4359,6 @@ namespace CUETools.Processor return "internal error"; } - public string ExecuteScript(string script) - { - AsmHelper helper = CompileScript(script); - return (string)helper.Invoke("*.Execute", this); - } - - public static AsmHelper CompileScript(string script) - { - //CSScript.GlobalSettings.InMemoryAsssembly = true; - //CSScript.GlobalSettings.HideAutoGeneratedFiles = - //CSScript.CacheEnabled = false; - return new AsmHelper(CSScript.LoadCode("using System; using System.Windows.Forms; using System.Net; using CUETools.Processor; using CUETools.Codecs; using CUETools.AccurateRip; public class Script { " - + "public static string Execute(CUESheet processor) { \r\n" - + script - + "\r\n } " - + " }", null, true)); - } - - public static bool TryCompileScript(string script) - { - AsmHelper helper = CompileScript(script); - return helper != null; - } - #endregion #region Events diff --git a/CUETools.Processor/CUETools.Processor.csproj b/CUETools.Processor/CUETools.Processor.csproj index 13236fa..bbb8a74 100644 --- a/CUETools.Processor/CUETools.Processor.csproj +++ b/CUETools.Processor/CUETools.Processor.csproj @@ -57,10 +57,6 @@ AllRules.ruleset - - False - ..\ThirdParty\CSScriptLibrary.v1.1.dll - diff --git a/CUETools.Processor/CUEToolsScript.cs b/CUETools.Processor/CUEToolsScript.cs index 368858d..a67f3b0 100644 --- a/CUETools.Processor/CUEToolsScript.cs +++ b/CUETools.Processor/CUEToolsScript.cs @@ -5,20 +5,16 @@ namespace CUETools.Processor public class CUEToolsScript { public string name { get; set; } - public bool builtin; public List conditions; - public string code; - public CUEToolsScript(string _name, bool _builtin, IEnumerable _conditions, string _code) + public CUEToolsScript(string _name, IEnumerable _conditions) { name = _name; - builtin = _builtin; conditions = new List(); foreach (CUEAction condition in _conditions) { conditions.Add(condition); } - code = _code; } public override string ToString() diff --git a/CUETools/frmCUETools.Designer.cs b/CUETools/frmCUETools.Designer.cs index a83ab90..554ee6f 100644 --- a/CUETools/frmCUETools.Designer.cs +++ b/CUETools/frmCUETools.Designer.cs @@ -100,6 +100,7 @@ namespace JDP { this.txtPreGapLength = new System.Windows.Forms.MaskedTextBox(); this.labelDataTrack = new System.Windows.Forms.Label(); this.txtDataTrackLength = new System.Windows.Forms.MaskedTextBox(); + this.textBoxOffset = new System.Windows.Forms.TextBox(); this.panelGo = new System.Windows.Forms.Panel(); this.btnConvert = new System.Windows.Forms.Button(); this.btnStop = new System.Windows.Forms.Button(); @@ -128,7 +129,6 @@ namespace JDP { this.updateLocalDatabaseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.locateInExplorerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.backgroundWorkerAddToLocalDB = new System.ComponentModel.BackgroundWorker(); - this.textBoxOffset = new System.Windows.Forms.TextBox(); this.toolStripContainer1.BottomToolStripPanel.SuspendLayout(); this.toolStripContainer1.ContentPanel.SuspendLayout(); this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); @@ -833,6 +833,13 @@ namespace JDP { this.txtDataTrackLength.TextMaskFormat = System.Windows.Forms.MaskFormat.IncludePromptAndLiterals; this.toolTip1.SetToolTip(this.txtDataTrackLength, resources.GetString("txtDataTrackLength.ToolTip")); // + // textBoxOffset + // + resources.ApplyResources(this.textBoxOffset, "textBoxOffset"); + this.textBoxOffset.Name = "textBoxOffset"; + this.textBoxOffset.TextChanged += new System.EventHandler(this.textBoxOffset_TextChanged); + this.textBoxOffset.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBoxOffset_KeyPress); + // // panelGo // this.panelGo.Controls.Add(this.btnConvert); @@ -1042,13 +1049,6 @@ namespace JDP { this.backgroundWorkerAddToLocalDB.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorkerAddToLocalDB_DoWork); this.backgroundWorkerAddToLocalDB.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorkerAddToLocalDB_RunWorkerCompleted); // - // textBoxOffset - // - resources.ApplyResources(this.textBoxOffset, "textBoxOffset"); - this.textBoxOffset.Name = "textBoxOffset"; - this.textBoxOffset.TextChanged += new System.EventHandler(this.textBoxOffset_TextChanged); - this.textBoxOffset.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBoxOffset_KeyPress); - // // frmCUETools // resources.ApplyResources(this, "$this"); diff --git a/CUETools/frmCUETools.cs b/CUETools/frmCUETools.cs index d4aa165..8cb66ef 100644 --- a/CUETools/frmCUETools.cs +++ b/CUETools/frmCUETools.cs @@ -1025,7 +1025,7 @@ namespace JDP if (outputExists.Count == 0) { cueSheet.UsePregapForFirstTrackInSingleFile = _usePregapForFirstTrackInSingleFile && !outputAudio; - if (script == null || (script.builtin && script.name == "default")) + if (script == null || script.name == "default") { status = cueSheet.Go(); if (cueSheet.Config.advanced.CTDBSubmit diff --git a/CUETools/frmCUETools.resx b/CUETools/frmCUETools.resx index 87877f3..8d3ceba 100644 --- a/CUETools/frmCUETools.resx +++ b/CUETools/frmCUETools.resx @@ -252,6 +252,21 @@ 0 + + Top, Bottom, Left, Right + + + 19 + + + 3, 17 + + + 192, 304 + + + 1 + fileSystemTreeView1 @@ -297,1065 +312,9 @@ 3 - - 3, 17 - - - tableLayoutPanelCUEStyle - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxMode - - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="rbTracks" Row="2" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="rbEmbedCUE" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="rbSingleFile" Row="1" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="checkBoxEditTags" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="checkBoxARVerifyOnEncode" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="checkBoxCTDBVerifyOnEncode" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,33.33332,Percent,33.33334,Percent,33.33334" /><Rows Styles="Percent,18.18229,Percent,18.18229,Percent,18.18229,Percent,22.72658,Percent,22.72658" /></TableLayoutSettings> - - - toolStripCorrectorFormat - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxMode - - - 1 - - - tableLayoutPanelVerifyMode - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxMode - - - 2 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="checkBoxSkipRecent" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="checkBoxVerifyUseLocal" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="checkBoxCTDBVerify" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,33.33333,Percent,33.33333,Percent,33.33333,Absolute,20" /><Rows Styles="Percent,32.72727,Percent,67.27273" /></TableLayoutSettings> - - - Fill - - - 173, 101 - - - 150, 130 - - - 12 - - - Mode - - - groupBoxMode - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 0 - - - buttonEncoderSettings - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 0 - - - labelEncoderMaxMode - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 1 - - - labelEncoderMinMode - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 2 - - - labelEncoderMode - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 3 - - - trackBarEncoderMode - - - System.Windows.Forms.TrackBar, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 4 - - - comboBoxEncoder - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 5 - - - radioButtonAudioNone - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 6 - - - radioButtonAudioLossy - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 7 - - - radioButtonAudioLossless - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 8 - - - labelFormat - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 9 - - - comboBoxAudioFormat - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAudioOutput - - - 10 - - - Fill - - - 329, 101 - - - 148, 194 - - - 2 - - - Audio Output - - - grpAudioOutput - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 1 - - - Fill - - - NoControl - - - 3, 237 - - - 164, 90 - - - Zoom - - - 15 - - - pictureBoxMotd - - - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 2 - - - tableLayoutPanelPaths - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpOutputPathGeneration - - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelOutputTemplate" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="comboBoxOutputFormat" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtInputPath" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtOutputPath" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="toolStripInput" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="toolStripOutput" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,20.94017,Percent,79.05983" /><Rows Styles="Percent,33.33333,Percent,33.33333,Percent,33.33333" /></TableLayoutSettings> - - - Fill - - - 3, 3 - - - 474, 92 - - - 1 - - - CUE Paths - - - grpOutputPathGeneration - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 3 - - - comboBoxScript - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAction - - - 0 - - - rbActionCorrectFilenames - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAction - - - 1 - - - rbActionCreateCUESheet - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAction - - - 2 - - - rbActionVerify - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAction - - - 3 - - - rbActionEncode - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpAction - - - 4 - - - Fill - - - 3, 101 - - - 164, 130 - - - 4 - - - Action - - - grpAction - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 4 - - - 2 - - - True - - - Fill - - - NoControl - - - 3, 0 - - - 75, 23 - - - 3 - - - Pregap - - - MiddleLeft - - - labelPregap - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel4 - - - 0 - - - True - - - Fill - - - NoControl - - - 3, 46 - - - 75, 24 - - - 5 - - - Offset - - - MiddleLeft - - - lblWriteOffset - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel4 - - - 1 - - - Fill - - - Consolas, 8.25pt - - - 84, 3 - - - 00:00:00 - - - 0 - - - 57, 20 - - - 0 - - - 153, 8 - - - Pregap is a certain amount of silence or hidden audio before track one. Normally it is known from the CUE sheet, but if converting/verifying a set of separate tracks without a CUE sheet you might want to set this. - - - txtPreGapLength - - - System.Windows.Forms.MaskedTextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel4 - - - 2 - - - True - - - Fill - - - NoControl - - - 3, 23 - - - 75, 23 - - - 4 - - - Data track - - - MiddleLeft - - - labelDataTrack - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel4 - - - 3 - - - Fill - - - Consolas, 8.25pt - - - 84, 26 - - - 00:00:00 - - - 0 - - - 57, 20 - - - 1 - - - Not used for normal music CDs. Enhanced CDs with data tracks cannot be found in database unless you know the length of the data track. You can often find it in EAC log. If EAC log is found next to the CUE sheet, it will be parsed automaticly and you won't have to enter anything here. - - - txtDataTrackLength - - - System.Windows.Forms.MaskedTextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel4 - - - 4 - - - Fill - - - 84, 49 - - - 6 - - - 57, 21 - - - 6 - - - 0 - - - Right - - - textBoxOffset - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel4 - - - 5 - - - Fill - - - 3, 17 - - - 0, 0, 0, 0 - - - 3 - - - 144, 70 - - - 6 - - - tableLayoutPanel4 - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpExtra - - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelPregap" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lblWriteOffset" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="txtPreGapLength" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelDataTrack" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="txtDataTrackLength" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="textBoxOffset" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,56.75676,Percent,43.24324" /><Rows Styles="Percent,33.33333,Percent,33.33333,Percent,33.33333" /></TableLayoutSettings> - - - Fill - - - 173, 237 - - - 150, 90 - - - 6 - - - Extra - - - grpExtra - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 5 - - - btnConvert - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panelGo - - - 0 - - - btnStop - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panelGo - - - 1 - - - btnResume - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panelGo - - - 2 - - - btnPause - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - panelGo - - - 3 - - - Fill - - - 338, 301 - - - 12, 3, 12, 3 - - - 130, 26 - - - 14 - - - panelGo - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel2 - - - 6 - - - Fill - - - 204, 0 - - - 0, 0, 0, 0 - - - 4 - - - 480, 330 - - - 1 - - - tableLayoutPanel2 - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanel1 - - - 2 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="groupBoxMode" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="grpAudioOutput" Row="1" RowSpan="2" Column="2" ColumnSpan="1" /><Control Name="pictureBoxMotd" Row="2" RowSpan="2" Column="0" ColumnSpan="1" /><Control Name="grpOutputPathGeneration" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="grpAction" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="grpExtra" Row="2" RowSpan="2" Column="1" ColumnSpan="1" /><Control Name="panelGo" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /></Controls><Columns Styles="Percent,35.41667,Percent,32.70833,Percent,31.875" /><Rows Styles="Percent,29.69697,Percent,41.51515,Percent,19.39394,Percent,9.393939" /></TableLayoutSettings> - - - Fill - - - 0, 0 - - - 0, 0, 0, 0 - - - 2 - - - 684, 448 - - - 17 - - - tableLayoutPanel1 - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripContainer1.ContentPanel - - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="textBatchReport" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="grpInput" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tableLayoutPanel2" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,100,Absolute,480" /><Rows Styles="Absolute,330,Percent,100" /></TableLayoutSettings> - - - 0, 0, 0, 0 - - - 684, 448 - - - toolStripContainer1.ContentPanel - - - System.Windows.Forms.ToolStripContentPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripContainer1 - - - 0 - - - Fill - - - 32, 0 - - - toolStripContainer1.LeftToolStripPanel - - - System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripContainer1 - - - 1 - - - 0, 0 - - - toolStripContainer1.RightToolStripPanel - - - System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripContainer1 - - - 2 - - - 684, 502 - - - 17 - - - toolStripContainer1 - - - 0, 0 - - - None - - - 0, 0 - - - 684, 25 - - - 0 - - - toolStripMenu - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripContainer1.TopToolStripPanel - - - 0 - - - toolStripContainer1.TopToolStripPanel - - - System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripContainer1 - - - 3 - - - toolStripContainer1 - - - System.Windows.Forms.ToolStripContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 - - - Top, Bottom, Left, Right - - - 19 - - - 3, 17 - - - 192, 304 - - - 1 - - - fileSystemTreeView1 - - - CUEControls.FileSystemTreeView, CUEControls, Version=2.1.5.0, Culture=neutral, PublicKeyToken=null - - - grpInput - - - 0 - 3 - - rbTracks - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 0 - - - rbEmbedCUE - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 1 - - - rbSingleFile - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 2 - - - checkBoxEditTags - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 3 - - - checkBoxARVerifyOnEncode - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 4 - - - checkBoxCTDBVerifyOnEncode - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 5 - - - Fill - - - 3, 17 - - - 0, 0, 0, 0 - - - 5 - - - 144, 110 - - - 11 - - - tableLayoutPanelCUEStyle - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxMode - - - 0 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="rbTracks" Row="2" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="rbEmbedCUE" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="rbSingleFile" Row="1" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="checkBoxEditTags" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="checkBoxARVerifyOnEncode" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="checkBoxCTDBVerifyOnEncode" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,33.33332,Percent,33.33334,Percent,33.33334" /><Rows Styles="Percent,18.18229,Percent,18.18229,Percent,18.18229,Percent,22.72658,Percent,22.72658" /></TableLayoutSettings> - - - 153, 8 - True @@ -1380,6 +339,9 @@ &Tracks + + 153, 8 + File per track. Gap handling can be selected in advanced settings. @@ -1590,6 +552,39 @@ 5 + + Fill + + + 3, 17 + + + 0, 0, 0, 0 + + + 5 + + + 144, 110 + + + 11 + + + tableLayoutPanelCUEStyle + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxMode + + + 0 + + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="rbTracks" Row="2" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="rbEmbedCUE" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="rbSingleFile" Row="1" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="checkBoxEditTags" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="checkBoxARVerifyOnEncode" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="checkBoxCTDBVerifyOnEncode" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,33.33332,Percent,33.33334,Percent,33.33334" /><Rows Styles="Percent,18.18229,Percent,18.18229,Percent,18.18229,Percent,22.72658,Percent,22.72658" /></TableLayoutSettings> + 3, 17 @@ -1599,6 +594,51 @@ Fill + + Magenta + + + 78, 20 + + + Overwrite + + + 168, 22 + + + Locate files + + + Try to locate missing files automatically + + + 168, 22 + + + Change extension + + + Replace extension for audio files with this: + + + Magenta + + + 79, 19 + + + Locate files + + + Magenta + + + 39, 19 + + + flac + 3, 17 @@ -1623,120 +663,9 @@ 1 - - Magenta - - - 78, 20 - - - Overwrite - - - Magenta - - - 79, 19 - - - Locate files - - - 168, 22 - - - Locate files - - - Try to locate missing files automatically - - - 168, 22 - - - Change extension - - - Replace extension for audio files with this: - - - Magenta - - - 39, 19 - - - flac - 3 - - checkBoxSkipRecent - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelVerifyMode - - - 0 - - - checkBoxVerifyUseLocal - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelVerifyMode - - - 1 - - - checkBoxCTDBVerify - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelVerifyMode - - - 2 - - - Fill - - - 3, 17 - - - 2 - - - 144, 110 - - - 2 - - - tableLayoutPanelVerifyMode - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxMode - - - 2 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="checkBoxSkipRecent" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="checkBoxVerifyUseLocal" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="checkBoxCTDBVerify" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,33.33333,Percent,33.33333,Percent,33.33333,Absolute,20" /><Rows Styles="Percent,32.72727,Percent,67.27273" /></TableLayoutSettings> - True @@ -1836,6 +765,63 @@ 2 + + Fill + + + 3, 17 + + + 2 + + + 144, 110 + + + 2 + + + tableLayoutPanelVerifyMode + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxMode + + + 2 + + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="checkBoxSkipRecent" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="checkBoxVerifyUseLocal" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="checkBoxCTDBVerify" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,33.33333,Percent,33.33333,Percent,33.33333,Absolute,20" /><Rows Styles="Percent,32.72727,Percent,67.27273" /></TableLayoutSettings> + + + Fill + + + 173, 101 + + + 150, 130 + + + 12 + + + Mode + + + groupBoxMode + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel2 + + + 0 + Flat @@ -2193,119 +1179,65 @@ 10 - - 0, 0 - - - 0, 24 - - - 2 - - - labelOutputTemplate - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelPaths - - - 0 - - - comboBoxOutputFormat - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelPaths - - - 1 - - - txtInputPath - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelPaths - - - 2 - - - txtOutputPath - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelPaths - - - 3 - - - toolStripInput - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelPaths - - - 4 - - - toolStripOutput - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelPaths - - - 5 - - + Fill - - 3, 17 + + 329, 101 - - 0, 0, 0, 0 + + 148, 194 - - 3 + + 2 - - 468, 72 + + Audio Output - - 14 + + grpAudioOutput - - tableLayoutPanelPaths + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tableLayoutPanel2 - - grpOutputPathGeneration + + 1 - - 0 + + Fill - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelOutputTemplate" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="comboBoxOutputFormat" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtInputPath" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtOutputPath" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="toolStripInput" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="toolStripOutput" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,20.94017,Percent,79.05983" /><Rows Styles="Percent,33.33333,Percent,33.33333,Percent,33.33333" /></TableLayoutSettings> + + NoControl + + + 3, 237 + + + 164, 90 + + + Zoom + + + 15 + + + pictureBoxMotd + + + System.Windows.Forms.PictureBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel2 + + + 2 + + + 2 Fill @@ -2343,9 +1275,6 @@ 0 - - 153, 8 - Fill @@ -2433,6 +1362,45 @@ Fill + + 38, 21 + + + Input: + + + 177, 22 + + + Folder browser + + + 177, 22 + + + Multiselect Browser + + + 177, 22 + + + Drag'n'drop mode + + + 177, 22 + + + Hide browser + + + Magenta + + + 32, 21 + + + Open/close input browser + 0, 0 @@ -2460,51 +1428,45 @@ 4 - - 38, 21 - - - Input: - - - Magenta - - - 32, 21 - - - Open/close input browser - - - 177, 22 - - - Folder browser - - - 177, 22 - - - Multiselect Browser - - - 177, 22 - - - Drag'n'drop mode - - - 177, 22 - - - Hide browser - 0, 24 Fill + + 48, 24 + + + Output: + + + 143, 22 + + + Browse + + + 143, 22 + + + Manual + + + 143, 22 + + + Use template + + + Magenta + + + 32, 21 + + + toolStripSplitButtonOutputBrowser + 0, 24 @@ -2532,38 +1494,65 @@ 5 - - 48, 24 + + Fill - - Output: + + 3, 17 - - Magenta + + 0, 0, 0, 0 - - 32, 21 + + 3 - - toolStripSplitButtonOutputBrowser + + 468, 72 - - 143, 22 + + 14 - - Browse + + tableLayoutPanelPaths - - 143, 22 + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Manual + + grpOutputPathGeneration - - 143, 22 + + 0 - - Use template + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelOutputTemplate" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="comboBoxOutputFormat" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtInputPath" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="txtOutputPath" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="toolStripInput" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="toolStripOutput" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,20.94017,Percent,79.05983" /><Rows Styles="Percent,33.33333,Percent,33.33333,Percent,33.33333" /></TableLayoutSettings> + + + Fill + + + 3, 3 + + + 474, 92 + + + 1 + + + CUE Paths + + + grpOutputPathGeneration + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel2 + + + 3 Top, Left, Right @@ -2724,6 +1713,309 @@ 4 + + Fill + + + 3, 101 + + + 164, 130 + + + 4 + + + Action + + + grpAction + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel2 + + + 4 + + + 2 + + + True + + + Fill + + + NoControl + + + 3, 0 + + + 75, 23 + + + 3 + + + Pregap + + + MiddleLeft + + + labelPregap + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel4 + + + 0 + + + True + + + Fill + + + NoControl + + + 3, 46 + + + 75, 24 + + + 5 + + + Offset + + + MiddleLeft + + + lblWriteOffset + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel4 + + + 1 + + + Fill + + + Consolas, 8.25pt + + + 84, 3 + + + 00:00:00 + + + 0 + + + 57, 20 + + + 0 + + + Pregap is a certain amount of silence or hidden audio before track one. Normally it is known from the CUE sheet, but if converting/verifying a set of separate tracks without a CUE sheet you might want to set this. + + + txtPreGapLength + + + System.Windows.Forms.MaskedTextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel4 + + + 2 + + + True + + + Fill + + + NoControl + + + 3, 23 + + + 75, 23 + + + 4 + + + Data track + + + MiddleLeft + + + labelDataTrack + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel4 + + + 3 + + + Fill + + + Consolas, 8.25pt + + + 84, 26 + + + 00:00:00 + + + 0 + + + 57, 20 + + + 1 + + + Not used for normal music CDs. Enhanced CDs with data tracks cannot be found in database unless you know the length of the data track. You can often find it in EAC log. If EAC log is found next to the CUE sheet, it will be parsed automaticly and you won't have to enter anything here. + + + txtDataTrackLength + + + System.Windows.Forms.MaskedTextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel4 + + + 4 + + + Fill + + + 84, 49 + + + 6 + + + 57, 21 + + + 6 + + + 0 + + + Right + + + textBoxOffset + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel4 + + + 5 + + + Fill + + + 3, 17 + + + 0, 0, 0, 0 + + + 3 + + + 144, 70 + + + 6 + + + tableLayoutPanel4 + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpExtra + + + 0 + + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelPregap" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="lblWriteOffset" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="txtPreGapLength" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelDataTrack" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="txtDataTrackLength" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="textBoxOffset" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,56.75676,Percent,43.24324" /><Rows Styles="Percent,33.33333,Percent,33.33333,Percent,33.33333" /></TableLayoutSettings> + + + Fill + + + 173, 237 + + + 150, 90 + + + 6 + + + Extra + + + grpExtra + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel2 + + + 5 + Fill @@ -2862,17 +2154,164 @@ 3 - - Magenta + + Fill - - 73, 22 + + 338, 301 - - default + + 12, 3, 12, 3 - - Profile + + 130, 26 + + + 14 + + + panelGo + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel2 + + + 6 + + + Fill + + + 204, 0 + + + 0, 0, 0, 0 + + + 4 + + + 480, 330 + + + 1 + + + tableLayoutPanel2 + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel1 + + + 2 + + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="groupBoxMode" Row="1" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="grpAudioOutput" Row="1" RowSpan="2" Column="2" ColumnSpan="1" /><Control Name="pictureBoxMotd" Row="2" RowSpan="2" Column="0" ColumnSpan="1" /><Control Name="grpOutputPathGeneration" Row="0" RowSpan="1" Column="0" ColumnSpan="3" /><Control Name="grpAction" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="grpExtra" Row="2" RowSpan="2" Column="1" ColumnSpan="1" /><Control Name="panelGo" Row="3" RowSpan="1" Column="2" ColumnSpan="1" /></Controls><Columns Styles="Percent,35.41667,Percent,32.70833,Percent,31.875" /><Rows Styles="Percent,29.69697,Percent,41.51515,Percent,19.39394,Percent,9.393939" /></TableLayoutSettings> + + + Fill + + + 0, 0 + + + 0, 0, 0, 0 + + + 2 + + + 684, 448 + + + 17 + + + tableLayoutPanel1 + + + System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripContainer1.ContentPanel + + + 0 + + + <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="textBatchReport" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="grpInput" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="tableLayoutPanel2" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="Percent,100,Absolute,480" /><Rows Styles="Absolute,330,Percent,100" /></TableLayoutSettings> + + + 0, 0, 0, 0 + + + 684, 448 + + + toolStripContainer1.ContentPanel + + + System.Windows.Forms.ToolStripContentPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripContainer1 + + + 0 + + + Fill + + + 32, 0 + + + toolStripContainer1.LeftToolStripPanel + + + System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripContainer1 + + + 1 + + + 0, 0 + + + toolStripContainer1.RightToolStripPanel + + + System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripContainer1 + + + 2 + + + 684, 502 + + + 17 + + + toolStripContainer1 + + + 0, 0 + + + None 100, 23 @@ -2898,6 +2337,18 @@ default + + Magenta + + + 73, 22 + + + default + + + Profile + 6, 25 @@ -2940,18 +2391,54 @@ Batch log + + 0, 0 + + + 684, 25 + + + 0 + + + toolStripMenu + + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripContainer1.TopToolStripPanel + + + 0 + + + toolStripContainer1.TopToolStripPanel + + + System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripContainer1 + + + 3 + + + toolStripContainer1 + + + System.Windows.Forms.ToolStripContainer, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + 424, 8 - - 225, 186 - - - contextMenuStripFileTree - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - False @@ -3006,6 +2493,15 @@ Locate in explorer + + 225, 186 + + + contextMenuStripFileTree + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 845, 8 diff --git a/CUETools/frmSettings.Designer.cs b/CUETools/frmSettings.Designer.cs index 87c4e3e..fecf618 100644 --- a/CUETools/frmSettings.Designer.cs +++ b/CUETools/frmSettings.Designer.cs @@ -164,14 +164,6 @@ namespace JDP this.tabPage4 = new System.Windows.Forms.TabPage(); this.grpHDCD = new System.Windows.Forms.GroupBox(); this.chkHDCDDetect = new System.Windows.Forms.CheckBox(); - this.tabPage5 = new System.Windows.Forms.TabPage(); - this.richTextBoxScript = new System.Windows.Forms.RichTextBox(); - this.buttonScriptCompile = new System.Windows.Forms.Button(); - this.groupBoxScriptConditions = new System.Windows.Forms.GroupBox(); - this.listViewScriptConditions = new System.Windows.Forms.ListView(); - this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.listViewScripts = new System.Windows.Forms.ListView(); - this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.tabPage7 = new System.Windows.Forms.TabPage(); this.propertyGrid1 = new System.Windows.Forms.PropertyGrid(); this.labelFormatDecoder = new System.Windows.Forms.Label(); @@ -217,8 +209,6 @@ namespace JDP this.panel2.SuspendLayout(); this.tabPage4.SuspendLayout(); this.grpHDCD.SuspendLayout(); - this.tabPage5.SuspendLayout(); - this.groupBoxScriptConditions.SuspendLayout(); this.tabPage7.SuspendLayout(); this.SuspendLayout(); // @@ -668,7 +658,6 @@ namespace JDP this.tabControl1.Controls.Add(this.tabPageEncoders); this.tabControl1.Controls.Add(this.tabPage11); this.tabControl1.Controls.Add(this.tabPage4); - this.tabControl1.Controls.Add(this.tabPage5); this.tabControl1.Controls.Add(this.tabPage7); this.tabControl1.HotTrack = true; this.tabControl1.Multiline = true; @@ -1316,80 +1305,6 @@ namespace JDP this.chkHDCDDetect.UseVisualStyleBackColor = true; this.chkHDCDDetect.CheckedChanged += new System.EventHandler(this.chkHDCDDetect_CheckedChanged); // - // tabPage5 - // - this.tabPage5.BackColor = System.Drawing.SystemColors.Control; - this.tabPage5.Controls.Add(this.richTextBoxScript); - this.tabPage5.Controls.Add(this.buttonScriptCompile); - this.tabPage5.Controls.Add(this.groupBoxScriptConditions); - this.tabPage5.Controls.Add(this.listViewScripts); - resources.ApplyResources(this.tabPage5, "tabPage5"); - this.tabPage5.Name = "tabPage5"; - // - // richTextBoxScript - // - this.richTextBoxScript.AcceptsTab = true; - this.richTextBoxScript.DetectUrls = false; - resources.ApplyResources(this.richTextBoxScript, "richTextBoxScript"); - this.richTextBoxScript.Name = "richTextBoxScript"; - // - // buttonScriptCompile - // - resources.ApplyResources(this.buttonScriptCompile, "buttonScriptCompile"); - this.buttonScriptCompile.Name = "buttonScriptCompile"; - this.buttonScriptCompile.UseVisualStyleBackColor = true; - this.buttonScriptCompile.Click += new System.EventHandler(this.buttonScriptCompile_Click); - // - // groupBoxScriptConditions - // - this.groupBoxScriptConditions.Controls.Add(this.listViewScriptConditions); - resources.ApplyResources(this.groupBoxScriptConditions, "groupBoxScriptConditions"); - this.groupBoxScriptConditions.Name = "groupBoxScriptConditions"; - this.groupBoxScriptConditions.TabStop = false; - // - // listViewScriptConditions - // - this.listViewScriptConditions.BackColor = System.Drawing.SystemColors.Control; - this.listViewScriptConditions.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listViewScriptConditions.CheckBoxes = true; - this.listViewScriptConditions.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader6}); - this.listViewScriptConditions.FullRowSelect = true; - this.listViewScriptConditions.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; - resources.ApplyResources(this.listViewScriptConditions, "listViewScriptConditions"); - this.listViewScriptConditions.MultiSelect = false; - this.listViewScriptConditions.Name = "listViewScriptConditions"; - this.listViewScriptConditions.UseCompatibleStateImageBehavior = false; - this.listViewScriptConditions.View = System.Windows.Forms.View.Details; - // - // columnHeader6 - // - resources.ApplyResources(this.columnHeader6, "columnHeader6"); - // - // listViewScripts - // - this.listViewScripts.BackColor = System.Drawing.SystemColors.Control; - this.listViewScripts.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.listViewScripts.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader5}); - this.listViewScripts.FullRowSelect = true; - this.listViewScripts.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; - this.listViewScripts.HideSelection = false; - this.listViewScripts.LabelEdit = true; - resources.ApplyResources(this.listViewScripts, "listViewScripts"); - this.listViewScripts.MultiSelect = false; - this.listViewScripts.Name = "listViewScripts"; - this.listViewScripts.UseCompatibleStateImageBehavior = false; - this.listViewScripts.View = System.Windows.Forms.View.Details; - this.listViewScripts.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewScripts_AfterLabelEdit); - this.listViewScripts.BeforeLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.listViewScripts_BeforeLabelEdit); - this.listViewScripts.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.listViewScripts_ItemSelectionChanged); - this.listViewScripts.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listViewScripts_KeyDown); - // - // columnHeader5 - // - resources.ApplyResources(this.columnHeader5, "columnHeader5"); - // // tabPage7 // this.tabPage7.BackColor = System.Drawing.SystemColors.Control; @@ -1495,8 +1410,6 @@ namespace JDP this.tabPage4.PerformLayout(); this.grpHDCD.ResumeLayout(false); this.grpHDCD.PerformLayout(); - this.tabPage5.ResumeLayout(false); - this.groupBoxScriptConditions.ResumeLayout(false); this.tabPage7.ResumeLayout(false); this.ResumeLayout(false); @@ -1581,14 +1494,6 @@ namespace JDP private System.Windows.Forms.CheckBox checkBoxFormatAllowLossy; private System.Windows.Forms.ComboBox comboFormatLossyEncoder; private System.Windows.Forms.Label labelFormatLossyEncoder; - private System.Windows.Forms.TabPage tabPage5; - private System.Windows.Forms.GroupBox groupBoxScriptConditions; - private System.Windows.Forms.ListView listViewScripts; - private System.Windows.Forms.ColumnHeader columnHeader5; - private System.Windows.Forms.ListView listViewScriptConditions; - private System.Windows.Forms.ColumnHeader columnHeader6; - private System.Windows.Forms.Button buttonScriptCompile; - private System.Windows.Forms.RichTextBox richTextBoxScript; private System.Windows.Forms.GroupBox groupBox4; private System.Windows.Forms.GroupBox groupBox5; private System.Windows.Forms.Label label2; diff --git a/CUETools/frmSettings.cs b/CUETools/frmSettings.cs index f47748b..e06811c 100644 --- a/CUETools/frmSettings.cs +++ b/CUETools/frmSettings.cs @@ -138,17 +138,6 @@ namespace JDP comboBoxFormatTagger.Items.Add(CUEToolsTagger.TagLibSharp); comboBoxFormatTagger.Items.Add(CUEToolsTagger.APEv2); comboBoxFormatTagger.Items.Add(CUEToolsTagger.ID3v2); - foreach (KeyValuePair script in _config.scripts) - { - ListViewItem item = new ListViewItem(script.Key); - item.Tag = script.Value; - listViewScripts.Items.Add(item); - } - ComponentResourceManager resources = new ComponentResourceManager(typeof(frmCUETools)); - listViewScriptConditions.Items.Add(resources.GetString("rbActionVerify.Text").Replace("&", "")); - listViewScriptConditions.Items.Add(resources.GetString("rbActionEncode.Text").Replace("&", "")); - listViewScriptConditions.Items[0].Tag = CUEAction.Verify; - listViewScriptConditions.Items[1].Tag = CUEAction.Encode; if (m_encoder != null) { @@ -196,8 +185,6 @@ namespace JDP { if (listViewFormats.SelectedIndices.Count > 0) listViewFormats.Items[listViewFormats.SelectedIndices[0]].Selected = false; - if (listViewScripts.SelectedItems.Count > 0) - listViewScripts.SelectedItems[0].Selected = false; _reducePriority = chkReducePriority.Checked; _config.checkForUpdates = checkBoxCheckForUpdates.Checked; @@ -305,8 +292,6 @@ namespace JDP { if (listViewFormats.SelectedItems.Count > 0) listViewFormats.SelectedItems[0].Selected = false; - if (listViewScripts.SelectedItems.Count > 0) - listViewScripts.SelectedItems[0].Selected = false; } private void listViewFormats_BeforeLabelEdit(object sender, LabelEditEventArgs e) @@ -555,172 +540,6 @@ namespace JDP labelDecoderExtension.ImageKey = "." + (string)comboBoxDecoderExtension.SelectedItem; } - private void listViewScripts_BeforeLabelEdit(object sender, LabelEditEventArgs e) - { - CUEToolsScript script = (CUEToolsScript)listViewScripts.Items[e.Item].Tag; - if (script.builtin) - e.CancelEdit = true; - } - - private void listViewScripts_AfterLabelEdit(object sender, LabelEditEventArgs e) - { - CUEToolsScript script; - if (e.Label == null || _config.scripts.TryGetValue(e.Label, out script)) - { - e.CancelEdit = true; - return; - } - script = (CUEToolsScript)listViewScripts.Items[e.Item].Tag; - if (script.builtin) - { - e.CancelEdit = true; - return; - } - _config.scripts.Remove(script.name); - script.name = e.Label; - _config.scripts.Add(script.name, script); - } - - private void listViewScripts_KeyDown(object sender, KeyEventArgs e) - { - switch (e.KeyCode) - { - case Keys.Insert: - { - CUEToolsScript script; - if (_config.scripts.TryGetValue("new", out script)) - return; - script = new CUEToolsScript("new", false, new CUEAction[] {}, ""); - _config.scripts.Add("new", script); - ListViewItem item = new ListViewItem(script.name); - item.Tag = script; - listViewScripts.Items.Add(item); - item.BeginEdit(); - break; - } - case Keys.Delete: - { - if (listViewScripts.SelectedItems.Count <= 0) - return; - CUEToolsScript script = (CUEToolsScript)listViewScripts.SelectedItems[0].Tag; - if (script.builtin) - return; - _config.scripts.Remove(script.name); - listViewScripts.Items.Remove(listViewScripts.SelectedItems[0]); - break; - } - } - } - - private void listViewScripts_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e) - { - if (e.IsSelected) - { - CUEToolsScript script = (CUEToolsScript)e.Item.Tag; - if (script == null) return; - foreach (ListViewItem item in listViewScriptConditions.Items) - item.Checked = script.conditions.Contains((CUEAction)item.Tag); - groupBoxScriptConditions.Visible = true; - richTextBoxScript.Text = script.code; - richTextBoxScript.Visible = true; - buttonScriptCompile.Visible = true; - - groupBoxScriptConditions.Enabled = - buttonScriptCompile.Enabled = - !script.builtin; - richTextBoxScript.ReadOnly = script.builtin; - } - else - { - CUEToolsScript script = (CUEToolsScript)e.Item.Tag; - if (script == null) return; - if (!script.builtin) - { - script.conditions.Clear(); - foreach (ListViewItem item in listViewScriptConditions.Items) - if (item.Checked) - script.conditions.Add((CUEAction)item.Tag); - script.code = richTextBoxScript.Text; - } - groupBoxScriptConditions.Visible = false; - richTextBoxScript.Visible = false; - buttonScriptCompile.Visible = false; - } - } - - private static int WordLength(string text, int pos) - { - if (pos >= text.Length) - return 1; - if ((text[pos] >= 'a' && text[pos] <= 'z') || - (text[pos] >= 'A' && text[pos] <= 'Z') || - (text[pos] == '_')) - { - for (int len = 1; len < text.Length - pos; len++) - { - bool ok = (text[pos + len] >= 'a' && text[pos + len] <= 'z') || - (text[pos + len] >= 'A' && text[pos + len] <= 'Z') || - (text[pos + len] == '_'); - if (!ok) - return len; - } - return text.Length - pos; - } - return 1; - } - - private void buttonScriptCompile_Click(object sender, EventArgs e) - { - richTextBoxScript.SelectAll(); - richTextBoxScript.SelectionColor = richTextBoxScript.ForeColor; - richTextBoxScript.DeselectAll(); - try - { - CUESheet.TryCompileScript(richTextBoxScript.Text); - } - catch (Exception ex) - { - using (StringWriter sw = new StringWriter()) - { - using (StringReader sr = new StringReader(ex.Message)) - { - string lineStr; - while ((lineStr = sr.ReadLine()) != null) - { - string[] s = { ".tmp(" }; - string[] n = lineStr.Split(s, 2, StringSplitOptions.None); - if (n.Length == 2) - { - string[] n2 = n[1].Split(")".ToCharArray(), 2); - if (n2.Length == 2) - { - string[] n3 = n2[0].Split(",".ToCharArray(), 2); - int row, col; - if (n3.Length == 2 && int.TryParse(n3[0], out row) && int.TryParse(n3[1], out col) && row > 1) - { - int pos = richTextBoxScript.GetFirstCharIndexFromLine(row - 2); - if (pos >= 0) - { - pos += col - 1; - richTextBoxScript.Select(pos, WordLength(richTextBoxScript.Text, pos)); - richTextBoxScript.SelectionColor = Color.Red; - richTextBoxScript.DeselectAll(); - } - } - } - sw.WriteLine("({0}", n[1]); - } - else - sw.WriteLine("{0}", lineStr); - } - } - MessageBox.Show(this, sw.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - return; - } - MessageBox.Show(this, "Script compiled successfully.", "Ok", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - private void buttonEncoderAdd_Click(object sender, EventArgs e) { encodersBindingSource.AddNew(); diff --git a/CUETools/frmSettings.resx b/CUETools/frmSettings.resx index 141a7c4..700c7f2 100644 --- a/CUETools/frmSettings.resx +++ b/CUETools/frmSettings.resx @@ -3920,168 +3920,6 @@ 6 - - Courier New, 8pt - - - 144, 110 - - - 382, 167 - - - 28 - - - - - - False - - - False - - - richTextBoxScript - - - System.Windows.Forms.RichTextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage5 - - - 0 - - - NoControl - - - 422, 19 - - - 75, 23 - - - 27 - - - Compile - - - False - - - buttonScriptCompile - - - System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage5 - - - 1 - - - 200 - - - 6, 20 - - - 249, 77 - - - 2 - - - listViewScriptConditions - - - System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBoxScriptConditions - - - 0 - - - 144, 7 - - - 261, 101 - - - 2 - - - Conditions - - - False - - - groupBoxScriptConditions - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage5 - - - 2 - - - 120 - - - 6, 6 - - - 124, 271 - - - 1 - - - listViewScripts - - - System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage5 - - - 3 - - - 4, 22 - - - 535, 291 - - - 8 - - - Scripts - - - tabPage5 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - 7 - 8, 6 @@ -4128,7 +3966,7 @@ tabControl1 - 8 + 7 0, 0 @@ -4280,18 +4118,6 @@ System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - columnHeader6 - - - System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - columnHeader5 - - - System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - columnHeader2