private void Change_Click(object sender, RoutedEventArgs e)
        {
            selected = (Species)dgrMain.SelectedItem;
            if (selected != null)
            {
                SpeciesWindow sw = new SpeciesWindow();
                sw.selected_etiquettes = selected.selected_etiquettes;
                sw.Show();
                sw.Name_tf.Text           = selected.Species_Name;
                sw.Species_Mark.Text      = selected.Mark;
                sw.Species_Mark.IsEnabled = false;
                sw.Income_tf.Text         = selected.Income.ToString();
                sw.Description_tf.Text    = selected.Species_Description;
                if (selected.Species_Dangerous)
                {
                    sw.DangerousYes.IsChecked = true;
                }
                if (selected.Species_Red)
                {
                    sw.RedListYes.IsChecked = true;
                }
                if (selected.Species_Settled)
                {
                    sw.SettledYes.IsChecked = true;
                }
                sw.Toursistic_Status.Text = selected.Species_Touristic;
                sw.Endange_Status.Text    = selected.Species_Endange;

                sw.Species_Icon.Source = selected.Species_Image.Source;
                sw.Reset.Content       = "Cancel";
                sw.DatePicker.Text     = selected.Discovered;

                sw.Type_tf.Text = selected.Species_Type;


                this.Close();
            }
            else
            {
                MessageBox.Show("First you have to choose type!");
            }
        }
Esempio n. 2
0
        //Aktions
        private void New_Species_Click(object sender, RoutedEventArgs e)
        {
            SpeciesWindow speciesWindow = new SpeciesWindow();

            speciesWindow.Show();
        }