private void Form1_DragDrop(object sender, DragEventArgs e) { DragandDropICON.Hide(); string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); foreach (var path1 in files) { MainOpenFileDialog.FileName = path1; ROM = File.ReadAllBytes(path1); MaxByte = ROM.Length - 1; StartByteNumb.Maximum = MaxByte; StartByteTrackBar.Maximum = MaxByte; EndByteTrackbar.Maximum = MaxByte; EndByteTrackbar.Value = MaxByte; EndByteNumb.Maximum = MaxByte; EndByteNumb.Value = MaxByte; FileSelectiontxt.Text = path1; SaveasTxt.Text = path1; var exc = Path.GetExtension(path1); SaveasTxt.Text = SaveasTxt.Text.Replace(Path.GetFileName(path1), "CorruptedFile" + exc); backupROM = ROM; MainSaveFileDialog.FileName = Path.GetDirectoryName(SaveasTxt.Text); } }
private void Form1_DragLeave(object sender, EventArgs e) { DragandDropICON.Hide(); }