Beispiel #1
0
 private void SelectPathClicked(object sender, EventArgs e)
 {
     if (BrowseFolderDialog.ShowDialog() == DialogResult.OK)
     {
         SelectedFilePath.Text = BrowseFolderDialog.SelectedPath;
     }
 }
Beispiel #2
0
        private void OutputFolderBrowseButton_Click(object sender, EventArgs e)
        {
            BrowseFolderDialog.SelectedPath = OutputFolderTextBox.Text;
            DialogResult res = BrowseFolderDialog.ShowDialog();

            if (res == DialogResult.OK)
            {
                OutputFolderTextBox.Text = BrowseFolderDialog.SelectedPath;
            }
        }
        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);
                }
            }
        }
        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);
                }
            }
        }
Beispiel #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;
                }
            }
        }
Beispiel #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;
                }
            }
        }
Beispiel #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()));
                }
            }
        }
        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);
                    }
                }
            }
        }