Advertisement
Guest User

Untitled

a guest
Mar 31st, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.35 KB | None | 0 0
  1.         private void button1_Click(object sender, EventArgs e)
  2.         {
  3.             folderBrowserDialog1.ShowDialog();
  4.             textBoxFolder.Text = folderBrowserDialog1.SelectedPath;
  5.         }
  6.  
  7.         private void MoveFolders()
  8.         {
  9.             string sourceDir = Config.GetGamePath();
  10.             string destinationDir = textBoxFolder.Text;
  11.             try
  12.             {
  13.                 if (Directory.Exists(sourceDir) == true)
  14.                 {
  15.                     if (bGameIsInstalled == true && textBoxFolder.TextLength > 0)
  16.                     {
  17.                         Directory.Move(sourceDir, destinationDir);
  18.                         bMoveFolders = true;
  19.                     }
  20.                     else
  21.                     {
  22.                         //// Could provide the user the option to delete the existing directory
  23.                         // before moving the source directory
  24.                         MessageBox.Show("Select Arma 3 directory before starting game");
  25.                     }
  26.                 }
  27.                 else
  28.                 {
  29.                     // Do somthing about source directory not existing -
  30.                 }
  31.             }
  32.             catch (Exception ex)
  33.             {
  34.                 //TODO: Handle the execption that has been thrown will do this on launcher update
  35.             }
  36.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement