From 612fba3bcbe5a6e5e608bc5d78b1d2276dfe4ef0 Mon Sep 17 00:00:00 2001 From: chudov Date: Thu, 25 Mar 2010 01:05:26 +0000 Subject: [PATCH] smart combobox control some localization for cueripper version bump --- Bwg.Scsi/Bwg.Scsi.csproj | 5 + Bwg.Scsi/Device.cs | 186 +- Bwg.Scsi/Messages.resx | 495 ++++ Bwg.Scsi/Messages.ru-RU.resx | 129 ++ CUEControls/BNComboBox.cs | 216 +- CUEControls/Properties/AssemblyInfo.cs | 4 +- CUERipper/frmCUERipper.Designer.cs | 63 +- CUERipper/frmCUERipper.cs | 184 +- CUERipper/frmCUERipper.resx | 71 +- CUETools.ARCUE/Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- CUETools.CDImage/Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- CUETools.Codecs/Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- .../Properties/AssemblyInfo.cs | 4 +- CUETools.Processor/Processor.cs | 4 +- CUETools.Processor/Properties/AssemblyInfo.cs | 4 +- CUETools.Ripper.Console/Program.cs | 2 +- .../CUETools.Ripper.SCSI.csproj | 12 + .../Properties/AssemblyInfo.cs | 4 +- CUETools.Ripper.SCSI/Resource1.Designer.cs | 126 + CUETools.Ripper.SCSI/Resource1.resx | 141 ++ CUETools.Ripper.SCSI/Resource1.ru-RU.resx | 141 ++ CUETools.Ripper.SCSI/SCSIDrive.cs | 37 +- CUETools.Ripper/Properties/AssemblyInfo.cs | 4 +- CUETools/Properties/AssemblyInfo.cs | 4 +- CUETools/frmCUETools.cs | 2 +- CUETools/frmCUETools.resx | 2048 ++++++++++------- 33 files changed, 2623 insertions(+), 1303 deletions(-) create mode 100644 Bwg.Scsi/Messages.resx create mode 100644 Bwg.Scsi/Messages.ru-RU.resx create mode 100644 CUETools.Ripper.SCSI/Resource1.Designer.cs create mode 100644 CUETools.Ripper.SCSI/Resource1.resx create mode 100644 CUETools.Ripper.SCSI/Resource1.ru-RU.resx diff --git a/Bwg.Scsi/Bwg.Scsi.csproj b/Bwg.Scsi/Bwg.Scsi.csproj index 8e6a281..1323b46 100644 --- a/Bwg.Scsi/Bwg.Scsi.csproj +++ b/Bwg.Scsi/Bwg.Scsi.csproj @@ -145,6 +145,11 @@ true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + NO ADDITIONAL SENSE INFORMATION + + + I/O PROCESS TERMINATED + + + NO INDEX/SECTOR SIGNAL + + + NO SEEK COMPLETE + + + PERIPHERAL DEVICE WRITE FAULT + + + LOGICAL UNIT NOT READY, CAUSE NOT REPORTABLE + + + LOGICAL UNIT IS IN PROCESS OF BECOMING READY + + + LOGICAL UNIT NOT READY, INITIALIZING COMMAND REQUIRED + + + LOGICAL UNIT NOT READY, MANUAL INTERVENTION REQUIRED + + + LOGICAL UNIT NOT READY, FORMAT IN PROGRESS + + + LOGICAL UNIT NOT READY, OPERATION IN PROGRESS + + + LOGICAL UNIT NOT READY, LONG WRITE IN PROGRESS + + + LOGICAL UNIT DOES NOT RESPOND TO SELECTION + + + LOGICAL UNIT COMMUNICATION FAILURE + + + LOGICAL UNIT COMMUNICATION TIME-OUT + + + LOGICAL UNIT COMMUNICATION PARITY ERROR + + + LOGICAL UNIT COMMUNICATION CRC ERROR (ULTRA-DMA/32) + + + UNREACHABLE COPY TARGET + + + WRITE ERROR + + + ID CRC OR ECC ERROR + + + UNRECOVERED READ ERROR + + + READ RETRIES EXHAUSTED + + + ERROR TOO LONG TO CORRECT + + + L-EC UNCORRECTABLE ERROR + + + CIRC UNRECOVERED ERROR + + + ERROR READING UPC/EAN NUMBER + + + ERROR READING ISRC NUMBER + + + READ ERROR – LOSS OF STREAMING + + + INVALID COMMAND OPERATION CODE + + + LOGICAL BLOCK ADDRESS OUT OF RANGE + + + INVALID ELEMENT ADDRESS + + + INVALID ADDRESS FOR WRITE + + + INVALID FIELD IN CDB + + + INVALID FIELD IN PARAMETER LIST + + + PARAMETER NOT SUPPORTED + + + PARAMETER VALUE INVALID + + + THRESHOLD PARAMETERS NOT SUPPORTED + + + WRITE PROTECTED + + + NOT READY TO READY CHANGE, MEDIUM MAY HAVE CHANGED + + + IMPORT OR EXPORT ELEMENT ACCESSED + + + POWER ON, RESET, OR BUS DEVICE RESET OCCURRED + + + POWER ON OCCURRED + + + BUS RESET OCCURRED + + + BUS DEVICE RESET FUNCTION OCCURRED + + + DEVICE INTERNAL RESET + + + PARAMETERS CHANGED + + + MODE PARAMETERS CHANGED + + + LOG PARAMETERS CHANGED + + + COMMMAND SEQUENCE ERROR + + + CURRENT PROGRAM AREA IS NOT EMPTY + + + CURRENT PROGRAM AREA IS EMPTY + + + INSUFFICIENT TIME FOR OPERATION + + + INCOMPATIBLE MEDIUM INSTALLED + + + CANNOT READ MEDIUM - UNKNOWN FORMAT + + + CANNOT READ MEDIUM - INCOMPATIBLE FORMAT + + + CLEANING CARTRIDGE INSTALLED + + + CANNOT WRITE MEDIUM - UNKONWN FORMAT + + + CANNOT WRITE MEDIUM - INCOMPATIBLE FORMAT + + + CANNOT FORMAT MEDIUM - INCOMPATIBLE FORMAT + + + CLEANING FAILURE + + + CANNOT WRITE - APPLICATION CODE MISMATCH + + + CURRENT SESSION NOT FIXATED FOR APPEND + + + MEDIUM NOT FORMATTED + + + CANNOT WRITE MEDIUM - UNSUPPORTED MEDIUM VERSION + + + MEDIUM NOT PRESENT + + + MEDIUM NOT PRESENT - TRAY CLOSED + + + MEDIUM NOT PRESENT - TRAY OPEN + + + MEDIUM DESTINATION ELEMENT FULL + + + MEDIUM SOURCE ELEMENT EMPTY + + + END OF MEDIUM REACHED + + + MEDIUM MAGAZINE NOT ACCESSIBLE + + + MEDIUM MAGAZINE REMOVED + + + MEDIUM MAGAZINE INSERTED + + + MEDIUM MAGAZINE LOCKED + + + MEDIUM MAGAZINE UNLOCKED + + + LOGICAL UNIT HAS NOT SELF-CONFIGURED YET + + + LOGICAL UNIT FAILURE + + + TIMEOUT ON LOGICAL UNIT + + + TARGET OPERATING CONDITIONS HAVE CHANGED + + + MICROCODE HAS BEEN CHANGED + + + CHANGED OPERATING DEFINITION + + + INQUIRY DATA HAS CHANGED + + + MEDIA LOAD OR EJECT FAILED + + + MEDIUM REMOVAL PREVENTED + + + UNABLE TO RECOVER TABLE OF CONTENTS + + + OPERATOR REQUEST OR STATE CHANGE INPUT + + + OPERATOR MEDIUM REMOVAL REQUEST + + + OPERATOR SELECTED WRITE PROTECT + + + OPERATOR SELECTED WRITE PERMIT + + + LOG EXCEPTION + + + THRESHOLD CONDITION MET + + + LOG COUNTER AT MAXIMUM + + + LOG LIST CODES EXHAUSTED + + + LOW POWER CONDITION ON + + + IDLE CONDITION ACTIVATED BY TIMER + + + STANDBY CONDITION ACTIVATED BY TIMER + + + IDLE CONDITION ACTIVATED BY COMMAND + + + STANDBY CONDITION ACTIVATED BY COMMAND + + + END OF USER AREA ENCOUNTERED ON THIS TRACK + + + PACKET DOES NOT FIT IN AVAILABLE SPACE + + + ILLEGAL MODE FOR THIS TRACK + + + INVALID PACKET SIZE + + + VOLTAGE FAULT + + + COPY PROTECTION KEY EXCHANGE FAILURE - AUTHENTICATION FAILURE + + + COPY PROTECTION KEY EXCHANGE FAILURE - KEY NOT PRESENT + + + COPY PROTECTION KEY EXCHANGE FAILURE - KEY NOT ESTABLISHED + + + READ OF SCRAMBLED SECTOR WITHOUT AUTHENTICATION + + + MEDIA REGION CODE IS MISMATCHED TO LOGICAL UNIT REGION + + + LOGICAL UNIT REGION MUST BE PERMANENT/REGION RESET COUNT ERROR + + + SESSION FIXATION ERROR + + + SESSION FIXATION ERROR WRITING LEAD-IN + + + SESSION FIXATION ERROR WRITING LEAD-OUT + + + SESSION FIXATION ERROR - INCOMPLETE TRACK IN SESSION + + + EMPTY OR PARTIALLY WRITTEN RESERVED TRACK + + + NO MORE TRACK RESERVATIONS ALLOWED + + + RMZ EXTENSION IS NOT ALLOWED + + + NO MORE TEST ZONE EXTENSIONS ARE ALLOWED + + + CD CONTROL ERROR + + + POWER CALIBRATION AREA ALMOST + + + POWER CALIBRATION AREA IS FULL + + + POWER CALIBRATION AREA ERROR + + + PROGRAM MEMORY AREA UPDATE FAILURE + + + PROGRAM MEMORY AREA IS FULL + + + RMA/PMA IS ALMOST FULL + + + NO SENSE STRING FOR + + \ No newline at end of file diff --git a/Bwg.Scsi/Messages.ru-RU.resx b/Bwg.Scsi/Messages.ru-RU.resx new file mode 100644 index 0000000..3ac2d62 --- /dev/null +++ b/Bwg.Scsi/Messages.ru-RU.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + отсутствует носитель + + + отсутствует носитель - лоток открыт + + + отсутствует носитель - лоток закрыт + + \ No newline at end of file diff --git a/CUEControls/BNComboBox.cs b/CUEControls/BNComboBox.cs index 3b1995b..0c18a26 100644 --- a/CUEControls/BNComboBox.cs +++ b/CUEControls/BNComboBox.cs @@ -15,10 +15,6 @@ namespace BBBNOVA private bool resize = false; private Color _backColor = Color.White; - private Color _color1 = Color.White; - private Color _color2 = Color.Gainsboro; - private Color _color3 = Color.White; - private Color _color4 = Color.PaleGoldenrod; private BNRadius _radius = new BNRadius(); private int _dropDownHeight = 200; @@ -66,31 +62,7 @@ namespace BBBNOVA #region Properties - - public Color Color1 - { - get { return _color1; } - set { _color1 = value; Invalidate(true); } - } - - public Color Color2 - { - get { return _color2; } - set { _color2 = value; Invalidate(true); } - } - - public Color Color3 - { - get { return _color3; } - set { _color3 = value; Invalidate(true); } - } - - public Color Color4 - { - get { return _color4; } - set { _color4 = value; Invalidate(true); } - } - + public int DropDownHeight { get { return _dropDownHeight; } @@ -154,16 +126,8 @@ namespace BBBNOVA get { return _dropDownStyle; } set { - _dropDownStyle = value; - - if (_dropDownStyle == ComboBoxStyle.DropDownList) - { - _textBox.Visible = false; - } - else - { - _textBox.Visible = true; - } + _dropDownStyle = value; + _textBox.Visible = ComboBoxStyle.DropDownList != value; Invalidate(true); } } @@ -179,35 +143,36 @@ namespace BBBNOVA } } - public bool IsDroppedDown - { - get { return _isDroppedDown; } - set - { - if (_isDroppedDown == true && value == false ) - { - if (_popupControl.IsDropDown) - { - _popupControl.Close(); - } - } + public bool IsDroppedDown + { + get { return _isDroppedDown; } + set + { + if (_isDroppedDown == value) + return; - _isDroppedDown = value; + _isDroppedDown = value; - if (_isDroppedDown) - { + if (!_isDroppedDown && _popupControl.IsDropDown) + { + _popupControl.Close(); + hovered = this.RectangleToScreen(this.ClientRectangle).Contains(MousePosition); + } + + if (_isDroppedDown) + { _listBox.Width = _dropDownWidth; _listBox.Height = CalculateListHeight(); - _popupControl.Show(this, CalculateDropPosition(), ToolStripDropDownDirection.BelowRight); + _popupControl.Show(this, CalculateDropPosition(), ToolStripDropDownDirection.BelowRight); Capture = false; _listBox.Capture = true; } - Invalidate(); - if (_isDroppedDown) - OnDroppedDown(this, EventArgs.Empty); - } - } + Invalidate(); + + OnDroppedDown(this, EventArgs.Empty); + } + } [Category("Appearance"), Description("Selects the radius of combobox edges.")] public BNRadius Radius @@ -336,7 +301,7 @@ namespace BBBNOVA _popupControl.Padding = new Padding(0); _popupControl.Margin = new Padding(0); _popupControl.AutoSize = true; - _popupControl.AutoClose = false; + _popupControl.AutoClose = true; _popupControl.DropShadowEnabled = true; _popupControl.Items.Add(_controlHost); @@ -347,11 +312,12 @@ namespace BBBNOVA _listBox.MeasureItem += new MeasureItemEventHandler(_listBox_MeasureItem); _listBox.DrawItem += new DrawItemEventHandler(_listBox_DrawItem); _listBox.MouseClick += new MouseEventHandler(_listBox_MouseClick); - _listBox.MouseUp += new MouseEventHandler(_listBox_MouseUp); + //_listBox.MouseUp += new MouseEventHandler(_listBox_MouseUp); _listBox.MouseDown += new MouseEventHandler(_listBox_MouseDown); _listBox.MouseMove += new MouseEventHandler(_listBox_MouseMove); //(_listBox.DataManager as CurrencyManager).ListChanged += new ListChangedEventHandler(BNComboBox_ListChanged); + _popupControl.Closing += new ToolStripDropDownClosingEventHandler(_popupControl_Closing); _popupControl.Closed += new ToolStripDropDownClosedEventHandler(_popupControl_Closed); _textBox.Resize += new EventHandler(_textBox_Resize); @@ -456,8 +422,9 @@ namespace BBBNOVA hovered = false; Invalidate(true); } - - base.OnMouseLeave(e); + if (!this.RectangleToScreen(this.ClientRectangle).Contains(MousePosition) && + (!IsDroppedDown || !_popupControl.RectangleToScreen(_popupControl.ClientRectangle).Contains(MousePosition))) + base.OnMouseLeave(e); } protected override void OnMouseDown(MouseEventArgs e) @@ -465,7 +432,7 @@ namespace BBBNOVA //System.Diagnostics.Trace.WriteLine(string.Format("OnMouseDown({0})", SelectedIndex)); _textBox.Focus(); if (e.Button == MouseButtons.Left) - if ((this.RectangleToScreen(rectBtn).Contains(MousePosition) || (DropDownStyle == ComboBoxStyle.DropDownList))) + if (rectBtn.Contains(e.Location) || DropDownStyle == ComboBoxStyle.DropDownList || this.IsDroppedDown) { this.IsDroppedDown = !this.IsDroppedDown; } @@ -488,6 +455,18 @@ namespace BBBNOVA base.OnMouseWheel(e); } + public override bool Focused + { + get + { + if (base.ContainsFocus) return true; + if (this.IsDroppedDown && _popupControl.ContainsFocus) return true; + //if (this.IsDroppedDown && _listBox.ContainsFocus) return true; + if (this._dropDownStyle != ComboBoxStyle.DropDownList && _textBox.ContainsFocus) return true; + return false; + } + } + protected override void OnGotFocus(EventArgs e) { Invalidate(true); @@ -496,9 +475,9 @@ namespace BBBNOVA protected override void OnLostFocus(EventArgs e) { - if (this.IsDroppedDown && !_popupControl.ContainsFocus && !this.ContainsFocus) + if (this.IsDroppedDown && !this.Focused) this.IsDroppedDown = false; - + Invalidate(); base.OnLostFocus(e); } @@ -510,11 +489,16 @@ namespace BBBNOVA //this.SelectedIndex = _listBox.SelectedIndex; //this.Invalidate(true); - Text = _listBox.SelectedValue != null ? - _listBox.GetItemText(_listBox.SelectedValue) : - ""; + if (Enabled || _listBox.SelectedItem != null) + { + Text = _listBox.SelectedItem != null ? + _listBox.GetItemText(_listBox.SelectedItem) : + ""; + } + // SelectedValue - OnSelectedIndexChanged(e); + if (_listBox.SelectedIndex >= 0) + OnSelectedIndexChanged(e); base.OnSelectedValueChanged(e); } @@ -610,34 +594,25 @@ namespace BBBNOVA Radius.BottomLeft); //brushes and pens - Brush brInnerBrush = new LinearGradientBrush( - new Rectangle(rectInner.X,rectInner.Y,rectInner.Width,rectInner.Height+1), - (hovered || IsDroppedDown || ContainsFocus)?Color4:Color2, Color.Transparent, - LinearGradientMode.Vertical); + Color foreColor = Color.FromArgb(IsDroppedDown ? 100 : 50, ForeColor); + Brush brInnerBrush = new LinearGradientBrush( + new Rectangle(rectInner.X, rectInner.Y, rectInner.Width, rectInner.Height + 1), + Color.FromArgb((hovered || IsDroppedDown || Focused) ? 200 : 100, ForeColor), Color.Transparent, + LinearGradientMode.Vertical); Brush brBackground; - if (this.DropDownStyle == ComboBoxStyle.DropDownList) - { - brBackground = new LinearGradientBrush(pathInnerBorder.GetBounds(), - Color.FromArgb(IsDroppedDown ? 100 : 255, Color.White), - Color.FromArgb(IsDroppedDown?255:100, BackColor), - LinearGradientMode.Vertical); - } - else - { - brBackground = new SolidBrush(BackColor); - } - Pen penOuterBorder = new Pen(Color1, 0); + if (this.DropDownStyle == ComboBoxStyle.DropDownList) + brBackground = new LinearGradientBrush(pathInnerBorder.GetBounds(), BackColor, foreColor, LinearGradientMode.Vertical); + else + brBackground = new SolidBrush(BackColor); + Pen penOuterBorder = new Pen(BackColor, 0); Pen penInnerBorder = new Pen(brInnerBrush, 0); - LinearGradientBrush brButtonLeft = new LinearGradientBrush(rectBtn, Color1, Color2, LinearGradientMode.Vertical); + LinearGradientBrush brButtonLeft = new LinearGradientBrush(rectBtn, BackColor, ForeColor, LinearGradientMode.Vertical); ColorBlend blend = new ColorBlend(); - blend.Colors = new Color[] { Color.Transparent, Color2, Color.Transparent }; + blend.Colors = new Color[] { Color.Transparent, foreColor, Color.Transparent }; blend.Positions = new float[] { 0.0f, 0.5f, 1.0f}; brButtonLeft.InterpolationColors = blend; Pen penLeftButton = new Pen(brButtonLeft, 0); - Brush brButton = new LinearGradientBrush(pathBtnBorder.GetBounds(), - Color.FromArgb(100, IsDroppedDown? Color2:Color.White), - Color.FromArgb(100, IsDroppedDown ? Color.White : Color2), - LinearGradientMode.Vertical); + Brush brButton = new LinearGradientBrush(pathBtnBorder.GetBounds(), BackColor, foreColor, LinearGradientMode.Vertical); //draw e.Graphics.FillPath(brBackground, pathContentBorder); @@ -691,11 +666,11 @@ namespace BBBNOVA SolidBrush foreBrush = new SolidBrush(ForeColor); if (Enabled) { - e.Graphics.DrawString(_textBox.Text, this.Font, foreBrush, rectText.Location); + e.Graphics.DrawString(_textBox.Text, this.Font, foreBrush, rectText); } else { - ControlPaint.DrawStringDisabled(e.Graphics, _textBox.Text, Font, Color1, rectText, sf); + ControlPaint.DrawStringDisabled(e.Graphics, _textBox.Text, Font, BackColor, rectText, sf); } } /* @@ -823,8 +798,9 @@ namespace BBBNOVA int i = _listBox.IndexFromPoint(e.Location); if (_hoverItem != i) { + if (_hoverItem != -1) _listBox.Invalidate(_listBox.GetItemRectangle(_hoverItem)); _hoverItem = i; - _listBox.Invalidate(); + if (_hoverItem != -1) _listBox.Invalidate(_listBox.GetItemRectangle(_hoverItem)); } } @@ -837,16 +813,16 @@ namespace BBBNOVA IsDroppedDown = false; } - void _listBox_MouseUp(object sender, MouseEventArgs e) - { - int i = _listBox.IndexFromPoint(e.Location); - //System.Diagnostics.Trace.WriteLine(string.Format("_listBox_MouseUp({0})", i)); - if (i >= 0) - { - _listBox.SelectedIndex = i; - IsDroppedDown = false; - } - } + //void _listBox_MouseUp(object sender, MouseEventArgs e) + //{ + // int i = _listBox.IndexFromPoint(e.Location); + // //System.Diagnostics.Trace.WriteLine(string.Format("_listBox_MouseUp({0})", i)); + // if (i >= 0) + // { + // _listBox.SelectedIndex = i; + // IsDroppedDown = false; + // } + //} void _listBox_MouseClick(object sender, MouseEventArgs e) { @@ -881,8 +857,8 @@ namespace BBBNOVA { if (DrawMode == DrawMode.Normal) { - Color fg = _hoverItem != -1 && _hoverItem == e.Index ? Color1 : Color4; - Color bg = _hoverItem != -1 && _hoverItem == e.Index ? Color4 : Color1; + Color fg = _hoverItem != -1 && _hoverItem == e.Index ? BackColor : ForeColor; + Color bg = _hoverItem != -1 && _hoverItem == e.Index ? ForeColor : BackColor; e.Graphics.FillRectangle(new SolidBrush(bg), e.Bounds); if (e.Index >= 0) @@ -906,7 +882,8 @@ namespace BBBNOVA StringFormat sf = new StringFormat(StringFormatFlags.NoWrap); sf.Alignment = StringAlignment.Near; textBounds.Offset(-3, 0); - e.Graphics.DrawString(_listBox.GetItemText(Items[e.Index]), e.Font, new SolidBrush(fg), textBounds); + textBounds.Height = _textBox.Height; + e.Graphics.DrawString(_listBox.GetItemText(Items[e.Index]), this.Font, new SolidBrush(fg), textBounds); } return; } @@ -938,19 +915,20 @@ namespace BBBNOVA } - void _popupControl_Closed(object sender, ToolStripDropDownClosedEventArgs e) + void _popupControl_Closing(object sender, ToolStripDropDownClosingEventArgs e) + { + if (e.CloseReason == ToolStripDropDownCloseReason.AppClicked) + { + if (this.RectangleToScreen(this.ClientRectangle).Contains(MousePosition)) + e.Cancel = true; + } + } + + void _popupControl_Closed(object sender, ToolStripDropDownClosedEventArgs e) { - _isDroppedDown = false; - if (!this.RectangleToScreen(this.ClientRectangle).Contains(MousePosition)) - { - hovered = false; - } - _hoverItem = -1; - Invalidate(true); + IsDroppedDown = false; } - - void _textBox_Resize(object sender, EventArgs e) { this.AdjustControls(); diff --git a/CUEControls/Properties/AssemblyInfo.cs b/CUEControls/Properties/AssemblyInfo.cs index 02ba2cf..154dee1 100644 --- a/CUEControls/Properties/AssemblyInfo.cs +++ b/CUEControls/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.0.6.0")] -[assembly: AssemblyFileVersion("2.0.6.0")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/CUERipper/frmCUERipper.Designer.cs b/CUERipper/frmCUERipper.Designer.cs index 8306772..3e823e0 100644 --- a/CUERipper/frmCUERipper.Designer.cs +++ b/CUERipper/frmCUERipper.Designer.cs @@ -82,6 +82,7 @@ namespace CUERipper this.imageListMetadataSource = new System.Windows.Forms.ImageList(this.components); this.bnComboBoxDrives = new BBBNOVA.BNComboBox(); this.drivesBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.bnComboBoxOutputFormat = new BBBNOVA.BNComboBox(); this.statusStrip1.SuspendLayout(); this.contextMenuStripRelease.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericWriteOffset)).BeginInit(); @@ -280,12 +281,8 @@ namespace CUERipper // // bnComboBoxLosslessOrNot // - this.bnComboBoxLosslessOrNot.BackColor = System.Drawing.SystemColors.ControlDark; + this.bnComboBoxLosslessOrNot.BackColor = System.Drawing.Color.White; this.bnComboBoxLosslessOrNot.Border = System.Windows.Forms.BorderStyle.FixedSingle; - this.bnComboBoxLosslessOrNot.Color1 = System.Drawing.SystemColors.Control; - this.bnComboBoxLosslessOrNot.Color2 = System.Drawing.SystemColors.ControlDark; - this.bnComboBoxLosslessOrNot.Color3 = System.Drawing.Color.Maroon; - this.bnComboBoxLosslessOrNot.Color4 = System.Drawing.SystemColors.ControlDarkDark; this.bnComboBoxLosslessOrNot.DataSource = this.losslessOrNotBindingSource; this.bnComboBoxLosslessOrNot.DropDownHeight = 200; this.bnComboBoxLosslessOrNot.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -314,12 +311,8 @@ namespace CUERipper // // bnComboBoxEncoder // - this.bnComboBoxEncoder.BackColor = System.Drawing.SystemColors.ControlDark; + this.bnComboBoxEncoder.BackColor = System.Drawing.Color.White; this.bnComboBoxEncoder.Border = System.Windows.Forms.BorderStyle.FixedSingle; - this.bnComboBoxEncoder.Color1 = System.Drawing.SystemColors.Control; - this.bnComboBoxEncoder.Color2 = System.Drawing.SystemColors.ControlDark; - this.bnComboBoxEncoder.Color3 = System.Drawing.Color.Maroon; - this.bnComboBoxEncoder.Color4 = System.Drawing.SystemColors.ControlDarkDark; this.bnComboBoxEncoder.DataSource = this.encodersBindingSource; this.bnComboBoxEncoder.DropDownHeight = 200; this.bnComboBoxEncoder.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -349,12 +342,8 @@ namespace CUERipper // // bnComboBoxFormat // - this.bnComboBoxFormat.BackColor = System.Drawing.SystemColors.ControlDark; + this.bnComboBoxFormat.BackColor = System.Drawing.Color.White; this.bnComboBoxFormat.Border = System.Windows.Forms.BorderStyle.FixedSingle; - this.bnComboBoxFormat.Color1 = System.Drawing.SystemColors.Control; - this.bnComboBoxFormat.Color2 = System.Drawing.SystemColors.ControlDark; - this.bnComboBoxFormat.Color3 = System.Drawing.Color.Maroon; - this.bnComboBoxFormat.Color4 = System.Drawing.SystemColors.ControlDarkDark; this.bnComboBoxFormat.DataSource = this.formatsBindingSource; this.bnComboBoxFormat.DropDownHeight = 200; this.bnComboBoxFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -385,12 +374,8 @@ namespace CUERipper // // bnComboBoxImage // - this.bnComboBoxImage.BackColor = System.Drawing.SystemColors.ControlDark; + this.bnComboBoxImage.BackColor = System.Drawing.Color.White; this.bnComboBoxImage.Border = System.Windows.Forms.BorderStyle.FixedSingle; - this.bnComboBoxImage.Color1 = System.Drawing.SystemColors.Control; - this.bnComboBoxImage.Color2 = System.Drawing.SystemColors.ControlDark; - this.bnComboBoxImage.Color3 = System.Drawing.Color.Maroon; - this.bnComboBoxImage.Color4 = System.Drawing.SystemColors.ControlDarkDark; this.bnComboBoxImage.DataSource = this.cUEStylesBindingSource; this.bnComboBoxImage.DropDownHeight = 200; this.bnComboBoxImage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -534,12 +519,8 @@ namespace CUERipper // // bnComboBoxRelease // - this.bnComboBoxRelease.BackColor = System.Drawing.SystemColors.ControlDarkDark; + this.bnComboBoxRelease.BackColor = System.Drawing.SystemColors.ControlLightLight; this.bnComboBoxRelease.Border = System.Windows.Forms.BorderStyle.FixedSingle; - this.bnComboBoxRelease.Color1 = System.Drawing.SystemColors.Control; - this.bnComboBoxRelease.Color2 = System.Drawing.SystemColors.ControlDark; - this.bnComboBoxRelease.Color3 = System.Drawing.Color.Maroon; - this.bnComboBoxRelease.Color4 = System.Drawing.SystemColors.ControlDarkDark; this.bnComboBoxRelease.ContextMenuStrip = this.contextMenuStripRelease; this.bnComboBoxRelease.DataSource = this.releasesBindingSource; this.bnComboBoxRelease.DropDownHeight = 200; @@ -574,12 +555,8 @@ namespace CUERipper // // bnComboBoxDrives // - this.bnComboBoxDrives.BackColor = System.Drawing.SystemColors.ControlDarkDark; + this.bnComboBoxDrives.BackColor = System.Drawing.SystemColors.ControlLightLight; this.bnComboBoxDrives.Border = System.Windows.Forms.BorderStyle.FixedSingle; - this.bnComboBoxDrives.Color1 = System.Drawing.SystemColors.Control; - this.bnComboBoxDrives.Color2 = System.Drawing.SystemColors.ControlDark; - this.bnComboBoxDrives.Color3 = System.Drawing.Color.Maroon; - this.bnComboBoxDrives.Color4 = System.Drawing.SystemColors.ControlDarkDark; this.bnComboBoxDrives.DataSource = this.drivesBindingSource; this.bnComboBoxDrives.DropDownHeight = 200; this.bnComboBoxDrives.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -603,13 +580,36 @@ namespace CUERipper this.drivesBindingSource.DataMember = "Drives"; this.drivesBindingSource.DataSource = this.bindingSourceCR; // + // bnComboBoxOutputFormat + // + this.bnComboBoxOutputFormat.BackColor = System.Drawing.SystemColors.ControlLightLight; + this.bnComboBoxOutputFormat.Border = System.Windows.Forms.BorderStyle.FixedSingle; + this.bnComboBoxOutputFormat.DropDownHeight = 200; + this.bnComboBoxOutputFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown; + this.bnComboBoxOutputFormat.DropDownWidth = 552; + this.bnComboBoxOutputFormat.ForeColor = System.Drawing.SystemColors.ControlText; + this.bnComboBoxOutputFormat.ImageList = null; + this.bnComboBoxOutputFormat.IsDroppedDown = false; + resources.ApplyResources(this.bnComboBoxOutputFormat, "bnComboBoxOutputFormat"); + this.bnComboBoxOutputFormat.MaxDropDownItems = 8; + this.bnComboBoxOutputFormat.MinimumSize = new System.Drawing.Size(40, 21); + this.bnComboBoxOutputFormat.Name = "bnComboBoxOutputFormat"; + this.bnComboBoxOutputFormat.Radius = ((BBBNOVA.BNRadius)(resources.GetObject("bnComboBoxOutputFormat.Radius"))); + this.bnComboBoxOutputFormat.SelectedIndex = -1; + this.bnComboBoxOutputFormat.SelectedItem = null; + this.bnComboBoxOutputFormat.Sorted = false; + this.bnComboBoxOutputFormat.DroppedDown += new System.EventHandler(this.bnComboBoxOutputFormat_DroppedDown); + this.bnComboBoxOutputFormat.MouseLeave += new System.EventHandler(this.bnComboBoxOutputFormat_MouseLeave); + this.bnComboBoxOutputFormat.TextChanged += new System.EventHandler(this.bnComboBoxOutputFormat_TextChanged); + // // frmCUERipper // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.txtOutputPath); this.Controls.Add(this.bnComboBoxRelease); this.Controls.Add(this.bnComboBoxDrives); - this.Controls.Add(this.txtOutputPath); + this.Controls.Add(this.bnComboBoxOutputFormat); this.Controls.Add(this.comboBoxOutputFormat); this.Controls.Add(this.progressBarErrors); this.Controls.Add(this.progressBarCD); @@ -701,6 +701,7 @@ namespace CUERipper private System.Windows.Forms.BindingSource encodersBindingSource; private BBBNOVA.BNComboBox bnComboBoxLosslessOrNot; private System.Windows.Forms.BindingSource losslessOrNotBindingSource; + private BBBNOVA.BNComboBox bnComboBoxOutputFormat; } } diff --git a/CUERipper/frmCUERipper.cs b/CUERipper/frmCUERipper.cs index ef3dbab..f384152 100644 --- a/CUERipper/frmCUERipper.cs +++ b/CUERipper/frmCUERipper.cs @@ -24,13 +24,11 @@ namespace CUERipper public partial class frmCUERipper : Form { private Thread _workThread = null; - private ICDRipper _reader = null; private StartStop _startStop; private CUEConfig _config; - private string _format; private CUESheet cueSheet; private ReleaseInfo selectedRelease; - private DriveInfo selectedDrive; + private DriveInfo selectedDriveInfo; private string _pathOut; string _defaultLosslessFormat, _defaultLossyFormat, _defaultHybridFormat; private CUEControls.ShellIconMgr m_icon_mgr; @@ -51,11 +49,6 @@ namespace CUERipper m_icon_mgr.SetExtensionIcon(".ogg", Properties.Resources.ogg); } - //private byte toBCD(int val) - //{ - // return (byte)(((val / 10) << 4) + (val % 10)); - //} - string[] OutputPathUseTemplates = { "%music%\\%artist%\\[%year% - ]%album%\\%artist% - %album%.cue", "%music%\\%artist%\\[%year% - ]%album%[ - %edition%]$ifgreater($max(%discnumber%,%totaldiscs%),1, - cd %discnumber%,)[' ('%unique%')']\\%artist% - %album%[ - %edition%].cue" @@ -118,32 +111,6 @@ namespace CUERipper private void frmCUERipper_Load(object sender, EventArgs e) { - bindingSourceCR.DataSource = this; - bnComboBoxDrives.ImageList = m_icon_mgr.ImageList; - bnComboBoxFormat.ImageList = m_icon_mgr.ImageList; - //releaseBindingSource.DataSource = new string[] { "a", "b", "ccc" }; - //byte[] _subchannelBuffer0 = { 0x01, 0x01, 0x01, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x02, 0x0A, 0x4C, 0x43 }; - //byte[] _subchannelBuffer1 = { 0x21, 0x01, 0x01, 0x00, 0x00, 0x11, 0x00, 0x00, 0x02, 0x11, 0xCF, 0x3E }; - //byte[] _subchannelBuffer2 = { 0x21, 0x01, 0x01, 0x00, 0x00, 0x12, 0x00, 0x00, 0x02, 0x12, 0x11, 0x8F }; - - //_subchannelBuffer0[3] = toBCD(_subchannelBuffer0[3]); - //_subchannelBuffer0[4] = toBCD(_subchannelBuffer0[4]); - //_subchannelBuffer0[5] = toBCD(_subchannelBuffer0[5]); - //_subchannelBuffer0[7] = toBCD(_subchannelBuffer0[7]); - //_subchannelBuffer0[8] = toBCD(_subchannelBuffer0[8]); - //_subchannelBuffer0[9] = toBCD(_subchannelBuffer0[9]); - - //Crc16Ccitt _crc = new Crc16Ccitt(InitialCrcValue.Zeros); - //ushort crc0a = (ushort)(_crc.ComputeChecksum(_subchannelBuffer0, 0, 10) ^ 0xffff); - //ushort crc0b = (ushort)(_subchannelBuffer0[11] + (_subchannelBuffer0[10] << 8)); - //ushort crc1a = (ushort)(_crc.ComputeChecksum(_subchannelBuffer1, 0, 10) ^ 0xffff); - //ushort crc1b = (ushort)(_subchannelBuffer1[11] + (_subchannelBuffer1[10] << 8)); - //ushort crc2a = (ushort)(_crc.ComputeChecksum(_subchannelBuffer2, 0, 10) ^ 0xffff); - //ushort crc2b = (ushort)(_subchannelBuffer2[11] + (_subchannelBuffer2[10] << 8)); - //if (crc0a != crc0b) // || crc1a != crc1b || crc2a != crc2b) - //{ - //} - SetupControls(); SettingsReader sr = new SettingsReader("CUERipper", "settings.txt", Application.ExecutablePath); _config.Load(sr); _defaultLosslessFormat = sr.Load("DefaultLosslessFormat") ?? "flac"; @@ -153,16 +120,25 @@ namespace CUERipper //_config.preserveHTOA = sr.LoadBoolean("PreserveHTOA") ?? false; //_config.createM3U = sr.LoadBoolean("CreateM3U") ?? true; + bindingSourceCR.DataSource = this; + bnComboBoxDrives.ImageList = m_icon_mgr.ImageList; + bnComboBoxFormat.ImageList = m_icon_mgr.ImageList; + SetupControls(); + int iFormat, nFormats = sr.LoadInt32("OutputPathUseTemplates", 0, 10) ?? 0; for (iFormat = 0; iFormat < OutputPathUseTemplates.Length; iFormat++) comboBoxOutputFormat.Items.Add(OutputPathUseTemplates[iFormat]); for (iFormat = nFormats - 1; iFormat >= 0; iFormat--) comboBoxOutputFormat.Items.Add(sr.Load(string.Format("OutputPathUseTemplate{0}", iFormat)) ?? ""); + for (iFormat = 0; iFormat < OutputPathUseTemplates.Length; iFormat++) + bnComboBoxOutputFormat.Items.Add(OutputPathUseTemplates[iFormat]); + for (iFormat = nFormats - 1; iFormat >= 0; iFormat--) + bnComboBoxOutputFormat.Items.Add(sr.Load(string.Format("OutputPathUseTemplate{0}", iFormat)) ?? ""); comboBoxOutputFormat.Text = sr.Load("PathFormat") ?? "%music%\\%artist%\\[%year% - ]%album%\\%artist% - %album%.cue"; + bnComboBoxOutputFormat.Text = sr.Load("PathFormat") ?? "%music%\\%artist%\\[%year% - ]%album%\\%artist% - %album%.cue"; checkBoxEACMode.Checked = _config.createEACLOG; SelectedOutputAudioType = (AudioEncoderType?)sr.LoadInt32("OutputAudioType", null, null) ?? AudioEncoderType.Lossless; - bnComboBoxFormat.SelectedIndex = sr.LoadInt32("ComboCodec", 0, bnComboBoxFormat.Items.Count - 1) ?? 0; bnComboBoxImage.SelectedIndex = sr.LoadInt32("ComboImage", 0, bnComboBoxImage.Items.Count - 1) ?? 0; trackBarSecureMode.Value = sr.LoadInt32("SecureMode", 0, trackBarSecureMode.Maximum - 1) ?? 1; trackBarSecureMode_Scroll(this, new EventArgs()); @@ -211,7 +187,7 @@ namespace CUERipper listTracks.Items.Clear(); releases.Clear(); selectedRelease = null; - selectedDrive = null; + selectedDriveInfo = null; bnComboBoxRelease.Text = ""; foreach (char drive in CDDrivesList.DrivesAvailable()) { @@ -232,14 +208,14 @@ namespace CUERipper } catch { - drives.Add(new DriveInfo(drive + ": " + ex.Message)); + drives.Add(new DriveInfo(m_icon_mgr, drive + ":\\", ex.Message)); continue; } } if (!AccurateRipVerify.FindDriveReadOffset(arName, out driveOffset)) ; //throw new Exception("Failed to find drive read offset for drive" + _ripper.ARName); reader.DriveOffset = driveOffset; - drives.Add(new DriveInfo(reader, drive + ":\\", m_icon_mgr)); + drives.Add(new DriveInfo(m_icon_mgr, drive + ":\\", reader)); } if (drives.Count == 0) { @@ -256,13 +232,14 @@ namespace CUERipper { bool running = _workThread != null; - comboBoxOutputFormat.Visible = outputFormatVisible; + bnComboBoxOutputFormat.Visible = comboBoxOutputFormat.Visible = outputFormatVisible; txtOutputPath.Visible = !outputFormatVisible; txtOutputPath.Enabled = !running && !outputFormatVisible; + bnComboBoxRelease.Enabled = !running && releases.Count > 0; + bnComboBoxOutputFormat.Enabled = comboBoxOutputFormat.Enabled = listTracks.Enabled = bnComboBoxDrives.Enabled = - bnComboBoxRelease.Enabled = groupBoxSettings.Enabled = !running; buttonPause.Visible = buttonPause.Enabled = buttonAbort.Visible = buttonAbort.Enabled = running; buttonGo.Visible = buttonGo.Enabled = !running; @@ -348,7 +325,7 @@ namespace CUERipper submit &= audioSource.CorrectionQuality > 0; foreach (DBEntry entry in cueSheet.CTDB.Entries) - if (entry.toc.TrackOffsets == _reader.TOC.TrackOffsets && !entry.hasErrors) + if (entry.toc.TrackOffsets == selectedDriveInfo.drive.TOC.TrackOffsets && !entry.hasErrors) confirm = entry; for (int iSector = 0; iSector < (int)cueSheet.TOC.AudioLength; iSector++) @@ -397,7 +374,7 @@ namespace CUERipper private void buttonGo_Click(object sender, EventArgs e) { - if (_reader == null) + if (selectedDriveInfo == null) return; if (!comboBoxOutputFormat.Items.Contains(comboBoxOutputFormat.Text) && comboBoxOutputFormat.Text.Contains("%")) @@ -407,26 +384,32 @@ namespace CUERipper comboBoxOutputFormat.Items.RemoveAt(OutputPathUseTemplates.Length + 10); } + if (!bnComboBoxOutputFormat.Items.Contains(bnComboBoxOutputFormat.Text) && bnComboBoxOutputFormat.Text.Contains("%")) + { + bnComboBoxOutputFormat.Items.Insert(OutputPathUseTemplates.Length, bnComboBoxOutputFormat.Text); + if (bnComboBoxOutputFormat.Items.Count > OutputPathUseTemplates.Length + 10) + bnComboBoxOutputFormat.Items.RemoveAt(OutputPathUseTemplates.Length + 10); + } + cueSheet.CopyMetadata(selectedRelease.metadata); - _format = bnComboBoxFormat.SelectedItem.ToString(); cueSheet.OutputStyle = bnComboBoxImage.SelectedIndex == 0 ? CUEStyle.SingleFileWithCUE : CUEStyle.GapsAppended; - _pathOut = cueSheet.GenerateUniqueOutputPath(comboBoxOutputFormat.Text, - cueSheet.OutputStyle == CUEStyle.SingleFileWithCUE ? "." + _format : ".cue", + _pathOut = cueSheet.GenerateUniqueOutputPath(bnComboBoxOutputFormat.Text, + cueSheet.OutputStyle == CUEStyle.SingleFileWithCUE ? "." + selectedFormat.ToString() : ".cue", CUEAction.Encode, null); if (_pathOut == "") { MessageBox.Show(this, "Output path generation failed", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } - cueSheet.GenerateFilenames(SelectedOutputAudioType, _format, _pathOut); - _reader.CorrectionQuality = trackBarSecureMode.Value; + cueSheet.GenerateFilenames(SelectedOutputAudioType, selectedFormat.ToString(), _pathOut); + selectedDriveInfo.drive.CorrectionQuality = trackBarSecureMode.Value; _workThread = new Thread(Rip); _workThread.Priority = ThreadPriority.BelowNormal; _workThread.IsBackground = true; SetupControls(); - _workThread.Start(_reader); + _workThread.Start(selectedDriveInfo.drive); } private void buttonAbort_Click(object sender, EventArgs e) @@ -439,14 +422,6 @@ namespace CUERipper _startStop.Pause(); } - private void comboRelease_Format(object sender, ListControlConvertEventArgs e) - { - if (e.ListItem is string) - return; - ReleaseInfo r = (ReleaseInfo)(e.ListItem); - e.Value = string.Format("{0}{1} - {2}", r.metadata.Year != "" ? r.metadata.Year + ": " : "", r.metadata.Artist, r.metadata.Title); - } - private void UpdateRelease() { listTracks.Items.Clear(); @@ -455,13 +430,13 @@ namespace CUERipper if (selectedRelease == null) return; - for (int i = 1; i <= _reader.TOC.TrackCount; i++) + for (int i = 1; i <= selectedDriveInfo.drive.TOC.TrackCount; i++) { listTracks.Items.Add(new ListViewItem(new string[] { - _reader.TOC[i].IsAudio ? selectedRelease.metadata.Tracks[i - _reader.TOC.FirstAudio].Title : "Data track", - _reader.TOC[i].Number.ToString(), - _reader.TOC[i].StartMSF, - _reader.TOC[i].LengthMSF })); + selectedDriveInfo.drive.TOC[i].IsAudio ? selectedRelease.metadata.Tracks[i - selectedDriveInfo.drive.TOC.FirstAudio].Title : "Data track", + selectedDriveInfo.drive.TOC[i].Number.ToString(), + selectedDriveInfo.drive.TOC[i].StartMSF, + selectedDriveInfo.drive.TOC[i].LengthMSF })); } } @@ -534,7 +509,7 @@ namespace CUERipper cueSheet.Action = CUEAction.Encode; this.BeginInvoke((MethodInvoker)delegate() { toolStripStatusLabel1.Text = "Contacting CTDB database..."; }); - cueSheet.UseCUEToolsDB(true, "CUERipper 2.0.6: " + _reader.ARName); + cueSheet.UseCUEToolsDB(true, "CUERipper 2.0.7: " + selectedDriveInfo.drive.ARName); cueSheet.CTDB.UploadHelper.onProgress += new EventHandler(UploadProgress); this.BeginInvoke((MethodInvoker)delegate() { toolStripStatusLabel1.Text = "Contacting AccurateRip database..."; }); cueSheet.UseAccurateRip(); @@ -639,8 +614,8 @@ namespace CUERipper private void UpdateDrive() { - selectedDrive = bnComboBoxDrives.SelectedItem as DriveInfo; - if (selectedDrive == null) + selectedDriveInfo = bnComboBoxDrives.SelectedItem as DriveInfo; + if (selectedDriveInfo == null) return; toolStripStatusAr.Visible = false; @@ -650,10 +625,11 @@ namespace CUERipper listTracks.Items.Clear(); releases.Clear(); selectedRelease = null; + bnComboBoxRelease.Enabled = false; bnComboBoxRelease.Text = ""; - if (selectedDrive == null || selectedDrive.drive == null) + if (selectedDriveInfo == null || selectedDriveInfo.drive == null) { - _reader = null; + selectedDriveInfo = null; return; } if (cueSheet != null) @@ -661,21 +637,20 @@ namespace CUERipper cueSheet.Close(); cueSheet = null; } - _reader = selectedDrive.drive; try { - _reader.Close(); - _reader.Open(_reader.Path[0]); - numericWriteOffset.Value = _reader.DriveOffset; + selectedDriveInfo.drive.Close(); + selectedDriveInfo.drive.Open(selectedDriveInfo.drive.Path[0]); + numericWriteOffset.Value = selectedDriveInfo.drive.DriveOffset; } catch (Exception ex) { - numericWriteOffset.Value = _reader.DriveOffset; - //_reader.Close(); + numericWriteOffset.Value = selectedDriveInfo.drive.DriveOffset; + //selectedDriveInfo.drive.Close(); bnComboBoxRelease.Text = ex.Message; return; } - if (_reader.TOC.AudioTracks == 0) + if (selectedDriveInfo.drive.TOC.AudioTracks == 0) { bnComboBoxRelease.Text = "No audio tracks"; return; @@ -685,7 +660,7 @@ namespace CUERipper _workThread.Priority = ThreadPriority.BelowNormal; _workThread.IsBackground = true; SetupControls(); - _workThread.Start(_reader); + _workThread.Start(selectedDriveInfo.drive); } private void listTracks_DoubleClick(object sender, EventArgs e) @@ -718,7 +693,7 @@ namespace CUERipper private void listTracks_AfterLabelEdit(object sender, LabelEditEventArgs e) { if (selectedRelease == null) return; - if (e.Label != null && _reader.TOC[e.Item + 1].IsAudio) + if (e.Label != null && selectedDriveInfo.drive.TOC[e.Item + 1].IsAudio) selectedRelease.metadata.Tracks[e.Item].Title = e.Label; else e.CancelEdit = true; @@ -745,7 +720,6 @@ namespace CUERipper //sw.Save("PreserveHTOA", _config.preserveHTOA); //sw.Save("CreateM3U", _config.createM3U); sw.Save("OutputAudioType", (int)SelectedOutputAudioType); - sw.Save("ComboCodec", bnComboBoxFormat.SelectedIndex); sw.Save("ComboImage", bnComboBoxImage.SelectedIndex); sw.Save("PathFormat", comboBoxOutputFormat.Text); sw.Save("SecureMode", trackBarSecureMode.Value); @@ -758,7 +732,7 @@ namespace CUERipper private void listTracks_BeforeLabelEdit(object sender, LabelEditEventArgs e) { - if (!_reader.TOC[e.Item + 1].IsAudio) + if (!selectedDriveInfo.drive.TOC[e.Item + 1].IsAudio) e.CancelEdit = true; } @@ -868,9 +842,9 @@ namespace CUERipper private void toolStripStatusLabelMusicBrainz_Click(object sender, EventArgs e) { - if (_reader == null) + if (selectedDriveInfo == null) return; - System.Diagnostics.Process.Start("http://musicbrainz.org/bare/cdlookup.html?toc=" + _reader.TOC.MusicBrainzTOC); + System.Diagnostics.Process.Start("http://musicbrainz.org/bare/cdlookup.html?toc=" + selectedDriveInfo.drive.TOC.MusicBrainzTOC); } private void frmCUERipper_KeyDown(object sender, KeyEventArgs e) @@ -888,7 +862,7 @@ namespace CUERipper { if (selectedFormat == null) return; CUEStyle style = bnComboBoxImage.SelectedIndex == 0 ? CUEStyle.SingleFileWithCUE : CUEStyle.GapsAppended; - txtOutputPath.Text = selectedRelease == null ? "" : selectedRelease.metadata.GenerateUniqueOutputPath(comboBoxOutputFormat.Text, + txtOutputPath.Text = selectedRelease == null ? "" : selectedRelease.metadata.GenerateUniqueOutputPath(bnComboBoxOutputFormat.Text, style == CUEStyle.SingleFileWithCUE ? "." + selectedFormat.ToString() : ".cue", CUEAction.Encode, null); } @@ -897,7 +871,7 @@ namespace CUERipper if (!outputFormatVisible) return; outputFormatVisible = false; - comboBoxOutputFormat.Visible = false; + bnComboBoxOutputFormat.Visible = false; txtOutputPath.Enabled = true; txtOutputPath.Visible = true; } @@ -907,9 +881,10 @@ namespace CUERipper if (outputFormatVisible) return; outputFormatVisible = true; - comboBoxOutputFormat.Visible = true; - comboBoxOutputFormat.Focus(); - comboBoxOutputFormat.Select(0, 0); + //comboBoxOutputFormat.Visible = true; + bnComboBoxOutputFormat.Visible = true; + bnComboBoxOutputFormat.Focus(); + //bnComboBoxOutputFormat.Select(); txtOutputPath.Enabled = false; txtOutputPath.Visible = false; } @@ -953,11 +928,9 @@ namespace CUERipper foreach (CUEToolsUDC encoder in _config.encoders) if (encoder.extension == SelectedOutputAudioFmt.extension) { - if (SelectedOutputAudioFormat.StartsWith("lossy.") && !encoder.lossless) + if (SelectedOutputAudioType == AudioEncoderType.Lossless && !encoder.lossless) continue; - else if (SelectedOutputAudioType == AudioEncoderType.Lossless && !encoder.lossless) - continue; - else if (SelectedOutputAudioType == AudioEncoderType.Lossy && encoder.lossless) + if (SelectedOutputAudioType == AudioEncoderType.Lossy && (encoder.lossless && !selectedFormat.lossyWAV)) continue; encoders.Add(encoder); } @@ -1014,6 +987,31 @@ namespace CUERipper formats.ResetBindings(); SelectedOutputAudioFormat = select; } + + private void bnComboBoxOutputFormat_TextChanged(object sender, EventArgs e) + { + comboBoxOutputFormat_TextUpdate(sender, e); + } + + private void bnComboBoxOutputFormat_MouseLeave(object sender, EventArgs e) + { + if (!outputFormatVisible) + return; + outputFormatVisible = false; + bnComboBoxOutputFormat.Visible = false; + txtOutputPath.Enabled = true; + txtOutputPath.Visible = true; + } + + private void bnComboBoxOutputFormat_DroppedDown(object sender, EventArgs e) + { + if (!outputFormatVisible || bnComboBoxOutputFormat.IsDroppedDown) + return; + outputFormatVisible = false; + bnComboBoxOutputFormat.Visible = false; + txtOutputPath.Enabled = true; + txtOutputPath.Visible = true; + } } public class StartStop @@ -1123,21 +1121,23 @@ namespace CUERipper } } - public DriveInfo(ICDRipper drive, string path, CUEControls.IIconManager iconMgr) + public DriveInfo(CUEControls.IIconManager iconMgr, string path, ICDRipper drive) { - this.drive = drive; this.iconMgr = iconMgr; this.di = new DirectoryInfo(path); + this.drive = drive; } - public DriveInfo(string error) + public DriveInfo(CUEControls.IIconManager iconMgr, string path, string error) { + this.iconMgr = iconMgr; + this.di = new DirectoryInfo(path); this.error = error; } public override string ToString() { - return drive != null ? drive.Path : error; + return drive != null ? drive.Path : this.di.FullName + ": " + error; } } } diff --git a/CUERipper/frmCUERipper.resx b/CUERipper/frmCUERipper.resx index 45d1860..902ec4e 100644 --- a/CUERipper/frmCUERipper.resx +++ b/CUERipper/frmCUERipper.resx @@ -197,7 +197,7 @@ $this - 10 + 11 @@ -258,7 +258,7 @@ $this - 8 + 9 Top, Left, Right @@ -288,7 +288,7 @@ $this - 9 + 10 Top, Left, Right @@ -321,7 +321,7 @@ $this - 11 + 12 Top, Left, Right @@ -354,7 +354,7 @@ $this - 12 + 13 17, 17 @@ -485,7 +485,7 @@ bnComboBoxLosslessOrNot - BBBNOVA.BNComboBox, CUEControls, Version=2.0.6.0, Culture=neutral, PublicKeyToken=null + BBBNOVA.BNComboBox, CUEControls, Version=2.0.7.0, Culture=neutral, PublicKeyToken=null groupBoxSettings @@ -517,7 +517,7 @@ bnComboBoxEncoder - BBBNOVA.BNComboBox, CUEControls, Version=2.0.6.0, Culture=neutral, PublicKeyToken=null + BBBNOVA.BNComboBox, CUEControls, Version=2.0.7.0, Culture=neutral, PublicKeyToken=null groupBoxSettings @@ -576,7 +576,7 @@ bnComboBoxFormat - BBBNOVA.BNComboBox, CUEControls, Version=2.0.6.0, Culture=neutral, PublicKeyToken=null + BBBNOVA.BNComboBox, CUEControls, Version=2.0.7.0, Culture=neutral, PublicKeyToken=null groupBoxSettings @@ -647,7 +647,7 @@ bnComboBoxImage - BBBNOVA.BNComboBox, CUEControls, Version=2.0.6.0, Culture=neutral, PublicKeyToken=null + BBBNOVA.BNComboBox, CUEControls, Version=2.0.7.0, Culture=neutral, PublicKeyToken=null groupBoxSettings @@ -800,7 +800,7 @@ $this - 7 + 8 181, 22 @@ -839,7 +839,7 @@ $this - 5 + 6 382, 392 @@ -866,10 +866,10 @@ $this - 6 + 7 - 6, 60 + 6, 170 10 @@ -893,10 +893,10 @@ $this - 4 + 5 - 6, 61 + 7, 61 552, 20 @@ -917,7 +917,7 @@ $this - 3 + 1 824, 56 @@ -995,13 +995,13 @@ bnComboBoxRelease - BBBNOVA.BNComboBox, CUEControls, Version=2.0.6.0, Culture=neutral, PublicKeyToken=null + BBBNOVA.BNComboBox, CUEControls, Version=2.0.7.0, Culture=neutral, PublicKeyToken=null $this - 1 + 2 116, 456 @@ -1027,13 +1027,42 @@ bnComboBoxDrives - BBBNOVA.BNComboBox, CUEControls, Version=2.0.6.0, Culture=neutral, PublicKeyToken=null + BBBNOVA.BNComboBox, CUEControls, Version=2.0.7.0, Culture=neutral, PublicKeyToken=null $this - 2 + 3 + + + 6, 60 + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAEJDVUVDb250cm9scywgVmVyc2lvbj0yLjAuNi4wLCBDdWx0dXJl + PW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwFAQAAABBCQkJOT1ZBLkJOUmFkaXVzBAAAAAhfdG9w + TGVmdAlfdG9wUmlnaHQLX2JvdHRvbUxlZnQMX2JvdHRvbVJpZ2h0AAAAAAgICAgCAAAAAgAAAAYAAAAC + AAAAAgAAAAs= + + + + 552, 21 + + + 37 + + + bnComboBoxOutputFormat + + + BBBNOVA.BNComboBox, CUEControls, Version=2.0.7.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 4 True @@ -1448,7 +1477,7 @@ CenterScreen - CUERipper 2.0.6 + CUERipper 2.0.7 toolStripStatusLabel1 diff --git a/CUETools.ARCUE/Properties/AssemblyInfo.cs b/CUETools.ARCUE/Properties/AssemblyInfo.cs index 7685f60..8d4ae5d 100644 --- a/CUETools.ARCUE/Properties/AssemblyInfo.cs +++ b/CUETools.ARCUE/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.0.6.0")] -[assembly: AssemblyFileVersion("2.0.6.0")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/CUETools.AccurateRip/Properties/AssemblyInfo.cs b/CUETools.AccurateRip/Properties/AssemblyInfo.cs index 9ba5ffe..42a56d4 100644 --- a/CUETools.AccurateRip/Properties/AssemblyInfo.cs +++ b/CUETools.AccurateRip/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.0.6.0")] -[assembly: AssemblyFileVersion("2.0.6.0")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/CUETools.CDImage/Properties/AssemblyInfo.cs b/CUETools.CDImage/Properties/AssemblyInfo.cs index b6d33e0..5cf5508 100644 --- a/CUETools.CDImage/Properties/AssemblyInfo.cs +++ b/CUETools.CDImage/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.0.6.0")] -[assembly: AssemblyFileVersion("2.0.6.0")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/CUETools.Codecs.ALAC/Properties/AssemblyInfo.cs b/CUETools.Codecs.ALAC/Properties/AssemblyInfo.cs index 8bddce4..9a84e92 100644 --- a/CUETools.Codecs.ALAC/Properties/AssemblyInfo.cs +++ b/CUETools.Codecs.ALAC/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.0.6.0")] -[assembly: AssemblyFileVersion("2.0.6.0")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/CUETools.Codecs.FLAKE/Properties/AssemblyInfo.cs b/CUETools.Codecs.FLAKE/Properties/AssemblyInfo.cs index 2fb0069..984231f 100644 --- a/CUETools.Codecs.FLAKE/Properties/AssemblyInfo.cs +++ b/CUETools.Codecs.FLAKE/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.0.6.0")] -[assembly: AssemblyFileVersion("2.0.6.0")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/CUETools.Codecs.FlaCuda/Properties/AssemblyInfo.cs b/CUETools.Codecs.FlaCuda/Properties/AssemblyInfo.cs index 98f5901..67ff3eb 100644 --- a/CUETools.Codecs.FlaCuda/Properties/AssemblyInfo.cs +++ b/CUETools.Codecs.FlaCuda/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.0.6.0")] -[assembly: AssemblyFileVersion("2.0.6.0")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/CUETools.Codecs/Properties/AssemblyInfo.cs b/CUETools.Codecs/Properties/AssemblyInfo.cs index 5f5f062..9492641 100644 --- a/CUETools.Codecs/Properties/AssemblyInfo.cs +++ b/CUETools.Codecs/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.0.6.0")] -[assembly: AssemblyFileVersion("2.0.6.0")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/CUETools.Compression.Rar/Properties/AssemblyInfo.cs b/CUETools.Compression.Rar/Properties/AssemblyInfo.cs index f25653e..3b565be 100644 --- a/CUETools.Compression.Rar/Properties/AssemblyInfo.cs +++ b/CUETools.Compression.Rar/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.0.6.0")] -[assembly: AssemblyFileVersion("2.0.6.0")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/CUETools.Compression.Zip/Properties/AssemblyInfo.cs b/CUETools.Compression.Zip/Properties/AssemblyInfo.cs index d608293..4588f26 100644 --- a/CUETools.Compression.Zip/Properties/AssemblyInfo.cs +++ b/CUETools.Compression.Zip/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.0.6.0")] -[assembly: AssemblyFileVersion("2.0.6.0")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/CUETools.Compression/Properties/AssemblyInfo.cs b/CUETools.Compression/Properties/AssemblyInfo.cs index 0daf3b3..c1fdf52 100644 --- a/CUETools.Compression/Properties/AssemblyInfo.cs +++ b/CUETools.Compression/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.0.6.0")] -[assembly: AssemblyFileVersion("2.0.6.0")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/CUETools.FlaCudaExe/Properties/AssemblyInfo.cs b/CUETools.FlaCudaExe/Properties/AssemblyInfo.cs index 153ecaa..6fd195d 100644 --- a/CUETools.FlaCudaExe/Properties/AssemblyInfo.cs +++ b/CUETools.FlaCudaExe/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.0.6.0")] -[assembly: AssemblyFileVersion("2.0.6.0")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/CUETools.Processor/Processor.cs b/CUETools.Processor/Processor.cs index 50fd7da..8fe99a7 100644 --- a/CUETools.Processor/Processor.cs +++ b/CUETools.Processor/Processor.cs @@ -1788,7 +1788,7 @@ string status = processor.Go(); m_freedb.UserName = "gchudov"; m_freedb.Hostname = "gmail.com"; m_freedb.ClientName = "CUETools"; - m_freedb.Version = "2.0.6"; + m_freedb.Version = "2.0.7"; m_freedb.SetDefaultSiteAddress("freedb.org"); QueryResult queryResult; @@ -5327,7 +5327,7 @@ string status = processor.Go(); } case "repair": { - UseCUEToolsDB(false, "CUETools 2.0.6"); + UseCUEToolsDB(false, "CUETools 2.0.7"); Action = CUEAction.Verify; if (CTDB.DBStatus != null) return CTDB.DBStatus; diff --git a/CUETools.Processor/Properties/AssemblyInfo.cs b/CUETools.Processor/Properties/AssemblyInfo.cs index 5d43b7b..8da37c6 100644 --- a/CUETools.Processor/Properties/AssemblyInfo.cs +++ b/CUETools.Processor/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.0.6.0")] -[assembly: AssemblyFileVersion("2.0.6.0")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/CUETools.Ripper.Console/Program.cs b/CUETools.Ripper.Console/Program.cs index 6a49de7..58929c9 100644 --- a/CUETools.Ripper.Console/Program.cs +++ b/CUETools.Ripper.Console/Program.cs @@ -89,7 +89,7 @@ namespace CUETools.ConsoleRipper static void Main(string[] args) { Console.SetOut(Console.Error); - Console.WriteLine("CUERipper v2.0.6 Copyright (C) 2008-10 Gregory S. Chudov"); + Console.WriteLine("CUERipper v2.0.7 Copyright (C) 2008-10 Gregory S. Chudov"); Console.WriteLine("This is free software under the GNU GPLv3+ license; There is NO WARRANTY, to"); Console.WriteLine("the extent permitted by law. for details."); diff --git a/CUETools.Ripper.SCSI/CUETools.Ripper.SCSI.csproj b/CUETools.Ripper.SCSI/CUETools.Ripper.SCSI.csproj index 888ddfe..e88b313 100644 --- a/CUETools.Ripper.SCSI/CUETools.Ripper.SCSI.csproj +++ b/CUETools.Ripper.SCSI/CUETools.Ripper.SCSI.csproj @@ -40,6 +40,11 @@ + + True + True + Resource1.resx + @@ -68,6 +73,13 @@ False + + + ResXFileCodeGenerator + Resource1.Designer.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + failed to autodetect read command + + + Error querying drive + + + not an MMC device + + + Open failed + + + no audio + + + Error reading CD + + + Cannot open CD + + \ No newline at end of file diff --git a/CUETools.Ripper.SCSI/Resource1.ru-RU.resx b/CUETools.Ripper.SCSI/Resource1.ru-RU.resx new file mode 100644 index 0000000..5d7bae2 --- /dev/null +++ b/CUETools.Ripper.SCSI/Resource1.ru-RU.resx @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + не удалось определить команду чтения + + + Ошибка при опросе устройства + + + устройство не поддерживает стандарт MMC + + + Ошибка при открытии устройства + + + отсутствует аудио + + + Ошибка при чтении диска + + + Ошибка при обращении к диску + + \ No newline at end of file diff --git a/CUETools.Ripper.SCSI/SCSIDrive.cs b/CUETools.Ripper.SCSI/SCSIDrive.cs index a429aaf..9065ccb 100644 --- a/CUETools.Ripper.SCSI/SCSIDrive.cs +++ b/CUETools.Ripper.SCSI/SCSIDrive.cs @@ -49,7 +49,6 @@ namespace CUETools.Ripper.SCSI const int NSECTORS = 16; //const int MSECTORS = 5*1024*1024 / (4 * 588); const int MSECTORS = 2400; - int _currentTrack = -1, _currentIndex = -1, _currentTrackActualStart = -1; Logger m_logger; CDImageLayout _toc; CDImageLayout _toc2; @@ -201,14 +200,14 @@ namespace CUETools.Ripper.SCSI m_device = new Device(m_logger); if (!m_device.Open(m_device_letter)) - throw new Exception("Open failed: " + WinDev.Win32ErrorToString(m_device.LastError)); + throw new Exception(Resource1.DeviceOpenError + ": " + WinDev.Win32ErrorToString(m_device.LastError)); // Get device info st = m_device.Inquiry(out m_inqury_result); if (st != Device.CommandStatus.Success || !m_inqury_result.Valid) - throw new SCSIException("Inquiry", m_device, st); + throw new SCSIException(Resource1.DeviceInquiryError, m_device, st); if (m_inqury_result.PeripheralQualifier != 0 || m_inqury_result.PeripheralDeviceType != Device.MMCDeviceType) - throw new Exception(Path + " is not an MMC device"); + throw new Exception(Path + ": " + Resource1.DeviceNotMMC); m_max_sectors = Math.Min(NSECTORS, m_device.MaximumTransferLength / CB_AUDIO - 1); //// Open/Initialize the driver @@ -252,7 +251,7 @@ namespace CUETools.Ripper.SCSI IList toc; st = m_device.ReadToc((byte)0, false, out toc); if (st != Device.CommandStatus.Success) - throw new SCSIException("ReadTOC", m_device, st); + throw new SCSIException(Resource1.ReadTOCError, m_device, st); //throw new Exception("ReadTOC: " + (st == Device.CommandStatus.DeviceFailed ? Device.LookupSenseError(m_device.GetSenseAsc(), m_device.GetSenseAscq()) : st.ToString())); //byte[] qdata = null; @@ -566,7 +565,7 @@ namespace CUETools.Ripper.SCSI public unsafe bool DetectGaps() { if (!TestReadCommand()) - throw new Exception("failed to autodetect read command:\n" + _autodetectResult); + throw new Exception(Resource1.AutodetectReadCommandFailed+ ":\n" + _autodetectResult); if (_gapDetection == GapDetectionMethod.None) { @@ -715,8 +714,6 @@ namespace CUETools.Ripper.SCSI bool found = false; _autodetectResult = ""; _currentStart = 0; - _currentTrack = -1; - _currentIndex = -1; m_max_sectors = Math.Min(NSECTORS, m_device.MaximumTransferLength / CB_AUDIO - 1); int sector = 3; int pass = 0; @@ -810,16 +807,22 @@ namespace CUETools.Ripper.SCSI int offs = 0; if (c2Size == 296) { - // TODO: sometimes sector C2 byte is placed after C2 info, not before!! + // TODO: sometimes (e.g on PIONEER 215D) sector C2 byte is placed after C2 info, + // not before, like it says in mmc6r02g.pdf !! int c2 = 0; for (int pos = 2; pos < 294; pos++) c2 |= sectorPtr[4 * 588 + pos]; if (sectorPtr[4 * 588 + 294] == (c2 | sectorPtr[4 * 588 + 0] | sectorPtr[4 * 588 + 1])) offs = 0; - else if (sectorPtr[4 * 588] == (c2 | sectorPtr[4 * 588 + 294] | sectorPtr[4 * 588 + 295])) + else offs = 2; - else - throw new Exception("invalid C2 pointers"); + // TSSTcorp CDDVDW SH-S203B SB03 + // TSSTcorpCD/DVDW SH-W162C TS12 + // Both produced Exception("invalid C2 pointers"); + //else if (sectorPtr[4 * 588] == (c2 | sectorPtr[4 * 588 + 294] | sectorPtr[4 * 588 + 295])) + // offs = 2; + //else + // throw new Exception("invalid C2 pointers"); } for (int pos = 0; pos < 294; pos++) { @@ -881,7 +884,7 @@ namespace CUETools.Ripper.SCSI if (!abort) return st; - SCSIException ex = new SCSIException("ReadCD", m_device, st); + SCSIException ex = new SCSIException(Resource1.ReadCDError, m_device, st); if (sector != 0 && Sectors2Read > 1 && st == Device.CommandStatus.DeviceFailed && m_device.GetSenseAsc() == 0x64 && m_device.GetSenseAscq() == 0x00) { if (_debugMessages) @@ -1139,7 +1142,7 @@ namespace CUETools.Ripper.SCSI return; if (!TestReadCommand()) - throw new Exception("failed to autodetect read command:\n" + _autodetectResult); + throw new Exception(Resource1.AutodetectReadCommandFailed + "\n" + _autodetectResult); _currentStart = iSector; _currentEnd = _currentStart + MSECTORS; @@ -1312,9 +1315,7 @@ namespace CUETools.Ripper.SCSI set { if (_toc.AudioLength <= 0) - throw new Exception("no audio"); - _currentTrack = -1; - _currentIndex = -1; + throw new Exception(Resource1.NoAudio); _crcErrorsCount = 0; _errorsCount = 0; _currentStart = -1; @@ -1363,7 +1364,7 @@ namespace CUETools.Ripper.SCSI { get { - return "CUERipper v2.0.6 Copyright (C) 2008-10 Gregory S. Chudov"; + return "CUERipper v2.0.7 Copyright (C) 2008-10 Gregory S. Chudov"; // ripper.GetName().Name + " " + ripper.GetName().Version; } } diff --git a/CUETools.Ripper/Properties/AssemblyInfo.cs b/CUETools.Ripper/Properties/AssemblyInfo.cs index 4099b0a..4dda1b0 100644 --- a/CUETools.Ripper/Properties/AssemblyInfo.cs +++ b/CUETools.Ripper/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.0.6.0")] -[assembly: AssemblyFileVersion("2.0.6.0")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/CUETools/Properties/AssemblyInfo.cs b/CUETools/Properties/AssemblyInfo.cs index f069d41..3bf9f91 100644 --- a/CUETools/Properties/AssemblyInfo.cs +++ b/CUETools/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.0.6.0")] -[assembly: AssemblyFileVersion("2.0.6.0")] +[assembly: AssemblyVersion("2.0.7.0")] +[assembly: AssemblyFileVersion("2.0.7.0")] diff --git a/CUETools/frmCUETools.cs b/CUETools/frmCUETools.cs index 7c78ce2..68b5400 100644 --- a/CUETools/frmCUETools.cs +++ b/CUETools/frmCUETools.cs @@ -741,7 +741,7 @@ namespace JDP { if (useAR || useCUEToolsDB) cueSheet.DataTrackLengthMSF = txtDataTrackLength.Text; if (useCUEToolsDB) - cueSheet.UseCUEToolsDB(false, "CUETools 2.0.6"); + cueSheet.UseCUEToolsDB(false, "CUETools 2.0.7"); if (useAR) cueSheet.UseAccurateRip(); diff --git a/CUETools/frmCUETools.resx b/CUETools/frmCUETools.resx index 28355ed..2ce1053 100644 --- a/CUETools/frmCUETools.resx +++ b/CUETools/frmCUETools.resx @@ -258,26 +258,11 @@ 0 - - Top, Bottom, Left, Right - - - 19 - - - 3, 17 - - - 192, 304 - - - 1 - fileSystemTreeView1 - CUEControls.FileSystemTreeView, CUEControls, Version=2.0.6.0, Culture=neutral, PublicKeyToken=null + CUEControls.FileSystemTreeView, CUEControls, Version=2.0.7.0, Culture=neutral, PublicKeyToken=null grpInput @@ -318,255 +303,9 @@ 3 - - 3 - - - True - - - Fill - - - NoControl - - - 95, 84 - - - 0, 0, 0, 0 - - - 49, 26 - - - 5 - - - 153, 8 - - - Use AccurateRip - - - checkBoxUseAccurateRip - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 0 - - - True - - - Fill - - - NoControl - - - 47, 84 - - - 0, 0, 0, 0 - - - 48, 26 - - - 4 - - - Use FreeDb - - - checkBoxUseFreeDb - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 1 - - - True - - - Fill - - - NoControl - - - 3, 40 - - - 3, 0, 3, 0 - - - 138, 20 - - - 2 - - - &Tracks - - - File per track. Gap handling can be selected in advanced settings. - - - rbTracks - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 2 - - - True - - - Fill - - - NoControl - - - 3, 0 - - - 3, 0, 3, 0 - - - 138, 20 - - - 0 - - - &Embedded - - - Create single file with embedded CUE sheet. - - - rbEmbedCUE - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 3 - - - True - - - Fill - - - NoControl - - - 3, 20 - - - 3, 0, 3, 0 - - - 138, 20 - - - 1 - - - Image + CUE - - - Create single file + CUE sheet - - - rbSingleFile - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelCUEStyle - - - 4 - - - True - - - Fill - - - NoControl - - - 0, 84 - - - 0, 0, 0, 0 - - - 47, 26 - - - 3 - - - Use MusicBrainz - - - checkBoxUseMusicBrainz - - - 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 @@ -582,72 +321,6 @@ <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="checkBoxUseAccurateRip" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="checkBoxUseFreeDb" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /><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="checkBoxUseMusicBrainz" Row="4" RowSpan="1" Column="0" 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 - - - False - - - 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 - - - 3, 0, 1, 0 - - - 144, 110 - - - 20 - toolStripCorrectorFormat @@ -660,57 +333,6 @@ 1 - - 2 - - - True - - - Fill - - - NoControl - - - 3, 3 - - - 45, 29 - - - 0 - - - checkBoxVerifyUseCDRepair - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tableLayoutPanelVerifyMode - - - 0 - - - Fill - - - 3, 17 - - - 2 - - - 144, 110 - - - 2 - - - Use CUETools database - tableLayoutPanelVerifyMode @@ -1098,6 +720,9 @@ 9 + + 153, 8 + Audio file format @@ -1170,9 +795,1059 @@ 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 + + + 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="numericWriteOffset" Row="2" RowSpan="1" Column="1" 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" /></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, 451 + + + 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, 451 + + + toolStripContainer1.ContentPanel + + + System.Windows.Forms.ToolStripContentPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + toolStripContainer1 + + + 0 + + + Fill + + + 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.0.7.0, Culture=neutral, PublicKeyToken=null + + + grpInput + + + 0 + + + 3 + + + checkBoxUseAccurateRip + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelCUEStyle + + + 0 + + + checkBoxUseFreeDb + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelCUEStyle + + + 1 + + + rbTracks + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelCUEStyle + + + 2 + + + rbEmbedCUE + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelCUEStyle + + + 3 + + + rbSingleFile + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelCUEStyle + + + 4 + + + checkBoxUseMusicBrainz + + + 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="checkBoxUseAccurateRip" Row="4" RowSpan="1" Column="2" ColumnSpan="1" /><Control Name="checkBoxUseFreeDb" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /><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="checkBoxUseMusicBrainz" Row="4" RowSpan="1" Column="0" 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 + + + Fill + + + NoControl + + + 95, 84 + + + 0, 0, 0, 0 + + + 49, 26 + + + 5 + + + Use AccurateRip + + + checkBoxUseAccurateRip + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelCUEStyle + + + 0 + + + True + + + Fill + + + NoControl + + + 47, 84 + + + 0, 0, 0, 0 + + + 48, 26 + + + 4 + + + Use FreeDb + + + checkBoxUseFreeDb + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelCUEStyle + + + 1 + + + True + + + Fill + + + NoControl + + + 3, 40 + + + 3, 0, 3, 0 + + + 138, 20 + + + 2 + + + &Tracks + + + File per track. Gap handling can be selected in advanced settings. + + + rbTracks + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelCUEStyle + + + 2 + + + True + + + Fill + + + NoControl + + + 3, 0 + + + 3, 0, 3, 0 + + + 138, 20 + + + 0 + + + &Embedded + + + Create single file with embedded CUE sheet. + + + rbEmbedCUE + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelCUEStyle + + + 3 + + + True + + + Fill + + + NoControl + + + 3, 20 + + + 3, 0, 3, 0 + + + 138, 20 + + + 1 + + + Image + CUE + + + Create single file + CUE sheet + + + rbSingleFile + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelCUEStyle + + + 4 + + + True + + + Fill + + + NoControl + + + 0, 84 + + + 0, 0, 0, 0 + + + 47, 26 + + + 3 + + + Use MusicBrainz + + + checkBoxUseMusicBrainz + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelCUEStyle + + + 5 + + + 3, 17 + + + False + + + Fill + + + 3, 17 + + + 3, 0, 1, 0 + + + 144, 110 + + + 20 + + + toolStripCorrectorFormat + + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBoxMode + + + 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 + + + 2 + + + checkBoxVerifyUseCDRepair + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelVerifyMode + + + 0 + + + Fill + + + 3, 17 + + + 2 + + + 144, 110 + + + 2 + + + Use CUETools database + + + 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="checkBoxVerifyUseCDRepair" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,36,11111,Percent,63,88889" /><Rows Styles="Percent,32,72727,Percent,67,27273" /></TableLayoutSettings> + + + True + + + Fill + + + NoControl + + + 3, 3 + + + 45, 29 + + + 0 + + + checkBoxVerifyUseCDRepair + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanelVerifyMode + + + 0 + + + 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 + + + 0, 0, 0, 0 + + + 3 + + + 468, 72 + + + 14 + + + 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 @@ -1296,45 +1971,6 @@ 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 @@ -1362,45 +1998,51 @@ 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 @@ -1428,65 +2070,38 @@ 5 - - Fill + + 48, 24 - - 3, 17 + + Output: - - 0, 0, 0, 0 + + Magenta - - 3 + + 32, 21 - - 468, 72 + + toolStripSplitButtonOutputBrowser - - 14 + + 143, 22 - - tableLayoutPanelPaths + + Browse - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 143, 22 - - grpOutputPathGeneration + + Manual - - 0 + + 143, 22 - - <?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 + + Use template Top, Left, Right @@ -1647,36 +2262,114 @@ 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 + + labelPregap + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel4 + + + 0 + + + lblWriteOffset + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel4 + + + 1 + + + numericWriteOffset + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel4 + + + 2 + + + txtPreGapLength + + + System.Windows.Forms.MaskedTextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel4 + + + 3 + + + labelDataTrack + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tableLayoutPanel4 + + + 4 + + + txtDataTrackLength + + + System.Windows.Forms.MaskedTextBox, 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="numericWriteOffset" Row="2" RowSpan="1" Column="1" 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" /></Controls><Columns Styles="Percent,56,75676,Percent,43,24324" /><Rows Styles="Percent,33,33333,Percent,33,33333,Percent,33,33333" /></TableLayoutSettings> + True @@ -1881,66 +2574,6 @@ 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="numericWriteOffset" Row="2" RowSpan="1" Column="1" 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" /></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 @@ -2079,161 +2712,17 @@ 3 - - Fill + + Magenta - - 338, 301 + + 73, 22 - - 12, 3, 12, 3 + + default - - 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, 451 - - - 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, 451 - - - toolStripContainer1.ContentPanel - - - System.Windows.Forms.ToolStripContentPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - toolStripContainer1 - - - 0 - - - Fill - - - 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 + + Profile 100, 23 @@ -2259,18 +2748,6 @@ default - - Magenta - - - 73, 22 - - - default - - - Profile - 6, 25 @@ -2313,54 +2790,18 @@ 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 + + 206, 76 + + + contextMenuStripFileTree + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + False @@ -2385,15 +2826,6 @@ Reset to original location - - 206, 76 - - - contextMenuStripFileTree - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - True @@ -2810,7 +3242,7 @@ 700, 538 - CUETools 2.0.6 + CUETools 2.0.7 toolStripStatusLabel1