Esempio n. 1
0
        private void buttonBrowseInput_Click(object sender, EventArgs e)
        {
            using (var folderBrowser = new ModernFolderBrowserDialog.FolderBrowser(Models.Settings.IsUnderWine))
            {
                while (true)
                {
                    if (folderBrowser.ShowDialog() != DialogResult.OK)
                    {
                        return;
                    }

                    if (folderBrowser.SelectedPath.StartsWith(Environment.GetEnvironmentVariable("windir")))
                    {
                        MessageBox.Show("The selected path is not allowed, please choose a different one.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }

                    else
                    {
                        break;
                    }
                }

                textBoxInputDir.Text = folderBrowser.SelectedPath;
            }
        }
Esempio n. 2
0
 private void buttonBrowseOutput_Click(object sender, EventArgs e)
 {
     using (var folderBrowser = new ModernFolderBrowserDialog.FolderBrowser(Models.Settings.IsUnderWine))
     {
         if (folderBrowser.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         textBoxOutput.Text = folderBrowser.SelectedPath;
     }
 }
Esempio n. 3
0
 private void buttonFile_Click(object sender, EventArgs e)
 {
     if (directoryMode)
     {
         if (folderDialog.ShowDialog() == DialogResult.OK)
         {
             inputFile.Text = folderDialog.SelectedPath;
         }
     }
     else
     {
         if (fileDialog.ShowDialog() == DialogResult.OK)
         {
             inputFile.Text = fileDialog.FileName;
         }
     }
 }