Exemple #1
0
        private void lblMagicDragArea_DragDrop(object sender, DragEventArgs e)
        {
            List <string> files = validateDrop(e.Data);

            if (files.Count == 0)
            {
                return;
            }
            try
            {
                this.Cursor = Cursors.WaitCursor;
                foreach (var file in files)
                {
                    var    disc     = Disc.LoadAutomagic(file);
                    string baseName = Path.GetFileNameWithoutExtension(file);
                    baseName += "_hawked";
                    string outfile = Path.Combine(Path.GetDirectoryName(file), baseName) + ".ccd";
                    CCD_Format.Dump(disc, outfile);
                }
                this.Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "oops! error");
                throw;
            }
        }
Exemple #2
0
        private void lblMagicDragArea_DragDrop(object sender, DragEventArgs e)
        {
            List <string> files = ValidateDrop(e.Data);

            if (files.Count == 0)
            {
                return;
            }
            try
            {
                Cursor = Cursors.WaitCursor;
                foreach (var file in files)
                {
                    var job = new DiscMountJob {
                        IN_FromPath = file
                    };
                    job.Run();
                    var disc = job.OUT_Disc;
                    if (job.OUT_ErrorLevel)
                    {
                        MessageBox.Show(job.OUT_Log, "Error loading disc");
                        break;
                    }

                    string baseName = Path.GetFileNameWithoutExtension(file);
                    baseName += "_hawked";
                    string outfile = $"{Path.Combine(Path.GetDirectoryName(file), baseName)}.ccd";
                    CCD_Format.Dump(disc, outfile);
                }

                Cursor = Cursors.Default;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "Error loading disc");
                throw;
            }
        }