void UpdateCue()
        {
            if (boundDisc == null)
            {
                txtCuePreview.Text = "";
                return;
            }

            var cueBin = boundDisc.DumpCueBin(boundDiscRecord.BaseName, GetCuePrefs());

            txtCuePreview.Text = cueBin.cue.Replace("\n", "\r\n");
        }
        private void handleDragDrop(object sender, DragEventArgs e)
        {
            List <string> files = validateDrop(e.Data);

            if (files.Count == 0)
            {
                return;
            }
            try
            {
                foreach (var file in files)
                {
                    Disc   disc     = Disc.FromCuePath(file, new CueBinPrefs());
                    string baseName = Path.GetFileNameWithoutExtension(file);
                    baseName += "_hawked";
                    var prefs = GetCuePrefs();
                    prefs.ReallyDumpBin = true;
                    var cueBin = disc.DumpCueBin(baseName, GetCuePrefs());
                    Dump(cueBin, Path.GetDirectoryName(file), prefs);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "oops! error");
                throw;
            }
        }
Exemple #3
0
        private void lblMagicDragArea_DragDrop(object sender, DragEventArgs e)
        {
            List <string> files = validateDrop(e.Data);

            if (files.Count == 0)
            {
                return;
            }
            try
            {
                foreach (var file in files)
                {
                    var    prefs = GetCuePrefs();
                    string ext   = Path.GetExtension(file).ToUpper();
                    Disc   disc  = null;
                    if (ext == ".ISO")
                    {
                        disc = Disc.FromIsoPath(file);
                    }
                    else if (ext == ".CUE")
                    {
                        disc = Disc.FromCuePath(file, prefs);
                    }
                    else if (ext == ".CCD")
                    {
                        disc = Disc.FromCCDPath(file);
                    }
                    string baseName = Path.GetFileNameWithoutExtension(file);
                    baseName           += "_hawked";
                    prefs.ReallyDumpBin = true;
                    var cueBin = disc.DumpCueBin(baseName, GetCuePrefs());
                    Dump(cueBin, Path.GetDirectoryName(file), prefs);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "oops! error");
                throw;
            }
        }