Beispiel #1
0
        /* Add a new string */
        private void AddString_Click(object sender, EventArgs e)
        {
            var newStringID = Interaction.InputBox("Unique string identifier to reference this string by. This cannot be edited after creation!", "Adding a new localised string...", "GAME_STRING_01");

            if (newStringID != "")
            {
                //Open editor window
                LocalisationNewString editor = new LocalisationNewString(gameFolder, newStringID);
                editor.Show();
                editor.FormClosed += new FormClosedEventHandler(stringEditorClosed);
            }
        }
Beispiel #2
0
        /* Edit selected string */
        private void EditString_Click(object sender, EventArgs e)
        {
            if (StringIdentifierList.SelectedIndex != -1)
            {
                //Disable inputs and open editor
                StringIdentifierList.Enabled = false;
                StringList.Enabled           = false;

                LocalisationNewString editor = new LocalisationNewString(gameFolder, StringIdentifierList.SelectedItem.ToString(), LanguageSelect.SelectedIndex);
                editor.Show();
                editor.FormClosed += new FormClosedEventHandler(stringEditorClosed);
            }
            else
            {
                MessageBox.Show("Nothing selected!\nPlease select a string from the list to edit.", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }