Esempio n. 1
0
 private void button3_Click(object sender, EventArgs e)
 {
     using (GetMapsForm dlg = new GetMapsForm(_mapsPlugin))
     {
         if (dlg.ShowDialog() == DialogResult.OK)
         {
             if (dlg.DownloadedFile != null)
             {
                 this.Cursor = Cursors.WaitCursor;
                 try
                 {
                     string dst = System.IO.Path.Combine(textBox1.Text, dlg.DownloadedFileName);
                     if (System.IO.File.Exists(dst))
                     {
                         System.IO.File.Delete(dst);
                     }
                     System.IO.File.Move(dlg.DownloadedFile.Path, dst);
                     loadMaps();
                 }
                 catch
                 {
                 }
                 this.Cursor = Cursors.Default;
             }
         }
     }
 }
Esempio n. 2
0
 private void button3_Click(object sender, EventArgs e)
 {
     using (GetMapsForm dlg = new GetMapsForm(_mapsPlugin))
     {
         if (dlg.ShowDialog() == DialogResult.OK)
         {
             if (dlg.DownloadedFile != null)
             {
                 this.Cursor = Cursors.WaitCursor;
                 try
                 {
                     string dst = System.IO.Path.Combine(textBox1.Text, dlg.DownloadedFileName);
                     if (System.IO.File.Exists(dst))
                     {
                         System.IO.File.Delete(dst);
                     }
                     System.IO.File.Move(dlg.DownloadedFile.Path, dst);
                     loadMaps();
                 }
                 catch
                 {
                 }
                 this.Cursor = Cursors.Default;
             }
         }
     }
 }