Esempio n. 1
0
 private void VerifyPath(LauncherPath path, bool throwErrors)
 {
     if (throwErrors && !Directory.Exists(path.GetFullPath()))
     {
         throw new DirectoryNotFoundException(path.GetPossiblyRelativePath());
     }
 }
Esempio n. 2
0
        void browseButton_Click(object sender, EventArgs e)
        {
            LauncherPath        path   = new LauncherPath(m_gameFileDirectory.Text);
            FolderBrowserDialog dialog = new FolderBrowserDialog();

            dialog.SelectedPath = path.GetFullPath();

            if (dialog.ShowDialog(this) == DialogResult.OK)
            {
                path = new LauncherPath(dialog.SelectedPath);
                m_gameFileDirectory.Text = path.GetPossiblyRelativePath();
            }
        }
Esempio n. 3
0
        private void VerifyPath(LauncherPath path, bool throwErrors)
        {
            bool exists = Directory.Exists(path.GetFullPath());

            if (throwErrors && !exists)
            {
                throw new DirectoryNotFoundException(path.GetPossiblyRelativePath());
            }

            if (!exists)
            {
                Directory.CreateDirectory(path.GetFullPath());
            }
        }