Ejemplo n.º 1
0
 private void Form1_DragEnter(object sender, DragEventArgs e)
 {
     if (e.Data.GetDataPresent(DataFormats.FileDrop))
     {
         DragandDropICON.BringToFront();
         DragandDropICON.Show();
         e.Effect = DragDropEffects.Copy;
     }
 }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
 private void Form1_DragLeave(object sender, EventArgs e)
 {
     DragandDropICON.Hide();
 }