/// <summary>
        /// Characters toolbar > Delete...
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void deleteCharacterMenu_Click(object sender, EventArgs e)
        {
            // Retrieve the selected URI character
            if (charactersListView.SelectedItems.Count == 0)
            {
                return;
            }

            ListViewItem item      = charactersListView.SelectedItems[0];
            Character    character = item.Tag as Character;

            // Opens the character deletion
            using (CharacterDeletionWindow window = new CharacterDeletionWindow(character))
            {
                window.ShowDialog(this);
            }
        }
        /// <summary>
        /// Characters toolbar > Delete...
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void deleteCharacterMenu_Click(object sender, EventArgs e)
        {
            // Retrieve the selected URI character
            if (charactersListView.SelectedItems.Count == 0)
                return;

            ListViewItem item = charactersListView.SelectedItems[0];
            Character character = item.Tag as Character;

            // Opens the character deletion
            using (CharacterDeletionWindow window = new CharacterDeletionWindow(character))
            {
                window.ShowDialog(this);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// File > Delete Character...
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void deleteCharacterMenu_Click(object sender, EventArgs e)
        {
            Character character = GetCurrentCharacter();
            if (character == null)
                return;

            using (CharacterDeletionWindow window = new CharacterDeletionWindow(character))
            {
                window.ShowDialog(this);
            }

            // Close any open associated windows
            CloseOpenWindowsOf(character);
        }