コード例 #1
0
        /// <summary>
        /// Add Link Button is pressed
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LinkMove_Button_Click(object sender, RoutedEventArgs e)
        {
            Move_Link link = new Move_Link();   // Create a new MoveLink Window to create a link with
            bool?     add  = link.ShowDialog(); // Shows the Link Window, Creates a Dialog to return true if it added successfully

            if (add == true)
            {
                Moves_List.Items.Add(link.LinkData);// Add MoveLink to list if not canceled
            }
        }
コード例 #2
0
        /// <summary>
        /// Edit Link Button is pressed
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void EditLinkMove_Button_Click(object sender, RoutedEventArgs e)
        {
            if (Moves_List.SelectedItem == null)
            {
                return;
            }                                                                                         // Returns if selection is null

            Move_Link link = new Move_Link((VPTU.Pokedex.Pokemon.Link_Moves)Moves_List.SelectedItem); // Creates a new MoveLink Window to modify link with

            link.ShowDialog();                                                                        // Shows the Link Window
        }