Exemple #1
0
        private void changeCharacter_Click(object sender, EventArgs e)
        {
            CharacterSelection charSelection = new CharacterSelection("Select testing character", characterName.Text);

            charSelection.FormClosed += (object s, FormClosedEventArgs fcea) =>
            {
                string result = charSelection.GetResult();

                if (result != "")
                {
                    LoadCharacter(result);
                }
            };

            charSelection.ShowDialog();
        }
Exemple #2
0
        private void selectCharacter_Click(object sender, EventArgs e)
        {
            if (current == null)
            {
                return;
            }

            CharacterSelection charSelection = new CharacterSelection("Select character for NPC '" + current.name + "'", currentProfile.character);

            charSelection.FormClosed += (object s, FormClosedEventArgs fcea) =>
            {
                string result = charSelection.GetResult();

                if (result != "")
                {
                    currentProfile.character = result;
                    characterName.Text       = "Character: " + result;
                }
            };

            charSelection.ShowDialog();
        }