コード例 #1
0
 private void SelectPathClicked(object sender, EventArgs e)
 {
     if (BrowseFolderDialog.ShowDialog() == DialogResult.OK)
     {
         SelectedFilePath.Text = BrowseFolderDialog.SelectedPath;
     }
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: keremsonmez/OpenMapTools
        private void OutputFolderBrowseButton_Click(object sender, EventArgs e)
        {
            BrowseFolderDialog.SelectedPath = OutputFolderTextBox.Text;
            DialogResult res = BrowseFolderDialog.ShowDialog();

            if (res == DialogResult.OK)
            {
                OutputFolderTextBox.Text = BrowseFolderDialog.SelectedPath;
            }
        }
コード例 #3
0
        private void button_ChangeLevelsPath_Click(object sender, EventArgs e)
        {
            using (BrowseFolderDialog dialog = new BrowseFolderDialog())
            {
                dialog.Title = "Choose a new /Levels/ folder for the project";

                if (dialog.ShowDialog(this) == DialogResult.OK)
                {
                    _ide.ChangeLevelsFolder(dialog.Folder);
                }
            }
        }
コード例 #4
0
        private void button_OpenFolder_Click(object sender, EventArgs e)
        {
            using (BrowseFolderDialog dialog = new BrowseFolderDialog())
            {
                dialog.Title = "Select the folder of the plugin you want to install";

                if (dialog.ShowDialog(this) == DialogResult.OK)
                {
                    InstallPluginIntoTombIDE(dialog.Folder);
                }
            }
        }
コード例 #5
0
        private void button_BrowseLevels_Click(object sender, EventArgs e)
        {
            using (BrowseFolderDialog dialog = new BrowseFolderDialog())
            {
                dialog.Title = "Choose a /Levels/ folder for the project";

                if (dialog.ShowDialog(this) == DialogResult.OK)
                {
                    textBox_LevelsPath.Text = dialog.Folder;
                }
            }
        }
コード例 #6
0
        private void button_BrowseScript_Click(object sender, EventArgs e)
        {
            using (BrowseFolderDialog dialog = new BrowseFolderDialog())
            {
                dialog.Title = "Select an existing /Script/ folder for the project";

                if (dialog.ShowDialog(this) == DialogResult.OK)
                {
                    textBox_ScriptPath.Text = dialog.Folder;
                }
            }
        }
コード例 #7
0
        private void button_BrowseProject_Click(object sender, EventArgs e)
        {
            using (BrowseFolderDialog dialog = new BrowseFolderDialog())
            {
                dialog.Title = "Choose where you want to install your project";

                if (dialog.ShowDialog(this) == DialogResult.OK)
                {
                    textBox_ProjectPath.Text = Path.Combine(dialog.Folder, PathHelper.RemoveIllegalPathSymbols(textBox_ProjectName.Text.Trim()));
                }
            }
        }
コード例 #8
0
        private void button_ChangeScriptPath_Click(object sender, EventArgs e)
        {
            using (BrowseFolderDialog dialog = new BrowseFolderDialog())
            {
                dialog.Title = "Choose a new /Script/ folder for the project";

                if (dialog.ShowDialog(this) == DialogResult.OK)
                {
                    try
                    {
                        if (!File.Exists(Path.Combine(dialog.Folder, "script.txt")))
                        {
                            throw new ArgumentException("Selected /Script/ folder does not contain a Script.txt file.");
                        }

                        _ide.ChangeScriptFolder(dialog.Folder);
                    }
                    catch (Exception ex)
                    {
                        DarkMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
            }
        }