Ejemplo n.º 1
0
        /// <summary>
        /// Add a creature type record
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddCreatureType_Click(object sender, RoutedEventArgs e)
        {
            var typeForm = new frmAddEditCreatureType(_creatureTypeManager);
            var result   = typeForm.ShowDialog();

            if (result == true)
            {
                refreshCreatureTypeList();
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Edit the selected creature type record
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnEditCreatureType_Click(object sender, RoutedEventArgs e)
 {
     if (this.dgCreatureTypes.SelectedItems.Count > 0)
     {
         var typeForm = new frmAddEditCreatureType(_creatureTypeManager, CreatureTypeForm.Edit, (CreatureType)this.dgCreatureTypes.SelectedItem);
         var result   = typeForm.ShowDialog();
         if (result == true)
         {
             refreshCreatureTypeList();
             refreshCreatureList();
         }
     }
     else
     {
         MessageBox.Show("You must select a creature type!");
     }
 }